30 #include "DetectorConstruction.hh"
31 #include "PrimaryGeneratorAction.hh"
42 fParticle(0), fEkin(0.),
71 const Run* localRun =
static_cast<const Run*
>(run);
88 std::ios::fmtflags mode =
G4cout.flags();
89 G4cout.setf(std::ios::fixed,std::ios::floatfield);
98 G4cout <<
"\n ======================== run summary =====================\n";
100 <<
"\n The run is " <<
numberOfEvent <<
" "<< partName <<
" of "
103 << material->
GetName() <<
" (density: "
107 G4cout.setf(mode,std::ios::floatfield);
117 if (rms>0.) rms = std::sqrt(rms);
else rms = 0.;
120 <<
"\n total Stopping Power (keV/um) = "<< fSP/(
keV/
um)
121 <<
" +- " << rms/(
keV/
um)
127 myFile=fopen(
"spower.txt",
"a");
128 fprintf(myFile,
"%e %e %e \n",
136 G4cout.setf(mode,std::ios::floatfield);
void SetPrimary(G4ParticleDefinition *particle, G4double energy)
DetectorConstruction * fDetector
G4double GetAbsorRadius()
static constexpr double keV
const G4String & GetParticleName() const
G4Material * GetAbsorMaterial(G4int i)
static constexpr double um
const G4String & GetName() const
virtual void Merge(const G4Run *)
static constexpr double eV
G4ParticleDefinition * fParticle
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4GLOB_DLL std::ostream G4cout
virtual void Merge(const G4Run *)
Simple detector construction with a box volume placed in a world.
G4double GetDensity() const