|
|
|||
File indexing completed on 2026-06-02 08:51:42
0001 #ifndef GPD_RESULT_H 0002 #define GPD_RESULT_H 0003 0004 /** 0005 * @file GPDResult.h 0006 * @author: Bryan BERTHOU (SPhN / CEA Saclay) 0007 * @date 26 April 2015 0008 * @version 1.0 0009 */ 0010 0011 #include <map> 0012 #include <string> 0013 #include <vector> 0014 0015 #include "../parton_distribution/PartonDistribution.h" 0016 #include "../Result.h" 0017 #include "GPDKinematic.h" 0018 #include "GPDType.h" 0019 0020 namespace PARTONS { 0021 0022 /** 0023 * @class GPDResult 0024 * 0025 * @brief Class representing single result of GPD computation. 0026 * 0027 * This class is used to store results of a single GPD computation. In other words, the class stores a collection of PartonDistribution objects, with each of them containing a part of the result defined for a specific GPD type. This is illustrated by the following example: 0028 \code{.cpp} 0029 //evaluate exemplary GPD result 0030 0031 //retrieve GPD service 0032 GPDService* pGPDService = Partons::getInstance()->getServiceObjectRegistry()->getGPDService(); 0033 0034 //load GPD module with the BaseModuleFactory 0035 GPDModule* pGPDModel = Partons::getInstance()->getModuleObjectFactory()->newGPDModule(MMS13Model::classId); 0036 0037 //define GPD kinematics used in computation 0038 GPDKinematic gpdKinematic(-0.1, 0.05, 0., 2., 2.); 0039 0040 //define list of GPD types to be computed 0041 List<GPDType> gpdTypeList; 0042 gpdTypeList.add(GPDType::H); 0043 gpdTypeList.add(GPDType::E); 0044 0045 //evaluate 0046 GPDResult gpdResult = pGPDService->computeGPDModel(gpdKinematic, pGPDModel, gpdTypeList); 0047 0048 //retrieve value of GPD H for up quarks: 0049 double Hu; 0050 //1. retrieve a reference to PartonDistribution object that stores the part of result for GPD type H 0051 const PartonDistribution& partonDistributionH = gpdResult.getPartonDistribution(GPDType::H); 0052 //2. retrieve a reference to QuarkDistribution object that stores the part of result for quark type u 0053 const QuarkDistribution& quarkDistributionHu = partonDistributionH.getQuarkDistribution(QuarkFlavor::UP); 0054 //3. retrieve the value 0055 Hu = quarkDistributionHu.getQuarkDistribution(); 0056 0057 //or simply 0058 Hu = gpdResult.getPartonDistribution(GPDType::H).getQuarkDistribution(QuarkFlavor::UP).getQuarkDistribution(); 0059 0060 //retrieve value of GPD E for gluons: 0061 double Eg; 0062 //1. retrieve a reference to PartonDistribution object that stores the part of result for GPD type E 0063 const PartonDistribution& partonDistributionE = gpdResult.getPartonDistribution(GPDType::E); 0064 //2. retrieve a reference to GluonDistribution object that stores the part of result for gluons 0065 const GluonDistribution& gluonDistributionE = partonDistributionE.getGluonDistribution(); 0066 //3. retrieve the value 0067 Eg = gluonDistributionE.getGluonDistribution(); 0068 0069 //or simply 0070 Eg = gpdResult.getPartonDistribution(GPDType::E).getGluonDistribution().getGluonDistribution(); 0071 \endcode 0072 * See the documentation of QuarkDistribution and GluonDistribution classes to check what kind of information you can access in objects of those types. 0073 */ 0074 class GPDResult: public Result<GPDKinematic> { 0075 0076 public: 0077 0078 /** 0079 * Default constructor. 0080 */ 0081 GPDResult(); 0082 0083 /** 0084 * Assignment constructor. 0085 * @param kinematic GPD kinematics to be assigned. 0086 */ 0087 GPDResult(const GPDKinematic& kinematic); 0088 0089 /** 0090 * Copy constructor. 0091 * @param other Object to be copied. 0092 */ 0093 GPDResult(const GPDResult &other); 0094 0095 /** 0096 * Destructor. 0097 */ 0098 virtual ~GPDResult(); 0099 0100 virtual std::string toString() const; 0101 0102 /** 0103 * Add parton distribution associated to given GPD type. 0104 * @param gpdType GPD type of parton distribution to be inserted. 0105 * @param partonDistribution Parton distribution to be added. 0106 */ 0107 void addPartonDistribution(GPDType::Type gpdType, 0108 const PartonDistribution& partonDistribution); 0109 0110 /** 0111 * Get reference to parton distribution associated to given GPD type. 0112 * @param gpdType GPD type associated to parton distribution to be selected. 0113 * @return Reference to selected parton distribution. 0114 */ 0115 const PartonDistribution& getPartonDistribution( 0116 GPDType::Type gpdType) const; 0117 0118 /** 0119 * Check if the object stores parton distribution of given GPD type. 0120 * @param gpdType GPD type to be checked. 0121 * @return True if the object stores parton distribution of given GPD type, otherwise false. 0122 * @see GPDResult::getLastAvailable() 0123 */ 0124 bool isAvailable(const GPDType::Type &gpdType) const; 0125 0126 /** 0127 * Get reference to parton distribution marked by the last call of GPDResult::isAvailible() function. 0128 * @return Reference to selected parton distribution. 0129 * @see GPDResult::isAvailible() 0130 */ 0131 PartonDistribution& getLastAvailable() const; 0132 0133 /** 0134 * Get list of GPD types associated to stored parton distributions. 0135 * @return Vector of associated types. 0136 */ 0137 std::vector<GPDType> listGPDTypeComputed() const; 0138 0139 //******************************************************** 0140 //*** SETTERS AND GETTERS ******************************** 0141 //******************************************************** 0142 0143 /** 0144 * Get reference to map containing stored parton distributions distinguished by associated GPD types. 0145 */ 0146 const std::map<GPDType::Type, PartonDistribution>& getPartonDistributions() const; 0147 0148 /** 0149 * Set map containing stored parton distributions distinguished by associated GPD types. 0150 */ 0151 void setPartonDistributions( 0152 const std::map<GPDType::Type, PartonDistribution>& partonDistributions); 0153 0154 private: 0155 0156 /** 0157 * Map containing stored parton distributions distinguished by associated GPD types. 0158 */ 0159 std::map<GPDType::Type, PartonDistribution> m_partonDistributions; 0160 0161 /** 0162 * Iterator used to mark a specific entry in GPDResult::m_partonDistributions. 0163 */ 0164 mutable std::map<GPDType::Type, PartonDistribution>::const_iterator m_it; 0165 }; 0166 0167 } /* namespace PARTONS */ 0168 0169 #endif /* GPD_RESULT_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|