//////////////////////////////////////////////////////////////////////// /// \class RAT::Gen_UFO /// /// \brief Top Level Event Producer - for UFO /// /// \author Mark Stringer -- contact person /// /// REVISION HISTORY\n /// Mark Stringer - Copied from VertexGen_Laserball 10/02/2016 /// 07-02-2017 N Barros - Removed instances of low level generators /// - Added concrete implementations of BeginOfRun and EndOfRun /// /// \details This generator simulates bunches of photons from the UFO. User RatDB settings for wavelength and angular distributions. /// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_Gen_UFO__ #define __RAT_Gen_UFO__ #include #include #include #include class G4ParticleDefinition; namespace RAT { class Gen_UFOMessenger; class Gen_UFO : public GLG4Gen { public: Gen_UFO(); virtual ~Gen_UFO(); /// 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 UFO 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 UFO 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 UFO 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 UFO 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 UFO generator to VertexGen_UFO virtual G4String GetVertexState() const; /// specify parameters for position generator - (eg from generator/pos/ commands) These don't apply for this UFO 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 UFO generator to PosGen_UFO 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_UFO *fPosGen; ///< the position generator // VertexGen_UFO *fVtxGen; ///< the vertex generator G4bool fPoisson; ///< poisson fluctuations flag Gen_UFOMessenger* fMessenger;///< Allows the user to change parameters via the command line. }; } // namespace RAT #endif