30 #include "DetectorConstruction.hh"
31 #include "HistoManager.hh"
32 #include "PrimaryGeneratorAction.hh"
43 fParticle(0), fEkin(0.),
44 fEdeposit(0.), fEdeposit2(0.),
45 fTrackLen(0.), fTrackLen2(0.),
46 fProjRange(0.), fProjRange2(0.),
47 fNbOfSteps(0), fNbOfSteps2(0),
48 fStepSize(0.), fStepSize2(0.)
102 const Run* localRun =
static_cast<const Run*
>(run);
127 std::ios::fmtflags mode =
G4cout.flags();
128 G4cout.setf(std::ios::fixed,std::ios::floatfield);
137 G4cout <<
"\n ======================== run summary =====================\n";
139 <<
"\n The run is " <<
numberOfEvent <<
" "<< partName <<
" of "
142 << material->
GetName() <<
" (density: "
146 G4cout.setf(mode,std::ios::floatfield);
153 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
157 <<
"\n Total Energy deposited = " <<
G4BestUnit(fEdeposit,
"Energy")
166 <<
"\n S value = " << sValue/
gray <<
" Gy/Bq.s "
167 <<
" +- " << rmsSValue/
gray
175 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
179 <<
"\n Track length of primary track = " <<
G4BestUnit(fTrackLen,
"Length")
186 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
189 <<
"\n Projected range = " <<
G4BestUnit(fProjRange,
"Length")
198 rms = fNbSteps2 - fNbSteps*fNbSteps;
199 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
202 G4cout <<
"\n Nb of steps of primary track = " << fNbSteps <<
" +- " << rms
207 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
211 <<
"\n Step size = " <<
G4BestUnit(fStepSize,
"Length")
219 G4double binWidth = analysisManager->GetH1Width(ih);
221 analysisManager->ScaleH1(ih,fac);
224 G4cout.setf(mode,std::ios::floatfield);
229 myFile = fopen (
"s.txt",
"a");
void AddProjRange(G4double x)
void SetPrimary(G4ParticleDefinition *particle, G4double energy)
DetectorConstruction * fDetector
static constexpr double MeV
G4double GetAbsorRadius()
void AddEdep(G4double val)
static constexpr double nm
static constexpr double mm
const G4String & GetParticleName() const
void AddTrackLength(G4double t)
static constexpr double gray
G4Material * GetAbsorMaterial(G4int i)
const G4String & GetName() const
G4double GetAbsorMass() const
virtual void Merge(const G4Run *)
static constexpr double eV
G4CsvAnalysisManager G4AnalysisManager
G4ParticleDefinition * fParticle
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
static const G4double fac
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