Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef PERTURBATIVE_QCD_ORDER_TYPE_H
0002 #define PERTURBATIVE_QCD_ORDER_TYPE_H
0003 
0004 /**
0005  * @file PerturbativeQCDOrderType.h
0006  * @author Bryan BERTHOU (SPhN / CEA Saclay)
0007  * @date July 16, 2014
0008  * @version 1.0
0009  */
0010 
0011 #include <string>
0012 
0013 #include "../BaseObject.h"
0014 
0015 namespace PARTONS {
0016 
0017 /**
0018  * @class PerturbativeQCDOrderType
0019  *
0020  * @brief Definition of enumeration values for pQCD orders of calculation.
0021  *
0022  * This class defines a set of enumeration values that are used to distinguish between pQCD orders of calculation. In addition, a declared object of this class is always associated to one pQCD order (see PerturbativeQCDOrderType::m_type), so member functions can act on it. E.g.
0023  \code{.cpp}
0024  //this is single enum variable - nothing to play with
0025  PerturbativeQCDOrderType::Type enum_variable = PerturbativeQCDOrderType::LO;
0026 
0027  //this is declared object
0028  PerturbativeQCDOrderType enum_object;
0029 
0030  //let us assign some type (default is PerturbativeQCDOrderType::UNDEFINED)
0031  enum_object.setType(enum_variable);
0032 
0033  //with objects you can use available functions, e.g. you can represent enumeration type by a corresponding string
0034  std::string enum_string_1 = enum_object.toString();
0035 
0036  //you can achieve some basic operations without the explicit declaration of objects by using the assignment constructor
0037  std::string enum_string_2 = PerturbativeQCDOrderType(PerturbativeQCDOrderType::NLO).toString();
0038 
0039  Partons::getInstance()->getLoggerManager()->info("example", __func__, ElemUtils::Formatter() << "pQCD order is: " << enum_string_1);
0040  Partons::getInstance()->getLoggerManager()->info("example", __func__, ElemUtils::Formatter() << "pQCD order is: " << enum_string_2);
0041  \endcode
0042  which gives via Logger:
0043  \code
0044  20-05-2017 12:13:02 [INFO] (example::main) pQCD order is: LO
0045  20-05-2017 12:13:02 [INFO] (example::main) pQCD order is: NLO
0046  \endcode
0047  */
0048 class PerturbativeQCDOrderType: public BaseObject {
0049 
0050 public:
0051 
0052     static const std::string PARAMETER_NAME_PERTURBATIVE_QCD_ORDER_TYPE;
0053 
0054     enum Type {
0055         UNDEFINED = 0,  //!< Undefined type.
0056         LO = 1,     //!< Leading Order.
0057         NLO = 2,    //!< Next-to-Leading Order.
0058         NNLO = 3,   //!< Next-to-Next-to-Leading Order.
0059         LL = 4,     //!< Leading Logarithm.
0060         NLL = 5    //!< Next-to-Leading Logarithm.
0061     };
0062 
0063     /**
0064      * Default constructor.
0065      */
0066     PerturbativeQCDOrderType();
0067 
0068     /**
0069      * Assignment constructor.
0070      * @param type Type to be assigned.
0071      */
0072     PerturbativeQCDOrderType(Type type);
0073 
0074     /**
0075      * Assignment constructor trying to match pQCD order type from given string. If unable to match set PerturbativeQCDOrderType::UNDEFINED.
0076      * @param perturbativeQCDOrderTypeString String to be matched.
0077      */
0078     PerturbativeQCDOrderType(const std::string &perturbativeQCDOrderTypeString);
0079 
0080     /**
0081      * Get string representation of type being assigned to a declared object of this class.
0082      * @return String representation of assigned type, like "LO" for PerturbativeQCDOrderType::LO.
0083      */
0084     std::string toString() const;
0085 
0086     //********************************************************
0087     //*** SETTERS AND GETTERS ********************************
0088     //********************************************************
0089 
0090     /**
0091      * Get type being assigned to a declared object of this class.
0092      */
0093     PerturbativeQCDOrderType::Type getType() const;
0094 
0095     /**
0096      * Assign type to a declared object of this class.
0097      */
0098     void setType(Type type);
0099 
0100 private:
0101 
0102     /**
0103      * Type associated to a declared object of this class.
0104      */
0105     PerturbativeQCDOrderType::Type m_type;
0106 };
0107 
0108 } /* namespace PARTONS */
0109 
0110 //inline bool operator==(const QCDOrderType& lhs, const QCDOrderType& rhs) {
0111 //    return (lhs.t_ == rhs.t_) ? true : false;
0112 //}
0113 
0114 #endif /* PERTURBATIVE_QCD_ORDER_TYPE_H */