30 #include "DetectorConstruction.hh"
31 #include "HistoManager.hh"
32 #include "PrimaryGeneratorAction.hh"
43 fParticle(0), fEkin(0.),
44 fNbInelastic(0), fNbInelastic2(0),
45 fEdeposit(0.), fEdeposit2(0.),
46 fTrackLen(0.), fTrackLen2(0.),
47 fProjRange(0.), fProjRange2(0.),
48 fNbOfSteps(0), fNbOfSteps2(0),
49 fStepSize(0.), fStepSize2(0.)
111 const Run* localRun =
static_cast<const Run*
>(run);
138 std::ios::fmtflags mode =
G4cout.flags();
139 G4cout.setf(std::ios::fixed,std::ios::floatfield);
148 G4cout <<
"\n ======================== run summary =====================\n";
150 <<
"\n The run is " <<
numberOfEvent <<
" "<< partName <<
" of "
153 << material->
GetName() <<
" (density: "
157 G4cout.setf(mode,std::ios::floatfield);
165 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
169 <<
"\n Nb of ionisations = " << fNbInelastic
176 <<
" +- " <<
G4BestUnit((
fEkin)*rms/(fNbInelastic*fNbInelastic),
"Energy")
183 myFile = fopen (
"wvalue.txt",
"a");
184 fprintf (myFile,
"%e %e %e %e %e \n",
fEkin/
eV, fNbInelastic, rms,
185 fEkin/
eV/fNbInelastic, (
fEkin/
eV)*rms/(fNbInelastic*fNbInelastic) );
192 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
196 <<
"\n Total Energy deposited = " <<
G4BestUnit(fEdeposit,
"Energy")
204 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
208 <<
"\n Track length of primary track = " <<
G4BestUnit(fTrackLen,
"Length")
215 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
218 <<
"\n Projected range = " <<
G4BestUnit(fProjRange,
"Length")
227 rms = fNbSteps2 - fNbSteps*fNbSteps;
228 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
231 G4cout <<
"\n Nb of steps of primary track = " << fNbSteps <<
" +- " << rms
236 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
240 <<
"\n Step size = " <<
G4BestUnit(fStepSize,
"Length")
250 analysisManager->
ScaleH1(ih,fac);
253 G4cout.setf(mode,std::ios::floatfield);