34 #include "RunAction.hh"
35 #include "DetectorConstruction.hh"
36 #include "PrimaryGeneratorAction.hh"
37 #include "HistoManager.hh"
51 :
G4UserRunAction(),fDetector(det), fPrimary(kin), fRun(0), fHistoManager(0)
68 fRun =
new Run(fDetector);
78 if (
isMaster) G4Random::showEngineStatus();
91 if ( analysisManager->IsActive() ) {
92 analysisManager->OpenFile();
106 if ( analysisManager->IsActive() ) {
107 analysisManager->Write();
108 analysisManager->CloseFile();
112 if (
isMaster) G4Random::showEngineStatus();
The primary generator action class with particle gun.
void BeginOfRunAction(const G4Run *)
virtual G4Run * GenerateRun()
void EndOfRunAction(const G4Run *)
G4ParticleGun * GetParticleGun()
G4double energy(const ThreeVector &p, const G4double m)
G4ParticleDefinition * GetParticleDefinition() const
Detector construction class to define materials and geometry.
void SetPrimary(G4ParticleDefinition *particle, G4double energy)
G4CsvAnalysisManager G4AnalysisManager
G4double GetParticleEnergy() const