Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef COLLINEAR_DISTRIBUTION_LHAPDF_H
0002 #define COLLINEAR_DISTRIBUTION_LHAPDF_H
0003 
0004 /**
0005  * @file CollinearDistributionLHAPDF.h
0006  * @author Valerio BERTONE (CEA Saclay)
0007  * @date July 18, 2020
0008  * @version 1.0
0009  */
0010 
0011 #include <ElementaryUtils/parameters/Parameters.h>
0012 #include <LHAPDF/LHAPDF.h>
0013 
0014 #include "CollinearDistributionModule.h"
0015 
0016 namespace PARTONS {
0017 
0018 /**
0019  * @class CollinearDistributionLHAPDF
0020  *
0021  * @brief A module that encapsulates a set provided through the LHAPDF
0022  * interface.
0023  */
0024 class CollinearDistributionLHAPDF: public CollinearDistributionModule {
0025 public:
0026 
0027     static const std::string PARAM_NAME_SET_NAME;
0028     static const std::string PARAM_NAME_SET_TYPE;
0029     static const std::string PARAM_NAME_SET_MEMBER;
0030 
0031     static const unsigned int classId; ///< Unique ID to automatically register the class in the registry.
0032 
0033     /**
0034      * Constructor.
0035      * See BaseObject::BaseObject and ModuleObject::ModuleObject for more details.
0036      *
0037      * @param className name of child class.
0038      */
0039     CollinearDistributionLHAPDF(const std::string &className);
0040 
0041     /**
0042      * Default destructor.
0043      */
0044     virtual ~CollinearDistributionLHAPDF();
0045 
0046     virtual CollinearDistributionLHAPDF* clone() const;
0047 
0048     virtual void configure(const ElemUtils::Parameters &parameters);
0049 
0050     virtual std::string toString() const;
0051 
0052     // ##### GETTERS & SETTERS #####
0053 
0054     std::string getSetName() const;
0055     int getMember() const;
0056     CollinearDistributionType::Type getType() const;
0057     std::vector<LHAPDF::PDF*> getSet() const;
0058 
0059     void setSetName(const std::string &setname);
0060     void setMember(const int &member);
0061     void setType(const CollinearDistributionType::Type &type);
0062 
0063 protected:
0064 
0065     /**
0066      * Copy constructor.
0067      *
0068      * Used by the factory.
0069      *
0070      * @param other
0071      */
0072     CollinearDistributionLHAPDF(const CollinearDistributionLHAPDF& other);
0073 
0074     virtual void isModuleWellConfigured();
0075     virtual void initModule();
0076 
0077     virtual PartonDistribution computeUnpolPDF();
0078     virtual PartonDistribution computePolPDF();
0079     virtual PartonDistribution computeUnpolFF();
0080     virtual PartonDistribution computePolFF();
0081  
0082 protected:
0083 
0084     std::string m_setName;
0085     int m_member;
0086     CollinearDistributionType::Type m_type;
0087     std::vector<LHAPDF::PDF*> m_set;
0088 
0089 };
0090 
0091 } /* namespace PARTONS */
0092 
0093 #endif /* COLLINEAR_DISTRIBUTION_LHAPDF_H */