Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef GAM2_CONVOL_COEFF_FUNCTION_KINEMATIC_H
0002 #define GAM2_CONVOL_COEFF_FUNCTION_KINEMATIC_H
0003 
0004 /**
0005  * @file GAM2ConvolCoeffFunctionKinematic.h
0006  * @author Bryan BERTHOU (SPhN / CEA Saclay)
0007  * @date July 22, 2015
0008  * @version 1.0
0009  */
0010 
0011 #include <ElementaryUtils/parameters/GenericType.h>
0012 #include <ElementaryUtils/parameters/Parameters.h>
0013 #include <string>
0014 #include <vector>
0015 
0016 #include "../../../utils/type/PhysicalType.h"
0017 #include "../../../utils/type/PhysicalUnit.h"
0018 #include "../../PolarizationType.h"
0019 #include "../ConvolCoeffFunctionKinematic.h"
0020 
0021 namespace PARTONS {
0022 
0023 /**
0024  * @class GAM2ConvolCoeffFunctionKinematic
0025  *
0026  * @brief Class representing single CCF kinematics for two photon production process.
0027  *
0028  * This class represents a single CCF kinematics for two photon production process (xi, t, \f$Q^{2}'\f$, \f$\mu_{F}^{2}\f$, \f$\mu_{F}^{2}\f$).
0029  */
0030 class GAM2ConvolCoeffFunctionKinematic: public ConvolCoeffFunctionKinematic {
0031 
0032 public:
0033 
0034     static const std::string GAM2_CONVOL_COEFF_FUNCTION_KINEMATIC_CLASS_NAME; ///< Type of the kinematic in XML automation.
0035 
0036     /**
0037      * Default constructor.
0038      */
0039     GAM2ConvolCoeffFunctionKinematic();
0040 
0041     /**
0042      * Assignment constructor.
0043      * @param xi Skewness variable.
0044      * @param t Four-momentum transfer squared of hadron target (in \f$GeV^{2}\f$).
0045      * @param uPrim Four-momentum transfer squared to photon (in \f$GeV^{2}\f$).
0046      * @param Mgg2 Invariant mass of two photons (in \f$GeV^{2}\f$).
0047      * @param MuF2 Factorization scale squared (in \f$GeV^{2}\f$).
0048      * @param MuR2 Renormalization scale squared (in \f$GeV^{2}\f$).
0049      * @param polG0 Polarization of incoming photon.
0050      * @param polG1 Polarization of first outgoing photon.
0051      * @param polG2 Polarization of second outgoing photon.
0052      * @param phi Linear polarization angle.
0053      */
0054     GAM2ConvolCoeffFunctionKinematic(double xi, double t, double uPrim,
0055             double Mgg2, double MuF2, double MuR2, PolarizationType::Type polG0,
0056             PolarizationType::Type polG1, PolarizationType::Type polG2,
0057             double phi);
0058 
0059     /**
0060      * Assignment constructor.
0061      * @param xi Skewness variable.
0062      * @param t Four-momentum transfer squared of hadron target (in \f$GeV^{2}\f$).
0063      * @param uPrim Four-momentum transfer squared to photon (in \f$GeV^{2}\f$).
0064      * @param Mgg2 Invariant mass of two photons (in \f$GeV^{2}\f$).
0065      * @param MuF2 Factorization scale squared (in \f$GeV^{2}\f$).
0066      * @param MuR2 Renormalization scale squared (in \f$GeV^{2}\f$).
0067      * @param polG0 Polarization of incoming photon.
0068      * @param polG1 Polarization of first outgoing photon.
0069      * @param polG2 Polarization of second outgoing photon.
0070      * @param phi Linear polarization angle.
0071      */
0072     GAM2ConvolCoeffFunctionKinematic(const PhysicalType<double> &xi,
0073             const PhysicalType<double> &t, const PhysicalType<double> &uPrim,
0074             const PhysicalType<double> &Mgg2, const PhysicalType<double> &MuF2,
0075             const PhysicalType<double> &MuR2, PolarizationType::Type polG0,
0076             PolarizationType::Type polG1, PolarizationType::Type polG2,
0077             const PhysicalType<double> &phi);
0078 
0079     /**
0080      * Assignment constructor.
0081      * @param xi Skewness variable.
0082      * @param t Four-momentum transfer squared of hadron target (in \f$GeV^{2}\f$).
0083      * @param uPrim Four-momentum transfer squared to photon (in \f$GeV^{2}\f$).
0084      * @param Mgg2 Invariant mass of two photons (in \f$GeV^{2}\f$).
0085      * @param MuF2 Factorization scale squared (in \f$GeV^{2}\f$).
0086      * @param MuR2 Renormalization scale squared (in \f$GeV^{2}\f$).
0087      * @param polG0 Polarization of incoming photon.
0088      * @param polG1 Polarization of first outgoing photon.
0089      * @param polG2 Polarization of second outgoing photon.
0090      * @param phi Linear polarization angle.
0091      */
0092     GAM2ConvolCoeffFunctionKinematic(const ElemUtils::GenericType &xi,
0093             const ElemUtils::GenericType &t,
0094             const ElemUtils::GenericType &uPrim,
0095             const ElemUtils::GenericType &Mgg2,
0096             const ElemUtils::GenericType &MuF2,
0097             const ElemUtils::GenericType &MuR2, PolarizationType::Type polG0,
0098             PolarizationType::Type polG1, PolarizationType::Type polG2,
0099             const ElemUtils::GenericType &phi);
0100 
0101     /**
0102      * Copy constructor.
0103      * @param other Object to be copied.
0104      */
0105     GAM2ConvolCoeffFunctionKinematic(
0106             const GAM2ConvolCoeffFunctionKinematic &other);
0107 
0108     /**
0109      * Destructor.
0110      */
0111     virtual ~GAM2ConvolCoeffFunctionKinematic();
0112 
0113     virtual void configure(const ElemUtils::Parameters &parameters);
0114     virtual std::string toString() const;
0115 
0116     /**
0117      * Serialize into given Packet.
0118      * @param packet Target Packet.
0119      */
0120     void serialize(ElemUtils::Packet &packet) const;
0121 
0122     /**
0123      * Retrieve data from given Packet.
0124      * @param packet Input Packet.
0125      */
0126     void unserialize(ElemUtils::Packet &packet);
0127 
0128     /**
0129      * Serialize to std::vector<double>.
0130      */
0131     void serializeIntoStdVector(std::vector<double>& vec) const;
0132 
0133     /**
0134      * Unserialize from std::vector<double>.
0135      */
0136     void unserializeFromStdVector(std::vector<double>::const_iterator& it,
0137             const std::vector<double>::const_iterator& end);
0138 
0139     /**
0140      * Is equal operator. Checks if values of kinematic variables are the same.
0141      */
0142     bool operator ==(const GAM2ConvolCoeffFunctionKinematic& other) const;
0143 
0144     /**
0145      * Is different operator. Checks of values of kinematic variables are different.
0146      */
0147     bool operator !=(const GAM2ConvolCoeffFunctionKinematic& other) const;
0148 
0149     //********************************************************
0150     //*** SETTERS AND GETTERS ********************************
0151     //********************************************************
0152 
0153     /**
0154      * Get four-momentum transfer squared to photon.
0155      */
0156     const PhysicalType<double>& getUPrim() const;
0157 
0158     /**
0159      * Set four-momentum transfer squared to photon.
0160      */
0161     void setUPrim(const PhysicalType<double>& uPrim);
0162 
0163     /**
0164      * Set four-momentum transfer squared to photon.
0165      */
0166     void setUPrim(double uPrim, PhysicalUnit::Type unit = PhysicalUnit::GEV2);
0167 
0168     /**
0169      * Get invariant mass of two photons.
0170      */
0171     const PhysicalType<double>& getMgg2() const;
0172 
0173     /**
0174      * Set invariant mass of two photons.
0175      */
0176     void setMgg2(const PhysicalType<double>& Mgg2);
0177 
0178     /**
0179      * Set invariant mass of two photons.
0180      */
0181     void setMgg2(double Mgg2, PhysicalUnit::Type unit = PhysicalUnit::GEV2);
0182 
0183     /**
0184      * Get polarization state of incoming photon.
0185      */
0186     PolarizationType::Type getPolG0() const;
0187 
0188     /**
0189      * Set polarization state of incoming photon.
0190      */
0191     void setPolG0(PolarizationType::Type polG0);
0192 
0193     /**
0194      * Get polarization state of first outgoing photon.
0195      */
0196     PolarizationType::Type getPolG1() const;
0197 
0198     /**
0199      * Set polarization state of first outgoing photon.
0200      */
0201     void setPolG1(PolarizationType::Type polG1);
0202 
0203     /**
0204      * Get polarization state of second outgoing photon.
0205      */
0206     PolarizationType::Type getPolG2() const;
0207 
0208     /**
0209      * Set polarization state of second outgoing photon.
0210      */
0211     void setPolG2(PolarizationType::Type polG2);
0212 
0213     /**
0214      * Get linear polarization angle.
0215      */
0216     const PhysicalType<double>& getPhi() const;
0217 
0218     /**
0219      * Set linear polarization angle.
0220      */
0221     void setPhi(const PhysicalType<double>& Phi);
0222 
0223     /**
0224      * Set linear polarization angle.
0225      */
0226     void setPhi(double Phi, PhysicalUnit::Type unit = PhysicalUnit::RAD);
0227 
0228 protected:
0229 
0230     virtual void updateHashSum() const;
0231 
0232 private:
0233 
0234     /**
0235      * Four-momentum transfer squared to photon (in \f$GeV^{2}\f$).
0236      */
0237     PhysicalType<double> m_uPrim;
0238 
0239     /**
0240      * Invariant mass of two photons (in \f$GeV^{2}\f$).
0241      */
0242     PhysicalType<double> m_Mgg2;
0243 
0244     PolarizationType::Type m_polG0; ///< Polarization state of incoming photon.
0245     PolarizationType::Type m_polG1; ///< Polarization state of first outgoing photon.
0246     PolarizationType::Type m_polG2; ///< Polarization state of second outgoing photon.
0247 
0248     /**
0249      * Linear polarization angle.
0250      */
0251     PhysicalType<double> m_phi;
0252 };
0253 
0254 /**
0255  * Stream operator to serialize class into Packet. See also GPDType::serialize().
0256  */
0257 ElemUtils::Packet& operator <<(ElemUtils::Packet& packet,
0258         GAM2ConvolCoeffFunctionKinematic& kinematic);
0259 
0260 /**
0261  * Stream operator to retrieve class from Packet. See also GPDType::unserialize().
0262  */
0263 ElemUtils::Packet& operator >>(ElemUtils::Packet& packet,
0264         GAM2ConvolCoeffFunctionKinematic& kinematic);
0265 
0266 } /* namespace PARTONS */
0267 
0268 #endif /* GAM2_CONVOL_COEFF_FUNCTION_KINEMATIC_H */