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);
void AddProjRange(G4double x)
void SetPrimary(G4ParticleDefinition *particle, G4double energy)
DetectorConstruction * fDetector
G4double GetAbsorRadius()
void AddEdep(G4double val)
static constexpr double nm
const G4String & GetParticleName() const
void AddTrackLength(G4double t)
G4Material * GetAbsorMaterial(G4int i)
const G4String & GetName() const
virtual void Merge(const G4Run *)
static constexpr double eV
G4ParticleDefinition * fParticle
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4GLOB_DLL std::ostream G4cout
virtual void Merge(const G4Run *)
G4double fEdeposit[kMaxAbsor]
void AddStepSize(G4int nb, G4double st)
Simple detector construction with a box volume placed in a world.
G4double GetDensity() const
void AddPenetration(G4double x)