148 G4cout <<
"Histo: Histograms are booked and run has been started" 152 G4cout <<
"Histo: Histograms are not booked because file name is not set" 162 G4cout <<
"Histo: End of run actions are started" <<
G4endl;
166 G4cout<<
"========================================================"<<
G4endl;
168 if(
fNevt > 0) { x = 1.0/
x; }
179 G4cout <<
"Number of events " 182 << std::setprecision(4) <<
"Average number of e- " 185 << std::setprecision(4) <<
"Average number of gamma " 188 << std::setprecision(4) <<
"Average number of e+ " 191 << std::setprecision(4) <<
"Average number of steps in the phantom " 194 << std::setprecision(4) <<
"Average number of e- steps in the target " 197 << std::setprecision(4) <<
"Average number of g produced in the target " 200 << std::setprecision(4) <<
"Average number of e- produced in the target " 203 << std::setprecision(4) <<
"Average number of g produced in the phantom " 206 << std::setprecision(4) <<
"Average number of e- produced in the phantom " 209 << std::setprecision(4) <<
"Total fGamma fluence in front of the phantom " 211 G4cout<<
"========================================================"<<
G4endl;
228 if(nr > 0.0) { nr = 1./nr; }
232 if(nr > 0.0) { nr = 1./nr; }
243 "Cannot write ROOT file.");
245 G4cout <<
"### Histo::Save: Histograms are saved" <<
G4endl;
261 G4cout <<
"Histo::bookHisto: ERROR open file <" << nam <<
">" <<
G4endl;
263 "Cannot open ROOT file.");
265 G4cout <<
"### Histo::Save: Opended file <" << nam <<
"> for " 270 "Energy deposit at radius (mm) normalised on 1st channel",
274 "Energy deposit at radius (mm) normalised to integral",
278 "Energy deposit (MeV/kg/electron) at radius (mm)",
285 "Energy profile (MeV/kg/electron) over Z (mm) at Central Voxel",
289 "Energy (MeV) of fGamma produced in the target",
302 "Gamma Energy Fluence (MeV/cm2) at radius(mm) in front of phantom",
350 G4int pid = aTrack->GetParentID();
361 G4cout <<
"TrackingAction: Primary " 364 << aTrack->GetKineticEnergy()/
MeV 365 <<
"; pos= " << pos <<
"; dir= " << dir <<
G4endl;
369 }
else if (0 < pid && particle ==
fElectron) {
371 G4cout <<
"TrackingAction: Secondary electron " <<
G4endl;
378 }
else if (0 < pid && particle ==
fPositron) {
380 G4cout <<
"TrackingAction: Secondary positron " <<
G4endl;
385 }
else if (0 < pid && particle ==
fGamma) {
387 G4cout <<
"TrackingAction: Secondary gamma; parentID= " << pid
388 <<
" E= " << aTrack->GetKineticEnergy() <<
G4endl;
423 G4cout <<
"Histo: edep(MeV)= " << edep/
MeV <<
" at binz= " << nzbin
424 <<
" r1= " << r1 <<
" z1= " << z1
425 <<
" r2= " << r2 <<
" z2= " << z2
426 <<
" r0= " << r0 <<
" z0= " << z0
469 G4double rr2 = r1 + dr*(zz2-zz1)/dz;
470 for(bin=bin1; bin<=bin2; bin++) {
484 rr2 = rr1 + dr*(zz2 - zz1)/dz;
void SetNumberDivR(G4int val)
void AddPhantomPhoton(const G4DynamicParticle *)
G4RootAnalysisManager * fAnalysisManager
void AddPhantomGamma(G4double e, G4double r)
static Histo * GetPointer()
G4int CreateH1(const G4String &name, const G4String &title, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binSchemeName="linear")
G4VPhysicalVolume * fTarget2
G4VPhysicalVolume * fPhantom
void AddElectron(const G4DynamicParticle *)
G4VPhysicalVolume * fTarget1
const G4ParticleDefinition * fGamma
G4bool OpenFile(const G4String &fileName="")
void ScoreNewTrack(const G4Track *aTrack)
void AddPhoton(const G4DynamicParticle *)
G4double GetKineticEnergy() const
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
const G4ParticleDefinition * fElectron
const G4ParticleDefinition * fPositron
G4VPhysicalVolume * fCheckVolume
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void AddTargetElectron(const G4DynamicParticle *)
static G4Positron * Positron()
G4bool FillH1(G4int id, G4double value, G4double weight=1.0)
static G4RootAnalysisManager * Instance()
G4VPhysicalVolume * fGasVolume
void AddTargetPhoton(const G4DynamicParticle *)
static G4Electron * Electron()
void AddPhantomStep(G4double e, G4double r1, G4double z1, G4double r2, G4double z2, G4double r0, G4double z0)
std::vector< G4int > fHisto
G4RootAnalysisManager * fManager
void AddPositron(const G4DynamicParticle *)
void AddPhantomElectron(const G4DynamicParticle *)
static const G4double pos