44 #include "HistoManager.hh"
52 #include "EmAcceptance.hh"
111 fHisto->Add1D(
"10",
"Evis/E0 in central crystal",
fBinsED,0.0,1,1.0);
114 fHisto->Add1D(
"13",
"Energy (MeV) of delta-electrons",
121 fHisto->Add1D(
"19",
"Number of vertex hits",20,-0.5,19.5,1.0);
139 for(
G4int i=0; i<6; i++) {
150 fBrem.resize(93,0.0);
151 fPhot.resize(93,0.0);
152 fComp.resize(93,0.0);
153 fConv.resize(93,0.0);
167 G4cout <<
"HistoManager: Histograms are booked and run has been started"
178 G4cout <<
"HistoManager: End of run actions are started RunID# "
180 G4String nam[6] = {
"1x1",
"3x3",
"5x5",
"E1/E9 ",
"E1/E25",
"E9/E25"};
184 G4cout<<
"================================================================="
187 if(
fEvt > 0) x = 1.0/
x;
189 for(j=0; j<
fNmax; j++) {
195 fErms[j] = std::sqrt(y);
199 if(xx > 0.0) xx = 1.0/
xx;
213 G4cout << std::setprecision(4) <<
"Average number of e- " << xe <<
G4endl;
214 G4cout << std::setprecision(4) <<
"Average number of gamma " << xg <<
G4endl;
215 G4cout << std::setprecision(4) <<
"Average number of e+ " << xp <<
G4endl;
216 G4cout << std::setprecision(4) <<
"Average number of steps " << xs <<
G4endl;
222 if(xx > 0.0) xx = 1.0/
xx;
224 G4cout << std::setprecision(4) <<
"Edep " << nam[j]
227 if(ex > 0.1)
G4cout <<
" res= " << f*sx/ex <<
" % " <<
fStat[j];
232 <<
"=========== Mean values without trancating ====================="<<
G4endl;
233 for(j=0; j<
fNmax; j++) {
237 G4cout << std::setprecision(4) <<
"Edep " << nam[j]
240 if(ex > 0.0)
G4cout <<
" res= " << f*sx/ex <<
" %";
245 <<
"=========== Ratios without trancating ==========================="<<
G4endl;
249 if(xx > 0.0) xx = 1.0/
xx;
253 if(y > 0.0) r = std::sqrt(y*xx);
254 G4cout <<
" " << nam[j] <<
" = " << e
262 <<
"=================================================================="<<
G4endl;
272 if(0 < runID) {
return; }
277 for (j=0; j<
fNmax; j++) {
294 G4cout <<
" Z bremsstrahlung photoeffect compton conversion" <<
G4endl;
295 for(j=1; j<93; ++j) {
300 if(n1 + n2 + n3 + n4 > 0) {
301 G4cout << std::setw(4) << j << std::setw(12) << n1 << std::setw(12) << n2
302 << std::setw(12) << n3 << std::setw(12) << n4 <<
G4endl;
319 for (
G4int i=0; i<25; i++) {
330 for (
G4int i=0; i<25; i++) {
333 if( ( 6<=i && 8>=i) || (11<=i && 13>=i) || (16<=i && 18>=i)) e9 +=
fE[i];
353 fErms[4] += e125*e125;
355 fErms[5] += e925*e925;
371 fHisto->Fill(11,e125,1.0);
372 fHisto->Fill(12,e925,1.0);
423 G4cout <<
"TrackingAction: Primary kinE(MeV)= " << kinE/
MeV
424 <<
"; m(MeV)= " << mass/
MeV
425 <<
"; pos= " << pos <<
"; dir= " << dir <<
G4endl;
437 if(Z > 0 && Z < 93) {
fBrem[
Z] += 1.0; }
441 static_cast<const G4VEmProcess*
>(proc)->GetCurrentElement();
444 if(Z > 0 && Z < 93) {
fPhot[
Z] += 1.0; }
448 static_cast<const G4VEmProcess*
>(proc)->GetCurrentElement();
451 if(Z > 0 && Z < 93) {
fConv[
Z] += 1.0; }
455 static_cast<const G4VEmProcess*
>(proc)->GetCurrentElement();
458 if(Z > 0 && Z < 93) {
fComp[
Z] += 1.0; }
465 G4cout <<
"TrackingAction: Secondary electron " <<
G4endl;
471 G4cout <<
"TrackingAction: Secondary positron " <<
G4endl;
475 }
else if (particle ==
fGamma) {
477 G4cout <<
"TrackingAction: Secondary gamma; parentID= " << pid
478 <<
" E= " << kinE <<
G4endl;
490 G4cout <<
"HistoManager::AddEnergy: e(keV)= " << edep/
keV
491 <<
"; volIdx= " << volIndex
492 <<
"; copyNo= " << copyNo
497 }
else if (1 == volIndex) {
499 }
else if (2 == volIndex) {
501 }
else if (3 == volIndex) {
503 }
else if (4 == volIndex) {
505 }
else if (5 == volIndex) {
509 for(
G4int i=0; i<
n; i++) {
546 if(i<fNmax && i>=0) {
548 if(val[1] > 0.0)
fRmstrue[i] = val[1];
const G4ThreeVector & GetVertexPosition() const
const G4ParticleDefinition * fGamma
void ScoreNewTrack(const G4Track *aTrack)
static const G4double pos
static constexpr double MeV
void AddPositron(const G4DynamicParticle *)
static constexpr double keV
const G4ThreeVector & GetMomentumDirection() const
static HistoManager * GetPointer()
G4ParticleDefinition * GetDefinition() const
G4double GetPDGMass() const
const G4ParticleDefinition * fPositron
void AddEnergy(G4double edep, G4int idx, G4int copyNo)
static G4Positron * Positron()
void AddPhoton(const G4DynamicParticle *)
static G4Electron * Electron()
static HistoManager * fManager
void EmAcceptanceGauss(const G4String &title, G4int stat, G4double avr, G4double avr0, G4double rms, G4double limit)
const G4VProcess * GetCreatorProcess() const
const G4ParticleDefinition * fElectron
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
void SetEdepAndRMS(G4int, G4ThreeVector)
void BeginOfAcceptance(const G4String &title, G4int stat)
static constexpr double GeV
const G4DynamicParticle * GetDynamicParticle() const
void AddDeltaElectron(const G4DynamicParticle *)
G4int GetParentID() const
G4int GetProcessSubType() const