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.)
108 const Run* localRun =
static_cast<const Run*
>(run);
133 std::ios::fmtflags mode =
G4cout.flags();
134 G4cout.setf(std::ios::fixed,std::ios::floatfield);
143 G4cout <<
"\n ======================== run summary =====================\n";
145 <<
"\n The run is " <<
numberOfEvent <<
" "<< partName <<
" of " 148 << material->
GetName() <<
" (density: " 152 G4cout.setf(mode,std::ios::floatfield);
159 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
163 <<
"\n Total Energy deposited = " <<
G4BestUnit(fEdeposit,
"Energy")
172 <<
"\n S value = " << sValue/
gray <<
" Gy/Bq.s " 173 <<
" +- " << rmsSValue/
gray 181 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
185 <<
"\n Track length of primary track = " <<
G4BestUnit(fTrackLen,
"Length")
192 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
195 <<
"\n Projected range = " <<
G4BestUnit(fProjRange,
"Length")
204 rms = fNbSteps2 - fNbSteps*fNbSteps;
205 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
208 G4cout <<
"\n Nb of steps of primary track = " << fNbSteps <<
" +- " << rms
213 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
217 <<
"\n Step size = " <<
G4BestUnit(fStepSize,
"Length")
225 G4double binWidth = analysisManager->GetH1Width(ih);
227 analysisManager->ScaleH1(ih,fac);
230 G4cout.setf(mode,std::ios::floatfield);
235 myFile = fopen (
"s.txt",
"a");
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()
ExG4HbookAnalysisManager G4AnalysisManager
DetectorConstruction * fDetector
static const G4double fac
Detector construction class to define materials and geometry.
G4double GetAbsorMass() const
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)