Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef ATOOLS_Phys_SelectorList
0002 #define ATOOLS_Phys_SelectorList
0003 
0004 #include "ATOOLS/Phys/Flavour.H"
0005 #include "ATOOLS/Math/Vector.H"
0006 
0007 #include <vector>
0008 
0009 namespace ATOOLS {
0010 
0011   class Selector_Particle {
0012   private:
0013     ATOOLS::Flavour m_fl;
0014     ATOOLS::Vec4D   m_p;
0015   public:
0016     Selector_Particle() :
0017       m_fl(ATOOLS::Flavour(kf_none)), m_p(ATOOLS::Vec4D(0.,0.,0.,0.)) {}
0018     Selector_Particle(ATOOLS::Flavour fl, ATOOLS::Vec4D p) :
0019       m_fl(fl), m_p(p) {}
0020     ~Selector_Particle();
0021 
0022     inline ATOOLS::Flavour Flavour()  const { return m_fl; }
0023     inline ATOOLS::Vec4D   Momentum() const { return m_p; }
0024 
0025     inline void SetFlavour(ATOOLS::Flavour fl) { m_fl=fl; }
0026     inline void SetMomentum(ATOOLS::Vec4D p)   { m_p=p; }
0027   };
0028 
0029   std::ostream &operator<<(std::ostream &ostr,const Selector_Particle &p);
0030 
0031   class Selector_List : public std::vector<Selector_Particle> {
0032   private:
0033     size_t m_nin;
0034     bool m_real;
0035   public:
0036     Selector_List();
0037     Selector_List(const ATOOLS::Flavour_Vector &fl,
0038                   const ATOOLS::Vec4D_Vector &p,
0039                   const size_t& nin);
0040     Selector_List(const ATOOLS::Flavour *fl, size_t n,
0041                   const ATOOLS::Vec4D_Vector &p,
0042                   const size_t& nin);
0043 
0044     void AddFlavour(ATOOLS::Flavour fl);
0045 
0046     void SetMomenta(ATOOLS::Vec4D_Vector p);
0047     ATOOLS::Vec4D_Vector ExtractMomenta();
0048 
0049     inline void SetNIn(const size_t& nin) { m_nin=nin; }
0050     inline const size_t& NIn() const      { return m_nin; }
0051 
0052     inline void SetReal(bool real) { m_real=real; }
0053     inline bool Real() const       { return m_real; }
0054   };
0055 
0056   std::ostream &operator<<(std::ostream &ostr,const Selector_List &p);
0057 }
0058 
0059 #endif