20.5.2011 Kamil Sedlak

1) Implementation of variables odet_timeSecond and odep_timeThird 
   (optical photons).  Documentatin updated accordingly.
This commit is contained in:
sedlak 2011-05-20 11:52:22 +00:00
parent d1b6c85605
commit 99f7935da9
8 changed files with 46 additions and 22 deletions

Binary file not shown.

View File

@ -1208,8 +1208,8 @@ The list of variables that can be stored in the Root tree:
the photon enters (and not \emph{from} which it comes). This e.g.\ allows one to attach more APDs to one scintillator,
in which case odet\_ID[] will correspond to the volume IDs of individual APDs.
\item{\bf odet\_nPhot[odet\_n]} (array of Int\_t) -- number of photons detected in the given optical photon signal.
\item{\bf odet\_timeFirst[odet\_n], odet\_timeLast[odet\_n]} (array of Double\_t)
-- times, when the the first and last photons contributing to the given signal were detected (odet\_timeFirst and odet\_timeLast).
\item{\bf odet\_timeFirst[odet\_n], odet\_timeSecond[odet\_n], odet\_timeThird[odet\_n], odet\_timeLast[odet\_n]} (array of Double\_t)
-- times, when the the first, second, third and last photons, contributing to the given signal, were detected.
\item{\bf odet\_timeA[odet\_n], odet\_timeB[odet\_n]} (array of Double\_t)
-- time, when the $n^{th}$ photon was detected, where $n$ for \emph{odet\_timeA[i]} is given as \emph{OPSA\_fracA}
multiplied by \emph{odet\_nPhot[i]}. Similarly for \emph{odet\_timeB[i]}.
@ -1517,14 +1517,14 @@ Please let us know your comments and suggestions for further improvement/develop
musrSim program.
\section{Appendix A: Steering file for the simulation}
\begin{verbatim}
# Macro file for seg06.cc
# set detector parameters
# This line fills some space
# This line fills some space
/run/beamOn 2
\end{verbatim}
%\section{Appendix A: Steering file for the simulation}
%\begin{verbatim}
%# Macro file for seg06.cc
%# set detector parameters
%# This line fills some space
%# This line fills some space
%/run/beamOn 2
%\end{verbatim}
\begin{thebibliography}{0}

View File

