35 #include "DetectorConstruction.hh"
36 #include "PrimaryGeneratorAction.hh"
37 #include "HistoManager.hh"
46 fDetector(det), fParticle(0), fEkin(0.)
70 std::map<G4String,G4int>::iterator it =
fProcCounter.find(procName);
88 ParticleData&
data = it->second;
93 if (Ekin < emin) data.fEmin = Ekin;
95 if (Ekin > emax) data.fEmax = Ekin;
123 ParticleData& data = it->second;
128 if (Ekin < emin) data.fEmin = Ekin;
130 if (Ekin > emax) data.fEmax = Ekin;
138 const Run* localRun =
static_cast<const Run*
>(run);
153 std::map<G4String,G4int>::const_iterator itp;
158 G4int localCount = itp->second;
168 std::map<G4String,ParticleData>::const_iterator itc;
173 const ParticleData& localData = itc->second;
176 = ParticleData(localData.fCount,
183 data.fCount += localData.fCount;
184 data.fEmean += localData.fEmean;
186 if (emin < data.fEmin) data.fEmin = emin;
188 if (emax > data.fEmax) data.fEmax =
emax;
193 std::map<G4String,ParticleData>::const_iterator itn;
198 const ParticleData& localData = itn->second;
201 = ParticleData(localData.fCount,
208 data.fCount += localData.fCount;
209 data.fEmean += localData.fEmean;
211 if (emin < data.fEmin) data.fEmin = emin;
213 if (emax > data.fEmax) data.fEmax =
emax;
233 << material->
GetName() <<
" (D = "
243 std::map<G4String,G4int>::iterator it;
246 G4int count = it->second;
247 G4String space =
" ";
if (++index%3 == 0) space =
"\n";
248 G4cout <<
" " << std::setw(20) << procName <<
"="<< std::setw(7) << count
257 std::map<G4String,ParticleData>::iterator itc;
260 ParticleData data = itc->second;
261 G4int count = data.fCount;
266 G4cout <<
" " << std::setw(13) << name <<
": " << std::setw(7) << count
267 <<
" Emean = " << std::setw(wid) <<
G4BestUnit(eMean,
"Energy")
278 if (rmsEdep>0.) rmsEdep = std::sqrt(rmsEdep);
281 G4cout <<
"\n Mean energy deposit per event = "
282 <<
G4BestUnit(fEnergyDeposit,
"Energy") <<
"; rms = "
290 if (rmsEflow>0.) rmsEflow = std::sqrt(rmsEflow);
293 G4cout <<
" Mean energy flow per event = "
294 <<
G4BestUnit(fEnergyFlow,
"Energy") <<
"; rms = "
300 G4cout <<
"\n List of particles emerging from the container :" <<
G4endl;
302 std::map<G4String,ParticleData>::iterator itn;
305 ParticleData data = itn->second;
306 G4int count = data.fCount;
310 G4double Eflow = data.fEmean/TotNbofEvents;
312 G4cout <<
" " << std::setw(13) << name <<
": " << std::setw(7) << count
313 <<
" Emean = " << std::setw(wid) <<
G4BestUnit(eMean,
"Energy")
std::map< G4String, ParticleData > fParticleDataMap1
void SetPrimary(G4ParticleDefinition *particle, G4double energy)
DetectorConstruction * fDetector
G4double GetAbsorLength()
std::vector< G4double > fEnergyDeposit[kMaxAbsor]
G4double GetAbsorRadius()
void AddEdep(G4double val)
void ParticleFlux(G4String, G4double)
const G4String & GetParticleName() const
void AddEflow(G4double eflow)
static const G4double emax
std::vector< G4double > fEnergyFlow
void ParticleCount(G4String, G4double)
G4Material * GetAbsorMaterial(G4int i)
const XML_Char const XML_Char * data
const G4String & GetName() const
const G4String & GetProcessName() const
virtual void Merge(const G4Run *)
std::map< G4String, G4int > fProcCounter
G4ParticleDefinition * fParticle
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
std::map< G4String, ParticleData > fParticleDataMap2
void CountProcesses(G4String procName)
G4GLOB_DLL std::ostream G4cout
virtual void Merge(const G4Run *)
Simple detector construction with a box volume placed in a world.