Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:10:16

0001 #ifndef SHRiMPS_Main_Cluster_Algorithm_H
0002 #define SHRiMPS_Main_Cluster_Algorithm_H
0003 
0004 #include "SHRiMPS/Main/Soft_Jet_Criterion.H"
0005 #include "PDF/Main/Cluster_Definitions_Base.H"
0006 #include "ATOOLS/Phys/Cluster_Amplitude.H"
0007 #include "ATOOLS/Phys/Flavour.H"
0008 #include "ATOOLS/Org/Run_Parameter.H"
0009 #include "ATOOLS/Math/Histogram.H"
0010 #include <map>
0011 #include <list>
0012 
0013 namespace ATOOLS { 
0014   class Blob;
0015   class Particle;
0016 }
0017 
0018 namespace PDF { 
0019   class Cluster_Definitions_Base; 
0020   class Jet_Criterion;
0021 }
0022 
0023 namespace SHRIMPS {
0024   typedef std::list<ATOOLS::Particle *> ParticleList;
0025 
0026   class Cluster_Algorithm: public ATOOLS::Mass_Selector {
0027   private:
0028     int           m_mode,m_nlad;
0029     bool          m_resc;
0030     ATOOLS::Vec4D m_rescvec;
0031     double        m_minkt2,m_Ymax;
0032     double        m_showerfac, m_tmax;
0033 
0034     std::map<std::string, ATOOLS::Histogram * > m_histomap;
0035 
0036     ATOOLS::Cluster_Amplitude     * p_ampl;
0037     PDF::Cluster_Definitions_Base * p_clus;
0038     ATOOLS::Mass_Selector         * p_ms;
0039     JF                            * p_jf;
0040     Soft_Jet_Criterion            * p_jets;
0041     
0042     void   CreateLegs(ATOOLS::Blob * const blob);
0043     void   InitLeg(ATOOLS::Cluster_Leg * leg,const double & kt2,
0044            const size_t & nmaxx);
0045     double SetShowerScales();
0046     void   SetAmplitudeProperties(const double & scale);
0047     double PTij2(const ATOOLS::Vec4D & pi,const ATOOLS::Vec4D & pj) const;
0048     double PTi2(const ATOOLS::Vec4D & pi,const ATOOLS::Vec4D & pbeam) const;
0049     int    ColorConnected(const ATOOLS::ColorID &i,
0050               const ATOOLS::ColorID &j) const;
0051     void   WriteOutAndDeleteHistograms();
0052   public:
0053     Cluster_Algorithm(const double & Ymax=10.,const double & minkt2=4.);
0054 
0055     ~Cluster_Algorithm();
0056 
0057     bool Cluster(ATOOLS::Blob *const blob);
0058     
0059     // inline functions
0060     inline ATOOLS::Cluster_Amplitude *Amplitude() { return p_ampl; }
0061     inline void SetShowerParams(const int & mode,const double & minkt2) {
0062       m_mode   = mode; 
0063       m_minkt2 = minkt2;
0064       if (m_mode<2) m_minkt2 = 0.;
0065     }
0066     inline void SetClusterDefinitions(PDF::Cluster_Definitions_Base *const cb) { p_clus=cb; }
0067     inline void SetShowerFac(const double & sfac) { m_showerfac = sfac; }
0068     inline void SetYmax(const double & Ymax)      { m_Ymax      = Ymax; }
0069     inline void SetMinKT2(const double & minkt2)  { m_minkt2    = minkt2; }
0070     inline void SetRescatt(const double & resc)  { m_resc = resc; }
0071     inline void SetTMax(const double & tmax)     { m_tmax = tmax; }
0072     inline void SetNLad(const int & nlad)        { m_nlad = nlad; }
0073 
0074     double Mass(const ATOOLS::Flavour &fl) const;
0075   };// end of class Cluster_Algorithm
0076 
0077 }// end of namespace SHRiMPS
0078 
0079 #endif