@ -79,9 +79,10 @@ class musrRootOutput {
G4double ekVertex, G4double xVertex, G4double yVertex, G4double zVertex,
G4int idVolVertex, G4int idProcVertex, G4int idTrackVertex, G4int particleID) ;
void SetOPSAinfo (G4int nDetectors, G4int ID, G4int nPhot, G4double timeFirst, G4double timeA,
G4double timeB, G4double timeC, G4double timeD, G4double timeMean, G4double timeLast,
G4double timeCFD, G4double amplCFD);
void SetOPSAinfo (G4int nDetectors, G4int ID, G4int nPhot, G4double timeFirst, G4double timeSecond,
G4double timeThird, G4double timeA, G4double timeB, G4double timeC, G4double timeD,
G4double timeMean, G4double timeLast, G4double timeCFD, G4double amplCFD);
void SetCFDSpecialInfo (G4int n, G4double time);
void SetSaveDetectorInfo (G4int ID, G4int particleID, G4double ke, G4double x, G4double y, G4double z, G4double time,
@ -218,6 +219,8 @@ class musrRootOutput {
static G4bool store_odet_ID;
static G4bool store_odet_nPhot;
static G4bool store_odet_timeFirst;
static G4bool store_odet_timeSecond;
static G4bool store_odet_timeThird;
static G4bool store_odet_timeA;
static G4bool store_odet_timeB;
static G4bool store_odet_timeC;
@ -327,6 +330,8 @@ class musrRootOutput {
G4int odet_ID[odet_nMax];
G4int odet_nPhot[odet_nMax];
G4double odet_timeFirst[odet_nMax];
G4double odet_timeSecond[odet_nMax];
G4double odet_timeThird[odet_nMax];
G4double odet_timeA[odet_nMax];
G4double odet_timeB[odet_nMax];
G4double odet_timeC[odet_nMax];

View File

@ -33,18 +33,19 @@ class G4HCofThisEvent;
class signalInfo {
public:
signalInfo(G4int id, G4int nP, G4double tFirst,
signalInfo(G4int id, G4int nP, G4double tFirst, G4double tSecond, G4double tThird,
G4double tA, G4double tB, G4double tC, G4double tD, G4double tE, G4double tLast,
G4double tCFD, G4double aCFD, G4double tCFDarray[1000])
{
detID=id; nPhot=nP; timeFirst=tFirst;
detID=id; nPhot=nP; timeFirst=tFirst; timeSecond=tSecond; timeThird=tThird;
timeA=tA; timeB=tB; timeC=tC; timeD=tD; timeE=tE; timeLast=tLast;
timeCFD=tCFD; amplCFD=aCFD;
if (musrRootOutput::store_odet_timeCFDarray) {for(int i=0;i<1000;i++) {timeCFDarray[i]=tCFDarray[i];}}
}
~signalInfo() {}
void transferDataToRoot(musrRootOutput* myRootOut, G4int nn) {
myRootOut->SetOPSAinfo(nn,detID,nPhot,timeFirst,timeA,timeB,timeC,timeD,timeE,timeLast,timeCFD,amplCFD);
myRootOut->SetOPSAinfo(nn,detID,nPhot,timeFirst,timeSecond,timeThird,
timeA,timeB,timeC,timeD,timeE,timeLast,timeCFD,amplCFD);
for (Int_t kk=0; kk<13; kk++) {
for (Int_t ll=0; ll<5; ll++) {
int index = (ll+1)*100+kk;
@ -60,6 +61,8 @@ class signalInfo {
G4int nPhot_refl;
G4int nPhot_other;
G4double timeFirst;
G4double timeSecond;
G4double timeThird;
G4double timeA;
G4double timeB;
G4double timeC;

View File

@ -41,7 +41,7 @@ int main(int argc,char** argv) {
XInitThreads();
G4cout<<"\n\n*************************************************************"<<G4endl;
G4cout<<" musrSim version 1.0.1 released on 19 May 2011"<<G4endl;
G4cout<<" musrSim version 1.0.2 released on 20 May 2011"<<G4endl;
G4cout<<" WWW: http://lmu.web.psi.ch/simulation/index.html"<<G4endl;
// choose the Random engine
// CLHEP::HepRandom::setTheEngine(new CLHEP::RanecuEngine); // the /musr/run/randomOption 2 does not work with RanecuEngine

View File

@ -1181,6 +1181,8 @@ G4VPhysicalVolume* musrDetectorConstruction::Construct() {
if (strcmp(tmpString2,"odet_ID")==0) {musrRootOutput::store_odet_ID = false;}
if (strcmp(tmpString2,"odet_nPhot")==0) {musrRootOutput::store_odet_nPhot = false;}
if (strcmp(tmpString2,"odet_timeFirst")==0) {musrRootOutput::store_odet_timeFirst = false;}
if (strcmp(tmpString2,"odet_timeSecond")==0) {musrRootOutput::store_odet_timeSecond = false;}
if (strcmp(tmpString2,"odet_timeThird")==0) {musrRootOutput::store_odet_timeThird = false;}
if (strcmp(tmpString2,"odet_timeA")==0) {musrRootOutput::store_odet_timeA = false;}
if (strcmp(tmpString2,"odet_timeB")==0) {musrRootOutput::store_odet_timeB = false;}
if (strcmp(tmpString2,"odet_timeC")==0) {musrRootOutput::store_odet_timeC = false;}

View File

@ -152,6 +152,8 @@ G4bool musrRootOutput::store_fieldIntegralBz3 = false;
G4bool musrRootOutput::store_odet_ID = true;
G4bool musrRootOutput::store_odet_nPhot = true;
G4bool musrRootOutput::store_odet_timeFirst = true;
G4bool musrRootOutput::store_odet_timeSecond = true;
G4bool musrRootOutput::store_odet_timeThird = true;
G4bool musrRootOutput::store_odet_timeA = true;
G4bool musrRootOutput::store_odet_timeB = true;
G4bool musrRootOutput::store_odet_timeC = true;
@ -287,12 +289,14 @@ void musrRootOutput::BeginOfRunAction() {
rootTree->Branch("save_polz",&save_polz,"save_polz[save_n]/D");
}
if (store_odet_ID || store_odet_nPhot || store_odet_timeFirst || store_odet_timeA || store_odet_timeB ||
if (store_odet_ID || store_odet_nPhot || store_odet_timeFirst || store_odet_timeSecond || store_odet_timeThird || store_odet_timeA || store_odet_timeB ||
store_odet_timeC || store_odet_timeD || store_odet_timeMean || store_odet_timeLast || store_odet_timeCFD || store_odet_amplCFD)
{rootTree->Branch("odet_n",&odet_n,"odet_n/I");}
if (store_odet_ID) {rootTree->Branch("odet_ID",&odet_ID,"odet_ID[odet_n]/I");}
if (store_odet_nPhot) {rootTree->Branch("odet_nPhot",&odet_nPhot,"odet_nPhot[odet_n]/I");}
if (store_odet_timeFirst) {rootTree->Branch("odet_timeFirst",&odet_timeFirst,"odet_timeFirst[odet_n]/D");}
if (store_odet_timeSecond) {rootTree->Branch("odet_timeSecond",&odet_timeSecond,"odet_timeSecond[odet_n]/D");}
if (store_odet_timeThird) {rootTree->Branch("odet_timeThird",&odet_timeThird,"odet_timeThird[odet_n]/D");}
if (store_odet_timeA) {rootTree->Branch("odet_timeA",&odet_timeA,"odet_timeA[odet_n]/D");}
if (store_odet_timeB) {rootTree->Branch("odet_timeB",&odet_timeB,"odet_timeB[odet_n]/D");}
if (store_odet_timeC) {rootTree->Branch("odet_timeC",&odet_timeC,"odet_timeC[odet_n]/D");}
@ -604,8 +608,9 @@ void musrRootOutput::SetDetectorInfoVvv (G4int nDetectors,
}
void musrRootOutput::SetOPSAinfo (G4int nDetectors, G4int ID, G4int nPhot, G4double timeFirst, G4double timeA,
G4double timeB, G4double timeC, G4double timeD, G4double timeMean, G4double timeLast, G4double timeCFD, G4double amplCFD)
void musrRootOutput::SetOPSAinfo (G4int nDetectors, G4int ID, G4int nPhot, G4double timeFirst,
G4double timeSecond, G4double timeThird, G4double timeA, G4double timeB, G4double timeC,
G4double timeD, G4double timeMean, G4double timeLast, G4double timeCFD, G4double amplCFD)
{
if ((nDetectors<0)||(nDetectors>=(odet_nMax-1))) {
char message[200];
@ -618,6 +623,8 @@ void musrRootOutput::SetOPSAinfo (G4int nDetectors, G4int ID, G4int nPhot, G4
odet_ID[nDetectors]=ID;
odet_nPhot[nDetectors]=nPhot;
odet_timeFirst[nDetectors]=timeFirst/microsecond;
odet_timeSecond[nDetectors]=timeSecond/microsecond;
odet_timeThird[nDetectors]=timeThird/microsecond;
odet_timeA[nDetectors]=timeA/microsecond;
odet_timeB[nDetectors]=timeB/microsecond;
odet_timeC[nDetectors]=timeC/microsecond;

View File

@ -584,6 +584,8 @@ void musrScintSD::EndOfEvent_OptiacalPhotons() {
Double_t time = -1000, lastTime = -1000;
G4int OPSA_nPhot = 0;
G4double OPSA_timeFirst = -1000000;
G4double OPSA_timeSecond = -1000000;
G4double OPSA_timeThird = -1000000;
G4double OPSA_timeA = -1000000;
G4double OPSA_timeB = -1000000;
G4double OPSA_timeC = -1000000;
@ -660,6 +662,8 @@ void musrScintSD::EndOfEvent_OptiacalPhotons() {
G4double timePhot = it3->first;
// if (APDcellsTimeVariationRequested) timePhot += G4RandGauss::shoot(0,APDcellsTimeVariationSigma); // Shifted above
if (nP==1) OPSA_timeFirst = timePhot;
if (nP==2) OPSA_timeSecond= timePhot;
if (nP==3) OPSA_timeThird = timePhot;
if (nP==NA) OPSA_timeA = timePhot;
if (nP==NB) OPSA_timeB = timePhot;
if (nP==OPSA_nPhot) OPSA_timeLast = timePhot;
@ -772,12 +776,15 @@ void musrScintSD::EndOfEvent_OptiacalPhotons() {
}
}
signalInfo* mySignalInfo = new signalInfo(OPSA_detID,OPSA_nPhot,OPSA_timeFirst,OPSA_timeA,OPSA_timeB,OPSA_timeC,
OPSA_timeD,OPSA_timeMean,OPSA_timeLast,OPSA_CFD_time,OPSA_CFD_ampl,timeCFDarray);
signalInfo* mySignalInfo = new signalInfo(OPSA_detID,OPSA_nPhot,OPSA_timeFirst,OPSA_timeSecond,OPSA_timeThird,
OPSA_timeA,OPSA_timeB,OPSA_timeC,OPSA_timeD,OPSA_timeMean,OPSA_timeLast,
OPSA_CFD_time,OPSA_CFD_ampl,timeCFDarray);
OPSA_signal_Map.insert(std::pair<G4int,signalInfo*>(OPSA_nPhot,mySignalInfo) );
}
OPSA_nPhot = 0;
OPSA_timeFirst = -1000000;
OPSA_timeSecond = -1000000;
OPSA_timeThird = -1000000;
OPSA_timeA = -1000000;
OPSA_timeB = -1000000;
OPSA_timeC = -1000000;