48 #include "HistoManager.hh"
94 : fPrimaryDef(nullptr),
97 fPrimaryKineticEnergy(0.0),
123 fHisto->Add1D(
"1",
"Energy deposition (MeV/mm/event) in the target",
125 fHisto->Add1D(
"2",
"Log10 Energy (MeV) of gammas",
fNBinsE,-5.,5.,1.0);
126 fHisto->Add1D(
"3",
"Log10 Energy (MeV) of electrons",
fNBinsE,-5.,5.,1.0);
127 fHisto->Add1D(
"4",
"Log10 Energy (MeV) of positrons",
fNBinsE,-5.,5.,1.0);
128 fHisto->Add1D(
"5",
"Log10 Energy (MeV) of protons",
fNBinsE,-5.,5.,1.0);
129 fHisto->Add1D(
"6",
"Log10 Energy (MeV) of neutrons",
fNBinsE,-5.,5.,1.0);
130 fHisto->Add1D(
"7",
"Log10 Energy (MeV) of charged pions",
fNBinsE,-4.,6.,1.0);
131 fHisto->Add1D(
"8",
"Log10 Energy (MeV) of pi0",
fNBinsE,-4.,6.,1.0);
132 fHisto->Add1D(
"9",
"Log10 Energy (MeV) of charged kaons",
fNBinsE,-4.,6.,1.0);
133 fHisto->Add1D(
"10",
"Log10 Energy (MeV) of neutral kaons",
fNBinsE,-4.,6.,1.0);
134 fHisto->Add1D(
"11",
"Log10 Energy (MeV) of deuterons and tritons",
136 fHisto->Add1D(
"12",
"Log10 Energy (MeV) of He3 and alpha",
fNBinsE,-5.,5.,1.0);
137 fHisto->Add1D(
"13",
"Log10 Energy (MeV) of Generic Ions",
fNBinsE,-5.,5.,1.0);
138 fHisto->Add1D(
"14",
"Log10 Energy (MeV) of muons",
fNBinsE,-4.,6.,1.0);
139 fHisto->Add1D(
"15",
"log10 Energy (MeV) of side-leaked neutrons",
141 fHisto->Add1D(
"16",
"log10 Energy (MeV) of forward-leaked neutrons",
143 fHisto->Add1D(
"17",
"log10 Energy (MeV) of backward-leaked neutrons",
145 fHisto->Add1D(
"18",
"log10 Energy (MeV) of leaking protons",
147 fHisto->Add1D(
"19",
"log10 Energy (MeV) of leaking charged pions",
149 fHisto->Add1D(
"20",
"Log10 Energy (MeV) of pi+",
fNBinsE,-4.,6.,1.0);
150 fHisto->Add1D(
"21",
"Log10 Energy (MeV) of pi-",
fNBinsE,-4.,6.,1.0);
152 "Energy deposition in the target normalized to beam energy",
155 "EM energy deposition in the target normalized to beam energy",
158 "Pion energy deposition in the target normalized to beam energy",
161 "Proton energy deposition in the target normalized to beam energy",
198 G4cout <<
"HistoManager: Histograms are booked and run has been started"
208 G4cout <<
"HistoManager: End of run actions are started" <<
G4endl;
211 G4cout<<
"========================================================"<<
G4endl;
214 if(
fNevt > 0) { x = 1.0/
x; }
242 G4cout <<
"Beam particle "
244 G4cout <<
"Beam Energy(MeV) "
246 G4cout <<
"Number of events "
248 G4cout << std::setprecision(4) <<
"Average energy deposit (MeV) "
251 G4cout << std::setprecision(4) <<
"Average number of steps "
253 G4cout << std::setprecision(4) <<
"Average number of gamma "
255 G4cout << std::setprecision(4) <<
"Average number of e- "
257 G4cout << std::setprecision(4) <<
"Average number of e+ "
259 G4cout << std::setprecision(4) <<
"Average number of neutrons "
261 G4cout << std::setprecision(4) <<
"Average number of protons "
263 G4cout << std::setprecision(4) <<
"Average number of antiprotons "
265 G4cout << std::setprecision(4) <<
"Average number of pi+ & pi- "
267 G4cout << std::setprecision(4) <<
"Average number of pi0 "
269 G4cout << std::setprecision(4) <<
"Average number of kaons "
271 G4cout << std::setprecision(4) <<
"Average number of muons "
273 G4cout << std::setprecision(4) <<
"Average number of deuterons+tritons "
275 G4cout << std::setprecision(4) <<
"Average number of He3+alpha "
277 G4cout << std::setprecision(4) <<
"Average number of ions "
279 G4cout << std::setprecision(4) <<
"Average number of forward neutrons "
281 G4cout << std::setprecision(4) <<
"Average number of reflected neutrons "
283 G4cout << std::setprecision(4) <<
"Average number of leaked neutrons "
285 G4cout << std::setprecision(4) <<
"Average number of proton leak "
287 G4cout << std::setprecision(4) <<
"Average number of pion leak "
289 G4cout<<
"========================================================"<<
G4endl;
338 G4cout <<
"### Primary " << name
339 <<
" kinE(MeV)= " << e/
MeV
348 G4cout <<
"=== Secondary " << name
349 <<
" kinE(MeV)= " << e/
MeV
354 e = std::log10(e/
MeV);
417 G4cout <<
"TargetSD::ProcessHits: beta1= "
449 G4cout <<
"HistoManager::AddEnergy: e(keV)= " << fEdep/
keV
450 <<
"; z(mm)= " << z/
mm
475 if(z > -
fAbsZ0 && dir.
z() > 0.0) {
480 }
else isLeaking =
true;
483 }
else if (z <
fAbsZ0 && dir.
z() < 0.0) {
488 }
else isLeaking =
true;
491 }
else if (std::abs(z) <= -
fAbsZ0 && x*dir.
x() + y*dir.
y() > 0.0) {
496 }
else isLeaking =
true;
static G4PionMinus * PionMinus()
void Fill(G4int id, G4double x, G4double w)
G4double GetKineticEnergy() const
void ScoreNewTrack(const G4Track *aTrack)
static const G4double pos
static constexpr double MeV
G4StepPoint * GetPreStepPoint() const
static constexpr double keV
static constexpr double mm
static G4AntiProton * AntiProton()
const G4String & GetParticleName() const
static G4PionPlus * PionPlus()
const G4String & GetParticleType() const
static HistoManager * GetPointer()
static G4MuonMinus * MuonMinus()
static G4Proton * Proton()
static G4KaonMinus * KaonMinus()
G4ParticleDefinition * GetDefinition() const
G4double GetPDGMass() const
static G4KaonPlus * KaonPlus()
G4double GetVelocity() const
const G4ParticleDefinition * fPrimaryDef
static G4Deuteron * Deuteron()
G4double GetWeight() const
static G4KaonZeroLong * KaonZeroLong()
G4double GetStepLength() const
const G4ThreeVector & GetPosition() const
G4Track * GetTrack() const
const G4ThreeVector & GetPosition() const
G4double GetTotalEnergyDeposit() const
static G4Positron * Positron()
G4StepPoint * GetPostStepPoint() const
G4double fPrimaryKineticEnergy
static G4Electron * Electron()
static HistoManager * fManager
static G4KaonZeroShort * KaonZeroShort()
void SetVerbose(G4int val)
void AddTargetStep(const G4Step *)
static constexpr double c_light
static G4Triton * Triton()
static G4Neutron * Neutron()
static G4MuonPlus * MuonPlus()
G4GLOB_DLL std::ostream G4cout
static G4PionZero * PionZero()
const G4ThreeVector & GetMomentumDirection() const
const G4ParticleDefinition * fNeutron
static constexpr double GeV
void AddLeakingParticle(const G4Track *)
G4int GetParentID() const