Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef PHASIC_Process_Tree_ME2_Base_H
0002 #define PHASIC_Process_Tree_ME2_Base_H
0003 
0004 #include "PHASIC++/Process/Process_Info.H"
0005 #include "ATOOLS/Math/Vector.H"
0006 #include "MODEL/Main/Model_Base.H"
0007 
0008 namespace MODEL { struct Coupling_Map; }
0009 
0010 namespace PHASIC {
0011 
0012   class External_ME_Args;
0013 
0014   class Tree_ME2_Base {
0015   public:
0016 
0017     struct Map_Info {
0018       std::vector<int> m_perm, m_hels;
0019       size_t m_id;
0020     };
0021 
0022   protected:
0023 
0024     const ATOOLS::Flavour_Vector m_flavs;
0025     MODEL::Coupling_Data* p_aqcd, * p_aqed;
0026 
0027     size_t m_namps;
0028     double m_norm;
0029 
0030     void CompleteCombinations
0031     (std::set<std::pair<size_t,size_t> > &combs,
0032      std::map<size_t,ATOOLS::Flavour_Vector> &fls) const;
0033 
0034   public:
0035 
0036     Tree_ME2_Base(const External_ME_Args& args);
0037 
0038     virtual ~Tree_ME2_Base();
0039 
0040     virtual double Calc(const ATOOLS::Vec4D_Vector &p) = 0;
0041 
0042     virtual void SetCouplings(const MODEL::Coupling_Map& cpls);
0043     virtual double AlphaQCD() const;
0044     virtual double AlphaQED() const;
0045 
0046     virtual std::vector<Complex> GetAmplitudes(const size_t &id);
0047     virtual Complex GetPhase(const size_t &id);
0048 
0049     virtual Complex GetHelicityPhase(const ATOOLS::Vec4D &pijt,
0050                      const ATOOLS::Vec4D &eps1);
0051 
0052     virtual std::vector<Map_Info> GetFlavourHelicityMap();
0053 
0054     virtual void FillCombinations
0055     (std::set<std::pair<size_t,size_t> > &combs,
0056      std::map<size_t,ATOOLS::Flavour_Vector> &fls);
0057 
0058     virtual int OrderQCD(const int &id=-1) const;
0059     virtual int OrderEW(const int &id=-1) const;
0060 
0061     virtual double TR() const;
0062 
0063     static Tree_ME2_Base *GetME2(const PHASIC::External_ME_Args& pi);
0064     static Tree_ME2_Base *GetME2(const std::string& tag,
0065                  const PHASIC::External_ME_Args& pi);
0066 
0067     // Legacy method, implemented as wrapper around new versions
0068     static Tree_ME2_Base *GetME2(const PHASIC::Process_Info& pi);
0069 
0070     inline size_t NAmps() const { return m_namps; }
0071 
0072     inline void SetNorm(const double &norm) { m_norm=norm; }
0073 
0074   };
0075 
0076   std::ostream &operator<<(std::ostream &str,
0077                const Tree_ME2_Base::Map_Info &mi);
0078 
0079   class Trivial_Tree : public Tree_ME2_Base {
0080   public:
0081 
0082     Trivial_Tree(const PHASIC::External_ME_Args& args) :
0083       Tree_ME2_Base(args) {}
0084 
0085     double Calc(const ATOOLS::Vec4D_Vector &p);
0086 
0087   };
0088 }
0089 
0090 #define DECLARE_TREEME2_GETTER(NAME,TAG)               \
0091   DECLARE_GETTER(NAME,TAG,PHASIC::Tree_ME2_Base,PHASIC::External_ME_Args);     \
0092   void ATOOLS::Getter<PHASIC::Tree_ME2_Base,PHASIC::External_ME_Args,NAME>::       \
0093   PrintInfo(std::ostream &str,const std::size_t width) const           \
0094   {                                                                \
0095     str<<#TAG;                                                     \
0096   }
0097 
0098 #endif