34 #include "PrimaryGeneratorAction.hh"
35 #include "HistoManager.hh"
45 fParticle(0), fEkin(0.),
46 fDecayCount(0), fTimeCount(0), fPrimaryTime(0.),
47 fTimeWindow1(0.), fTimeWindow2(0.)
75 ParticleData&
data = it->second;
80 if (Ekin < emin) data.fEmin = Ekin;
82 if (Ekin > emax) data.fEmax = Ekin;
83 data.fTmean = meanLife;
100 std::map<G4String, ActivityData>::iterator it =
fActivityMap.find(name);
166 const Run* localRun =
static_cast<const Run*
>(run);
202 std::map<G4String,ParticleData>::const_iterator itn;
207 const ParticleData& localData = itn->second;
210 = ParticleData(localData.fCount,
218 data.fCount += localData.fCount;
219 data.fEmean += localData.fEmean;
221 if (emin < data.fEmin) data.fEmin =
emin;
223 if (emax > data.fEmax) data.fEmax =
emax;
224 data.fTmean = localData.fTmean;
232 std::map<G4String,ActivityData>::const_iterator ita;
237 const ActivityData& localData = ita->second;
240 = ActivityData(localData.fNlife_t1,
242 localData.fNdecay_t1t2);
245 data.fNlife_t1 += localData.fNlife_t1;
246 data.fNlife_t2 += localData.fNlife_t2;
247 data.fNdecay_t1t2 += localData.fNdecay_t1t2;
261 G4cout <<
"\n ======================== run summary ======================";
262 G4cout <<
"\n The run was " << nbEvents <<
" " << partName <<
" of "
264 G4cout <<
"\n ===========================================================\n";
266 if (nbEvents == 0) {
return; }
275 std::map<G4String,ParticleData>::iterator
it;
278 ParticleData data = it->second;
279 G4int count = data.fCount;
285 G4cout <<
" " << std::setw(15) << name <<
": " << std::setw(7) << count
286 <<
" Emean = " << std::setw(wid) <<
G4BestUnit(eMean,
"Energy")
288 <<
" --> " <<
G4BestUnit(eMax,
"Energy") <<
")";
302 G4cout <<
"\n Ekin Total (Q single decay): mean = "
303 << std::setw(wid) <<
G4BestUnit(Ebmean,
"Energy")
308 G4cout <<
"\n Momentum balance (excluding gamma desexcitation): mean = "
309 << std::setw(wid) <<
G4BestUnit(Pbmean,
"Energy")
319 G4double halfLife = Tmean*std::log(2.);
321 G4cout <<
"\n Total time of life (full chain): mean = "
322 << std::setw(wid) <<
G4BestUnit(Tmean,
"Time")
324 << std::setw(wid) <<
G4BestUnit(halfLife,
"Time")
335 G4cout <<
"\n Total visible energy (full chain) : mean = "
336 << std::setw(wid) <<
G4BestUnit(Evmean,
"Energy")
347 G4double Activity_perUnitOfMass = 0.0;
349 { Activity_perUnitOfMass = nAtoms_perUnitOfMass/pTimeMean; }
351 G4cout <<
"\n Activity of " << partName <<
" = "
352 << std::setw(wid) << Activity_perUnitOfMass*
g/
becquerel
353 <<
" Bq/g (" << Activity_perUnitOfMass*
g/
curie
362 G4cout <<
" Activities in time window [t1, t2] = ["
367 std::map<G4String,ActivityData>::iterator ita;
370 ActivityData data = ita->second;
372 G4int n2 = data.fNlife_t2;
373 G4int ndecay = data.fNdecay_t1t2;
376 G4cout <<
" " << std::setw(15) << name <<
": "
377 <<
" n(t1) = " << std::setw(7) << n1
378 <<
"\tn(t2) = " << std::setw(7) << n2
379 <<
"\t decays = " << std::setw(7) << ndecay
380 <<
" ---> <actv> = " <<
G4BestUnit(actv,
"Activity") <<
"\n";
389 analysisManager->
ScaleH1(1,factor);
390 analysisManager->
ScaleH1(2,factor);
391 analysisManager->
ScaleH1(3,factor);
392 analysisManager->
ScaleH1(4,factor);
393 analysisManager->
ScaleH1(5,factor);