34 #include "DetectorConstruction.hh"
35 #include "PrimaryGeneratorAction.hh"
36 #include "HistoManager.hh"
51 :fDetector(det),fKinematic(kin), fProcCounter(0), fMateWall(0),fMateCavity(0)
101 if ( analysisManager->
IsActive() ) {
116 std::ios::fmtflags mode =
G4cout.flags();
117 G4cout.setf(std::ios::fixed,std::ios::floatfield);
128 G4cout <<
"\n ======================== run summary ======================\n";
133 <<
G4BestUnit(energy,
"Energy") <<
" through 2*"
138 G4cout <<
"\n the cavity is "
139 <<
G4BestUnit(fCavityThickness,
"Length") <<
" of "
141 <<
G4BestUnit(fDensityCavity,
"Volumic Mass") <<
"); Mass = "
144 G4cout<<
"\n ============================================================\n";
148 G4cout <<
"\n Process calls frequency --->";
150 G4String procName = (*fProcCounter)[i]->GetName();
151 G4int count = (*fProcCounter)[i]->GetCounter();
152 G4cout <<
" " << procName <<
"= " << count;
159 G4cout <<
"\n Gamma crossSections in wall material :";
162 G4String procName = (*fProcCounter)[i]->GetName();
166 if (massSigma > 0.) {
168 G4cout <<
" " << procName <<
"= "
179 G4double varianceEsec = meanEsecond2 - meanEsecond*meanEsecond;
181 if (varianceEsec>0.) dToverT = std::sqrt(varianceEsec/
fNbSec)/meanEsecond;
187 <<
"\n Mean energy of secondary e- = " <<
G4BestUnit(meanEsecond,
"Energy")
188 <<
" +- " << 100*dToverT <<
" %"
189 <<
" (--> range in wall material = " <<
G4BestUnit(csdaRange,
"Length")
197 G4cout <<
" Mass_energy_transfer coef: "
211 <<
"\n StoppingPower in wall = "
214 <<
G4BestUnit(dedxCavity,
"Energy*Surface/Mass")
220 <<
"\n Charged particle flow in cavity :"
239 G4double varianceEdep = meanEdep2 - meanEdep*meanEdep;
241 if(varianceEdep>0.) dEoverE=std::sqrt(varianceEdep/
fNbEventCavity)/meanEdep;
254 <<
" +- " << 100*dEoverE <<
" %"
256 <<
" (mean value = " <<
G4BestUnit(meantrack,
"Length") <<
")"
257 <<
"\n Total dose in cavity = " << doseCavity/(
MeV/
mg) <<
" MeV/mg"
258 <<
"\n Dose/EnergyFluence = " <<
G4BestUnit(doseOverBeam,
"Surface/Mass")
264 G4double error = ratio*std::sqrt(dEoverE*dEoverE + dToverT*dToverT);
268 <<
"\n (Dose/EnergyFluence)/Mass_energy_transfer = " << ratio
269 <<
" +- " << error <<
G4endl;
275 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
279 <<
"\n StepSize of ch. tracks in wall = "
285 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
288 <<
"\n StepSize of ch. tracks in cavity = "
295 G4cout.setf(mode,std::ios::floatfield);
312 if (NbofEvents == 0)
return;
332 G4double doseOverBeam = doseCavity*surfaceBeam/(NbofEvents*beamEnergy);
338 std::ios::fmtflags mode =
G4cout.flags();
339 G4cout.setf(std::ios::fixed,std::ios::floatfield);
342 G4cout <<
" ---> NbofEvents= " << NbofEvents
343 <<
" NbOfelectr= " <<
fNbSec
344 <<
" Tkin= " <<
G4BestUnit(meanEsecond,
"Energy")
345 <<
" (" << rateEmean <<
" %)"
347 <<
" Dose/EnFluence= " <<
G4BestUnit(doseOverBeam,
"Surface/Mass")
348 <<
" (" << rateDose <<
" %) \n"
352 G4cout.setf(mode,std::ios::floatfield);
360 const Run* localRun =
static_cast<const Run*
>(run);
387 std::vector<OneProcessCount*>::iterator
it;
407 while ((i<nbProc)&&((*
fProcCounter)[i]->GetName()!=procName)) i++;
410 (*fProcCounter)[i]->Count();