Back to home page

EIC code displayed by LXR

 
 

    


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

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