Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef GAM2_CONVOL_COEFF_FUNCTION_MODULE_H
0002 #define GAM2_CONVOL_COEFF_FUNCTION_MODULE_H
0003 
0004 /**
0005  * @file GAM2ConvolCoeffFunctionModule.h
0006  * @author Bryan BERTHOU (SPhN / CEA Saclay)
0007  * @date July 22, 2015
0008  * @version 1.0
0009  */
0010 
0011 #include <ElementaryUtils/parameters/Parameters.h>
0012 #include <complex>
0013 #include <map>
0014 #include <string>
0015 
0016 #include "../../../beans/automation/BaseObjectData.h"
0017 #include "../../../beans/convol_coeff_function/GAM2/GAM2ConvolCoeffFunctionKinematic.h"
0018 #include "../../../beans/convol_coeff_function/GAM2/GAM2ConvolCoeffFunctionResult.h"
0019 #include "../../../beans/gpd/GPDType.h"
0020 #include "../../../beans/List.h"
0021 #include "../../../beans/PerturbativeQCDOrderType.h"
0022 #include "../../../beans/PolarizationType.h"
0023 #include "../../../utils/type/PhysicalType.h"
0024 #include "../ConvolCoeffFunctionModule.h"
0025 
0026 namespace PARTONS {
0027 
0028 /**
0029  * @class GAM2ConvolCoeffFunctionModule
0030  *
0031  * @brief Abstract class that provides a skeleton to implement a Compton Form Factor (CFF) module.
0032  *
0033  * It is best to use this module with the corresponding service: ConvolCoeffFunctionService (see examples therein), as explained in the [general tutorial](@ref usage).
0034  */
0035 class GAM2ConvolCoeffFunctionModule: public ConvolCoeffFunctionModule<
0036         GAM2ConvolCoeffFunctionKinematic, GAM2ConvolCoeffFunctionResult> {
0037 
0038 public:
0039 
0040     static const std::string GAM2_CONVOL_COEFF_FUNCTION_MODULE_CLASS_NAME; ///< Type of the module in XML automation.
0041 
0042     /**
0043      * Destructor.
0044      */
0045     virtual ~GAM2ConvolCoeffFunctionModule();
0046 
0047     virtual GAM2ConvolCoeffFunctionModule* clone() const = 0;
0048     virtual std::string toString() const;
0049     virtual void resolveObjectDependencies();
0050     virtual void run();
0051     virtual void configure(const ElemUtils::Parameters &parameters);
0052     virtual void prepareSubModules(
0053             const std::map<std::string, BaseObjectData>& subModulesData);
0054     virtual GAM2ConvolCoeffFunctionResult compute(
0055             const GAM2ConvolCoeffFunctionKinematic& kinematic,
0056             const List<GPDType>& gpdType = List<GPDType>());
0057     virtual List<GPDType> getListOfAvailableGPDTypeForComputation() const;
0058 
0059     // ##### GETTERS & SETTERS #####
0060 
0061     /**
0062      * Get order of the perturbative QCD computation.
0063      */
0064     PerturbativeQCDOrderType::Type getQCDOrderType() const;
0065 
0066     /**
0067      * Set order of the perturbative QCD computation.
0068      */
0069     void setQCDOrderType(PerturbativeQCDOrderType::Type qcdOrderType);
0070 
0071     // #### IMPLEMENTATION MEMBERS ####
0072 
0073     /**
0074      * Method to compute some CFFs.
0075      * Can be implemented and used in child class, if needed.
0076      * @return Complex result.
0077      */
0078     virtual std::complex<double> computeUnpolarized();
0079 
0080     /**
0081      * Method to compute some CFFs.
0082      * Can be implemented and used in child class, if needed.
0083      * @return Complex result.
0084      */
0085     virtual std::complex<double> computePolarized();
0086 
0087     /**
0088      * Method to compute some CFFs.
0089      * Can be implemented and used in child class, if needed.
0090      * @return Complex result.
0091      */
0092     virtual std::complex<double> computeCFF();
0093 
0094     virtual std::vector<double> test();
0095 
0096 protected:
0097 
0098     /**
0099      * Default constructor.
0100      */
0101     GAM2ConvolCoeffFunctionModule(const std::string &className);
0102 
0103     /**
0104      * Copy constructor.
0105      *
0106      * @param other Object to be copied
0107      */
0108     GAM2ConvolCoeffFunctionModule(const GAM2ConvolCoeffFunctionModule &other);
0109 
0110     virtual void setKinematics(
0111             const GAM2ConvolCoeffFunctionKinematic& kinematic);
0112     virtual void initModule();
0113     virtual void isModuleWellConfigured();
0114 
0115     /**
0116      * List of GPD/CFF types the child class can compute.
0117      */
0118     std::map<GPDType::Type,
0119             std::complex<double> (GAM2ConvolCoeffFunctionModule::*)()> m_listOfCFFComputeFunctionAvailable;
0120 
0121     /**
0122      * Iterator.
0123      */
0124     std::map<GPDType::Type,
0125             std::complex<double> (GAM2ConvolCoeffFunctionModule::*)()>::iterator m_it;
0126 
0127     double m_uPrim; ///< Four-momentum transfer squared to photon (in \f$GeV^{2}\f$).
0128     double m_Mgg2; ///< Invariant mass of two photons (in \f$GeV^{2}\f$).
0129 
0130     PolarizationType::Type m_polG0; ///< Polarization state of incoming photon.
0131     PolarizationType::Type m_polG1; ///< Polarization state of first outgoing photon.
0132     PolarizationType::Type m_polG2; ///< Polarization state of second outgoing photon.
0133 
0134     double m_phi; ///< Linear polarization angle.
0135 
0136     PerturbativeQCDOrderType::Type m_qcdOrderType; ///< Order of the perturbative QCD computation.
0137 };
0138 
0139 } /* namespace PARTONS */
0140 
0141 #endif /* GAM2_CONVOL_COEFF_FUNCTION_MODULE_H */