35 #include "DetectorConstruction.hh"
36 #include "PrimaryGeneratorAction.hh"
50 fParticle(0), fEkin(0.),
51 fTotalCount(0), fSumTrack(0.), fSumTrack2(0.), fEnTransfer(0.)
70 std::map<G4String,G4int>::iterator it =
fProcCounter.find(procName);
99 const Run* localRun =
static_cast<const Run*
>(run);
106 std::map<G4String,G4int>::const_iterator it;
111 G4int localCount = it->second;
142 G4cout <<
"\n ======================== run summary ======================\n";
146 << material->
GetName() <<
" (density: "
151 G4cout <<
"\n Process calls frequency --->";
152 std::map<G4String,G4int>::iterator it;
155 G4int count = it->second;
156 G4cout <<
"\t" << procName <<
" = " << count;
157 if (procName ==
"Transportation") survive = count;
161 G4cout <<
"\n\n Nb of incident particles surviving after "
172 G4double rms = std::sqrt(std::fabs(MeanTrack2 - MeanFreePath*MeanFreePath));
173 G4double CrossSection = 1./MeanFreePath;
174 G4double massicMFP = MeanFreePath*density;
179 <<
"\tmassic: " <<
G4BestUnit(massicMFP,
"Mass/Surface")
180 <<
"\n CrossSection:\t" << CrossSection*
cm <<
" cm^-1 "
181 <<
"\t\t\tmassic: " <<
G4BestUnit(massicCS,
"Surface/Mass")
189 G4cout <<
"\n mean energy of charged secondaries: "
191 <<
"\n ---> mass_energy_transfer coef: "
197 G4cout <<
"\n Verification : "
198 <<
"crossSections from G4EmCalculator \n";
206 procName,material)/density;
210 procName,material)/density;
212 G4cout <<
" " << procName <<
"= "
void SetPrimary(G4ParticleDefinition *particle, G4double energy)
DetectorConstruction * fDetector
const G4String & GetParticleName() const
const G4String & GetName() const
virtual void Merge(const G4Run *)
std::map< G4String, G4int > fProcCounter
G4ParticleDefinition * fParticle
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4double ComputeCrossSectionPerVolume(G4double kinEnergy, const G4ParticleDefinition *, const G4String &processName, const G4Material *, G4double cut=0.0)
void CountProcesses(G4String procName)
G4double GetCrossSectionPerVolume(G4double kinEnergy, const G4ParticleDefinition *, const G4String &processName, const G4Material *, const G4Region *r=nullptr)
static constexpr double cm
G4GLOB_DLL std::ostream G4cout
virtual void Merge(const G4Run *)
G4Material * GetMaterial()
void SumTrack(G4double track)
Simple detector construction with a box volume placed in a world.
G4double GetDensity() const
void SumeTransf(G4double energy)