Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef DDVCS_PROCESS_MODULE_H
0002 #define DDVCS_PROCESS_MODULE_H
0003 
0004 /**
0005  * @file DDVCSProcessModule.h
0006  * @author Bryan BERTHOU (SPhN / CEA Saclay)
0007  * @date November 19, 2014
0008  * @version 1.0
0009  */
0010 
0011 #include <ElementaryUtils/parameters/Parameters.h>
0012 #include <NumA/linear_algebra/vector/Vector3D.h>
0013 #include <complex>
0014 #include <map>
0015 #include <string>
0016 
0017 #include "../../../beans/automation/BaseObjectData.h"
0018 #include "../../../beans/convol_coeff_function/DDVCS/DDVCSConvolCoeffFunctionKinematic.h"
0019 #include "../../../beans/convol_coeff_function/DDVCS/DDVCSConvolCoeffFunctionResult.h"
0020 #include "../../../beans/gpd/GPDType.h"
0021 #include "../../../beans/List.h"
0022 #include "../../../beans/observable/DDVCS/DDVCSObservableKinematic.h"
0023 #include "../../../beans/observable/DDVCS/DDVCSObservableResult.h"
0024 #include "../../../beans/process/VCSSubProcessType.h"
0025 #include "../../../utils/type/PhysicalType.h"
0026 #include "../ProcessModule.h"
0027 
0028 namespace PARTONS {
0029 class DDVCSConvolCoeffFunctionModule;
0030 class DDVCSScalesModule;
0031 class DDVCSXiConverterModule;
0032 } /* namespace PARTONS */
0033 
0034 namespace PARTONS {
0035 
0036 /**
0037  * @class DDVCSProcessModule
0038  *
0039  * @brief Abstract class for computing the *differential* cross section of
0040  * the photon electroproduction process (also called DDVCS; Deeply Virtual Compton Scattering).
0041  *
0042  * 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.
0043  */
0044 class DDVCSProcessModule: public ProcessModule<DDVCSObservableKinematic,
0045         DDVCSObservableResult> {
0046 
0047 public:
0048 
0049     static const std::string DDVCS_PROCESS_MODULE_CLASS_NAME; ///< Type of the module in XML automation.
0050 
0051     /**
0052      * Destructor.
0053      */
0054     virtual ~DDVCSProcessModule();
0055 
0056     virtual DDVCSProcessModule* clone() const = 0;
0057     virtual std::string toString() const;
0058     virtual void resolveObjectDependencies();
0059     virtual void run();
0060     virtual void configure(const ElemUtils::Parameters &parameters);
0061     virtual void prepareSubModules(
0062             const std::map<std::string, BaseObjectData>& subModulesData);
0063     virtual DDVCSObservableResult compute(double beamHelicity,
0064             double beamCharge, NumA::Vector3D targetPolarization,
0065             const DDVCSObservableKinematic& kinematic,
0066             const List<GPDType>& gpdType = List<GPDType>());
0067     virtual List<GPDType> getListOfAvailableGPDTypeForComputation() const;
0068     virtual std::vector<double> test();
0069 
0070     /**
0071      * Computes the differential cross-section. Must be implemented in the child class.
0072      * @param beamHelicity Helicity of the beam (in units of hbar/2).
0073      * @param beamCharge Charge of the beam (in units of positron charge).
0074      * @param targetPolarization Polarization of the target. In GV conventions.
0075      * @param kinematic Kinematics.
0076      * @param processType Subprocess type.
0077      * @return Result.
0078      */
0079     DDVCSObservableResult compute(double beamHelicity, double beamCharge,
0080             NumA::Vector3D targetPolarization,
0081             const DDVCSObservableKinematic& kinematic,
0082             const List<GPDType>& gpdType, VCSSubProcessType::Type processType);
0083 
0084     /**
0085      * Reset previous kinematics.
0086      */
0087     virtual void resetPreviousKinematic();
0088 
0089     /**
0090      * Check if this kinematics is different than the previous one.
0091      */
0092     bool isPreviousCCFKinematicDifferent(
0093             const DDVCSConvolCoeffFunctionKinematic& kinematic) const;
0094 
0095     // ##### GETTERS & SETTERS #####
0096 
0097     /**
0098      * Get scale module.
0099      */
0100     DDVCSScalesModule* getScaleModule() const;
0101 
0102     /**
0103      * Set scale module.
0104      */
0105     void setScaleModule(DDVCSScalesModule* pScaleModule);
0106 
0107     /**
0108      * Get xi converter module.
0109      */
0110     DDVCSXiConverterModule* getXiConverterModule() const;
0111 
0112     /**
0113      * Set xi converted module.
0114      */
0115     void setXiConverterModule(DDVCSXiConverterModule* pXiConverterModule);
0116 
0117     /**
0118      * Get CCF module;
0119      */
0120     DDVCSConvolCoeffFunctionModule* getConvolCoeffFunctionModule() const;
0121 
0122     /**
0123      * Set CCF module
0124      */
0125     void setConvolCoeffFunctionModule(
0126             DDVCSConvolCoeffFunctionModule* pConvolCoeffFunctionModule);
0127 
0128     // ##### IMPLEMENTATION MEMBERS #####
0129 
0130     /**
0131      * Bethe-Heitler differential cross section.
0132      */
0133     virtual PhysicalType<double> CrossSectionBH();
0134 
0135     /**
0136      * Virtual Compton Scattering differential cross section.
0137      */
0138     virtual PhysicalType<double> CrossSectionVCS();
0139 
0140     /**
0141      * Interference differential cross section.
0142      */
0143     virtual PhysicalType<double> CrossSectionInterf();
0144 
0145 protected:
0146 
0147     /**
0148      * Default constructor.
0149      */
0150     DDVCSProcessModule(const std::string &className);
0151 
0152     /**
0153      * Copy constructor.
0154      * @param other Object to be copied.
0155      */
0156     DDVCSProcessModule(const DDVCSProcessModule& other);
0157 
0158     virtual void setKinematics(const DDVCSObservableKinematic& kinematic);
0159     virtual void setExperimentalConditions(double beamHelicity,
0160             double beamCharge, NumA::Vector3D targetPolarization);
0161     virtual void initModule();
0162     virtual void isModuleWellConfigured();
0163 
0164     double m_xB; ///< Bjorken variable.
0165     double m_t; ///< Mandelstam variable (square of the 4-momentum transferm in GeV2).
0166     double m_Q2; ///< Virtuality of the incoming photon (in GeV2).
0167     double m_Q2Prim; ///< Virtuality of the outgoing photon (in GeV2).
0168     double m_E; ///< Beam energy in target rest frame (in GeV).
0169     double m_phi; ///<  Angle between leptonic and hadronic plane (in radians, Trento convention).
0170     double m_phiL; ///< Azimuthal angle of the lepton pair (in radians).
0171     double m_thetaL; ///< Polar angle of the lepton pair (in radians).
0172 
0173     double m_beamHelicity; ///< Beam helicity.
0174     double m_beamCharge; ///< Beam charge.
0175     NumA::Vector3D m_targetPolarization; ///< Target polarization.
0176 
0177     DDVCSScalesModule* m_pScaleModule; ///< Pointer to the underlying scale module.
0178     DDVCSXiConverterModule* m_pXiConverterModule; ///< Pointer to the underlying xi converter module.
0179     DDVCSConvolCoeffFunctionModule* m_pConvolCoeffFunctionModule; ///< Pointer to the underlying CCF module.
0180 
0181     DDVCSConvolCoeffFunctionResult m_dvcsConvolCoeffFunctionResult; ///< Stored Compton Form Factor result.
0182     DDVCSConvolCoeffFunctionKinematic m_lastCCFKinematics; ///< Last Compton Form Factor kinematics.
0183 
0184     /**
0185      * Compute CCF for a given kinematics.
0186      * @param kinematic Kinematics to be computed.
0187      * @param gpdType List of GPD types to be computed.
0188      */
0189     void computeConvolCoeffFunction(const DDVCSObservableKinematic& kinematic,
0190             const List<GPDType> & gpdType = List<GPDType>());
0191 
0192     /**
0193      * Gives back a previously computed Compton Form Factor.
0194      * @param gpdType CFF type (e.g. H or E).
0195      * @return CFF value for the given type.
0196      */
0197     std::complex<double> getConvolCoeffFunctionValue(GPDType::Type gpdType);
0198 };
0199 
0200 } /* namespace PARTONS */
0201 
0202 #endif /* DDVCS_PROCESS_MODULE_H */