File indexing completed on 2025-04-19 09:10:05
0001 #ifndef MCATNLO_Main_CS_Gamma_H
0002 #define MCATNLO_Main_CS_Gamma_H
0003
0004 #include "MCATNLO/Showers/Shower.H"
0005 #include "MCATNLO/Main/CS_Cluster_Definitions.H"
0006 #include "PHASIC++/Process/Subprocess_Info.H"
0007 #include "ATOOLS/Phys/Cluster_Amplitude.H"
0008
0009 namespace PHASIC {
0010 class Process_Base;
0011 class Single_Process;
0012 }
0013
0014 namespace MCATNLO {
0015
0016 struct Weight_Key {
0017 size_t m_ij, m_k;
0018 Weight_Key(const size_t &ij,const size_t &k,const ATOOLS::Flavour &flij,
0019 const ATOOLS::Flavour &fli,const ATOOLS::Flavour &flj);
0020 inline bool operator<(const Weight_Key &wk) const
0021 { return m_ij<wk.m_ij?true:(m_ij>wk.m_ij?false:m_k<wk.m_k); }
0022 };
0023
0024 std::ostream &operator<<(std::ostream &str,const Weight_Key &k);
0025
0026 struct Weight_Value {
0027 PHASIC::Process_Base *p_proc;
0028 Splitting_Function_Base *p_sf;
0029 double m_me, m_b, m_muf2, m_mur2;
0030 inline Weight_Value(PHASIC::Process_Base *const proc=NULL,
0031 const double &muf2=0.0,const double &mur2=0.0):
0032 p_proc(proc), p_sf(NULL), m_me(0.0), m_b(0.0),
0033 m_muf2(muf2), m_mur2(mur2) {}
0034 };
0035
0036 std::ostream &operator<<(std::ostream &str,const Weight_Value &w);
0037
0038 typedef std::map<Weight_Key,Weight_Value> Weight_Map;
0039
0040 class CS_MCatNLO;
0041
0042 struct Trial_Weight {
0043 private:
0044 double m_f, m_g, m_h;
0045 public:
0046 inline Trial_Weight(const double &f,
0047 const double &g,const double &h):
0048 m_f(f), m_g(g), m_h(h) {}
0049 inline double MC() const { return m_f/m_g; }
0050 inline double Accept() const { return m_g/m_h; }
0051 inline double Reject() const
0052 { return m_g/m_h*(m_h-m_f)/(m_g-m_f); }
0053 };
0054
0055 class CS_Gamma {
0056 private:
0057
0058 CS_MCatNLO *p_css;
0059 Shower *p_shower;
0060
0061 CS_Cluster_Definitions *p_cluster;
0062 ATOOLS::Mass_Selector *p_ms;
0063
0064 int m_on, m_strict_mapcheck;
0065 double m_weight, m_oef;
0066
0067 int SingleWeight(ATOOLS::Cluster_Amplitude *const rampl,
0068 ATOOLS::Cluster_Leg *const li,
0069 ATOOLS::Cluster_Leg *const lj,
0070 ATOOLS::Cluster_Leg *const lk,const CS_Parameters &cs,
0071 const std::map<size_t,size_t> &idmap,Weight_Map &ws,
0072 const int mode);
0073 int CalculateWeights(ATOOLS::Cluster_Amplitude *const rampl,
0074 const std::map<size_t,size_t> &idmap,
0075 Weight_Map &ws,const int mode);
0076
0077 Weight_Map CalculateWeight(ATOOLS::Cluster_Amplitude *const ampl,
0078 const int mode);
0079
0080 Weight_Value Differential(ATOOLS::Cluster_Amplitude *const ampl,
0081 const ATOOLS::nlo_type::code type
0082 =ATOOLS::nlo_type::lo,
0083 const std::string add="") const;
0084
0085 Trial_Weight TrialWeight(ATOOLS::Cluster_Amplitude *const ampl);
0086
0087 public:
0088
0089 CS_Gamma(CS_MCatNLO *const css,Shower *const shower,
0090 CS_Cluster_Definitions *const clus);
0091
0092 bool Reject();
0093
0094 inline void SetOn(const int on) { m_on=on; }
0095
0096 inline int On() const { return m_on; }
0097
0098 inline double Weight() const { return m_weight; }
0099
0100 inline void SetOEF(const double &oef) { m_oef=oef; }
0101
0102 };
0103
0104 }
0105
0106 #endif