Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef GAM2_PROCESS_MODULE_H
0002 #define GAM2_PROCESS_MODULE_H
0003 
0004 #include <ElementaryUtils/parameters/Parameters.h>
0005 #include <NumA/linear_algebra/vector/Vector3D.h>
0006 #include <complex>
0007 #include <map>
0008 #include <string>
0009 
0010 #include "../../../beans/automation/BaseObjectData.h"
0011 #include "../../../beans/convol_coeff_function/GAM2/GAM2ConvolCoeffFunctionKinematic.h"
0012 #include "../../../beans/convol_coeff_function/GAM2/GAM2ConvolCoeffFunctionResult.h"
0013 #include "../../../beans/gpd/GPDType.h"
0014 #include "../../../beans/List.h"
0015 #include "../../../beans/observable/GAM2/GAM2ObservableKinematic.h"
0016 #include "../../../beans/observable/GAM2/GAM2ObservableResult.h"
0017 #include "../../../beans/PolarizationType.h"
0018 #include "../../../utils/type/PhysicalType.h"
0019 #include "../ProcessModule.h"
0020 
0021 namespace PARTONS {
0022 class GAM2ConvolCoeffFunctionModule;
0023 class GAM2ScalesModule;
0024 class GAM2XiConverterModule;
0025 } /* namespace PARTONS */
0026 
0027 namespace PARTONS {
0028 
0029 /**
0030  * @class GAM2ProcessModule
0031  *
0032  * @brief Abstract class for computing the *differential* cross section of
0033  * the XXX.
0034  *
0035  * The cross-section is five-fold differential with respect to the variables: @f$ x_B @f$, @f$ Q^2 @f$, @f$ t @f$ and the two angles. XXX
0036  */
0037 class GAM2ProcessModule: public ProcessModule<GAM2ObservableKinematic,
0038         GAM2ObservableResult> {
0039 
0040 public:
0041 
0042     static const std::string GAM2_PROCESS_MODULE_CLASS_NAME; ///< Type of the module in XML automation.
0043 
0044     /**
0045      * Destructor.
0046      */
0047     virtual ~GAM2ProcessModule();
0048 
0049     virtual GAM2ProcessModule* clone() const = 0;
0050     virtual std::string toString() const;
0051     virtual void resolveObjectDependencies();
0052     virtual void run();
0053     virtual void configure(const ElemUtils::Parameters &parameters);
0054     virtual void prepareSubModules(
0055             const std::map<std::string, BaseObjectData>& subModulesData);
0056     virtual std::vector<double> test();
0057 
0058     virtual List<GPDType> getListOfAvailableGPDTypeForComputation() const;
0059 
0060     /**
0061      * Computes the differential cross-section. Must be implemented in the child class.
0062      */
0063     virtual GAM2ObservableResult compute(PolarizationType::Type polG0,
0064             PolarizationType::Type polG1, PolarizationType::Type polG2,
0065             NumA::Vector3D targetPolarization,
0066             const GAM2ObservableKinematic& kinematic,
0067             const List<GPDType>& gpdType = List<GPDType>());
0068 
0069     /**
0070      * Reset previous kinematics.
0071      */
0072     virtual void resetPreviousKinematic();
0073 
0074     /**
0075      * Check if this kinematics is different than the previous one.
0076      */
0077     bool isPreviousCCFKinematicDifferent(
0078             const GAM2ConvolCoeffFunctionKinematic& kinematic) const;
0079 
0080     // ##### GETTERS & SETTERS #####
0081 
0082     /**
0083      * Get scale module.
0084      */
0085     GAM2ScalesModule* getScaleModule() const;
0086 
0087     /**
0088      * Set scale module.
0089      */
0090     void setScaleModule(GAM2ScalesModule* pScaleModule);
0091 
0092     /**
0093      * Get xi converter module.
0094      */
0095     GAM2XiConverterModule* getXiConverterModule() const;
0096 
0097     /**
0098      * Set xi converted module.
0099      */
0100     void setXiConverterModule(GAM2XiConverterModule* pXiConverterModule);
0101 
0102     /**
0103      * Get CCF module;
0104      */
0105     GAM2ConvolCoeffFunctionModule* getConvolCoeffFunctionModule() const;
0106 
0107     /**
0108      * Set CCF module
0109      */
0110     void setConvolCoeffFunctionModule(
0111             GAM2ConvolCoeffFunctionModule* pConvolCoeffFunctionModule);
0112 
0113     // ##### IMPLEMENTATION MEMBERS #####
0114 
0115     /**
0116      * Differential cross section.
0117      */
0118     virtual PhysicalType<double> CrossSection();
0119 
0120     /**
0121      * Set manually CFFs.
0122      */
0123     void setConvolCoeffFunction(const GAM2ConvolCoeffFunctionKinematic& kin, const GAM2ConvolCoeffFunctionResult& result);
0124 
0125 protected:
0126 
0127     /**
0128      * Default constructor.
0129      */
0130     GAM2ProcessModule(const std::string &className);
0131 
0132     /**
0133      * Copy constructor.
0134      * @param other Object to be copied.
0135      */
0136     GAM2ProcessModule(const GAM2ProcessModule& other);
0137 
0138     virtual void setKinematics(const GAM2ObservableKinematic& kinematic);
0139     virtual void setExperimentalConditions(PolarizationType::Type polG0,
0140             PolarizationType::Type polG1, PolarizationType::Type polG2,
0141             NumA::Vector3D targetPolarization);
0142     virtual void initModule();
0143     virtual void isModuleWellConfigured();
0144 
0145     double m_t; ///< Four-momentum transfer squared of hadron target (in \f$GeV^{2}\f$).
0146     double m_uPrim; ///<F our-momentum transfer squared to photon (in \f$GeV^{2}\f$).
0147     double m_Mgg2; ///< Invariant mass of two photons (in \f$GeV^{2}\f$).
0148     double m_E; ///<  Beam energy (in GeV).
0149     double m_phi; ///< Linear polarization angle.
0150 
0151     double m_tmin; ///< t min;
0152     double m_xi; ///< xi;
0153 
0154     PolarizationType::Type m_polG0; ///< Polarization of incoming photon.
0155     PolarizationType::Type m_polG1; ///< Polarization of first outgoing photon.
0156     PolarizationType::Type m_polG2; ///< Polarization of second outgoing photon.
0157     NumA::Vector3D m_targetPolarization; ///< Target polarization.
0158 
0159     GAM2ScalesModule* m_pScaleModule; ///< Pointer to the underlying scale module.
0160     GAM2XiConverterModule* m_pXiConverterModule; ///< Pointer to the underlying xi converter module.
0161     GAM2ConvolCoeffFunctionModule* m_pConvolCoeffFunctionModule; ///< Pointer to the underlying CCF module.
0162 
0163     GAM2ConvolCoeffFunctionResult m_dvcsConvolCoeffFunctionResult; ///< Stored Compton Form Factor result.
0164     GAM2ConvolCoeffFunctionKinematic m_lastCCFKinematics; ///< Last Compton Form Factor kinematics.
0165 
0166     /**
0167      * Compute CCF for a given kinematics.
0168      * @param kinematic Kinematics to be computed.
0169      * @param gpdType List of GPD types to be computed.
0170      */
0171     void computeConvolCoeffFunction(const GAM2ObservableKinematic& kinematic,
0172             const List<GPDType> & gpdType = List<GPDType>());
0173 
0174     /**
0175      * Gives back a previously computed Compton Form Factor.
0176      * @param gpdType CFF type (e.g. H or E).
0177      * @return CFF value for the given type.
0178      */
0179     std::complex<double> getConvolCoeffFunctionValue(GPDType::Type gpdType);
0180 };
0181 
0182 } /* namespace PARTONS */
0183 
0184 #endif /* GAM2_PROCESS_MODULE_H */