43 #include "HistoManager.hh"
51 #include "EmAcceptance.hh"
110 fHisto->Add1D(
"10",
"Evis/E0 in central crystal",
fBinsED,0.0,1,1.0);
113 fHisto->Add1D(
"13",
"Energy (MeV) of delta-electrons",
120 fHisto->Add1D(
"19",
"Number of vertex hits",20,-0.5,19.5,1.0);
138 for(
G4int i=0; i<6; i++) {
149 fBrem.resize(93,0.0);
150 fPhot.resize(93,0.0);
151 fComp.resize(93,0.0);
152 fConv.resize(93,0.0);
166 G4cout <<
"HistoManager: Histograms are booked and run has been started"
177 G4cout <<
"HistoManager: End of run actions are started RunID# "
179 G4String nam[6] = {
"1x1",
"3x3",
"5x5",
"E1/E9 ",
"E1/E25",
"E9/E25"};
183 G4cout<<
"================================================================="
186 if(
fEvt > 0) x = 1.0/
x;
188 for(j=0; j<
fNmax; j++) {
194 fErms[j] = std::sqrt(y);
198 if(xx > 0.0) xx = 1.0/
xx;
212 G4cout << std::setprecision(4) <<
"Average number of e- " << xe <<
G4endl;
213 G4cout << std::setprecision(4) <<
"Average number of gamma " << xg <<
G4endl;
214 G4cout << std::setprecision(4) <<
"Average number of e+ " << xp <<
G4endl;
215 G4cout << std::setprecision(4) <<
"Average number of steps " << xs <<
G4endl;
221 if(xx > 0.0) xx = 1.0/
xx;
223 G4cout << std::setprecision(4) <<
"Edep " << nam[j]
226 if(ex > 0.1)
G4cout <<
" res= " << f*sx/ex <<
" % " <<
fStat[j];
231 <<
"=========== 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 <<
" %";
244 <<
"=========== Ratios without trancating ==========================="<<
G4endl;
248 if(xx > 0.0) xx = 1.0/
xx;
252 if(y > 0.0) r = std::sqrt(y*xx);
253 G4cout <<
" " << nam[j] <<
" = " << e
261 <<
"=================================================================="<<
G4endl;
271 if(0 < runID) {
return; }
276 for (j=0; j<
fNmax; j++) {
293 G4cout <<
" Z bremsstrahlung photoeffect compton conversion" <<
G4endl;
294 for(j=1; j<93; ++j) {
299 if(n1 + n2 + n3 + n4 > 0) {
300 G4cout << std::setw(4) << j << std::setw(12) << n1 << std::setw(12) << n2
301 << std::setw(12) << n3 << std::setw(12) << n4 <<
G4endl;
318 for (
G4int i=0; i<25; i++) {
329 for (
G4int i=0; i<25; i++) {
332 if( ( 6<=i && 8>=i) || (11<=i && 13>=i) || (16<=i && 18>=i)) e9 +=
fE[i];
352 fErms[4] += e125*e125;
354 fErms[5] += e925*e925;
370 fHisto->Fill(11,e125,1.0);
371 fHisto->Fill(12,e925,1.0);
422 G4cout <<
"TrackingAction: Primary kinE(MeV)= " << kinE/
MeV
423 <<
"; m(MeV)= " << mass/
MeV
424 <<
"; pos= " << pos <<
"; dir= " << dir <<
G4endl;
436 if(Z > 0 && Z < 93) {
fBrem[
Z] += 1.0; }
440 static_cast<const G4VEmProcess*
>(proc)->GetCurrentElement();
443 if(Z > 0 && Z < 93) {
fPhot[
Z] += 1.0; }
447 static_cast<const G4VEmProcess*
>(proc)->GetCurrentElement();
450 if(Z > 0 && Z < 93) {
fConv[
Z] += 1.0; }
454 static_cast<const G4VEmProcess*
>(proc)->GetCurrentElement();
457 if(Z > 0 && Z < 93) {
fComp[
Z] += 1.0; }
464 G4cout <<
"TrackingAction: Secondary electron " <<
G4endl;
470 G4cout <<
"TrackingAction: Secondary positron " <<
G4endl;
474 }
else if (particle ==
fGamma) {
476 G4cout <<
"TrackingAction: Secondary gamma; parentID= " << pid
477 <<
" E= " << kinE <<
G4endl;
489 G4cout <<
"HistoManager::AddEnergy: e(keV)= " << edep/
keV
490 <<
"; volIdx= " << volIndex
491 <<
"; copyNo= " << copyNo
496 }
else if (1 == volIndex) {
498 }
else if (2 == volIndex) {
500 }
else if (3 == volIndex) {
502 }
else if (4 == volIndex) {
504 }
else if (5 == volIndex) {
508 for(
G4int i=0; i<
n; i++) {
545 if(i<fNmax && i>=0) {
547 if(val[1] > 0.0)
fRmstrue[i] = val[1];