File indexing completed on 2025-04-19 09:10:02
0001 #ifndef DIM__Shower__Shower_H
0002 #define DIM__Shower__Shower_H
0003
0004 #include "DIM/Tools/Parton.H"
0005 #include "DIM/Shower/Kernel.H"
0006 #include "DIM/Tools/Amplitude.H"
0007 #include "ATOOLS/Phys/Weights.H"
0008
0009 namespace ATOOLS {
0010 class QCD_Variation_Params;
0011 }
0012 namespace MODEL {
0013 class Model_Base;
0014 class Running_AlphaS;
0015 }
0016 namespace PDF {
0017 class PDF_Base;
0018 class ISR_Handler;
0019 }
0020
0021 namespace DIM {
0022
0023 class Gamma;
0024
0025 class Shower {
0026 public:
0027
0028 struct Reweight_Args {
0029 Splitting *m_s;
0030 int m_acc;
0031 Reweight_Args(Splitting *const s,const int acc):
0032 m_s(s), m_acc(acc) {}
0033 };
0034
0035 struct JetVeto_Args {
0036 ATOOLS::Cluster_Amplitude *p_ampl;
0037 double m_jcv;
0038 int m_acc;
0039 JetVeto_Args(ATOOLS::Cluster_Amplitude *const ampl,
0040 const double &jcv):
0041 p_ampl(ampl), m_jcv(jcv), m_acc(0) {}
0042 };
0043
0044 typedef std::map<ATOOLS::Flavour,Kernel_Vector> SKernel_Map;
0045
0046 typedef std::map<ATOOLS::Flavour,Kernel*> EKernel_Map;
0047 typedef std::map<ATOOLS::Flavour,EKernel_Map> SEKernel_Map;
0048 typedef std::map<int,SEKernel_Map> Kernel_Map;
0049
0050 private:
0051
0052 MODEL::Model_Base *p_model;
0053 PDF::PDF_Base *p_pdf[2];
0054
0055 MODEL::Running_AlphaS *p_as;
0056
0057 Gamma *p_gamma;
0058
0059 ATOOLS::Weights_Map m_weightsmap;
0060
0061 Kernel_Vector m_cks;
0062 SKernel_Map m_sks;
0063 Kernel_Map m_kmap;
0064
0065 double m_tmin[2], m_rewtmin, m_cplfac[2], m_rsf, m_fsf;
0066 double m_weight, m_oef, m_pdfmin[2], m_rcf;
0067
0068 int m_kfac, m_cpl;
0069
0070 unsigned int m_maxem, m_maxrewem;
0071
0072 Splitting m_s;
0073
0074 void AddKernel(Kernel *const k);
0075
0076 void AddWeight(const Amplitude &a,const double &t);
0077
0078 Splitting GeneratePoint(Parton &p,const double &t,
0079 const unsigned int &nem);
0080 Splitting GeneratePoint(const Amplitude &a,const double &t,
0081 const unsigned int &nem);
0082
0083 void Reweight(ATOOLS::QCD_Variation_Params* params,
0084 size_t varindex,
0085 const Reweight_Args& a);
0086
0087 public:
0088
0089 Shower();
0090
0091 ~Shower();
0092
0093 void Init(MODEL::Model_Base *const model,
0094 PDF::ISR_Handler *const isr);
0095
0096 void SetMS(ATOOLS::Mass_Selector *const ms);
0097
0098 int Evolve(Amplitude &a,unsigned int &nem);
0099
0100 double GetXPDF(const double &x,const double &Q2,
0101 const ATOOLS::Flavour &fl,const int b) const;
0102
0103 Kernel *GetKernel(const Splitting &s,const int mode) const;
0104
0105 inline MODEL::Model_Base *Model() const { return p_model; }
0106
0107 inline MODEL::Running_AlphaS *const &AlphaS() const { return p_as; }
0108
0109 inline double TMin(const int i) const { return m_tmin[i]; }
0110
0111 inline double CplFac(const int i) const { return m_cplfac[i]; }
0112
0113 inline double PDFMin(const int i) const { return m_pdfmin[i]; }
0114
0115 inline double GetWeight() const { return m_weight; }
0116 inline const ATOOLS::Weights_Map& GetWeightsMap() const { return m_weightsmap; }
0117
0118 inline int KFactorScheme() const { return m_kfac; }
0119 inline int CouplingScheme() const { return m_cpl; }
0120
0121 inline double MuR2Factor() const { return m_rsf; }
0122
0123 inline const Splitting &LastSplitting() const { return m_s; }
0124
0125 inline void SetGamma(Gamma *const gamma) { p_gamma=gamma; }
0126
0127 inline double OEF() const { return m_oef; }
0128
0129 };
0130
0131 }
0132
0133 #endif