48 #include "HistoManager.hh" 124 fHisto->Add1D(
"1",
"Energy deposition (MeV/mm/event) in the target",
126 fHisto->Add1D(
"2",
"Log10 Energy (MeV) of gammas",
fNBinsE,-5.,5.,1.0);
127 fHisto->Add1D(
"3",
"Log10 Energy (MeV) of electrons",
fNBinsE,-5.,5.,1.0);
128 fHisto->Add1D(
"4",
"Log10 Energy (MeV) of positrons",
fNBinsE,-5.,5.,1.0);
129 fHisto->Add1D(
"5",
"Log10 Energy (MeV) of protons",
fNBinsE,-5.,5.,1.0);
130 fHisto->Add1D(
"6",
"Log10 Energy (MeV) of neutrons",
fNBinsE,-5.,5.,1.0);
131 fHisto->Add1D(
"7",
"Log10 Energy (MeV) of charged pions",
fNBinsE,-4.,6.,1.0);
132 fHisto->Add1D(
"8",
"Log10 Energy (MeV) of pi0",
fNBinsE,-4.,6.,1.0);
133 fHisto->Add1D(
"9",
"Log10 Energy (MeV) of charged kaons",
fNBinsE,-4.,6.,1.0);
134 fHisto->Add1D(
"10",
"Log10 Energy (MeV) of neutral kaons",
fNBinsE,-4.,6.,1.0);
135 fHisto->Add1D(
"11",
"Log10 Energy (MeV) of deuterons and tritons",
137 fHisto->Add1D(
"12",
"Log10 Energy (MeV) of He3 and alpha",
fNBinsE,-5.,5.,1.0);
138 fHisto->Add1D(
"13",
"Log10 Energy (MeV) of Generic Ions",
fNBinsE,-5.,5.,1.0);
139 fHisto->Add1D(
"14",
"Log10 Energy (MeV) of muons",
fNBinsE,-4.,6.,1.0);
140 fHisto->Add1D(
"15",
"log10 Energy (MeV) of side-leaked neutrons",
142 fHisto->Add1D(
"16",
"log10 Energy (MeV) of forward-leaked neutrons",
144 fHisto->Add1D(
"17",
"log10 Energy (MeV) of backward-leaked neutrons",
146 fHisto->Add1D(
"18",
"log10 Energy (MeV) of leaking protons",
148 fHisto->Add1D(
"19",
"log10 Energy (MeV) of leaking charged pions",
150 fHisto->Add1D(
"20",
"Log10 Energy (MeV) of pi+",
fNBinsE,-4.,6.,1.0);
151 fHisto->Add1D(
"21",
"Log10 Energy (MeV) of pi-",
fNBinsE,-4.,6.,1.0);
153 "Energy deposition in the target normalized to beam energy",
156 "EM energy deposition in the target normalized to beam energy",
159 "Pion energy deposition in the target normalized to beam energy",
162 "Proton energy deposition in the target normalized to beam energy",
199 G4cout <<
"HistoManager: Histograms are booked and run has been started" 209 G4cout <<
"HistoManager: End of run actions are started" <<
G4endl;
212 G4cout<<
"========================================================"<<
G4endl;
215 if(
fNevt > 0) { x = 1.0/
x; }
243 G4cout <<
"Beam particle " 245 G4cout <<
"Beam Energy(MeV) " 247 G4cout <<
"Number of events " 249 G4cout << std::setprecision(4) <<
"Average energy deposit (MeV) " 252 G4cout << std::setprecision(4) <<
"Average number of steps " 254 G4cout << std::setprecision(4) <<
"Average number of gamma " 256 G4cout << std::setprecision(4) <<
"Average number of e- " 258 G4cout << std::setprecision(4) <<
"Average number of e+ " 260 G4cout << std::setprecision(4) <<
"Average number of neutrons " 262 G4cout << std::setprecision(4) <<
"Average number of protons " 264 G4cout << std::setprecision(4) <<
"Average number of antiprotons " 266 G4cout << std::setprecision(4) <<
"Average number of pi+ & pi- " 268 G4cout << std::setprecision(4) <<
"Average number of pi0 " 270 G4cout << std::setprecision(4) <<
"Average number of kaons " 272 G4cout << std::setprecision(4) <<
"Average number of muons " 274 G4cout << std::setprecision(4) <<
"Average number of deuterons+tritons " 276 G4cout << std::setprecision(4) <<
"Average number of He3+alpha " 278 G4cout << std::setprecision(4) <<
"Average number of ions " 280 G4cout << std::setprecision(4) <<
"Average number of forward neutrons " 282 G4cout << std::setprecision(4) <<
"Average number of reflected neutrons " 284 G4cout << std::setprecision(4) <<
"Average number of leaked neutrons " 286 G4cout << std::setprecision(4) <<
"Average number of proton leak " 288 G4cout << std::setprecision(4) <<
"Average number of pion leak " 290 G4cout<<
"========================================================"<<
G4endl;
332 if(0 == track->GetParentID()) {
339 G4cout <<
"### Primary " << name
340 <<
" kinE(MeV)= " << e/
MeV 342 <<
"; pos(mm)= " << track->GetPosition()/
mm 343 <<
"; dir= " << track->GetMomentumDirection()
349 G4cout <<
"=== Secondary " << name
350 <<
" kinE(MeV)= " << e/
MeV 352 <<
"; pos(mm)= " << track->GetPosition()/
mm 353 <<
"; dir= " << track->GetMomentumDirection()
355 e = std::log10(e/
MeV);
418 G4cout <<
"TargetSD::ProcessHits: beta1= " 419 << step->GetPreStepPoint()->GetVelocity()/
c_light 420 <<
" beta2= " << step->GetPostStepPoint()->GetVelocity()/
c_light 421 <<
" weight= " << step->GetTrack()->GetWeight()
425 const G4Track* track = step->GetTrack();
428 (step->GetPreStepPoint()->GetPosition() +
429 step->GetPostStepPoint()->GetPosition())*0.5;
450 G4cout <<
"HistoManager::AddEnergy: e(keV)= " << fEdep/
keV 451 <<
"; z(mm)= " << z/
mm 452 <<
"; step(mm)= " << step->GetStepLength()/
mm 454 <<
" E(MeV)= " << track->GetKineticEnergy()/
MeV 465 G4double e = std::log10(track->GetKineticEnergy()/
MeV);
476 if(z > -
fAbsZ0 && dir.
z() > 0.0) {
481 }
else isLeaking =
true;
484 }
else if (z <
fAbsZ0 && dir.
z() < 0.0) {
489 }
else isLeaking =
true;
492 }
else if (std::abs(z) <= -
fAbsZ0 && x*dir.
x() + y*dir.
y() > 0.0) {
497 }
else isLeaking =
true;
void AddTargetStep(const G4Step *)
static G4MuonPlus * MuonPlus()
static G4KaonZeroLong * KaonZeroLong()
const G4String & GetParticleType() const
G4double fPrimaryKineticEnergy
static G4KaonMinus * KaonMinus()
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
void AddLeakingParticle(const G4Track *)
const G4ParticleDefinition * fPrimaryDef
static G4KaonZeroShort * KaonZeroShort()
static G4AntiProton * AntiProton()
static G4Triton * Triton()
static G4Proton * Proton()
static G4PionPlus * PionPlus()
static G4Neutron * Neutron()
void Fill(G4int id, G4double x, G4double w)
static G4PionZero * PionZero()
static G4Deuteron * Deuteron()
static G4Positron * Positron()
G4double GetPDGMass() const
static G4PionMinus * PionMinus()
static HistoManager * fManager
void ScoreNewTrack(const G4Track *aTrack)
const G4ParticleDefinition * fNeutron
void SetVerbose(G4int val)
static G4MuonMinus * MuonMinus()
static G4Electron * Electron()
static HistoManager * GetPointer()
static G4KaonPlus * KaonPlus()
static const G4double pos