Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:09:48

0001 #ifndef AMISIC_Perturbative_MI_Process_H
0002 #define AMISIC_Perturbative_MI_Process_H
0003 /*!
0004   \file MI_Process.H
0005   \brief Declares the class MI_Process
0006 */
0007 
0008 #include "ATOOLS/Phys/Particle.H"
0009 #include "ATOOLS/Phys/Momenta_Stretcher.H"
0010 #include "EXTRA_XS/Main/ME2_Base.H"
0011 
0012 namespace AMISIC {
0013   
0014   class XS_Base {
0015   protected:
0016     std::string m_name;
0017     double      m_Ms, m_Mt, m_Mu, m_lastxs, m_shat, m_that, m_uhat;
0018     std::vector<std::vector<int> > m_colours;
0019     std::vector<double>            m_masses, m_masses2;
0020   public:
0021     XS_Base();
0022     explicit XS_Base(const std::vector<double> & masses);
0023     virtual ~XS_Base();
0024     
0025     virtual void Calc(const double & s,const double & t,const double & u)=0;
0026     virtual bool SetColours(const ATOOLS::Flavour_Vector & flavs)=0;
0027     virtual double operator()() { return m_lastxs; }
0028     virtual const int & Colour(const size_t & i,const size_t & j) const {
0029       return m_colours[i][j];
0030     }
0031     virtual const std::string & Name() const { return m_name; }
0032   };
0033 
0034 #define DECLARE_XSBASE_GETTER(NAME,TAG)                  \
0035   DECLARE_GETTER(NAME,TAG,AMISIC::XS_Base,ATOOLS::Flavour_Vector);   \
0036   void ATOOLS::Getter<AMISIC::XS_Base,ATOOLS::Flavour_Vector,NAME>:: \
0037   PrintInfo(std::ostream &str,const size_t width) const          \
0038   {                                  \
0039     str<<#TAG;                               \
0040   }
0041 
0042 
0043   class MI_Process {
0044   private:
0045     std::string                  m_name;
0046     ATOOLS::Momenta_Stretcher    m_stretcher;
0047     std::vector<ATOOLS::Flavour> m_flavs;
0048     std::vector<double>          m_masses, m_masses2;
0049     std::vector<ATOOLS::Vec4D>   m_momenta;
0050     XS_Base   * p_me2;
0051     double      m_emin;
0052     bool        m_masslessIS;
0053 
0054     bool AllowedKinematics(const double & Ehat);
0055     void MasslessKinematics(const double & pt2,const double & phi,
0056                 const double & y3,const double & y4);
0057   public:
0058     explicit MI_Process(const std::vector<ATOOLS::Flavour> & flavs);
0059     ~MI_Process();
0060 
0061     bool MakeKinematics(const double & pt2,const double & y3,const double & y4,
0062             const double & Ehat);
0063     ATOOLS::Particle * GetParticle(const size_t & i);
0064 
0065     inline const ATOOLS::Flavour & Flav(const size_t & i) const {
0066       return m_flavs[i];
0067     }
0068     inline const ATOOLS::Vec4D & Momentum(size_t i) const {
0069       return m_momenta[i];
0070     }
0071     inline void SetME2(XS_Base * me2) { p_me2 = me2; }
0072     inline double operator()() const { return (*p_me2)(); }
0073     inline bool SetColours() const { return p_me2->SetColours(m_flavs); }
0074     inline const std::string & Name() const { return m_name; }
0075   };
0076 }
0077 
0078 #endif