Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/SHERPA-MC/DIM/Tools/Parton.H was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 #ifndef DIM__Tools__Parton_H
0002 #define DIM__Tools__Parton_H
0003 
0004 #include "ATOOLS/Phys/Flavour.H"
0005 #include "ATOOLS/Math/Vector.H"
0006 #include "DIM/Tools/Color.H"
0007 
0008 namespace DIM {
0009 
0010   class Amplitude;
0011   class Splitting;
0012 
0013   class Parton {
0014   public:
0015 
0016     struct Weight {
0017       double m_t, m_w;
0018       std::vector<double> m_v;
0019       inline Weight(const double &t=-1.0,
0020             const double &w=0.0,
0021             const std::vector<double> &v=
0022             std::vector<double>()):
0023     m_t(t), m_w(w), m_v(v) {}
0024       inline Weight(const size_t &n):
0025     m_t(0.0), m_w(1.0), m_v(n,1.0) {}
0026     };// end of struct Weight
0027 
0028     typedef std::vector<Weight> Weight_Vector;
0029 
0030     typedef std::map<const Parton*,Weight_Vector> Weight_Map;
0031 
0032   private:
0033 
0034     Amplitude *p_ampl;
0035 
0036     ATOOLS::Flavour m_f;
0037     ATOOLS::Vec4D   m_p, m_sp;
0038 
0039     Color m_c, m_sc;
0040     int   m_h, m_b;
0041 
0042     std::vector<Parton*> m_s;
0043 
0044     size_t m_id;
0045 
0046     Weight_Map m_ws;
0047 
0048     static size_t s_cnt;
0049 
0050   public:
0051 
0052     Parton(Amplitude *const ampl,const ATOOLS::Flavour &f,
0053        const ATOOLS::Vec4D &p=ATOOLS::Vec4D(),
0054        const Color &c=Color(),const int h=0);
0055 
0056     ~Parton();
0057 
0058     double GetXB() const;
0059 
0060     void AddWeight(const Splitting &c,const int acc);
0061 
0062     double GetWeight(const double &t,std::vector<double> &v) const;
0063 
0064     void SetColor(const Color &c);
0065 
0066     inline const ATOOLS::Flavour &Flav() const { return m_f; }
0067     inline const ATOOLS::Vec4D   &Mom() const  { return m_p; }
0068     inline const Color           &Col() const  { return m_c; }
0069 
0070     inline void SetFlav(const ATOOLS::Flavour &f) { m_f=f; }
0071     inline void SetMom(const ATOOLS::Vec4D &p)    { m_p=p; }
0072     inline void SetCol(const Color &c)            { m_c=c; }
0073 
0074     inline int  Hel() const   { return m_h; }
0075     inline void SetHel(int h) { m_h=h;      }
0076 
0077     inline int  Beam() const   { return m_b; }
0078     inline void SetBeam(int b) { m_b=b;      }
0079 
0080     inline size_t Id() const              { return m_id; }
0081     inline void   SetId(const size_t &id) { m_id=id;     }
0082 
0083     inline const std::vector<Parton*> &S() const { return m_s; }
0084     inline       std::vector<Parton*> &S()       { return m_s; }
0085 
0086     inline void Store()   { m_sp=m_p; m_sc=m_c; }
0087     inline void Restore() { m_p=m_sp; m_c=m_sc; }
0088 
0089     inline Amplitude *Ampl() const { return p_ampl; }
0090 
0091     inline static size_t Counter() { return s_cnt; }
0092 
0093     inline const Weight_Map &Weights() const { return m_ws; }
0094 
0095     inline void ClearWeights() { m_ws.clear(); }
0096 
0097   };// end of class Parton
0098 
0099   std::ostream &operator<<(std::ostream &s,const Parton &p);
0100 
0101   typedef std::vector<Parton*> Parton_Vector;
0102 
0103 }// end of namespace DIM
0104 
0105 #endif