Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef AHADIC_Tools_Cluster_H
0002 #define AHADIC_Tools_Cluster_H
0003 
0004 #include "AHADIC++/Tools/Proto_Particle.H"
0005 #include <set>
0006 #include <iostream>
0007 
0008 namespace AHADIC {
0009   static ATOOLS::Vec4D s_axis = ATOOLS::Vec4D(1.,1.,0.,0.);
0010   
0011   class Cluster {
0012   private:
0013     std::pair<Proto_Particle *,Proto_Particle *> m_parts;
0014     ATOOLS::Vec4D m_momentum;
0015   public:
0016     Cluster(std::pair<Proto_Particle *,Proto_Particle *> parts);
0017     Cluster(Proto_Particle * part1,Proto_Particle * part2);
0018     ~Cluster();
0019     void Clear();
0020     void SetMomentum(const ATOOLS::Vec4D & mom) { m_momentum = mom; } 
0021     ATOOLS::Vec4D Momentum() { return m_momentum; } 
0022     Proto_Particle * operator[](size_t pos) {
0023       if (pos==0) return m_parts.first;
0024       if (pos==1) return m_parts.second;
0025       return NULL;
0026     }
0027 
0028     static std::set<Cluster *> s_clusters;
0029     static void Reset();
0030     
0031     friend std::ostream & operator<<(std::ostream &,const Cluster &);
0032   };
0033   
0034   typedef std::list<Cluster *>         Cluster_List;
0035   typedef Cluster_List::iterator       Cluster_Iterator;
0036   typedef Cluster_List::const_iterator Cluster_Const_Iterator;
0037   
0038   std::ostream & operator<<(std::ostream & s, const Cluster_List & pl);
0039 }
0040 #endif