//////////////////////////////////////////////////////////////////// /// \class RAT::PosGen_Laserball /// /// \brief Provides the laserball position for generation. /// /// \author Jose Maneira -- contact person /// /// REVISION HISTORY:\n /// 5/10/14 : J.Maneira - First version (inspired by PosGen_ELLIE) /// 07-02-2017 : N. Barros - Added BeginOfRun /// /// \details Choose the laserball position via SetState string /// /generator/pos/set x y z /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_PosGen_Laserball__ #define __RAT_PosGen_Laserball__ #include #include #include namespace RAT { class PosGen_Laserball : public GLG4PosGen { public: /// Constructor sets the default db name PosGen_Laserball( const std::string& dbname = std::string( "posLaserball" )); /// Destructor virtual ~PosGen_Laserball() { }; /// Initialise parameters from DB void Init(); /// interface for generating the position virtual void GeneratePosition( G4ThreeVector& argResult ); /// interface for setting the state virtual void SetState( G4String newValues ); /// interface for getting the state virtual G4String GetState() const; virtual void BeginOfRun(); protected: G4ThreeVector fPosition; ///< laserball position G4bool fInitDB; ///< flag for DB initialisation int fSimulationMode; ///< Position mode. 0 to use position from this table }; } // namespace RAT #endif