Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef CSSHOWER_Main_CS_Shower_H
0002 #define CSSHOWER_Main_CS_Shower_H
0003 
0004 #include "PDF/Main/Shower_Base.H"
0005 #include "CSSHOWER++/Main/CS_Cluster_Definitions.H"
0006 #include "CSSHOWER++/Showers/Shower.H"
0007 #include "ATOOLS/Phys/Blob_List.H"
0008 
0009 
0010 namespace REMNANTS { class Remnant_Handler; }
0011 
0012 namespace CSSHOWER {
0013   struct partcomp{
0014     bool operator() (const Parton * part1, const Parton * part2) const
0015     {
0016       if (part1->Id() < part2->Id()) return true;
0017       else return false;
0018     }
0019   };
0020 
0021   class Splitting_Function_Base;
0022 
0023   typedef std::map<size_t,std::pair<double,double> > KT2X_Map;
0024 
0025   class CS_Shower : public PDF::Shower_Base {
0026 
0027   private:
0028 
0029     struct Q2_Value {
0030       double m_q2;
0031       ATOOLS::Flavour m_fl;
0032       int m_i, m_j, m_k;
0033       inline Q2_Value(const double &q2,
0034               const ATOOLS::Flavour &fl,
0035               int i, int j, int k):
0036     m_q2(q2), m_fl(fl), m_i(i), m_j(j), m_k(k) {}
0037       inline bool operator<(const Q2_Value &v) const
0038       { return m_q2<v.m_q2; }
0039     };
0040 
0041     PDF::ISR_Handler * p_isr;
0042     int m_kmode, m_type;
0043     bool m_respectq2;
0044     size_t m_maxem, m_nem, m_recocheck;
0045 
0046     Shower          * p_shower;
0047     All_Singlets m_allsinglets;
0048     CS_Cluster_Definitions *p_cluster;
0049     All_Singlets *p_next, *p_refs;
0050 
0051     ATOOLS::Mass_Selector *p_ms;
0052 
0053     ATOOLS::Cluster_Amplitude *p_rampl;
0054 
0055     void   GetKT2Min(ATOOLS::Cluster_Amplitude *const ampl,const size_t &id,
0056              KT2X_Map &kt2xmap,std::set<size_t> &aset);
0057     void   GetKT2Min(ATOOLS::Cluster_Amplitude *const ampl,KT2X_Map &kt2xmap);
0058 
0059     int IsDecay(ATOOLS::Cluster_Amplitude *const ampl,
0060         ATOOLS::Cluster_Leg *const cl) const;
0061 
0062     double HardScale(const ATOOLS::Cluster_Amplitude *const ampl);
0063 
0064     Singlet *TranslateAmplitude(ATOOLS::Cluster_Amplitude *const ampl,
0065                 std::map<ATOOLS::Cluster_Leg*,Parton*> &pmap,
0066                 std::map<Parton*,ATOOLS::Cluster_Leg*> &lmap,
0067                 const KT2X_Map &kt2xmap);
0068 
0069     bool PrepareStandardShower(ATOOLS::Cluster_Amplitude *const ampl);
0070     int  PerformShowers(const size_t &maxem,size_t &nem);
0071 
0072     double Qij2(const ATOOLS::Vec4D &pi,const ATOOLS::Vec4D &pj,
0073         const ATOOLS::Vec4D &pk,const ATOOLS::Flavour &fi,
0074         const ATOOLS::Flavour &fj) const;
0075 
0076   public:
0077 
0078     // constructor 
0079     CS_Shower(PDF::ISR_Handler *const,
0080               MODEL::Model_Base *const,
0081               const int type);
0082 
0083     // destructor
0084     ~CS_Shower();
0085 
0086     //member functions
0087     int  PerformShowers();
0088     int  PerformDecayShowers();
0089 
0090     void AddRBPoint(ATOOLS::Cluster_Amplitude *const ampl);
0091 
0092     bool ExtractPartons(ATOOLS::Blob_List *const blist);
0093 
0094     void CleanUp();
0095 
0096     // inline functions
0097     PDF::Cluster_Definitions_Base * GetClusterDefinitions();
0098     bool PrepareShower(ATOOLS::Cluster_Amplitude *const ampl,
0099                const bool & soft=false);
0100     double JetVeto(ATOOLS::Cluster_Amplitude *const ampl,
0101            const int mode);
0102 
0103     void SetRBOff();
0104     inline void SetRemnants(REMNANTS::Remnant_Handler * remnants) {
0105       p_shower->SetRemnants(remnants);
0106     }
0107 
0108   };// end of class CS_Shower
0109 
0110 }// end of namespace CSSHOWER
0111 
0112 #endif