File indexing completed on 2025-04-19 09:09:46
0001 #ifndef AMEGIC_DipoleSubtraction_Single_Virtual_Correction_H
0002 #define AMEGIC_DipoleSubtraction_Single_Virtual_Correction_H
0003
0004 #include "AMEGIC++/Main/Process_Base.H"
0005
0006 #include "AMEGIC++/DipoleSubtraction/Single_LOProcess.H"
0007 #include "AMEGIC++/DipoleSubtraction/DipoleSplitting_Base.H"
0008 #include "PHASIC++/Process/KP_Terms.H"
0009
0010 namespace PDF { class PDF_Base; }
0011
0012 namespace PHASIC {
0013 class Virtual_ME2_Base;
0014 class Multi_Channel;
0015 }
0016
0017 namespace AMEGIC {
0018 class Helicity;
0019 class Amplitude_Handler;
0020 class Phase_Space_Generator;
0021
0022 class Single_Virtual_Correction : public Process_Base {
0023
0024 protected:
0025 std::string m_ptypename,m_pslibname;
0026 ATOOLS::sbt::subtype m_stype,m_user_stype;
0027 ATOOLS::cs_itype::type m_user_imode;
0028 double m_iresult;
0029 Phase_Space_Generator * p_psgen;
0030 PHASIC::Multi_Channel * p_fsmc;
0031
0032 std::vector<std::vector<double> > m_dsijqcd,m_dsijew;
0033 std::vector<std::vector<double> > m_Q2ij;
0034
0035 Single_Virtual_Correction * p_partner;
0036 Single_LOProcess * p_LO_process;
0037 PHASIC::Massive_Kernels * p_kernel_qcd, * p_kernel_ew;
0038 PHASIC::KP_Terms * p_kpterms_qcd, * p_kpterms_ew;
0039 PHASIC::Virtual_ME2_Base * p_loopme;
0040
0041 double * p_reqborn;
0042 std::vector<double> m_cmur,m_wass;
0043 double m_x0,m_x1,m_eta0,m_eta1,m_z0,m_z1;
0044
0045 bool m_force_init, m_sccmur, m_murcoeffvirt, m_loopmapped;
0046 bool m_checkborn, m_checkpoles, m_checkfinite;
0047 size_t m_pspisrecscheme, m_pspfsrecscheme;
0048 size_t m_pspissplscheme, m_pspfssplscheme;
0049 double m_checkthreshold;
0050 int m_bvimode, m_user_bvimode, m_epsmode, m_drmode, m_checkloopmap, m_calcv;
0051
0052 double m_bsum, m_vsum, m_isum, m_n;
0053 double m_mbsum, m_mvsum, m_misum, m_mn;
0054 double m_lastb, m_lastv, m_lasti, m_lastkp, m_lastki;
0055 double m_finite, m_singlepole, m_doublepole;
0056
0057
0058
0059
0060
0061
0062 public:
0063
0064 Single_Virtual_Correction();
0065 ~Single_Virtual_Correction();
0066
0067 void AddPoint(const double &value);
0068 bool ReadIn(const std::string &pid);
0069 void WriteOut(const std::string &pid);
0070 void MPICollect(std::vector<double> &sv,size_t &i);
0071 void MPIReturn(std::vector<double> &sv,size_t &i);
0072 void MPISync(const int mode=0);
0073
0074 bool FillIntegrator(PHASIC::Phase_Space_Handler *const psh);
0075 void SetScale(const PHASIC::Scale_Setter_Arguments &args);
0076
0077 void SetSelector(const PHASIC::Selector_Key &key);
0078 void SetShower(PDF::Shower_Base *const ps);
0079 void SetNLOMC(PDF::NLOMC_Base *const mc);
0080 void SetFixedScale(const std::vector<double> &s);
0081 void SetSelectorOn(const bool on);
0082 void SetGenerator(PHASIC::ME_Generator_Base *const gen);
0083 ATOOLS::Flavour ReMap(const ATOOLS::Flavour &fl,const size_t &id) const;
0084 void SetCaller(PHASIC::Process_Base *const proc);
0085
0086
0087
0088
0089
0090 protected:
0091 void PolarizationNorm();
0092 double Eps_Scheme_Factor(const ATOOLS::Vec4D_Vector& mom);
0093 bool CreateChannelLibrary();
0094
0095
0096
0097
0098
0099
0100 public:
0101 void AddChannels(std::list<std::string>*);
0102 bool NewLibs();
0103 int InitAmplitude(Amegic_Model *,Topology *,
0104 std::vector<Process_Base *> &,
0105 std::vector<Process_Base *> &);
0106 bool SetUpIntegrator();
0107 void RequestVariables(PHASIC::Phase_Space_Handler *const psh);
0108 Single_LOProcess* GetLOProcess() { return p_LO_process; }
0109 Amplitude_Handler * GetAmplitudeHandler() { return p_partner->GetLOProcess()->GetAmplitudeHandler();}
0110 Helicity * GetHelicity() { return p_partner->GetLOProcess()->GetHelicity(); }
0111 double Result() { return m_iresult; }
0112
0113 void SelectLoopProcess();
0114
0115
0116
0117
0118
0119 public:
0120 void SetLookUp(const bool lookup);
0121 std::string LibName() { return p_partner->GetLOProcess()->LibName(); }
0122 std::string PSLibName() { return p_partner->GetLOProcess()->PSLibName(); }
0123 Process_Base * Partner() const { return p_partner; }
0124 void Minimize();
0125
0126 int Type() { return 200; }
0127
0128
0129
0130
0131
0132
0133 public:
0134 double Partonic(const ATOOLS::Vec4D_Vector&,
0135 ATOOLS::Variations_Mode varmode,
0136 int mode);
0137 double DSigma(const ATOOLS::Vec4D_Vector &,bool,
0138 ATOOLS::Variations_Mode varmode,
0139 const int);
0140 double operator()(const ATOOLS::Vec4D_Vector &,
0141 ATOOLS::Variations_Mode varmode,
0142 const int mode);
0143 void FillAmplitudes(std::vector<METOOLS::Spin_Amplitudes>& amps,
0144 std::vector<std::vector<Complex> >& cols);
0145
0146 int NumberOfDiagrams();
0147 Point * Diagram(int i);
0148
0149 bool Combinable(const size_t &idi,const size_t &idj);
0150 const ATOOLS::Flavour_Vector &CombinedFlavour(const size_t &idij);
0151 void FillProcessMap(PHASIC::NLOTypeStringProcessMap_Map *apmap);
0152
0153 inline double * RequestedBorn() { return p_reqborn; }
0154
0155 inline const PHASIC::KP_Terms* KPTermsQCD() { return p_kpterms_qcd; }
0156 inline const PHASIC::KP_Terms* KPTermsEW() { return p_kpterms_ew; }
0157 inline const PHASIC::Massive_Kernels * KernelQCD() { return p_kernel_qcd; }
0158 inline const PHASIC::Massive_Kernels * KernelEW() { return p_kernel_ew; }
0159
0160 inline double Finite() const { return m_finite; }
0161 inline double SinglePole() const { return m_singlepole; }
0162 inline double DoublePole() const { return m_doublepole; }
0163
0164 inline void SetKPz0(const double &z0) { m_z0=z0; }
0165 inline void SetKPz1(const double &z1) { m_z1=z1; }
0166
0167 protected:
0168 double Calc_B();
0169 double Calc_V(const ATOOLS::Vec4D_Vector&,
0170 ATOOLS::Variations_Mode varmode);
0171 double Calc_V_WhenMapped(const ATOOLS::Vec4D_Vector&,
0172 ATOOLS::Variations_Mode varmode);
0173 double Calc_I(const ATOOLS::Vec4D_Vector&);
0174 double Calc_I(const ATOOLS::sbt::subtype,
0175 const std::vector<size_t>&,
0176 PHASIC::Massive_Kernels *,
0177 const PHASIC::KP_Terms*,
0178 const ATOOLS::Vec4D_Vector &,
0179 std::vector<std::vector<double> >&);
0180 void Calc_KP(const ATOOLS::Vec4D_Vector&);
0181 double KPTerms(int mode, PDF::PDF_Base *pdfa,
0182 PDF::PDF_Base *pdfb, double scalefac2=1.0);
0183 double Get_KPTerms(PDF::PDF_Base *pdfa, PDF::PDF_Base *pdfb,
0184 const double&,const double&,
0185 const ATOOLS::Flavour&,const ATOOLS::Flavour&,
0186 const double&);
0187 void CheckBorn();
0188 void CheckFinite(const double &, const double &);
0189 void CheckPoleCancelation(const ATOOLS::Vec4D_Vector);
0190 void FillMEwgts(ATOOLS::ME_Weight_Info&);
0191 void EndOptimize();
0192 void AttachChargeFactors();
0193 void ComputeChargeFactors();
0194 ATOOLS::ist::itype AssignType(const size_t& id,
0195 const ATOOLS::sbt::subtype);
0196 bool AllowAsSpecInPFF(const size_t& i,const size_t& k);
0197
0198 void PrintDSij();
0199
0200 inline void SetCalcV(const int calcv) { m_calcv=calcv; }
0201 };
0202 }
0203
0204
0205
0206 #endif
0207