35 #include "DetectorConstruction.hh" 37 #include "HistoManager.hh" 38 #include "PrimaryGeneratorAction.hh" 49 fParticle(0), fEkin(0.),
50 fEdeposit(0.), fEdeposit2(0.),
51 fTrackLen(0.), fTrackLen2(0.),
52 fProjRange(0.), fProjRange2(0.),
53 fPenetration(0.), fPenetration2(0.),
54 fNbOfSteps(0), fNbOfSteps2(0),
55 fStepSize(0.), fStepSize2(0.)
117 const Run* localRun =
static_cast<const Run*
>(run);
144 std::ios::fmtflags mode =
G4cout.flags();
145 G4cout.setf(std::ios::fixed,std::ios::floatfield);
154 G4cout <<
"\n ======================= run summary ====================\n";
156 <<
"\n The run is " <<
numberOfEvent <<
" "<< partName <<
" of " 159 << material->
GetName() <<
" (density: " 163 G4cout.setf(mode,std::ios::floatfield);
173 if (rmsTrack>0.) rmsTrack = std::sqrt(rmsTrack);
else rmsTrack = 0.;
177 <<
"\n Track length of primary track = " <<
G4BestUnit(fTrackLen,
"Length")
185 if (rmsProj>0.) rmsProj = std::sqrt(rmsProj);
else rmsProj = 0.;
188 <<
"\n Projected range = " 196 if (rmsPene>0.) rmsPene = std::sqrt(rmsPene);
else rmsPene = 0.;
199 <<
"\n Penetration = " 208 myFile = fopen (
"range.txt",
"a");
209 fprintf (myFile,
"%e %e %e %e %e %e %e\n",
221 G4cout.setf(mode,std::ios::floatfield);
virtual void Merge(const G4Run *)
G4double GetDensity() const
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4Material * GetAbsorMaterial(G4int i)
void AddEdep(G4double val)
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
G4double GetAbsorRadius()
void AddPenetration(G4double x)
DetectorConstruction * fDetector
Detector construction class to define materials and geometry.
G4ParticleDefinition * fParticle
void AddTrackLength(G4double t)
void AddStepSize(G4int nb, G4double st)
void SetPrimary(G4ParticleDefinition *particle, G4double energy)
const G4String & GetName() const
virtual void Merge(const G4Run *)
void AddProjRange(G4double x)