Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef Analysis_Triggers_Midpoint_Cone_H
0002 #define Analysis_Triggers_Midpoint_Cone_H
0003 
0004 #include "AddOns/Analysis/Triggers/Kt_Algorithm.H"
0005 #include "ATOOLS/Phys/Particle_List.H"
0006 #include "ATOOLS/Math/Vector.H"
0007 #include "ATOOLS/Math/Histogram.H"
0008 #include <list>
0009 #include <vector>
0010 
0011 namespace ANALYSIS {
0012   class Primitive_Analysis;
0013 
0014   class Midpoint_Cone : public Jet_Algorithm_Base {
0015 
0016     struct _Vector {
0017       _Vector() 
0018     : p(0.0,0.0,0.0,0.0), pt(0.0), eta(0.0), phi(0.0) {}
0019       
0020       _Vector(const ATOOLS::Vec4D& q) 
0021     : p(q), pt(q.PPerp()), eta(q.Y()), phi(q.Phi()) {}
0022       
0023       ATOOLS::Vec4D p;
0024       double pt, eta, phi;
0025     };
0026 
0027     struct _Proto {
0028       _Vector psum;
0029       std::list<unsigned int> pars;
0030     };
0031 
0032     void _M_do_clustering(double, double);
0033     void _M_check_trial_cone(unsigned int, unsigned int *, double);
0034     unsigned int _M_check_shared_towers(const _Proto&, const _Proto&);
0035     void _M_split_merge(double, std::list<_Proto>::iterator, std::list<_Proto>::iterator);
0036     
0037     void _M_assadd(_Vector&, const _Vector&) const;
0038     void _M_iterate_cone(double, const _Vector&);
0039     void _M_was_it_already_found(const _Proto *);
0040 
0041     //       private data members
0042     //   recombination scheme
0043     int _M_reco, _M_midpoint;
0044     
0045     //   momenta of the particles
0046     std::vector<_Vector> _M_pp;
0047     
0048     //   list of the protojets
0049     std::list<_Proto> _M_proto; 
0050     
0051     //   the list of the overlapping partons
0052     std::list<unsigned int> _M_overlap; 
0053     
0054     //   temporary variable to store the jet momenta
0055     ATOOLS::Particle_List       * p_jets;
0056     std::vector<double> * p_kts;
0057     
0058     static double _S_dphi(double);
0059 
0060     double m_f;
0061 
0062     void AddToKtlist(double );
0063     void AddToJetlist(const ATOOLS::Vec4D &, bool);
0064 
0065   public:
0066     Midpoint_Cone(ATOOLS::Particle_Qualifier_Base * const qualifier,
0067           int reco = 0, double f=.5);
0068     ~Midpoint_Cone();
0069 
0070     bool ConstructJets(const ATOOLS::Particle_List * pl = 0,ATOOLS::Particle_List * jets = 0,
0071                std::vector<double> * kt2 = 0,double R=.7);
0072     int    NumberOfJets();
0073 
0074   private:
0075     struct pT_sort {
0076       bool operator()(const _Proto& p1, const _Proto& p2) const {
0077     return p1.psum.pt > p2.psum.pt;
0078       }
0079     };
0080   };
0081 
0082 
0083 
0084   inline int    Midpoint_Cone::NumberOfJets() { return p_jets->size(); }
0085 
0086   //
0087 }
0088 
0089 #endif