Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef TCS_CONVOL_COEFF_FUNCTION_MODULE_H
0002 #define TCS_CONVOL_COEFF_FUNCTION_MODULE_H
0003 
0004 /**
0005  * @file TCSConvolCoeffFunctionModule.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/TCS/TCSConvolCoeffFunctionKinematic.h"
0018 #include "../../../beans/convol_coeff_function/TCS/TCSConvolCoeffFunctionResult.h"
0019 #include "../../../beans/gpd/GPDType.h"
0020 #include "../../../beans/List.h"
0021 #include "../../../beans/PerturbativeQCDOrderType.h"
0022 #include "../ConvolCoeffFunctionModule.h"
0023 
0024 namespace PARTONS {
0025 
0026 /**
0027  * @class TCSConvolCoeffFunctionModule
0028  *
0029  * @brief Abstract class that provides a skeleton to implement a Compton Form Factor (CFF) module.
0030  *
0031  * It is best to use this module with the corresponding service: ConvolCoeffFunctionService (see examples therein), as explained in the [general tutorial](@ref usage).
0032  */
0033 class TCSConvolCoeffFunctionModule: public ConvolCoeffFunctionModule<
0034         TCSConvolCoeffFunctionKinematic, TCSConvolCoeffFunctionResult> {
0035 
0036 public:
0037 
0038     static const std::string TCS_CONVOL_COEFF_FUNCTION_MODULE_CLASS_NAME; ///< Type of the module in XML automation.
0039 
0040     /**
0041      * Destructor.
0042      */
0043     virtual ~TCSConvolCoeffFunctionModule();
0044 
0045     virtual TCSConvolCoeffFunctionModule* clone() const = 0;
0046     virtual std::string toString() const;
0047     virtual void resolveObjectDependencies();
0048     virtual void run();
0049     virtual void configure(const ElemUtils::Parameters &parameters);
0050     virtual void prepareSubModules(
0051             const std::map<std::string, BaseObjectData>& subModulesData);
0052     virtual TCSConvolCoeffFunctionResult compute(
0053             const TCSConvolCoeffFunctionKinematic& kinematic,
0054             const List<GPDType>& gpdType = List<GPDType>());
0055     virtual List<GPDType> getListOfAvailableGPDTypeForComputation() const;
0056 
0057     // ##### GETTERS & SETTERS #####
0058 
0059     /**
0060      * Get order of the perturbative QCD computation.
0061      */
0062     PerturbativeQCDOrderType::Type getQCDOrderType() const;
0063 
0064     /**
0065      * Set order of the perturbative QCD computation.
0066      */
0067     void setQCDOrderType(PerturbativeQCDOrderType::Type qcdOrderType);
0068 
0069     // #### IMPLEMENTATION MEMBERS ####
0070 
0071     /**
0072      * Method to compute some CFFs.
0073      * Can be implemented and used in child class, if needed.
0074      * @return Complex result.
0075      */
0076     virtual std::complex<double> computeUnpolarized();
0077 
0078     /**
0079      * Method to compute some CFFs.
0080      * Can be implemented and used in child class, if needed.
0081      * @return Complex result.
0082      */
0083     virtual std::complex<double> computePolarized();
0084 
0085     /**
0086      * Method to compute some CFFs.
0087      * Can be implemented and used in child class, if needed.
0088      * @return Complex result.
0089      */
0090     virtual std::complex<double> computeCFF();
0091 
0092     virtual std::vector<double> test();
0093 
0094 protected:
0095 
0096     /**
0097      * Default constructor.
0098      */
0099     TCSConvolCoeffFunctionModule(const std::string &className);
0100 
0101     /**
0102      * Copy constructor.
0103      *
0104      * @param other Object to be copied
0105      */
0106     TCSConvolCoeffFunctionModule(const TCSConvolCoeffFunctionModule &other);
0107 
0108     virtual void setKinematics(
0109             const TCSConvolCoeffFunctionKinematic& kinematic);
0110     virtual void initModule();
0111     virtual void isModuleWellConfigured();
0112 
0113     /**
0114      * List of GPD/CFF types the child class can compute.
0115      */
0116     std::map<GPDType::Type,
0117             std::complex<double> (TCSConvolCoeffFunctionModule::*)()> m_listOfCFFComputeFunctionAvailable;
0118 
0119     /**
0120      * Iterator.
0121      */
0122     std::map<GPDType::Type,
0123             std::complex<double> (TCSConvolCoeffFunctionModule::*)()>::iterator m_it;
0124 
0125     double m_Q2Prim; ///< Virtuality of the photon (in GeV^2).
0126 
0127     PerturbativeQCDOrderType::Type m_qcdOrderType; ///< Order of the perturbative QCD computation.
0128 };
0129 
0130 } /* namespace PARTONS */
0131 
0132 #endif /* TCS_CONVOL_COEFF_FUNCTION_MODULE_H */