35 #include "DetectorConstruction.hh"
37 #include "EventAction.hh"
38 #include "HistoManager.hh"
39 #include "PrimaryGeneratorAction.hh"
52 fParticle(0), fEkin(0.),
53 fTrackLen(0.), fTrackLen2(0.),
54 fProjRange(0.), fProjRange2(0.),
55 fNbOfSteps(0), fNbOfSteps2(0),
56 fStepSize(0.), fStepSize2(0.)
165 const Run* localRun =
static_cast<const Run*
>(run);
182 for (
G4int i=1; i<=nbOfAbsor; ++i) {
188 min = localRun->
fEmin[i]; max = localRun->
fEmax[i];
209 std::ios::fmtflags mode =
G4cout.flags();
210 G4cout.setf(std::ios::fixed,std::ios::floatfield);
218 G4cout <<
"\n ======================== run summary =====================\n";
220 <<
"\n The run is " <<
numberOfEvent <<
" "<< partName <<
" of "
222 <<
" through " << nbOfAbsor <<
" absorbers: \n";
223 for (
G4int i=1; i<= nbOfAbsor; i++) {
227 G4cout << std::setw(5) << i
228 << std::setw(10) <<
G4BestUnit(thickness,
"Length") <<
" of "
229 << material->
GetName() <<
" (density: "
234 G4cout.setf(mode,std::ios::floatfield);
242 for (
G4int i=1; i<= nbOfAbsor; i++) {
246 <<
"\n Edep in absorber " << i <<
" = "
267 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
271 <<
"\n Track length of primary track = " <<
G4BestUnit(fTrackLen,
"Length")
277 if (NbOfAbsor == 1) {
280 <<
" (from full dE/dx)" <<
G4endl;
287 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
290 <<
"\n Projected range = " <<
G4BestUnit(fProjRange,
"Length")
299 rms = fNbSteps2 - fNbSteps*fNbSteps;
300 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
303 G4cout <<
"\n Nb of steps of primary track = " << fNbSteps <<
" +- " << rms;
307 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
311 <<
"\t Step size= " <<
G4BestUnit(fStepSize,
"Length")
323 <<
"\n absorbed = " << absorbed <<
" %"
324 <<
" transmit = " << transmit <<
" %"
325 <<
" reflected = " << reflected <<
" %" <<
G4endl;
331 G4double binWidth = analysisManager->GetH1Width(ih)
332 *analysisManager->GetH1Unit(ih);
334 analysisManager->ScaleH1(ih,fac);
337 binWidth = analysisManager->GetH1Width(ih);
339 analysisManager->ScaleH1(ih,fac);
342 G4cout.setf(mode,std::ios::floatfield);
G4double fCsdaRange[kMaxAbsor]
void AddProjRange(G4double x)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
void SetPrimary(G4ParticleDefinition *particle, G4double energy)
DetectorConstruction * fDetector
static constexpr double MeV
void AddEdep(G4double val)
static constexpr double mm
void AddTotEdep(G4double e)
void AddTrackStatus(G4int i)
const G4String & GetParticleName() const
void AddTrackLength(G4double t)
G4double fXfrontNorm[kMaxAbsor]
G4Material * GetAbsorMaterial(G4int i)
const G4String & GetName() const
static constexpr double g
static constexpr double cm2
const XML_Char int const XML_Char * value
G4double fEmin[kMaxAbsor]
void SetXfrontNorm(G4int i, G4double 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
static constexpr double joule
G4GLOB_DLL std::ostream G4cout
G4double GetXfrontNorm(G4int i)
G4double GetAbsorThickness(G4int i)
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.
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4double fEmax[kMaxAbsor]
G4double GetDensity() const