Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /*
0002  * GPDSubtractionConstantDLMSTW21.h
0003  *
0004  *  Created on: Jan 8, 2021
0005  *      Author: Pawel Sznajder (NCBJ)
0006  */
0007 
0008 #ifndef GPD_SUBTRACTION_CONSTANT_DLMSTW21_H
0009 #define GPD_SUBTRACTION_CONSTANT_DLMSTW21_H
0010 
0011 #include <stddef.h>
0012 #include <string>
0013 #include <vector>
0014 
0015 #include <ElementaryUtils/parameters/Parameters.h>
0016 
0017 #include "../../modules/gpd_subtraction_constant/GPDSubtractionConstantModule.h"
0018 #include "../../utils/type/PhysicalType.h"
0019 
0020 namespace PARTONS {
0021 
0022 /**
0023  * @class GPDSubtractionConstantDLMSTW21
0024  *
0025  * @brief Implementation of DLMSTW subtraction constant.
0026  *
0027  * This module implements the subtraction constant based on tripole Ansatz with parameters
0028  * extracted as described in 2021 paper by Dutrieux, Lorce, Moutarde, Sznajder, Trawinski and Wagner.
0029  */
0030 class GPDSubtractionConstantDLMSTW21: public GPDSubtractionConstantModule {
0031 
0032 public:
0033 
0034     static const std::string PARAMETER_NAME_REPLICA; ///< Name of parameter to set replica index via xml file.
0035 
0036     /**
0037      * Unique ID to automatically register the class in the registry.
0038      */
0039     static const unsigned int classId;
0040 
0041     /**
0042      * Constructor.
0043      * @param className Name of this class.
0044      */
0045     GPDSubtractionConstantDLMSTW21(const std::string &className);
0046 
0047     /**
0048      * Destructor.
0049      */
0050     virtual ~GPDSubtractionConstantDLMSTW21();
0051 
0052     virtual void configure(const ElemUtils::Parameters &parameters);
0053     virtual GPDSubtractionConstantDLMSTW21* clone() const;
0054 
0055     /**
0056      * Load parameters for a given replica index.
0057      */
0058     void loadParameters(size_t replica, bool printInfo = true);
0059 
0060     /**
0061      * Evaluate mean and uncertainty for a given vector of numbers. The procedure include removing of outliers.
0062      */
0063     void getMeanAndUncertainty(const std::vector<double>& v, double& mean,
0064             double& unc) const;
0065 
0066 protected:
0067 
0068     /** Copy constructor.
0069      * @param other Object to be copied.
0070      */
0071     GPDSubtractionConstantDLMSTW21(const GPDSubtractionConstantDLMSTW21& other);
0072 
0073     virtual PhysicalType<double> computeSubtractionConstant();
0074 
0075 private:
0076 
0077     /**
0078      * Evaluate mean from a given vector.
0079      */
0080     double getMean(const std::vector<double>& v) const;
0081 
0082     /**
0083      * Evaluate sigma from a given vector.
0084      */
0085     double getSigma(const std::vector<double>& v) const;
0086 
0087     /**
0088      * Remove outliers from a given vector using 3sigma rule.
0089      */
0090     size_t removeOutliers(std::vector<double>& v) const;
0091 
0092     size_t m_replica; ///< Replica index.
0093 
0094     double m_d1g;   ///< d1 for gluons at initial scale.
0095     double m_d1q;   ///< d1 for light quarks at initial scale.
0096 
0097     double m_muF20; ///< Initial factorization scale.
0098     double m_M;     ///< Parameter of multipole Ansatz.
0099     double m_alpha; ///< Parameter of multipole Ansatz.
0100 };
0101 
0102 } /* namespace PARTONS */
0103 
0104 #endif /* GPD_SUBTRACTION_CONSTANT_DLMSTW21_H */