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];
231 G4cout<<
"=========== Mean values without trancating ====================="<<
G4endl;
232 for(j=0; j<
fNmax; j++) {
236 G4cout << std::setprecision(4) <<
"Edep " << nam[j]
239 if(ex > 0.0)
G4cout <<
" res= " << f*sx/ex <<
" %";
243 G4cout<<
"=========== Ratios without trancating ==========================="<<
G4endl;
247 if(xx > 0.0) xx = 1.0/xx;
251 if(y > 0.0) r = std::sqrt(y*xx);
252 G4cout <<
" " << nam[j] <<
" = " << e
259 G4cout<<
"=================================================================="<<
G4endl;
269 if(0 < runID) {
return; }
274 for (j=0; j<
fNmax; j++) {
291 G4cout <<
" Z bremsstrahlung photoeffect compton conversion" <<
G4endl;
292 for(j=1; j<93; ++j) {
297 if(n1 + n2 + n3 + n4 > 0) {
298 G4cout << std::setw(4) << j << std::setw(12) << n1 << std::setw(12) << n2
299 << std::setw(12) << n3 << std::setw(12) << n4 <<
G4endl;
316 for (
G4int i=0; i<25; i++) {
327 for (
G4int i=0; i<25; i++) {
330 if( ( 6<=i && 8>=i) || (11<=i && 13>=i) || (16<=i && 18>=i)) e9 +=
fE[i];
350 fErms[4] += e125*e125;
352 fErms[5] += e925*e925;
368 fHisto->Fill(11,e125,1.0);
369 fHisto->Fill(12,e925,1.0);
420 G4cout <<
"TrackingAction: Primary kinE(MeV)= " << kinE/
MeV
421 <<
"; m(MeV)= " << mass/
MeV
422 <<
"; pos= " << pos <<
"; dir= " << dir <<
G4endl;
434 if(Z > 0 && Z < 93) {
fBrem[Z] += 1.0; }
438 static_cast<const G4VEmProcess*
>(proc)->GetCurrentElement();
441 if(Z > 0 && Z < 93) {
fPhot[Z] += 1.0; }
445 static_cast<const G4VEmProcess*
>(proc)->GetCurrentElement();
448 if(Z > 0 && Z < 93) {
fConv[Z] += 1.0; }
452 static_cast<const G4VEmProcess*
>(proc)->GetCurrentElement();
455 if(Z > 0 && Z < 93) {
fComp[Z] += 1.0; }
462 G4cout <<
"TrackingAction: Secondary electron " <<
G4endl;
468 G4cout <<
"TrackingAction: Secondary positron " <<
G4endl;
472 }
else if (particle ==
fGamma) {
474 G4cout <<
"TrackingAction: Secondary gamma; parentID= " << pid
475 <<
" E= " << kinE <<
G4endl;
487 G4cout <<
"HistoManager::AddEnergy: e(keV)= " << edep/
keV
488 <<
"; volIdx= " << volIndex
489 <<
"; copyNo= " << copyNo
494 }
else if (1 == volIndex) {
496 }
else if (2 == volIndex) {
498 }
else if (3 == volIndex) {
500 }
else if (4 == volIndex) {
502 }
else if (5 == volIndex) {
506 for(
G4int i=0; i<
n; i++) {
543 if(i<fNmax && i>=0) {
545 if(val[1] > 0.0)
fRmstrue[i] = val[1];
void AddPositron(const G4DynamicParticle *)
G4ParticleDefinition * GetDefinition() const
G4int GetParentID() const
void AddPhoton(const G4DynamicParticle *)
G4double GetKineticEnergy() const
CLHEP::Hep3Vector G4ThreeVector
const G4DynamicParticle * GetDynamicParticle() const
void EmAcceptanceGauss(const G4String &title, G4int stat, G4double avr, G4double avr0, G4double rms, G4double limit)
const G4ParticleDefinition * fGamma
void SetEdepAndRMS(G4int, G4ThreeVector)
void BeginOfAcceptance(const G4String &title, G4int stat)
const G4VProcess * GetCreatorProcess() const
G4GLOB_DLL std::ostream G4cout
void AddDeltaElectron(const G4DynamicParticle *)
const G4ParticleDefinition * fElectron
const G4ThreeVector & GetMomentumDirection() const
const G4ThreeVector & GetVertexPosition() const
static G4Positron * Positron()
G4double GetPDGMass() const
const G4double x[NPOINTSGL]
static HistoManager * fManager
void ScoreNewTrack(const G4Track *aTrack)
static G4Electron * Electron()
const G4ParticleDefinition * fPositron
static HistoManager * GetPointer()
G4int GetProcessSubType() const
static const G4double pos
void AddEnergy(G4double edep, G4int idx, G4int copyNo)