Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef QUARK_DISTRIBUTION_H
0002 #define QUARK_DISTRIBUTION_H
0003 
0004 /**
0005  * @file QuarkDistribution.h
0006  * @author: Bryan BERTHOU (SPhN / CEA Saclay)
0007  * @date 26 April 2015
0008  * @version 1.0
0009  */
0010 
0011 #include <string>
0012 
0013 #include "../../BaseObject.h"
0014 #include "../QuarkFlavor.h"
0015 
0016 namespace PARTONS {
0017 
0018 /**
0019  * @class QuarkDistribution
0020  *
0021  * @brief Container to store values of single quark distribution.
0022  *
0023  * This class represents a quark distribution at a single kinematic point. For example, it can be GPD of a given type and specific quark flavor at some GPD kinematics.
0024  *
0025  * Except the information on the assigned quark flavor, three values can be stored in this container: 1) value of the quark distributions, 2) value of the singlet combination and 3) value of the non-singlet combination. For the definition of singlet and non-singlet combinations see the documentation of QuarkDistribution::m_quarkDistributionPlus and QuarkDistribution::m_quarkDistributionMinus members. Note, that these combinations appear naturally in many GPD-related computations.
0026  *
0027  * To see how this class can be used, analyze the following example:
0028  \code{.cpp}
0029  //in code, e.g. in one of GPD modules, we calculate values of GPD H for up quarks at x and -x kinematics
0030  double HuAtX = 2.34;
0031  double HuAtmX = 1.23;
0032 
0033  //calculate singlet and non-singlet combinations (note: definition is specific for given GPD type!)
0034  double HuSinglet = HuAtX - HuAtmX;
0035  double HuNonSinglet = HuAtX + HuAtmX;
0036 
0037  //store my results in QuarkDistribution object
0038  QuarkDistribution quarkDistribution(QuarkFlavor::UP, HuAtX, HuSinglet, HuNonSinglet);
0039 
0040  //check what is inside
0041  Partons::getInstance()->getLoggerManager()->info("example", __func__, ElemUtils::Formatter() << "My quark distribution contains: " << quarkDistribution.toString());
0042  \endcode
0043  which gives via Logger:
0044  \code
0045  20-05-2017 09:16:45 [INFO] (example::main) Quark distribution contains: u = 2.34
0046  u(+) = 1.11
0047  u(-) = 3.57
0048  \endcode
0049  * Check also the documentation of GPDResult and PartonDistribution classes, where QuarkDistribution objects are used extensively.
0050  */
0051 class QuarkDistribution: public BaseObject {
0052 public:
0053 
0054     static const std::string QUARK_DISTRIBUTION_DB_COLUMN_NAME_QUARK_DISTRIBUTION;
0055     static const std::string QUARK_DISTRIBUTION_DB_COLUMN_NAME_QUARK_DISTRIBUTION_PLUS;
0056     static const std::string QUARK_DISTRIBUTION_DB_COLUMN_NAME_QUARK_DISTRIBUTION_MINUS;
0057 
0058     //QuarkDistribution(); // Not needed because the other constructor uses default values now
0059     //QuarkDistribution(QuarkFlavor::Type quarkFlavor); // Not needed because the other constructor uses default values now
0060 
0061     /**
0062      * Copy constructor.
0063      * @param other Object to be copied.
0064      */
0065     QuarkDistribution(const QuarkDistribution &other);
0066 
0067     /**
0068      * Assignment constructor.
0069      * @param quarkFlavor Quark flavor to be assigned.
0070      * @param quarkDistribution Value of quark distribution.
0071      * @param quarkDistributionPlus Value of singlet combination, see QuarkDistribution::m_quarkDistributionPlus.
0072      * @param quarkDistributionMinus Value of non-singlet combination, see QuarkDistribution::m_quarkDistributionMinus.
0073      */
0074     QuarkDistribution(QuarkFlavor::Type quarkFlavor = QuarkFlavor::UNDEFINED,
0075             double quarkDistribution = 0., double quarkDistributionPlus = 0.,
0076             double quarkDistributionMinus = 0.);
0077 
0078     /**
0079      * Destructor.
0080      */
0081     virtual ~QuarkDistribution();
0082 
0083     virtual std::string toString() const;
0084 
0085     //********************************************************
0086     //*** SETTERS AND GETTERS ********************************
0087     //********************************************************
0088 
0089     /**
0090      * Get quark flavor assigned to this object.
0091      */
0092     QuarkFlavor getQuarkFlavor() const;
0093 
0094     /**
0095      * Set quark flavor assigned to this object.
0096      */
0097     void setQuarkFlavor(QuarkFlavor quarkFlavorType);
0098 
0099     /**
0100      * Get value of quark distribution.
0101      */
0102     double getQuarkDistribution() const;
0103 
0104     /**
0105      * Set value of quark distribution.
0106      */
0107     void setQuarkDistribution(double quarkDistribution);
0108 
0109     /**
0110      * Get value of singlet combination.
0111      */
0112     double getQuarkDistributionPlus() const;
0113 
0114     /**
0115      * Set value of singlet combination.
0116      */
0117     void setQuarkDistributionPlus(double quarkDistributionPlus);
0118 
0119     /**
0120      * Get value of non-singlet combination.
0121      */
0122     double getQuarkDistributionMinus() const;
0123 
0124     /**
0125      * Set value of non-singlet combination.
0126      */
0127     void setQuarkDistributionMinus(double quarkDistributionMinus);
0128 
0129 private:
0130 
0131     /**
0132      * Quark flavor assigned to this object.
0133      */
0134     QuarkFlavor m_quarkFlavor;
0135 
0136     /**
0137      * Value of quark distribution.
0138      */
0139     double m_quarkDistribution;
0140 
0141     /**
0142      * Value of singlet (plus) combination.
0143      * In GPD formalism it is C-even combination of single type GPDs, e.g.: <br>
0144      * \f$H^{q(+)}(x, \xi, t) = H^{q}(x, \xi, t) - H^{q}(-x, \xi, t)\f$ <br>
0145      * \f$\tilde{H}^{q(+)}(x, \xi, t) = \tilde{H}^{q}(x, \xi, t) + \tilde{H}^{q}(-x, \xi, t)\f$ <br>
0146      * and analogously for GPDs \f$E\f$ and \f$\tilde{E}\f$. See M. Diehl's https://arxiv.org/abs/hep-ph/0307382 Sec. 3.3.2 for more details.
0147      */
0148     double m_quarkDistributionPlus;
0149 
0150     /**
0151      * Value of non-singlet (minus) combination.
0152      * In GPD formalism it is C-odd combination of single type GPDs, e.g.: <br>
0153      * \f$H^{q(-)}(x, \xi, t) = H^{q}(x, \xi, t) + H^{q}(-x, \xi, t)\f$ <br>
0154      * \f$\tilde{H}^{q(-)}(x, \xi, t) = \tilde{H}^{q}(x, \xi, t) - \tilde{H}^{q}(-x, \xi, t)\f$ <br>
0155      * and analogously for GPDs \f$E\f$ and \f$\tilde{E}\f$. See M. Diehl's https://arxiv.org/abs/hep-ph/0307382 Sec. 3.3.2 for more details.
0156      */
0157     double m_quarkDistributionMinus;
0158 };
0159 
0160 } /* namespace PARTONS */
0161 
0162 #endif /* QUARK_DISTRIBUTION_H */