//////////////////////////////////////////////////////////////////////// /// \class RAT::Gen_Laserball /// /// \brief Top Level Event Producer - for Laserball /// /// \author Jose Maneira -- contact person /// /// REVISION HISTORY\n /// first version of VertexGen_Laserball: M. Hedayatipour - unknown\n /// first version of GenLaserball: J. Maneira (Oct. 2014) /// Major revision of Laserball simulation. /// DB access, class structure based on GenELLIE, VertexGen_ELLIE, ... /// 07-02-2017 - N. Barros - Removed low levels generators (inherited from GLG4Gen) /// /// \details This generator simulates bunches of photons from the laserball. User RatDB settings for wavelength and angular distributions. /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_Gen_Laserball__ #define __RAT_Gen_Laserball__ #include #include #include #include class G4ParticleDefinition; namespace RAT { class Gen_LaserballMessenger; class Gen_Laserball : public GLG4Gen { public: Gen_Laserball(); virtual ~Gen_Laserball(); /// Main function - Call the underlying time, vertex and position generators virtual void GenerateEvent(G4Event *event); /// Required by GLG4 - Always returns true virtual bool IsRepeatable() const { return true; }; /// Dummy function - required by GLG4, but does nothing /// @param[in] state SetState state virtual void SetState(G4String state); /// Dummy function - required by GLG4, but returns an empty string virtual G4String GetState() const; /// specify the type of time generator to use to give time BETWEEN Laserball pulses, default is Poisson /// @param[in] state the time generator state virtual void SetTimeGen(G4String state); /// @param[in] offset Time reset to this value virtual void ResetTime(double offset=0.0); /// specify parameters for time generator for BETWEEN Laserball pulses (eg from generator/rate/ commands) /// @param[in] state the time generator state virtual void SetTimeState(G4String state); /// get parameters for time generator for BETWEEN Laserball pulses (eg from generator/rate/ commands) virtual G4String GetTimeState() const; /// specify parameters for vertex generator - (eg from generator/vtx/ commands) These don't apply for this Laserball generator so just print a warning /// @param[in] state the vertex generator state virtual void SetVertexState(G4String state); /// get parameters for vertex generator - fixed for this Laserball generator to VertexGen_Laserball virtual G4String GetVertexState() const; /// specify parameters for position generator - (eg from generator/pos/ commands) These don't apply for this Laserball generator so just print a warning /// @param[in] state the Position generator state virtual void SetPosState(G4String state); /// get parameters for position generator - fixed for this Laserball generator to PosGen_Laserball virtual G4String GetPosState() const; /// Set Poisson fluctuations for number of photons per pulse /// @param[in] set boolean setting, 1 for poisson fluctuations on void SetPoissonFluctuations(G4bool set); protected: G4String fStateStr; ///< dummy string, not used // NFB : FIXME : Remove this after testing // GLG4TimeGen *fTimeGen; ///< the time generator // PosGen_Laserball *fPosGen; ///< the position generator // VertexGen_Laserball *fVtxGen; ///< the vertex generator G4bool fPoisson; ///< poisson fluctuations flag Gen_LaserballMessenger* fMessenger;///< Allows the user to change parameters via the command line. }; } // namespace RAT #endif