21.1.2011 Kamil Sedlak
This version contains many changes! 1) Optical photon simulation is now possible - some work still may need to be done (e.g. the manual is not updated yet), but it should basically work already now. 2) Changes in the musrSimAna - correction of some bugs (mainly in the coincidence of coincidence and veto detectors) and some other improvements
This commit is contained in:
@ -147,6 +147,16 @@ G4bool musrRootOutput::store_fieldIntegralBz = false;
|
||||
G4bool musrRootOutput::store_fieldIntegralBz1 = false;
|
||||
G4bool musrRootOutput::store_fieldIntegralBz2 = false;
|
||||
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_timeA = true;
|
||||
G4bool musrRootOutput::store_odet_timeB = true;
|
||||
G4bool musrRootOutput::store_odet_timeC = true;
|
||||
G4bool musrRootOutput::store_odet_timeD = true;
|
||||
G4bool musrRootOutput::store_odet_timeE = true;
|
||||
G4bool musrRootOutput::store_odet_timeLast = true;
|
||||
|
||||
|
||||
G4int musrRootOutput::oldEventNumberInG4EqEMFieldWithSpinFunction=-1;
|
||||
|
||||
@ -265,6 +275,19 @@ void musrRootOutput::BeginOfRunAction() {
|
||||
rootTree->Branch("save_poly",&save_poly,"save_poly[save_n]/D");
|
||||
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 ||
|
||||
store_odet_timeC || store_odet_timeD || store_odet_timeE || store_odet_timeLast)
|
||||
{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_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");}
|
||||
if (store_odet_timeD) {rootTree->Branch("odet_timeD",&odet_timeD,"odet_timeD[odet_n]/D");}
|
||||
if (store_odet_timeE) {rootTree->Branch("odet_timeE",&odet_timeE,"odet_timeE[odet_n]/D");}
|
||||
if (store_odet_timeLast) {rootTree->Branch("odet_timeLast",&odet_timeLast,"odet_timeLast[odet_n]/D");}
|
||||
|
||||
// htest1 = new TH1F("htest1","The debugging histogram 1",50,-4.,4.);
|
||||
// htest2 = new TH1F("htest2","The debugging histogram 2",50,0.,3.142);
|
||||
@ -317,7 +340,7 @@ void musrRootOutput::FillEvent() {
|
||||
htest5->Fill(atan2(posIniMomy,posIniMomx));
|
||||
htest6->Fill(atan2(sqrt(posIniMomx*posIniMomx+posIniMomy*posIniMomy),posIniMomz));
|
||||
if (weight>0.) {
|
||||
if ( !((musrParameters::storeOnlyEventsWithHits)&&(det_n<=0)) ) {
|
||||
if ( !((musrParameters::storeOnlyEventsWithHits)&&(det_n<=0)&&(odet_n<=0)) ) {
|
||||
rootTree->Fill();
|
||||
}
|
||||
}
|
||||
@ -349,7 +372,7 @@ void musrRootOutput::ClearAllRootVariables() {
|
||||
BzIntegral1 = -1000; BzIntegral2 = -1000; BzIntegral3 = -1000;
|
||||
det_n=0;
|
||||
save_n=0;
|
||||
|
||||
odet_n=0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@ -498,3 +521,27 @@ void musrRootOutput::SetDetectorInfoVvv (G4int nDetectors,
|
||||
det_VvvParticleID[nDetectors]=particleID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void musrRootOutput::SetOPSAinfo (G4int nDetectors, G4int ID, G4int nPhot, G4double timeFirst, G4double timeA,
|
||||
G4double timeB, G4double timeC, G4double timeD, G4double timeE, G4double timeLast)
|
||||
{
|
||||
if ((nDetectors<0)||(nDetectors>=(odet_nMax-1))) {
|
||||
char message[200];
|
||||
sprintf(message,"musrRootOutput.cc::SetOPSAInfo: nDetectors %i is larger than det_nMax = %i",nDetectors,det_nMax);
|
||||
musrErrorMessage::GetInstance()->musrError(SERIOUS,message,false);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
odet_n=nDetectors+1;
|
||||
odet_ID[nDetectors]=ID;
|
||||
odet_nPhot[nDetectors]=nPhot;
|
||||
odet_timeFirst[nDetectors]=timeFirst/microsecond;
|
||||
odet_timeA[nDetectors]=timeA/microsecond;
|
||||
odet_timeB[nDetectors]=timeB/microsecond;
|
||||
odet_timeC[nDetectors]=timeC/microsecond;
|
||||
odet_timeD[nDetectors]=timeD/microsecond;
|
||||
odet_timeE[nDetectors]=timeE/microsecond;
|
||||
odet_timeLast[nDetectors]=timeLast/microsecond;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user