Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef DVMP_CONVOL_COEFF_FUNCTION_KINEMATIC_H
0002 #define DVMP_CONVOL_COEFF_FUNCTION_KINEMATIC_H
0003 
0004 /**
0005  * @file DVMPConvolCoeffFunctionKinematic.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 "../../MesonType.h"
0019 #include "../../PolarizationType.h"
0020 #include "../ConvolCoeffFunctionKinematic.h"
0021 
0022 namespace PARTONS {
0023 
0024 /**
0025  * @class DVMPConvolCoeffFunctionKinematic
0026  *
0027  * @brief Class representing single CCF kinematics for DVMP process.
0028  *
0029  * This class represents a single CCF kinematics for DVMP process (xi, t, \f$Q^{2}\f$, \f$\mu_{F}^{2}\f$, \f$\mu_{F}^{2}\f$, mesonType, mesonPolarization).
0030  */
0031 class DVMPConvolCoeffFunctionKinematic: public ConvolCoeffFunctionKinematic {
0032 
0033 public:
0034 
0035     static const std::string DVMP_CONVOL_COEFF_FUNCTION_KNEMATIC_CLASS_NAME; ///< Type of the kinematic in XML automation.
0036 
0037     /**
0038      * Parameter name to set meson polarization via configuration methods.
0039      */
0040     static const std::string KINEMATIC_PARAMETER_NAME_MESON_POLARIZATION;
0041 
0042     /**
0043      * Parameter name to set unit of meson polarization via configuration methods.
0044      */
0045     static const std::string KINEMATIC_PARAMETER_NAME_MESON_POLARIZATION_UNIT;
0046 
0047     /**
0048      * Default constructor.
0049      */
0050     DVMPConvolCoeffFunctionKinematic();
0051 
0052     /**
0053      * Assignment constructor.
0054      * @param xi Skewness variable.
0055      * @param t Four-momentum transfer squared of hadron target (in \f$GeV^{2}\f$).
0056      * @param Q2 Virtual-photon virtuality (in \f$GeV^{2}\f$).
0057      * @param MuF2 Factorization scale squared (in \f$GeV^{2}\f$).
0058      * @param MuR2 Renormalization scale squared (in \f$GeV^{2}\f$).
0059      * @param mesonType Meson type.
0060      * @param mesonPolarization Meson polarization.
0061      */
0062     DVMPConvolCoeffFunctionKinematic(double xi, double t, double Q2,
0063             double MuF2, double MuR2, MesonType::Type mesonType,
0064             PolarizationType::Type mesonPolarization);
0065 
0066     /**
0067      * Assignment constructor.
0068      * @param xi Skewness variable.
0069      * @param t Four-momentum transfer squared of hadron target (in \f$GeV^{2}\f$).
0070      * @param Q2 Virtual-photon virtuality (in \f$GeV^{2}\f$).
0071      * @param MuF2 Factorization scale squared (in \f$GeV^{2}\f$).
0072      * @param MuR2 Renormalization scale squared (in \f$GeV^{2}\f$).
0073      * @param mesonType Meson type.
0074      * @param mesonPolarization Meson polarization.
0075      */
0076     DVMPConvolCoeffFunctionKinematic(const PhysicalType<double> &xi,
0077             const PhysicalType<double> &t, const PhysicalType<double> &Q2,
0078             const PhysicalType<double> &MuF2, const PhysicalType<double> &MuR2,
0079             MesonType::Type mesonType,
0080             PolarizationType::Type mesonPolarization);
0081 
0082     /**
0083      * Assignment constructor.
0084      * @param xi Skewness variable.
0085      * @param t Four-momentum transfer squared of hadron target (in \f$GeV^{2}\f$).
0086      * @param Q2 Virtual-photon virtuality (in \f$GeV^{2}\f$).
0087      * @param MuF2 Factorization scale squared (in \f$GeV^{2}\f$).
0088      * @param MuR2 Renormalization scale squared (in \f$GeV^{2}\f$).
0089      * @param mesonType Meson type.
0090      * @param mesonPolarization Meson polarization.
0091      */
0092     DVMPConvolCoeffFunctionKinematic(const ElemUtils::GenericType &xi,
0093             const ElemUtils::GenericType &t, const ElemUtils::GenericType &Q2,
0094             const ElemUtils::GenericType &MuF2,
0095             const ElemUtils::GenericType &MuR2, MesonType::Type mesonType,
0096             PolarizationType::Type mesonPolarization);
0097 
0098     /**
0099      * Copy constructor.
0100      * @param other Object to be copied.
0101      */
0102     DVMPConvolCoeffFunctionKinematic(
0103             const DVMPConvolCoeffFunctionKinematic &other);
0104 
0105     /**
0106      * Destructor.
0107      */
0108     virtual ~DVMPConvolCoeffFunctionKinematic();
0109 
0110     virtual void configure(const ElemUtils::Parameters &parameters);
0111     virtual std::string toString() const;
0112 
0113     /**
0114      * Serialize into given Packet.
0115      * @param packet Target Packet.
0116      */
0117     void serialize(ElemUtils::Packet &packet) const;
0118 
0119     /**
0120      * Retrieve data from given Packet.
0121      * @param packet Input Packet.
0122      */
0123     void unserialize(ElemUtils::Packet &packet);
0124 
0125     /**
0126      * Serialize to std::vector<double>.
0127      */
0128     void serializeIntoStdVector(std::vector<double>& vec) const;
0129 
0130     /**
0131      * Unserialize from std::vector<double>.
0132      */
0133     void unserializeFromStdVector(std::vector<double>::const_iterator& it,
0134             const std::vector<double>::const_iterator& end);
0135 
0136     /**
0137      * Is equal operator. Checks if values of kinematic variables are the same.
0138      */
0139     bool operator ==(const DVMPConvolCoeffFunctionKinematic& other) const;
0140 
0141     /**
0142      * Is different operator. Checks of values of kinematic variables are different.
0143      */
0144     bool operator !=(const DVMPConvolCoeffFunctionKinematic& other) const;
0145 
0146     //********************************************************
0147     //*** SETTERS AND GETTERS ********************************
0148     //********************************************************
0149 
0150     /**
0151      * Get virtual-photon virtuality.
0152      */
0153     const PhysicalType<double>& getQ2() const;
0154 
0155     /**
0156      * Set virtual-photon virtuality.
0157      */
0158     void setQ2(const PhysicalType<double>& Q2);
0159 
0160     /**
0161      * Set virtual-photon virtuality.
0162      */
0163     void setQ2(double Q2, PhysicalUnit::Type unit = PhysicalUnit::GEV2);
0164 
0165     /**
0166      * Get meson type.
0167      */
0168     MesonType::Type getMesonType() const;
0169 
0170     /**
0171      * Set meson type.
0172      */
0173     void setMesonType(MesonType::Type mesonType);
0174 
0175     /**
0176      * Get meson polarization.
0177      */
0178     PolarizationType::Type getMesonPolarization() const;
0179 
0180     /**
0181      * Set meson polarization.
0182      */
0183     void setMesonPolarization(PolarizationType::Type mesonPolarization);
0184 
0185 protected:
0186 
0187     virtual void updateHashSum() const;
0188 
0189 private:
0190 
0191     /**
0192      * Virtual-photon virtuality (in \f$GeV^{2}\f$).
0193      */
0194     PhysicalType<double> m_Q2;
0195 
0196     /**
0197      * Meson type.
0198      */
0199     MesonType::Type m_mesonType;
0200 
0201     /**
0202      * Meson polarization.
0203      */
0204     PolarizationType::Type m_mesonPolarization;
0205 };
0206 
0207 /**
0208  * Stream operator to serialize class into Packet. See also GPDType::serialize().
0209  */
0210 ElemUtils::Packet& operator <<(ElemUtils::Packet& packet,
0211         DVMPConvolCoeffFunctionKinematic& kinematic);
0212 
0213 /**
0214  * Stream operator to retrieve class from Packet. See also GPDType::unserialize().
0215  */
0216 ElemUtils::Packet& operator >>(ElemUtils::Packet& packet,
0217         DVMPConvolCoeffFunctionKinematic& kinematic);
0218 
0219 } /* namespace PARTONS */
0220 
0221 #endif /* DVMP_CONVOL_COEFF_FUNCTION_KINEMATIC_H */