35 #include "RunAction.hh"
36 #include "HistoManager.hh"
61 fSumEAbs = fSum2EAbs =fSumEGap = fSum2EGap = 0.;
62 fSumLAbs = fSum2LAbs =fSumLGap = fSum2LGap = 0.;
66 fHistoManager->
book();
76 fSumEAbs += EAbs; fSum2EAbs += EAbs*EAbs;
77 fSumEGap += EGap; fSum2EGap += EGap*EGap;
79 fSumLAbs += LAbs; fSum2LAbs += LAbs*LAbs;
80 fSumLGap += LGap; fSum2LGap += LGap*LGap;
88 if (NbOfEvents == 0)
return;
92 fSumEAbs /= NbOfEvents; fSum2EAbs /= NbOfEvents;
93 G4double rmsEAbs = fSum2EAbs - fSumEAbs*fSumEAbs;
94 if (rmsEAbs >0.) rmsEAbs = std::sqrt(rmsEAbs);
else rmsEAbs = 0.;
96 fSumEGap /= NbOfEvents; fSum2EGap /= NbOfEvents;
97 G4double rmsEGap = fSum2EGap - fSumEGap*fSumEGap;
98 if (rmsEGap >0.) rmsEGap = std::sqrt(rmsEGap);
else rmsEGap = 0.;
100 fSumLAbs /= NbOfEvents; fSum2LAbs /= NbOfEvents;
101 G4double rmsLAbs = fSum2LAbs - fSumLAbs*fSumLAbs;
102 if (rmsLAbs >0.) rmsLAbs = std::sqrt(rmsLAbs);
else rmsLAbs = 0.;
104 fSumLGap /= NbOfEvents; fSum2LGap /= NbOfEvents;
105 G4double rmsLGap = fSum2LGap - fSumLGap*fSumLGap;
106 if (rmsLGap >0.) rmsLGap = std::sqrt(rmsLGap);
else rmsLGap = 0.;
111 <<
"\n--------------------End of Run------------------------------\n"
112 <<
"\n mean Energy in Absorber : " <<
G4BestUnit(fSumEAbs,
"Energy")
114 <<
"\n mean Energy in Gap : " <<
G4BestUnit(fSumEGap,
"Energy")
119 <<
"\n mean trackLength in Absorber : " <<
G4BestUnit(fSumLAbs,
"Length")
121 <<
"\n mean trackLength in Gap : " <<
G4BestUnit(fSumLGap,
"Length")
123 <<
"\n------------------------------------------------------------\n"
129 fHistoManager->
save();