34 #include "DetectorConstruction.hh"
35 #include "PrimaryGeneratorAction.hh"
36 #include "HistoManager.hh"
37 #include "EmAcceptance.hh"
56 fParticle(nullptr), fEkin(0.),
57 fChargedStep(0), fNeutralStep(0),
58 fN_gamma(0), fN_elec(0), fN_pos(0),
144 const Run* localRun =
static_cast<const Run*
>(run);
190 if(norm > 0) norm = 1./
norm;
201 G4double MeanEAbs,MeanEAbs2,rmsEAbs,resolution,rmsres;
202 G4double MeanLAbs,MeanLAbs2,rmsLAbs;
204 std::ios::fmtflags mode =
G4cout.flags();
206 G4cout <<
"\n------------------------------------------------------------\n";
207 G4cout << std::setw(14) <<
"material"
208 << std::setw(17) <<
"Edep RMS"
209 << std::setw(33) <<
"sqrt(E0(GeV))*rmsE/Emean"
210 << std::setw(23) <<
"total tracklen \n \n";
216 rmsEAbs = std::sqrt(
std::abs(MeanEAbs2 - MeanEAbs*MeanEAbs));
225 for(
G4int i=0; i<nEvt; i++) {
234 if(norm1 > 0.0) norm1 = 1.0/norm1;
235 MeanEAbs = sume*norm1;
236 MeanEAbs2 = sume2*norm1;
237 rmsEAbs = std::sqrt(
std::abs(MeanEAbs2 - MeanEAbs*MeanEAbs));
240 resolution= 100.*sqbeam*rmsEAbs/MeanEAbs;
241 rmsres = resolution*qnorm;
249 rmsLAbs = std::sqrt(
std::abs(MeanLAbs2 - MeanLAbs*MeanLAbs));
255 << std::setprecision(5)
256 << std::setw(6) <<
G4BestUnit(MeanEAbs,
"Energy") <<
" : "
257 << std::setprecision(4)
258 << std::setw(5) <<
G4BestUnit( rmsEAbs,
"Energy")
259 << std::setw(10) << resolution <<
" +- "
260 << std::setw(5) << rmsres <<
" %"
261 << std::setprecision(3)
262 << std::setw(10) <<
G4BestUnit(MeanLAbs,
"Length") <<
" +- "
263 << std::setw(4) <<
G4BestUnit( rmsLAbs,
"Length")
266 G4cout <<
"\n------------------------------------------------------------\n";
268 G4cout <<
" Beam particle "
274 G4cout << std::setprecision(6)
277 G4cout <<
"------------------------------------------------------------\n";
283 for (
G4int Id=1; Id<=Idmax+1; Id++) {
294 for (
G4int Id=1; Id<=Idmax; Id++) {
295 G4int iAbsor = Id%nbOfAbsor;
if (iAbsor==0) iAbsor = nbOfAbsor;
299 G4cout << std::setprecision(3)
300 <<
"\n Energy deposition from Energy flow balance : \n"
301 << std::setw(10) <<
" material \t Total Edep \n \n";
304 for (
G4int k=1;
k<=nbOfAbsor;
k++) {
307 <<
"\t " <<
G4BestUnit(EdepTot [
k],
"Energy") <<
"\n";
310 G4cout <<
"\n------------------------------------------------------------\n"
339 G4cout.setf(mode,std::ios::floatfield);
347 if (i>=0 && i<kMaxAbsor) {