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 fNbOfSteps(0), fNbOfSteps2(0),
54 fStepSize(0.), fStepSize2(0.),
123 const Run* localRun =
static_cast<const Run*
>(run);
150 std::ios::fmtflags mode =
G4cout.flags();
151 G4cout.setf(std::ios::fixed,std::ios::floatfield);
160 G4cout <<
"\n ======================== run summary =====================\n";
162 <<
"\n The run is " <<
numberOfEvent <<
" "<< partName <<
" of "
165 << material->
GetName() <<
" (density: "
169 G4cout.setf(mode,std::ios::floatfield);
176 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
180 <<
"\n Total Energy deposited = " <<
G4BestUnit(fEdeposit,
"Energy")
188 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
192 <<
"\n Track length of primary track = " <<
G4BestUnit(fTrackLen,
"Length")
199 <<
" (from full dE/dx)" <<
G4endl;
206 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
209 <<
"\n Projected range = " <<
G4BestUnit(fProjRange,
"Length")
218 rms = fNbSteps2 - fNbSteps*fNbSteps;
219 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
222 G4cout <<
"\n Nb of steps of primary track = " << fNbSteps <<
" +- " << rms;
226 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
230 <<
"\t Step size= " <<
G4BestUnit(fStepSize,
"Length")
238 G4double binWidth = analysisManager->GetH1Width(ih)
239 *analysisManager->GetH1Unit(ih);
241 analysisManager->ScaleH1(ih,fac);
246 binWidth = analysisManager->GetH1Width(ih);
248 analysisManager->ScaleH1(ih,fac);
251 G4cout.setf(mode,std::ios::floatfield);
G4double fCsdaRange[kMaxAbsor]
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 mm
const G4String & GetParticleName() const
void AddTrackLength(G4double t)
G4Material * GetAbsorMaterial(G4int i)
const G4String & GetName() const
const XML_Char int const XML_Char * value
virtual void Merge(const G4Run *)
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 SetCsdaRange(G4int i, G4double value)
void AddStepSize(G4int nb, G4double st)
Simple detector construction with a box volume placed in a world.
G4double GetDensity() const