Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:10:14

0001 #ifndef SHERPA_Single_Events_Event_Phase_Handler_H
0002 #define SHERPA_Single_Events_Event_Phase_Handler_H
0003 
0004 #include "ATOOLS/Phys/Blob_List.H"
0005 #include "ATOOLS/Phys/Blob.H"
0006 #include "ATOOLS/Org/CXXFLAGS.H"
0007 #include "ATOOLS/Org/Return_Value.H"
0008 
0009 namespace SHERPA {
0010   struct eph {
0011     enum code {
0012       Unspecified         =    0,
0013       Perturbative        =    1,
0014       Hadronization       =    2,
0015       Analysis            =   10,
0016       Userhook            =   20,
0017       Read_In             =   90
0018     };
0019   };// end of struct eph
0020   std::ostream& operator<<(std::ostream&,const eph::code);
0021 
0022   class Event_Phase_Handler {
0023   protected :
0024     eph::code   m_type;
0025     std::string m_name;
0026   public :
0027     Event_Phase_Handler();
0028     Event_Phase_Handler(std::string);
0029     virtual ~Event_Phase_Handler();
0030     virtual ATOOLS::Return_Value::code Treat(ATOOLS::Blob_List*)=0;
0031     virtual void                       CleanUp(const size_t & mode=0)=0;
0032     virtual void                       Finish(const std::string &)=0;
0033 
0034     const eph::code & Type() const          { return m_type; }
0035     const std::string & Name() const        { return m_name; }
0036     void  SetType(const eph::code & type)   { m_type = type; }
0037     void  SetName(const std::string & name) { m_name = name; }
0038   };
0039   /*!
0040     \file 
0041     \brief Contains the class SHERPA::Event_Phase_Handler
0042   */
0043 
0044   /*!
0045     \class Event_Phase_Handler
0046     \brief The base class for all specific event phases (such as, e.g., JetEvolution)
0047 
0048     This is the - mainly abstract - base class for all event phases. Apart from the name and type and 
0049     methods to access these characteristics, and apart from constructors and destructors, this class 
0050     contains two central methods, namely Treat(ATOOLS::Blob_List *) and CleanUp(). The
0051     former is the one through which the concrete event phases interact during the event generation. 
0052     This happens by modifying individual blobs of the list or adding or removing blobs from the list. 
0053     The latter method is used to reset the event phase handlers between two events.
0054   */
0055   /*!
0056     \var std::string Event_Phase_Handler::m_type
0057     The type of the phase. At the moment two types are implemented, "Perturbative" and "Hadronization".
0058   */
0059   /*!
0060     \var std::string Event_Phase_Handler::m_name
0061     The name of the phase. The combination of type and name helps to ensure that only one Event_Phase_Handler
0062     of each type enters into the Event_Handler.
0063   */
0064   /*!
0065     \fn Event_Phase_Handler::Event_Phase_Handler()
0066     Here, the type and name are set - by default - to "Unspecified" and "No Name", respectively.
0067   */
0068   /*!
0069     \fn virtual bool Event_Phase_Handler::Treat(ATOOLS::Blob_List*)
0070     Virtual method to be filled by the specific Event_Phase_Handler. this method basically defines
0071     the role, any of these handlers plays in the event generation process. 
0072   */
0073   /*!
0074     \fn virtual void Event_Phase_Handler::CleanUp()
0075     Virtual method to eventually reset the specific Event_Phase_Handler.
0076   */
0077 }
0078 
0079 #endif
0080