34 #include "RunAction.hh"
35 #include "DetectorConstruction.hh"
36 #include "PhysicsList.hh"
38 #include "PrimaryGeneratorAction.hh"
40 #include "HistoManager.hh"
52 fDetector(det),fPhysics(phys),fPrimary(kin),fRun(0),fHistoManager(0)
79 G4Random::showEngineStatus();
85 if ( analysisManager->IsActive() ) {
86 analysisManager->OpenFile();
104 csdaRange = emCalculator.
GetCSDARange(energy,particle,material);
112 if (analysisManager->GetH1Activation(ih))
113 stepMax = analysisManager->GetH1Width(ih)*analysisManager->GetH1Unit(ih);
115 if (analysisManager->GetH1Activation(ih)) {
117 stepMax =
std::min(stepMax, width*csdaRange);
133 if ( analysisManager->IsActive() ) {
134 analysisManager->Write();
135 analysisManager->CloseFile();
139 if (
isMaster) G4Random::showEngineStatus();
void SetPrimary(G4ParticleDefinition *particle, G4double energy)
void EndOfRunAction(const G4Run *)
virtual G4Run * GenerateRun()
G4double GetPDGCharge() const
G4ParticleGun * GetParticleGun()
G4Material * GetAbsorMaterial(G4int i)
G4StepLimiter * GetStepMaxProcess()
HistoManager * fHistoManager
void BeginOfRunAction(const G4Run *)
The primary generator action class with particle gun.
G4CsvAnalysisManager G4AnalysisManager
DetectorConstruction * fDetector
G4double GetParticleEnergy() const
G4double GetCSDARange(G4double kinEnergy, const G4ParticleDefinition *, const G4Material *, const G4Region *r=nullptr)
PrimaryGeneratorAction * fPrimary
G4ParticleDefinition * GetParticleDefinition() const
void SetCsdaRange(G4int i, G4double value)
static G4EmParameters * Instance()
Simple detector construction with a box volume placed in a world.
T min(const T t1, const T t2)
brief Return the smallest of the two arguments