24.3.2010 Kamil Sedlak

New variable "timeToNextEvent" added in order to simulate time differences between subsequent events.
	1)  /gun/meanarrivaltime meanArrivalTime (defines the mean time difference betweent 
                                                  the subsequent events).
        2)  timeToNextEvent - new variable written out to the root tree.

   This new variable is needed for the pile-up studies
This commit is contained in:
2010-03-24 16:21:08 +00:00
parent 29e49736ea
commit d308d597bd
9 changed files with 48 additions and 17 deletions

View File

@ -68,6 +68,7 @@ musrRootOutput* musrRootOutput::GetRootInstance() {
G4bool musrRootOutput::store_runID = true;
G4bool musrRootOutput::store_eventID = true;
G4bool musrRootOutput::store_weight = true;
G4bool musrRootOutput::store_timeToNextEvent = true;
G4bool musrRootOutput::store_BFieldAtDecay = true;
G4bool musrRootOutput::store_muIniTime = true;
G4bool musrRootOutput::store_muIniPosX = true;
@ -161,6 +162,7 @@ void musrRootOutput::BeginOfRunAction() {
if (store_runID) {rootTree->Branch("runID",&runID_t,"runID/I");}
if (store_eventID) {rootTree->Branch("eventID",&eventID_t,"eventID/I");}
if (store_weight) {rootTree->Branch("weight",&weight_t,"weight/D");}
if (store_timeToNextEvent){rootTree->Branch("timeToNextEvent",&timeToNextEvent_t,"timeToNextEvent/D");}
if (store_BFieldAtDecay) {rootTree->Branch("BFieldAtDecay",&B_t,"Bx/D:By:Bz:B3:B4:B5");}
if (store_muIniTime) {rootTree->Branch("muIniTime",&muIniTime_t,"muIniTime/D");}
if (store_muIniPosX) {rootTree->Branch("muIniPosX",&muIniPosX_t,"muIniPosX/D");}
@ -327,6 +329,7 @@ void musrRootOutput::ClearAllRootVariables() {
runID_t=-1000;
eventID_t=-1000;
weight_t=1.;
timeToNextEvent_t = -1000;
B_t[0]=-1000.;B_t[1]=-1000.;B_t[2]=-1000.;B_t[3]=-1000.;B_t[4]=-1000.;B_t[5]=-1000.;
muIniTime_t=-1000;
muIniPosX_t=-1000; muIniPosY_t=-1000; muIniPosZ_t=-1000;