Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-02 08:51:44

0001 #ifndef GAM2_CFF_STANDARD_H
0002 #define GAM2_CFF_STANDARD_H
0003 
0004 /**
0005  * @file GAM2CFFStandard.h
0006  * @author Bryan BERTHOU (SPhN / CEA Saclay)
0007  * @author Hervé MOUTARDE (SPhN / CEA Saclay)
0008  * @author Hervé MOUTARDE (SPhN / CEA Saclay)
0009  * @date September 08, 2014
0010  * @version 1.0
0011  */
0012 
0013 #include <complex>
0014 #include <map>
0015 #include <string>
0016 #include <vector>
0017 
0018 #include "../../../beans/automation/BaseObjectData.h"
0019 #include "GAM2ConvolCoeffFunctionModule.h"
0020 
0021 #include "../../../../../include/algorithm/LiSK/lisk.hpp"
0022 
0023 namespace NumA {
0024 class FunctionType1D;
0025 } /* namespace NumA */
0026 namespace PARTONS {
0027 class PartonDistribution;
0028 } /* namespace PARTONS */
0029 
0030 namespace PARTONS {
0031 
0032 /**
0033  * @class GAM2CFFStandard
0034  *
0035  * Class used to compute CFF for photoproduction of diphoton
0036  * Used formulas are presented in
0037  * https://arxiv.org/pdf/2108.03426.pdf
0038  * (called the NLO paper),
0039  * in some cases we refer also to:
0040  * https://arxiv.org/pdf/2108.03426.pdf
0041  * (OG's MSc thesis)
0042  *
0043  * Available CFF types: H, E, Ht, Et.
0044  */
0045 class GAM2CFFStandard: public GAM2ConvolCoeffFunctionModule {
0046 public:
0047 
0048     static const unsigned int classId; ///< Unique ID to automatically register the class in the registry.
0049 
0050     /**
0051      * Constructor.
0052      * See BaseObject::BaseObject and ModuleObject::ModuleObject for more details.
0053      * @param className Name of last child class.
0054      */
0055     GAM2CFFStandard(const std::string &className);
0056 
0057     virtual GAM2CFFStandard* clone() const;
0058 
0059     /**
0060      * Default destructor.
0061      */
0062     virtual ~GAM2CFFStandard();
0063 
0064     virtual void resolveObjectDependencies();
0065 
0066     void prepareSubModules(
0067             const std::map<std::string, BaseObjectData>& subModulesData);
0068 
0069     // ##### GETTERS & SETTERS #####
0070 
0071     /**
0072      * Get alphaS module.
0073      */
0074     RunningAlphaStrongModule* getRunningAlphaStrongModule() const;
0075 
0076     /**
0077      * Set alphaS module.
0078      */
0079     void setRunningAlphaStrongModule(
0080             RunningAlphaStrongModule* pRunningAlphaStrongModule);
0081 
0082     // Set iEpsilon.
0083     void setIEpsilon(double iEps);
0084 
0085     // Get iEpsilon.
0086     double getIEpsilon() const;
0087 
0088     // Only evaluate Re (0), Im (1) or both (2) - set.
0089     void setReIm(int reim);
0090 
0091     // Only evaluate Re (0), Im (1) or both (2) - get.
0092     int getReIm() const;
0093 
0094     // Set if phi-dependemt.
0095     void setPhiDep(bool phiDep);
0096 
0097     // Get if phi-dependemt.
0098     bool getPhiDep() const;
0099 
0100     double Convol_NLO_V_x(double x, const std::vector<double>& params);
0101     double Convol_NLO_V_x_Sym(double x, const std::vector<double>& params);
0102     double Convol_NLO_V_x_Sym_Const(double x,
0103             const std::vector<double>& params);
0104 
0105     double Convol_NLO_V_xz(double x, double z,
0106             const std::vector<double>& params);
0107 
0108 protected:
0109 
0110     /**
0111      * Copy constructor.
0112      * @param other
0113      */
0114     GAM2CFFStandard(const GAM2CFFStandard &other);
0115 
0116     virtual void initModule();
0117     virtual void isModuleWellConfigured();
0118 
0119     virtual std::complex<double> computeUnpolarized();
0120     virtual std::complex<double> computePolarized();
0121 
0122     double m_CF;                     ///< ( Nc^2 - 1 ) / ( 2 Nc ) (colour)
0123     double m_alphaSOver2Pi;
0124 
0125 private:
0126 
0127     LiSK::LiSK<std::complex<double> > m_lisk;
0128 
0129     double gslIntegrationWrapper(NumA::FunctionType1D* functor,
0130             NumA::FunctionType1D* functorSym,
0131             NumA::FunctionType1D* functorSymConst,
0132             const std::vector<double>& range,
0133             const std::vector<double>& params);
0134 
0135     RunningAlphaStrongModule *m_pRunningAlphaStrongModule; ///< Related alphaS module.
0136 
0137     NumA::FunctionType1D* m_pConvol_NLO_V_x;
0138     NumA::FunctionType1D* m_pConvol_NLO_V_x_Sym;
0139     NumA::FunctionType1D* m_pConvol_NLO_V_x_Sym_Const;
0140 
0141     double m_quark_diagonal_V;
0142     double m_quark_diagonal_A;
0143 
0144     double computeCubedChargeAveragedGPD(
0145             const PartonDistribution &partonDistribution);
0146 
0147     void computeDiagonalGPD_V();
0148     void computeDiagonalGPD_A();
0149 
0150     void initFunctorsForIntegrations();
0151 
0152     // Trace \mathcal{A}, NLO paper, Eq. (21)
0153     double A(double s, const std::vector<double>& beta,
0154             const std::vector<double>& ee, const std::vector<double>& ek) const;
0155 
0156     // LO amplitude for single photons permutation, NLO paper, Eq. (20)
0157     std::complex<double> M0(double s, double x, double xi,
0158             const std::vector<double>& beta, const std::vector<double>& ee,
0159             const std::vector<double>& ek);
0160 
0161     // Sum of finite parts of amplitudes 2.L/R and 3.L/R, NLO paper, Eqs. (26)-(29)
0162     // NOTE: the factorization scale dependent term is included in the collinear part!
0163     std::complex<double> M23LR(double s, double x, double xi,
0164             const std::vector<double>& beta, const std::vector<double>& ee,
0165             const std::vector<double>& ek);
0166 
0167     // M3M amplitude, NLO paper, Eq. (30)
0168     std::complex<double> M3M(double s, double x, double xi,
0169             const std::vector<double>& beta, const std::vector<double>& ee,
0170             const std::vector<double>& ek);
0171 
0172     // Trace structures in amplitudes 4.L and 5.L,
0173     // NLO paper, Eqs. (43)-(44), see also the Mathematica notebook Traces
0174     // Tr_4/5L_Fnab is the trace multiplying the function F_nab (see NLO paper)
0175     double Tr_4L_F210(double xi, double s, const std::vector<double>& beta,
0176             const std::vector<double>& ee, const std::vector<double>& ek) const;
0177     double Tr_4L_F201(double xi, double s, const std::vector<double>& beta,
0178             const std::vector<double>& ee, const std::vector<double>& ek) const;
0179     double Tr_4L_F211(double xi, double s, const std::vector<double>& beta,
0180             const std::vector<double>& ee, const std::vector<double>& ek) const;
0181     double Tr_4L_F220(double xi, double s, const std::vector<double>& beta,
0182             const std::vector<double>& ee, const std::vector<double>& ek) const;
0183     double Tr_4L_F221(double xi, double s, const std::vector<double>& beta,
0184             const std::vector<double>& ee, const std::vector<double>& ek) const;
0185     double Tr_4L_F100(double xi, double s, const std::vector<double>& beta,
0186             const std::vector<double>& ee, const std::vector<double>& ek) const;
0187     double Tr_4L_F110(double xi, double s, const std::vector<double>& beta,
0188             const std::vector<double>& ee, const std::vector<double>& ek) const;
0189     double Tr_4L_G(double xi, double s, const std::vector<double>& beta,
0190             const std::vector<double>& ee, const std::vector<double>& ek) const;
0191     double Tr_5L_F201(double xi, double s, const std::vector<double>& beta,
0192             const std::vector<double>& ee, const std::vector<double>& ek) const;
0193     double Tr_5L_F210(double xi, double s, const std::vector<double>& beta,
0194             const std::vector<double>& ee, const std::vector<double>& ek) const;
0195     double Tr_5L_F211(double xi, double s, const std::vector<double>& beta,
0196             const std::vector<double>& ee, const std::vector<double>& ek) const;
0197     double Tr_5L_F220(double xi, double s, const std::vector<double>& beta,
0198             const std::vector<double>& ee, const std::vector<double>& ek) const;
0199     double Tr_5L_F221(double xi, double s, const std::vector<double>& beta,
0200             const std::vector<double>& ee, const std::vector<double>& ek) const;
0201     double Tr_5L_F100(double xi, double s, const std::vector<double>& beta,
0202             const std::vector<double>& ee, const std::vector<double>& ek) const;
0203     double Tr_5L_F110(double xi, double s, const std::vector<double>& beta,
0204             const std::vector<double>& ee, const std::vector<double>& ek) const;
0205     double Tr_5L_G(double xi, double s, const std::vector<double>& beta,
0206             const std::vector<double>& ee, const std::vector<double>& ek) const;
0207 
0208     // Amplitudes 4.L/R and 5.L/R, NLO paper, Eqs. (43)-(44)
0209     // For .R amplitudes, see the comment below Eq. (44) in the NLO paper
0210     // ATTENTION! Terms from the last lines of (43)-(44) are included in M_scale
0211 
0212     std::complex<double> M4L(double s, double x, double xi,
0213             const std::vector<double>& beta, const std::vector<double>& ee,
0214             const std::vector<double>& ek);
0215     std::complex<double> M5L(double s, double x, double xi,
0216             const std::vector<double>& beta, const std::vector<double>& ee,
0217             const std::vector<double>& ek);
0218     std::complex<double> M4R(double s, double x, double xi,
0219             const std::vector<double>& beta, const std::vector<double>& ee,
0220             const std::vector<double>& ek);
0221     std::complex<double> M5R(double s, double x, double xi,
0222             const std::vector<double>& beta, const std::vector<double>& ee,
0223             const std::vector<double>& ek);
0224 
0225     std::complex<double> M4L(double s, double x, double xi,
0226             const std::vector<double>& beta, const std::vector<double>& ee,
0227             const std::vector<double>& ek, double z);
0228     std::complex<double> M5L(double s, double x, double xi,
0229             const std::vector<double>& beta, const std::vector<double>& ee,
0230             const std::vector<double>& ek, double z);
0231     std::complex<double> M4R(double s, double x, double xi,
0232             const std::vector<double>& beta, const std::vector<double>& ee,
0233             const std::vector<double>& ek, double z);
0234     std::complex<double> M5R(double s, double x, double xi,
0235             const std::vector<double>& beta, const std::vector<double>& ee,
0236             const std::vector<double>& ek, double z);
0237 
0238     // Artefact of using a different definition of the hard scale in OG's MSc thesis,
0239     // see the comment after Eq. (44) in NLO paper
0240     std::complex<double> M_scale(double s, double x, double xi,
0241             std::vector<double> beta, std::vector<double> ee,
0242             std::vector<double> ek);
0243 
0244     // The collinear term.
0245     // For now, it implements formulas (3.105)-(3.106) from OG's MSc thesis
0246     // In particular, it is the contribution from the single permutation of photons!
0247     // Do not mistake it with Eq. (40) in NLO paper.
0248     // TODO re-write it so that it implements Eq. (40) from NLO paper
0249     std::complex<double> Ccoll(double s, double x, double xi,
0250             std::vector<double> beta, std::vector<double> ee,
0251             std::vector<double> ek);
0252 
0253     // Vector NLO amplitude - a single permutation of photons
0254     // See the description at the beginning of IV.A in NLO paper
0255     double NLO_V_permutation(double x, const std::vector<double>& params);
0256 
0257     // Vector NLO amplitude - a single permutation of photons
0258     // See the description at the beginning of IV.A in NLO paper
0259     double NLO_V_permutation(double x, double z,
0260             const std::vector<double>& params);
0261 
0262     // The full NLO vector amplitude
0263     double NLO_V(double x, const std::vector<double>& params);
0264 
0265     // The full NLO vector amplitude
0266     // z-dependent part
0267     double NLO_V(double x, double z, const std::vector<double>& params);
0268 
0269     // Functions F_nab
0270     std::complex<double> F100(double x, double xi,
0271             const std::vector<double>& beta, double s);
0272     std::complex<double> F110(double x, double xi,
0273             const std::vector<double>& beta, double s);
0274     std::complex<double> F201(double x, double xi,
0275             const std::vector<double>& beta, double s);
0276     std::complex<double> F210(double x, double xi,
0277             const std::vector<double>& beta, double s);
0278     std::complex<double> F211(double x, double xi,
0279             const std::vector<double>& beta, double s);
0280     std::complex<double> F220(double x, double xi,
0281             const std::vector<double>& beta, double s);
0282     std::complex<double> F221(double x, double xi,
0283             const std::vector<double>& beta, double s);
0284 
0285     std::complex<double> G(double x, double xi, const std::vector<double>& beta,
0286             double z);
0287 
0288     // Sign
0289     double sgn(double x) const;
0290 
0291     // iEps
0292     std::complex<double> m_iepsilon;
0293 
0294     // only evaluate Re (0), Im (1) or both (2) - get.
0295     int m_reim;
0296 
0297     //make phi-dependent.
0298     bool m_phiDep;
0299 
0300 };
0301 
0302 struct GAM2CFFStandardIntegrationParameters {
0303 
0304     GAM2CFFStandard* m_GAM2CFFStandardGAM2CFFStandard;
0305     std::vector<double> const* m_parameters;
0306 };
0307 
0308 double GAM2CFFStandardIntegrationFunction(double* x, size_t dim, void* p);
0309 
0310 } /* namespace PARTONS */
0311 
0312 #endif /* GAM2_CFF_STANDARD_H */