35 #include "DetectorConstruction.hh" 36 #include "PrimaryGeneratorAction.hh" 49 fParticle(0), fEkin(0.),
50 fNbOfTraks0(0), fNbOfTraks1(0),
51 fNbOfSteps0(0), fNbOfSteps1(0),
53 fTrueRange(0.), fTrueRange2(0.),
54 fProjRange(0.), fProjRange2(0.),
55 fTransvDev(0.), fTransvDev2(0.)
74 std::map<G4String,G4int>::iterator it =
fProcCounter.find(procName);
87 const Run* localRun =
static_cast<const Run*
>(run);
108 std::map<G4String,G4int>::const_iterator it;
113 G4int localCount = it->second;
138 G4cout <<
"\n ======================== run summary ======================\n";
142 << material->
GetName() <<
" (density: " 148 G4cout <<
"\n total energy deposit: " 153 G4cout <<
"\n nb tracks/event" 154 <<
" neutral: " << std::setw(wid) <<
fNbOfTraks0/dNbOfEvents
155 <<
" charged: " << std::setw(wid) <<
fNbOfTraks1/dNbOfEvents
156 <<
"\n nb steps/event" 157 <<
" neutral: " << std::setw(wid) <<
fNbOfSteps0/dNbOfEvents
158 <<
" charged: " << std::setw(wid) <<
fNbOfSteps1/dNbOfEvents
165 std::map<G4String,G4int>::iterator it;
168 G4int count = it->second;
169 G4String space =
" ";
if (++index%3 == 0) space =
"\n";
170 G4cout <<
" " << std::setw(20) << procName <<
"="<< std::setw(7) << count
179 if (trueRms>0.) trueRms = std::sqrt(trueRms);
else trueRms = 0.;
183 if (projRms>0.) projRms = std::sqrt(projRms);
else projRms = 0.;
187 if (trvsRms>0.) trvsRms = std::sqrt(trvsRms);
else trvsRms = 0.;
196 G4cout <<
"\n---------------------------------------------------------\n";
197 G4cout <<
" Primary particle : " ;
199 <<
" rms = " <<
G4BestUnit(trueRms,
"Length");
202 <<
" rms = " <<
G4BestUnit(projRms,
"Length");
206 G4cout <<
"\n transverse dispersion at end = " 209 G4cout <<
"\n mass true Range from simulation = " 210 <<
G4BestUnit(fTrueRange*density,
"Mass/Surface")
211 <<
"\n from PhysicsTable (csda range) = " 212 <<
G4BestUnit(rangeTable*density,
"Mass/Surface");
213 G4cout <<
"\n---------------------------------------------------------\n";
virtual void Merge(const G4Run *)
void CountProcesses(G4String procName)
G4double GetDensity() const
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4double GetCSDARange(G4double kinEnergy, const G4ParticleDefinition *, const G4Material *, const G4Region *r=0)
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
G4Material * GetMaterial()
std::map< G4String, G4int > fProcCounter
DetectorConstruction * fDetector
Detector construction class to define materials and geometry.
G4ParticleDefinition * fParticle
void SetPrimary(G4ParticleDefinition *particle, G4double energy)
const G4String & GetName() const
virtual void Merge(const G4Run *)
G4double GetPDGCharge() const