30 #include "DetectorConstruction.hh"
32 #include "HistoManager.hh"
33 #include "PrimaryGeneratorAction.hh"
44 fParticle(0), fEkin(0.),
45 fEdeposit(0.), fEdeposit2(0.),
46 fTrackLen(0.), fTrackLen2(0.),
47 fProjRange(0.), fProjRange2(0.),
48 fPenetration(0.), fPenetration2(0.),
49 fNbOfSteps(0), fNbOfSteps2(0),
50 fStepSize(0.), fStepSize2(0.)
112 const Run* localRun =
static_cast<const Run*
>(run);
139 std::ios::fmtflags mode =
G4cout.flags();
140 G4cout.setf(std::ios::fixed,std::ios::floatfield);
149 G4cout <<
"\n ======================= run summary ====================\n";
151 <<
"\n The run is " <<
numberOfEvent <<
" "<< partName <<
" of "
154 << material->
GetName() <<
" (density: "
158 G4cout.setf(mode,std::ios::floatfield);
168 if (rmsTrack>0.) rmsTrack = std::sqrt(rmsTrack);
else rmsTrack = 0.;
172 <<
"\n Track length of primary track = " <<
G4BestUnit(fTrackLen,
"Length")
180 if (rmsProj>0.) rmsProj = std::sqrt(rmsProj);
else rmsProj = 0.;
183 <<
"\n Projected range = "
191 if (rmsPene>0.) rmsPene = std::sqrt(rmsPene);
else rmsPene = 0.;
194 <<
"\n Penetration = "
203 myFile = fopen (
"range.txt",
"a");
204 fprintf (myFile,
"%e %e %e %e %e %e %e\n",
216 G4cout.setf(mode,std::ios::floatfield);