35 #include "DetectorConstruction.hh"
45 fNbStep1(0), fNbStep2(0),
46 fTrackLen1(0.), fTrackLen2(0.),
58 std::map<const G4VProcess*,G4int>::iterator it =
fProcCounter.find(process);
81 if (Ekin < emin) data.
fEmin = Ekin;
83 if (Ekin > emax) data.
fEmax = Ekin;
107 G4cout <<
"\n Process calls frequency --->";
109 std::map<const G4VProcess*,G4int>::iterator it;
112 G4int count = it->second;
113 G4cout <<
"\t" << procName <<
"= " << count;
114 if (procName ==
"Transportation") survive = count;
119 G4cout <<
"\n Nb of incident particles surviving after "
126 G4cout <<
"\n Parcours of incident neutron:";
130 G4double meanCollisTota = meanCollision1 + meanCollision2;
132 G4cout <<
"\n nb of collisions E>1*eV= " << meanCollision1
133 <<
" E<1*eV= " << meanCollision2
134 <<
" total= " << meanCollisTota;
138 G4double meanTrackLtot = meanTrackLen1 + meanTrackLen2;
141 <<
"\n track length E>1*eV= " <<
G4BestUnit(meanTrackLen1,
"Length")
142 <<
" E<1*eV= " <<
G4BestUnit(meanTrackLen2,
"Length")
143 <<
" total= " <<
G4BestUnit(meanTrackLtot,
"Length");
147 G4double meanTimeTo = meanTime1 + meanTime2;
150 <<
"\n time of flight E>1*eV= " <<
G4BestUnit(meanTime1,
"Time")
151 <<
" E<1*eV= " <<
G4BestUnit(meanTime2,
"Time")
158 std::map<G4String,ParticleData>::iterator itn;
161 ParticleData data = itn->second;
162 G4int count = data.fCount;
167 G4cout <<
" " << std::setw(13) << name <<
": " << std::setw(7) << count
168 <<
" Emean = " << std::setw(wid) <<
G4BestUnit(eMean,
"Energy")
187 const Run* localRun =
static_cast<const Run*
>(run);
199 std::map<const G4VProcess*,G4int>::const_iterator itp;
204 G4int localCount = itp->second;
213 std::map<G4String,ParticleData>::const_iterator itn;
218 const ParticleData& localData = itn->second;
221 = ParticleData(localData.fCount,
228 data.fCount += localData.fCount;
229 data.fEmean += localData.fEmean;
231 if (emin < data.fEmin) data.fEmin = emin;
233 if (emax > data.fEmax) data.fEmax = emax;
virtual void Merge(const G4Run *)
void CountProcesses(G4String procName)
std::map< G4String, ParticleData > fParticleDataMap
const G4String & GetName() const
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
void SumTrackLength(G4int, G4int, G4double, G4double, G4double, G4double)
G4GLOB_DLL std::ostream G4cout
std::map< G4String, G4int > fProcCounter
G4Material * GetMaterial()
DetectorConstruction * fDetector
Detector construction class to demonstrate various ways of placement.
virtual void Merge(const G4Run *)
void ParticleCount(G4String, G4double)
Run(DetectorConstruction *)