34 #include "RunAction.hh"
36 #include "DetectorConstruction.hh"
37 #include "PrimaryGeneratorAction.hh"
38 #include "HistoManager.hh"
53 : fDetector(det), fPrimary(prim)
76 fSumTrack = fSumTrack2 = 0.;
82 if ( analysisManager->IsActive() ) {
83 analysisManager->OpenFile();
92 if (NbOfEvents == 0)
return;
104 G4cout <<
"\n The run consists of " << NbOfEvents <<
" "<< Particle <<
" of "
107 << material->
GetName() <<
" (density: "
111 G4cout <<
"\n Process calls frequency --->";
112 std::map<G4String,G4int>::iterator it;
113 for (it = fProcCounter.begin(); it != fProcCounter.end(); it++) {
115 G4int count = it->second;
116 G4cout <<
"\t" << procName <<
" = " << count;
117 if (procName ==
"Transportation") survive = count;
121 G4cout <<
"\n\n Nb of incident particles surviving after "
126 if (fTotalCount == 0) fTotalCount = 1;
130 G4double MeanFreePath = fSumTrack /fTotalCount;
131 G4double MeanTrack2 = fSumTrack2/fTotalCount;
132 G4double rms = std::sqrt(std::fabs(MeanTrack2 - MeanFreePath*MeanFreePath));
133 G4double CrossSection = 1./MeanFreePath;
139 <<
"\tmassic: " <<
G4BestUnit(massicMFP,
"Mass/Surface")
140 <<
"\n CrossSection:\t" << CrossSection*
cm <<
" cm^-1 "
141 <<
"\t\t\tmassic: " <<
G4BestUnit(massicCS,
"Surface/Mass")
146 G4double MeanTransfer = fEnTransfer/fTotalCount;
149 G4cout <<
"\n mean energy of charged secondaries: " <<
G4BestUnit(MeanTransfer,
"Energy")
150 <<
"\tmass_energy_transfer coef: " <<
G4BestUnit(massTransfCoef,
"Surface/Mass")
155 G4cout <<
"\n Verification : "
156 <<
"crossSections from G4EmCalculator \n";
160 for (it = fProcCounter.begin(); it != fProcCounter.end(); it++) {
170 G4cout <<
"\t" << procName <<
"= "
180 fProcCounter.clear();
184 if ( analysisManager->IsActive() ) {
185 analysisManager->Write();
186 analysisManager->CloseFile();