#include "SolidActionInitialization.hh" #include "SolidDetectorConstruction.hh" #include "SolidPrimaryGeneratorAction.hh" #include "SolidRunAction.hh" #include "SolidEventAction.hh" #include "SolidSteppingAction.hh" #include "SolidTrackingAction.hh" #include "TFile.h" //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... SolidActionInitialization::SolidActionInitialization(SolidDetectorConstruction* _fDetector, TFile* _outp, G4long seed, G4String generatorFile) : G4VUserActionInitialization() { m_detector = _fDetector; m_outp = _outp; m_seed = seed; m_generatorFileName = generatorFile; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... SolidActionInitialization::~SolidActionInitialization() {} //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void SolidActionInitialization::BuildForMaster() const { SolidRunAction * ra = new SolidRunAction(m_outp); SetUserAction(ra); } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void SolidActionInitialization::Build() const { SolidPrimaryGeneratorAction* pga = new SolidPrimaryGeneratorAction(m_detector); if (m_generatorFileName != "") { //Set generator file name if it really exists pga->SetGeneratorFileName(m_generatorFileName); } SetUserAction(pga); SolidRunAction * ra = new SolidRunAction(m_outp); ra->SetSeed(m_seed); SolidEventAction* ea = new SolidEventAction(ra,pga); SolidSteppingAction* step = new SolidSteppingAction(ra,ea); SolidTrackingAction* track = new SolidTrackingAction(); SetUserAction(ra); SetUserAction(ea); SetUserAction(step); SetUserAction(track); } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......