35 #include "DetectorConstruction.hh"
36 #include "EventAction.hh"
47 fEdeposit(0.), fEdeposit2(0.),
48 fTrackLen(0.), fTrackLen2(0.),
49 fProjRange(0.), fProjRange2(0.),
50 fNbOfSteps(0), fNbOfSteps2(0),
51 fStepSize(0.), fStepSize2(0.)
53 for (
G4int i=0; i<3; ++i) fStatus[i] = 0;
55 fCsdaRange[i] = 0.; fXfrontNorm[i] = 0.;
69 std::ios::fmtflags mode =
G4cout.flags();
70 G4cout.setf(std::ios::fixed,std::ios::floatfield);
74 G4double rms = fEdeposit2 - fEdeposit*fEdeposit;
75 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
79 <<
"\n Total Energy deposited = " <<
G4BestUnit(fEdeposit,
"Energy")
86 rms = fTrackLen2 - fTrackLen*fTrackLen;
87 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
91 <<
"\n Track length of primary track = " <<
G4BestUnit(fTrackLen,
"Length")
99 <<
"\n Range from EmCalculator = " <<
G4BestUnit(fCsdaRange[1],
"Length")
100 <<
" (from full dE/dx)" <<
G4endl;
106 rms = fProjRange2 - fProjRange*fProjRange;
107 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
110 <<
"\n Projected range = " <<
G4BestUnit(fProjRange,
"Length")
117 G4double fNbSteps = fNbOfSteps/dNofEvents,
118 fNbSteps2 = fNbOfSteps2/dNofEvents;
119 rms = fNbSteps2 - fNbSteps*fNbSteps;
120 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
123 G4cout <<
"\n Nb of steps of primary track = " << fNbSteps <<
" +- " << rms;
126 rms = fStepSize2 - fStepSize*fStepSize;
127 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
131 <<
"\t Step size= " <<
G4BestUnit(fStepSize,
"Length")
138 G4double transmit = 100.*fStatus[1]/dNofEvents;
139 G4double reflected = 100.*fStatus[2]/dNofEvents;
143 <<
"\n absorbed = " << absorbed <<
" %"
144 <<
" transmit = " << transmit <<
" %"
145 <<
" reflected = " << reflected <<
" %" <<
G4endl;
148 G4cout.setf(mode,std::ios::floatfield);
156 const Run* localRun =
static_cast<const Run*
>(run);
159 fEdeposit += localRun->fEdeposit;
160 fEdeposit2 += localRun->fEdeposit2;
161 fTrackLen += localRun->fTrackLen;
162 fTrackLen2 += localRun->fTrackLen2;
163 fProjRange += localRun->fProjRange;
164 fProjRange2 += localRun->fProjRange2;
165 fNbOfSteps += localRun->fNbOfSteps ;
166 fNbOfSteps2 += localRun->fNbOfSteps2;
167 fStepSize += localRun->fStepSize;
168 fStepSize2 += localRun->fStepSize2;
171 for (
G4int i=1; i<=nbOfAbsor; ++i) {
172 fCsdaRange[i] = localRun->fCsdaRange[i];
173 fXfrontNorm[i] = localRun->fXfrontNorm[i];
176 for (
G4int i=0; i<3; ++i) fStatus[i] += localRun->fStatus[i];
virtual void Merge(const G4Run *)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4GLOB_DLL std::ostream G4cout
virtual void Merge(const G4Run *)
Run(DetectorConstruction *)