30 #include "DetectorConstruction.hh"
31 #include "PrimaryGeneratorAction.hh"
42 fParticle(0), fEkin(0.),
43 fTotalCount(0), fSumTrack(0.), fSumTrack2(0.), fEnTransfer(0.)
63 std::map<G4String,G4int>::iterator it =
fProcCounter.find(procName);
92 const Run* localRun =
static_cast<const Run*
>(run);
99 std::map<G4String,G4int>::const_iterator it;
104 G4int localCount = it->second;
125 std::ios::fmtflags mode =
G4cout.flags();
126 G4cout.setf(std::ios::fixed,std::ios::floatfield);
135 "\n ======================== run summary =====================\n";
137 <<
"\n The run is " <<
numberOfEvent <<
" "<< partName <<
" of "
140 << material->
GetName() <<
" (density: "
144 G4cout.setf(mode,std::ios::floatfield);
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 "
173 std::sqrt(std::fabs(MeanTrack2 - MeanFreePath*MeanFreePath));
174 G4double CrossSection = 1./MeanFreePath;
175 G4double massicMFP = MeanFreePath*density;
180 <<
"\t\t\tmassic: " <<
G4BestUnit(massicMFP,
"Mass/Surface")
181 <<
"\n CrossSection:\t" << CrossSection*
cm <<
" cm^-1 "
182 <<
"\t\t\tmassic: " <<
G4BestUnit(massicCS,
"Surface/Mass")
189 G4cout <<
"\n mean energy of charged secondaries: "
191 <<
"\tmass_energy_transfer coef: "
198 myFile=fopen(
"mfp.txt",
"a");
199 fprintf(myFile,
"%e %e %e \n",
210 G4cout.setf(mode,std::ios::floatfield);
void SetPrimary(G4ParticleDefinition *particle, G4double energy)
DetectorConstruction * fDetector
G4double GetAbsorRadius()
static constexpr double nm
const G4String & GetParticleName() const
G4Material * GetAbsorMaterial(G4int i)
const G4String & GetName() const
virtual void Merge(const G4Run *)
static constexpr double eV
std::map< G4String, G4int > fProcCounter
G4ParticleDefinition * fParticle
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
void CountProcesses(G4String procName)
static constexpr double cm
G4GLOB_DLL std::ostream G4cout
virtual void Merge(const G4Run *)
void SumTrack(G4double track)
Simple detector construction with a box volume placed in a world.
G4double GetDensity() const
void SumeTransf(G4double energy)