Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef GPD_KINEMATIC_H
0002 #define GPD_KINEMATIC_H
0003 
0004 /**
0005  * @file GPDKinematic.h
0006  * @author: Bryan BERTHOU (SPhN / CEA Saclay)
0007  * @date November 26, 2014
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 "../Kinematic.h"
0019 
0020 namespace ElemUtils {
0021 class Packet;
0022 } /* namespace ElemUtils */
0023 
0024 namespace PARTONS {
0025 
0026 /**
0027  * @class GPDKinematic
0028  *
0029  * @brief Class representing single GPD kinematics.
0030  *
0031  * This class represents a single GPD kinematics (x, xi, t, \f$\mu_{F}^{2}\f$, \f$\mu_{F}^{2}\f$).
0032  */
0033 class GPDKinematic: public Kinematic {
0034 
0035 public:
0036 
0037     static const std::string GPD_KINEMATIC_CLASS_NAME; ///< Type of the kinematic in XML automation.
0038 
0039     /**
0040      * Parameter name to set variable \f$x\f$ via configuration methods.
0041      */
0042     static const std::string KINEMATIC_PARAMETER_NAME_X;
0043 
0044     /**
0045      * Parameter name to set variable \f$\xi\f$ via configuration methods.
0046      */
0047     static const std::string KINEMATIC_PARAMETER_NAME_XI;
0048 
0049     /**
0050      * Parameter name to set variable \f$t\f$ via configuration methods.
0051      */
0052     static const std::string KINEMATIC_PARAMETER_NAME_T;
0053 
0054     /**
0055      * Parameter name to set variable \f$\mu_{F}^{2}\f$ via configuration methods.
0056      */
0057     static const std::string KINEMATIC_PARAMETER_NAME_MUF2;
0058 
0059     /**
0060      * Parameter name to set variable \f$\mu_{R}^{2}\f$ via configuration methods.
0061      */
0062     static const std::string KINEMATIC_PARAMETER_NAME_MUR2;
0063 
0064     /**
0065      * Parameter name to set unit of variable \f$x\f$ via configuration methods.
0066      */
0067     static const std::string KINEMATIC_PARAMETER_NAME_X_UNIT;
0068 
0069     /**
0070      * Parameter name to set unit of variable \f$\xi\f$ via configuration methods.
0071      */
0072     static const std::string KINEMATIC_PARAMETER_NAME_XI_UNIT;
0073 
0074     /**
0075      * Parameter name to set unit of variable \f$t\f$ via configuration methods.
0076      */
0077     static const std::string KINEMATIC_PARAMETER_NAME_T_UNIT;
0078 
0079     /**
0080      * Parameter name to set unit of variable \f$\mu_{F}^{2}\f$ via configuration methods.
0081      */
0082     static const std::string KINEMATIC_PARAMETER_NAME_MUF2_UNIT;
0083 
0084     /**
0085      * Parameter name to set unit of variable \f$\mu_{R}^{2}\f$ via configuration methods.
0086      */
0087     static const std::string KINEMATIC_PARAMETER_NAME_MUR2_UNIT;
0088 
0089     /**
0090      * Default constructor.
0091      */
0092     GPDKinematic();
0093 
0094     /**
0095      * Assignment constructor.
0096      *
0097      * @param x Longitudinal momentum fraction of active parton.
0098      * @param xi Skewness variable.
0099      * @param t Four-momentum transfer squared of hadron target (in \f$GeV^{2}\f$).
0100      * @param MuF2 Factorization scale squared (in \f$GeV^{2}\f$).
0101      * @param MuR2 Renormalization scale squared (in \f$GeV^{2}\f$).
0102      */
0103     GPDKinematic(double x, double xi, double t, double MuF2, double MuR2);
0104 
0105     /**
0106      * Assignment constructor.
0107      *
0108      * @param x Longitudinal momentum fraction of active parton.
0109      * @param xi Skewness variable.
0110      * @param t Four-momentum transfer squared of hadron target (in \f$GeV^{2}\f$).
0111      * @param MuF2 Factorization scale squared (in \f$GeV^{2}\f$).
0112      * @param MuR2 Renormalization scale squared (in \f$GeV^{2}\f$).
0113      */
0114     GPDKinematic(const PhysicalType<double> &x, const PhysicalType<double> &xi,
0115             const PhysicalType<double> &t, const PhysicalType<double> &MuF2,
0116             const PhysicalType<double> &MuR2);
0117 
0118     /**
0119      * Assignment constructor.
0120      *
0121      * @param x Longitudinal momentum fraction of active parton.
0122      * @param xi Skewness variable.
0123      * @param t Four-momentum transfer squared of hadron target (in \f$GeV^{2}\f$).
0124      * @param MuF2 Factorization scale squared (in \f$GeV^{2}\f$).
0125      * @param MuR2 Renormalization scale squared (in \f$GeV^{2}\f$).
0126      */
0127     GPDKinematic(const ElemUtils::GenericType &x,
0128             const ElemUtils::GenericType &xi, const ElemUtils::GenericType &t,
0129             const ElemUtils::GenericType &MuF2,
0130             const ElemUtils::GenericType &MuR2);
0131 
0132     /**
0133      * Copy constructor.
0134      * @param other Object to be copied.
0135      */
0136     GPDKinematic(const GPDKinematic &other);
0137 
0138     /**
0139      * Destructor.
0140      */
0141     virtual ~GPDKinematic();
0142 
0143     virtual void configure(const ElemUtils::Parameters &parameters);
0144     virtual std::string toString() const;
0145 
0146     /**
0147      * Serialize into given Packet.
0148      * @param packet Target Packet.
0149      */
0150     void serialize(ElemUtils::Packet &packet) const;
0151 
0152     /**
0153      * Retrieve data from given Packet.
0154      * @param packet Input Packet.
0155      */
0156     void unserialize(ElemUtils::Packet &packet);
0157 
0158     /**
0159      * Serialize to std::vector<double>.
0160      */
0161     void serializeIntoStdVector(std::vector<double>& vec) const;
0162 
0163     /**
0164      * Unserialize from std::vector<double>.
0165      */
0166     void unserializeFromStdVector(std::vector<double>::const_iterator& it,
0167             const std::vector<double>::const_iterator& end);
0168 
0169     /**
0170      * Is equal operator. Checks if values of kinematic variables are the same.
0171      */
0172     bool operator ==(const GPDKinematic& other) const;
0173 
0174     /**
0175      * Is different operator. Checks of values of kinematic variables are different.
0176      */
0177     bool operator !=(const GPDKinematic& other) const;
0178 
0179     //********************************************************
0180     //*** SETTERS AND GETTERS ********************************
0181     //********************************************************
0182 
0183     /**
0184      * Get longitudinal momentum fraction of active parton.
0185      */
0186     const PhysicalType<double>& getX() const;
0187 
0188     /**
0189      * Set longitudinal momentum fraction of active parton.
0190      */
0191     void setX(const PhysicalType<double>& x);
0192 
0193     /**
0194      * Set longitudinal momentum fraction of active parton.
0195      */
0196     void setX(double x, PhysicalUnit::Type unit = PhysicalUnit::NONE);
0197 
0198     /**
0199      * Get skewness variable.
0200      */
0201     const PhysicalType<double>& getXi() const;
0202 
0203     /**
0204      * Set skewness variable.
0205      */
0206     void setXi(const PhysicalType<double>& xi);
0207 
0208     /**
0209      * Set skewness variable.
0210      */
0211     void setXi(double xi, PhysicalUnit::Type unit = PhysicalUnit::NONE);
0212 
0213     /**
0214      * Get four-momentum transfer squared of hadron target.
0215      */
0216     const PhysicalType<double>& getT() const;
0217 
0218     /**
0219      * Set four-momentum transfer squared of hadron target.
0220      */
0221     void setT(const PhysicalType<double>& t);
0222 
0223     /**
0224      * Set four-momentum transfer squared of hadron target.
0225      */
0226     void setT(double t, PhysicalUnit::Type unit = PhysicalUnit::GEV2);
0227 
0228     /**
0229      * Get factorization scale squared.
0230      */
0231     const PhysicalType<double>& getMuF2() const;
0232 
0233     /**
0234      * Set factorization scale squared.
0235      */
0236     void setMuF2(const PhysicalType<double>& muF2);
0237 
0238     /**
0239      * Set factorization scale squared.
0240      */
0241     void setMuF2(double muF2, PhysicalUnit::Type unit = PhysicalUnit::GEV2);
0242 
0243     /**
0244      * Get renormalization scale squared.
0245      */
0246     const PhysicalType<double>& getMuR2() const;
0247 
0248     /**
0249      * Set renormalization scale squared.
0250      */
0251     void setMuR2(const PhysicalType<double>& muR2);
0252 
0253     /**
0254      * Set renormalization scale squared.
0255      */
0256     void setMuR2(double muR2, PhysicalUnit::Type unit = PhysicalUnit::GEV2);
0257 
0258 protected:
0259 
0260     virtual void updateHashSum() const;
0261 
0262 private:
0263 
0264     /**
0265      * Longitudinal momentum fraction of active parton.
0266      */
0267     PhysicalType<double> m_x;
0268 
0269     /**
0270      * Skewness variable.
0271      */
0272     PhysicalType<double> m_xi;
0273 
0274     /**
0275      * Four-momentum transfer squared of hadron target (in \f$GeV^{2}\f$).
0276      */
0277     PhysicalType<double> m_t;
0278 
0279     /**
0280      * Factorization scale squared (in \f$GeV^{2}\f$).
0281      */
0282     PhysicalType<double> m_MuF2;
0283 
0284     /**
0285      * Renormalization scale squared (in \f$GeV^{2}\f$).
0286      */
0287     PhysicalType<double> m_MuR2;
0288 };
0289 
0290 /**
0291  * Stream operator to serialize class into Packet. See also GPDType::serialize().
0292  */
0293 ElemUtils::Packet& operator <<(ElemUtils::Packet& packet,
0294         GPDKinematic& kinematic);
0295 
0296 /**
0297  * Stream operator to retrieve class from Packet. See also GPDType::unserialize().
0298  */
0299 ElemUtils::Packet& operator >>(ElemUtils::Packet& packet,
0300         GPDKinematic& kinematic);
0301 
0302 } /* namespace PARTONS */
0303 
0304 #endif /* GPD_KINEMATIC_H */