34 #include "RunAction.hh"
36 #include "DetectorConstruction.hh"
37 #include "PrimaryGeneratorAction.hh"
52 : fDetector(det), fPrimary(prim)
76 if (NbOfEvents == 0)
return;
88 G4cout <<
"\n The run consists of " << NbOfEvents <<
" "<< Particle <<
" of "
91 << material->
GetName() <<
" (density: "
97 G4cout <<
"\n Process calls frequency --->";
98 std::map<G4String,G4int>::iterator it;
99 for (it = fProcCounter.begin(); it != fProcCounter.end(); it++) {
101 G4int count = it->second;
103 G4cout <<
"\t" << procName <<
" = " << count;
104 if (procName ==
"Transportation") survive = count;
107 if (totalCount == 0)
return;
109 G4double ratio = double(survive)/totalCount;
111 G4cout <<
"\n Nb of incident particles unaltered after "
113 << material->
GetName() <<
" : " << survive
114 <<
" over " << totalCount <<
" incident particles."
115 <<
" Ratio = " << 100*ratio <<
" %" <<
G4endl;
117 if (ratio == 0.)
return;
121 G4double CrossSection = - std::log(ratio)/tickness;
124 G4cout <<
" ---> CrossSection per volume:\t" << CrossSection*
cm <<
" cm^-1 "
125 <<
"\tCrossSection per mass: " <<
G4BestUnit(massicCS,
"Surface/Mass")
130 G4cout <<
"\n Verification from G4EmCalculator: \n";
133 for (it = fProcCounter.begin(); it != fProcCounter.end(); it++) {
143 if (procName !=
"Transportation")
144 G4cout <<
"\t" << procName <<
"= "
151 G4double Ratio = std::exp(-sumc*density*tickness);
152 G4cout <<
"\tExpected ratio of transmitted particles= "
153 << 100*Ratio <<
" %" <<
G4endl;
159 fProcCounter.clear();