/////////////////////////////////////////////////////////////////// // // Code that is executed for every step. This class invokes the scintillation // code, ensuring scintillation occurs for every step. // If the instance was created by PEnergy, call PEnergy AccumulateData function. // // Author: P G Jones // Author: S Langrock -- contact person // // REVISION HISTORY: // 2013-12-15 : P G Jones - new file, code partially from GLG4SteppingAction // 2017-03-10 : W Heintzelman - Add option to call PEnergy AccumulateData // /////////////////////////////////////////////////////////////////// #ifndef __RAT_SteppingAction_hh__ #define __RAT_SteppingAction_hh__ #include #include namespace RAT { class SteppingAction : public G4UserSteppingAction { public: SteppingAction( Methods::PEnergy* ptrPEnergy = NULL); // Called by Geant4 for each step simulated // aStep: the step simulated void UserSteppingAction( const G4Step* aStep ); private: // Flag to cause PEnergy::AccumulateData function to be called // Set true by PEnergy when it constructs a SteppingAction instance bool fCallPEnergy; // Pointer to PEnergy object that created an instance of SteppingAction: Methods::PEnergy* fPtrPEnergy; }; } //::RAT #endif