35 #include "DetectorConstruction.hh"
36 #include "PrimaryGeneratorAction.hh"
37 #include "HistoManager.hh"
46 fDetector(det), fParticle(0), fEkin(0.),
47 fNbStep1(0), fNbStep2(0),
48 fTrackLen1(0.), fTrackLen2(0.),
69 std::map<G4String,G4int>::iterator it =
fProcCounter.find(procName);
87 ParticleData&
data = it->second;
92 if (Ekin < emin) data.fEmin = Ekin;
94 if (Ekin > emax) data.fEmax = Ekin;
113 const Run* localRun =
static_cast<const Run*
>(run);
130 std::map<G4String,G4int>::const_iterator itp;
135 G4int localCount = itp->second;
145 std::map<G4String,ParticleData>::const_iterator itn;
150 const ParticleData& localData = itn->second;
153 = ParticleData(localData.fCount,
160 data.fCount += localData.fCount;
161 data.fEmean += localData.fEmean;
163 if (emin < data.fEmin) data.fEmin = emin;
165 if (emax > data.fEmax) data.fEmax =
emax;
188 << material->
GetName() <<
" (density: "
197 std::map<G4String,G4int>::iterator it;
200 G4int count = it->second;
201 G4cout <<
"\t" << procName <<
"= " << count;
202 if (procName ==
"Transportation") survive = count;
207 G4cout <<
"\n Nb of incident particles surviving after "
214 G4cout <<
"\n Parcours of incident neutron:";
218 G4double meanCollisTota = meanCollision1 + meanCollision2;
220 G4cout <<
"\n nb of collisions E>1*eV= " << meanCollision1
221 <<
" E<1*eV= " << meanCollision2
222 <<
" total= " << meanCollisTota;
226 G4double meanTrackLtot = meanTrackLen1 + meanTrackLen2;
229 <<
"\n track length E>1*eV= " <<
G4BestUnit(meanTrackLen1,
"Length")
230 <<
" E<1*eV= " <<
G4BestUnit(meanTrackLen2,
"Length")
231 <<
" total= " <<
G4BestUnit(meanTrackLtot,
"Length");
235 G4double meanTimeTo = meanTime1 + meanTime2;
238 <<
"\n time of flight E>1*eV= " <<
G4BestUnit(meanTime1,
"Time")
239 <<
" E<1*eV= " <<
G4BestUnit(meanTime2,
"Time")
246 std::map<G4String,ParticleData>::iterator itn;
249 ParticleData data = itn->second;
250 G4int count = data.fCount;
255 G4cout <<
" " << std::setw(13) << name <<
": " << std::setw(7) << count
256 <<
" Emean = " << std::setw(wid) <<
G4BestUnit(eMean,
"Energy")
std::map< G4String, ParticleData > fParticleDataMap
void SetPrimary(G4ParticleDefinition *particle, G4double energy)
DetectorConstruction * fDetector
const G4String & GetParticleName() const
static const G4double emax
void SumTrackLength(G4int, G4int, G4double, G4double, G4double, G4double)
void ParticleCount(G4String, G4double)
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
void CountProcesses(G4String procName)
G4GLOB_DLL std::ostream G4cout
virtual void Merge(const G4Run *)
G4Material * GetMaterial()
Simple detector construction with a box volume placed in a world.
G4double GetDensity() const