34 #include "DetectorConstruction.hh"
35 #include "PrimaryGeneratorAction.hh"
36 #include "HistoManager.hh"
59 fDetector(det), fParticle(nullptr), fEkin(0.)
72 void Run::Merge(std::map<G4String, ParticleData>& destinationMap,
73 const std::map<G4String, ParticleData>& sourceMap)
const
75 for (
const auto& particleData : sourceMap ) {
78 if ( destinationMap.find(name) == destinationMap.end()) {
112 std::map<G4String,G4int>::iterator
it =
fProcCounter.find(procName);
135 if (Ekin < emin) data.
fEmin = Ekin;
137 if (Ekin > emax) data.
fEmax = Ekin;
166 ParticleData&
data = it->second;
171 if (Ekin < emin) data.fEmin = Ekin;
173 if (Ekin > emax) data.fEmax = Ekin;
185 std::map<G4String,G4int>::const_iterator it =
fgIonMap.find(ionName);
197 const Run* localRun =
static_cast<const Run*
>(run);
212 for (
const auto& procCounter : localRun->
fProcCounter ) {
214 G4int localCount = procCounter.second;
248 << material->
GetName() <<
" (density: "
259 G4int count = procCounter.second;
260 G4String space =
" ";
if (++index%3 == 0) space =
"\n";
261 G4cout <<
" " << std::setw(20) << procName <<
"="<< std::setw(7) << count
272 ParticleData data = particleData.second;
273 G4int count = data.fCount;
279 G4cout <<
" " << std::setw(13) << name <<
": " << std::setw(7) << count
280 <<
" Emean = " << std::setw(wid) <<
G4BestUnit(eMean,
"Energy")
282 <<
" --> " <<
G4BestUnit(eMax,
"Energy") <<
")";
293 if (rmsEdep>0.) rmsEdep = std::sqrt(rmsEdep);
296 G4cout <<
"\n Mean energy deposit per event = "
297 <<
G4BestUnit(fEnergyDeposit,
"Energy") <<
"; rms = "
305 if (rmsEflow>0.) rmsEflow = std::sqrt(rmsEflow);
308 G4cout <<
" Mean energy flow per event = "
309 <<
G4BestUnit(fEnergyFlow,
"Energy") <<
"; rms = "
315 G4cout <<
"\n List of particles emerging from the target :" <<
G4endl;
319 ParticleData data = particleData.second;
320 G4int count = data.fCount;
324 G4double Eflow = data.fEmean/TotNbofEvents;
326 G4cout <<
" " << std::setw(13) << name <<
": " << std::setw(7) << count
327 <<
" Emean = " << std::setw(wid) <<
G4BestUnit(eMean,
"Energy")
340 for (
const auto& ionMapElement :
fgIonMap ) {
342 G4int h1Id = ionMapElement.second;
344 G4cout <<
" " << std::setw(20) << ionName <<
" id = "<< std::setw(3) << h1Id
348 if ( ! analysisManager->
GetH1(h1Id) )
continue;
352 title = ionName +
title;
361 analysisManager->
ScaleH1(ih,fac);
363 for (ih=14; ih<24; ih++) {
366 fac = (
second/(binWidth*unit));
367 analysisManager->
ScaleH1(ih,fac);
371 fProcCounter.clear();
372 fParticleDataMap1.clear();
373 fParticleDataMap2.clear();