#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, G4float codeVersion) : G4VUserActionInitialization() { m_detector = _fDetector; m_outp = _outp; m_seed = seed; m_generatorFileName = generatorFile; m_CodeVersion = codeVersion; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... SolidActionInitialization::~SolidActionInitialization() {} //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void SolidActionInitialization::BuildForMaster() const {} //....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, pga); ra->SetSeed(m_seed); ra->SetCodeVersion(m_CodeVersion); 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......