Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef SHERPA_PerturbativePhysics_Perturbative_Interface_H
0002 #define SHERPA_PerturbativePhysics_Perturbative_Interface_H
0003 
0004 #include "ATOOLS/Phys/Blob_List.H"
0005 #include "ATOOLS/Phys/Weights.H"
0006 #include "ATOOLS/Org/Return_Value.H"
0007 
0008 namespace ATOOLS {
0009 
0010   class Cluster_Amplitude;
0011 }
0012 
0013 namespace REMNANTS {
0014   class Remnant_Handler;
0015 }
0016 
0017 namespace SHERPA {
0018   class Matrix_Element_Handler;
0019   class Hard_Decay_Handler;
0020   class Decay_Handler_Base;
0021   class MI_Handler;
0022   class Soft_Collision_Handler;
0023   class Shower_Handler;
0024 
0025   struct mets_bbar_mode {
0026     enum code {
0027       none         = 0,
0028       enabled      = 1,
0029       lowestmulti  = 2,
0030       exclcluster  = 4
0031     };
0032   };
0033 
0034   inline mets_bbar_mode::code operator|(const mets_bbar_mode::code mm1,
0035                                         const mets_bbar_mode::code mm2)
0036   { return (mets_bbar_mode::code)((int)mm1|(int)mm2); }
0037   inline const mets_bbar_mode::code &operator|=(mets_bbar_mode::code &mm1,
0038                                                 const mets_bbar_mode::code mm2)
0039   { return mm1=(mets_bbar_mode::code)((int)mm1|(int)mm2); }
0040   inline mets_bbar_mode::code operator&(const mets_bbar_mode::code mm1,
0041                                         const mets_bbar_mode::code mm2)
0042   { return (mets_bbar_mode::code)((int)mm1&(int)mm2); }
0043   inline const mets_bbar_mode::code &operator&=(mets_bbar_mode::code &mm1,
0044                                                 const mets_bbar_mode::code mm2)
0045   { return mm1=(mets_bbar_mode::code)((int)mm1&(int)mm2); }
0046   inline mets_bbar_mode::code operator^(const mets_bbar_mode::code mm1,
0047                                         const mets_bbar_mode::code mm2)
0048   { return (mets_bbar_mode::code)((int)mm1^(int)mm2); }
0049   inline const mets_bbar_mode::code &operator^=(mets_bbar_mode::code &mm1,
0050                                                 const mets_bbar_mode::code mm2)
0051   { return mm1=(mets_bbar_mode::code)((int)mm1^(int)mm2); }
0052 
0053   std::ostream & operator<<(std::ostream & s,const mets_bbar_mode::code & mm);
0054   std::istream & operator>>(std::istream & s,mets_bbar_mode::code &mm);
0055 
0056   class Perturbative_Interface {
0057   protected :
0058 
0059     Matrix_Element_Handler    * p_me;
0060     Hard_Decay_Handler        * p_dec;
0061     MI_Handler                * p_mi;
0062     Decay_Handler_Base        * p_hd;
0063     Soft_Collision_Handler    * p_sc;
0064     Shower_Handler            * p_shower;        
0065     REMNANTS::Remnant_Handler * p_remnants;
0066 
0067     ATOOLS::Blob *p_hard;
0068     ATOOLS::Blob_List *p_bloblist;
0069 
0070     ATOOLS::Poincare m_cms;
0071 
0072     ATOOLS::Cluster_Amplitude *p_ampl;
0073 
0074     ATOOLS::Weights_Map m_weightsmap, m_lkfweightsmap;
0075     double m_globalkfac, m_maxkfac;
0076     mets_bbar_mode::code m_bbarmode;
0077 
0078     long int m_fails_Moms, m_fails_Ampls, m_fails_Masses;
0079     bool LocalKFactor(ATOOLS::Cluster_Amplitude* ampl);
0080 
0081   public :
0082 
0083     Perturbative_Interface(Matrix_Element_Handler* const,
0084                            Hard_Decay_Handler* const,
0085                            Shower_Handler* const);
0086     Perturbative_Interface(Decay_Handler_Base *const hdh,
0087                Shower_Handler *const psh);
0088     Perturbative_Interface(MI_Handler *const hdh,
0089                Shower_Handler *const psh);
0090     Perturbative_Interface(Soft_Collision_Handler *const sch,
0091                Shower_Handler *const psh);
0092 
0093     ~Perturbative_Interface();
0094 
0095     ATOOLS::Return_Value::code DefineInitialConditions(ATOOLS::Blob*,
0096                                                        ATOOLS::Blob_List*);
0097 
0098     bool FillBlobs();
0099 
0100     int  PerformShowers();
0101     int  PerformDecayShowers();
0102 
0103     void CleanUp();
0104 
0105     inline void SetRemnantHandler(REMNANTS::Remnant_Handler * remnants) { p_remnants = remnants; }
0106 
0107     inline ATOOLS::Weights_Map WeightsMap() const { return m_weightsmap; }
0108 
0109     inline Matrix_Element_Handler    * MEHandler()      const { return p_me; }
0110     inline ATOOLS::Cluster_Amplitude * Amplitude()      const { return p_ampl; }
0111     inline Shower_Handler            * Shower()               { return p_shower; }
0112     inline MI_Handler                * MIHandler()      const { return p_mi; }
0113     inline REMNANTS::Remnant_Handler * RemnantHandler() const { return p_remnants; }
0114   };// end of class Perturbative_Interface
0115 
0116   typedef std::map<std::string,Perturbative_Interface *> PertInterfaceMap;
0117   typedef PertInterfaceMap::iterator                     PertInterfaceIter;
0118 
0119 }// end of namespace SHERPA
0120 
0121 #endif