35 #include "DetectorConstruction.hh"
37 #include "EventAction.hh"
38 #include "HistoManager.hh"
39 #include "PrimaryGeneratorAction.hh"
52 fParticle(0), fEkin(0.),
53 fEdeposit(0.), fEdeposit2(0.),
54 fTrackLen(0.), fTrackLen2(0.),
55 fProjRange(0.), fProjRange2(0.),
56 fNbOfSteps(0), fNbOfSteps2(0),
57 fStepSize(0.), fStepSize2(0.)
151 const Run* localRun =
static_cast<const Run*
>(run);
170 for (
G4int i=1; i<=nbOfAbsor; ++i) {
184 std::ios::fmtflags mode =
G4cout.flags();
185 G4cout.setf(std::ios::fixed,std::ios::floatfield);
193 G4cout <<
"\n ======================== run summary =====================\n";
195 <<
"\n The run is " <<
numberOfEvent <<
" "<< partName <<
" of "
197 <<
" through " << nbOfAbsor <<
" absorbers: \n";
198 for (
G4int i=1; i<= nbOfAbsor; i++) {
203 << material->
GetName() <<
" (density: "
208 G4cout.setf(mode,std::ios::floatfield);
215 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
219 <<
"\n Total Energy deposited = " <<
G4BestUnit(fEdeposit,
"Energy")
227 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
231 <<
"\n Track length of primary track = " <<
G4BestUnit(fTrackLen,
"Length")
237 if (NbOfAbsor == 1) {
240 <<
" (from full dE/dx)" <<
G4endl;
247 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
250 <<
"\n Projected range = " <<
G4BestUnit(fProjRange,
"Length")
259 rms = fNbSteps2 - fNbSteps*fNbSteps;
260 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
263 G4cout <<
"\n Nb of steps of primary track = " << fNbSteps <<
" +- " << rms;
267 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
271 <<
"\t Step size= " <<
G4BestUnit(fStepSize,
"Length")
283 <<
"\n absorbed = " << absorbed <<
" %"
284 <<
" transmit = " << transmit <<
" %"
285 <<
" reflected = " << reflected <<
" %" <<
G4endl;
291 G4double binWidth = analysisManager->GetH1Width(ih);
293 analysisManager->ScaleH1(ih,fac);
296 binWidth = analysisManager->GetH1Width(ih);
298 analysisManager->ScaleH1(ih,fac);
301 G4cout.setf(mode,std::ios::floatfield);
virtual void Merge(const G4Run *)
const G4String & GetName() const
void SetCsdaRange(G4int i, G4double value)
G4double GetDensity() const
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
const G4String & GetParticleName() const
G4Material * GetAbsorMaterial(G4int i)
void AddEdep(G4double val)
G4GLOB_DLL std::ostream G4cout
void SetXfrontNorm(G4int i, G4double value)
ExG4HbookAnalysisManager G4AnalysisManager
G4double GetAbsorThickness(G4int i)
G4double GetXfrontNorm(G4int i)
G4double energy(const ThreeVector &p, const G4double m)
void AddTrackStatus(G4int i)
DetectorConstruction * fDetector
static const G4double fac
Detector construction class to demonstrate various ways of placement.
G4ParticleDefinition * fParticle
G4double fCsdaRange[MaxAbsor]
void AddTrackLength(G4double t)
void AddStepSize(G4int nb, G4double st)
void SetPrimary(G4ParticleDefinition *particle, G4double energy)
G4double fXfrontNorm[MaxAbsor]
virtual void Merge(const G4Run *)
void AddProjRange(G4double x)