34 #include "RunAction.hh"
35 #include "DetectorConstruction.hh"
36 #include "PrimaryGeneratorAction.hh"
37 #include "RunActionMessenger.hh"
52 fHisto(0),fDetector(det),fKinematic(kin),fRunActionMessenger(0)
92 fHisto->
Add1D(
"1",
"Edep (MeV/mm) along absorber (mm)", nbBins, 0, length,
mm);
93 fHisto->
Add1D(
"2",
"DEDX (MeV/mm) of proton", 100, -3., 7.);
94 fHisto->
Add1D(
"3",
"DEDX (MeV/mm) of monopole", 100, -3., 7.);
106 if (nEvents == 0) {
return; }
119 G4cout <<
"\n The run consists of " << nEvents <<
" "<< particle <<
" of "
122 << matName <<
" (density: "
130 if (rms>0.) { rms = std::sqrt(rms); }
140 G4double ekin[100], dedxproton[100], dedxmp[100];
144 for(i = 0; i < 100; ++i) {
154 for(i=0; i<100; i++) {
155 G4cout <<
" E(MeV)= " << ekin[i] <<
" dedxp= " << dedxproton[i]
156 <<
" dedxmp= " << dedxmp[i]
170 for(i=0; i<100; ++i) {
181 CLHEP::HepRandom::showEngineStatus();
189 G4cout <<
"FillHisto " << ih <<
" x=" << x <<
" weight= " << weight
The primary generator action class with particle gun.
static constexpr double mm
void BeginOfRunAction(const G4Run *)
G4double GetRange(G4double kinEnergy, const G4ParticleDefinition *, const G4Material *, const G4Region *r=nullptr)
const G4String & GetName() const
G4double GetDensity() const
G4double ComputeElectronicDEDX(G4double kinEnergy, const G4ParticleDefinition *, const G4Material *mat, G4double cut=DBL_MAX)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
DetectorConstruction * fDetector
const G4String & GetParticleName() const
void Fill(G4int, G4double, G4double)
G4Material * GetAbsorMaterial(G4int i)
RunActionMessenger * fRunActionMessenger
PrimaryGeneratorAction * fKinematic
G4GLOB_DLL std::ostream G4cout
G4int GetNumberOfEvent() const
void FillHisto(G4int id, G4double x, G4double weight=1.0)
void ScaleH1(G4int, G4double)
void EndOfRunAction(const G4Run *)
void Add1D(const G4String &, const G4String &, G4int nb, G4double x1, G4double x2, G4double u=1.)
G4double GetMaxStepSize()
G4ParticleGun * GetParticleGun()
G4double energy(const ThreeVector &p, const G4double m)
G4ParticleDefinition * GetParticleDefinition() const
static const G4double fac
Detector construction class to demonstrate various ways of placement.
static constexpr double MeV
void SetVerbose(G4int val)
static constexpr double keV
G4double GetParticleEnergy() const
void SetFileName(const G4String &)