PARTONS  
PARtonic Tomography Of Nucleon Software
Public Member Functions | Private Attributes | List of all members
PARTONS::GPDResult Class Reference

Class representing single result of GPD computation. More...

Inheritance diagram for PARTONS::GPDResult:
PARTONS::Result< GPDKinematic > PARTONS::BaseObject

Public Member Functions

 GPDResult ()
 Default constructor. More...
 
 GPDResult (const GPDKinematic &kinematic)
 Assignment constructor. More...
 
 GPDResult (const GPDResult &other)
 Copy constructor. More...
 
virtual ~GPDResult ()
 Destructor. More...
 
virtual std::string toString () const
 Return a pre-formatted characters string for output visualization of class member's values. More...
 
void addPartonDistribution (GPDType::Type gpdType, const PartonDistribution &partonDistribution)
 Add parton distribution associated to given GPD type. More...
 
const PartonDistributiongetPartonDistribution (GPDType::Type gpdType) const
 Get reference to parton distribution associated to given GPD type. More...
 
bool isAvailable (const GPDType::Type &gpdType) const
 Check if the object stores parton distribution of given GPD type. More...
 
PartonDistributiongetLastAvailable () const
 Get reference to parton distribution marked by the last call of GPDResult::isAvailible() function. More...
 
void compare (ComparisonReport &rootComparisonReport, const GPDResult &referenceObject, std::string parentObjectInfo="") const
 Compare to other GPDResult object and store comparison result in given comparison report. More...
 
std::vector< GPDTypelistGPDTypeComputed () const
 Get list of GPD types associated to stored parton distributions. More...
 
const std::map< GPDType::Type, PartonDistribution > & getPartonDistributions () const
 Get reference to map containing stored parton distributions distinguished by associated GPD types. More...
 
void setPartonDistributions (const std::map< GPDType::Type, PartonDistribution > &partonDistributions)
 Set map containing stored parton distributions distinguished by associated GPD types. More...
 
- Public Member Functions inherited from PARTONS::Result< GPDKinematic >
virtual ~Result ()
 Destructor. More...
 
bool operator< (const Result< GPDKinematic > &other) const
 Relation operator that checks if the value of left operand is less than the value of right operand (in this case returned is this->m_kinematic < other.m_kinematic). More...
 
ChannelType::Type getChannelType () const
 Get channel type. More...
 
void setComputationModuleName (const std::string &moduleName)
 Set name of module used to evaluate this result. More...
 
const std::string & getComputationModuleName () const
 Get name of module used to evaluate this result. More...
 
void setResultInfo (const ResultInfo &resultInfo)
 Set information on this result. More...
 
const ResultInfogetResultInfo () const
 Get information on this result. More...
 
void setKinematic (const GPDKinematic &kinematic)
 Set kinematics associated to this result. More...
 
const GPDKinematicgetKinematic () const
 Get reference to kinematics associated to this result. More...
 
- Public Member Functions inherited from PARTONS::BaseObject
 BaseObject (const std::string &className)
 Constructor. More...
 
virtual ~BaseObject ()
 Default destructor. More...
 
virtual BaseObjectclone () const
 Virtual clone function to allow the factory to clone all derived members object stored in the BaseObjectRegistry. More...
 
virtual void resolveObjectDependencies ()
 Because of the initialization step order of the program, objects are registered in a total random order and some objects depend on others. More...
 
void serialize (ElemUtils::Packet &packet) const
 Used to split a complex C++ object into a concatenation of simple types. More...
 
void unserialize (ElemUtils::Packet &packet)
 Used to rebuild a complex C++ object from a concatenation of simple type. More...
 
bool operator< (const BaseObject &other) const
 Overload of < operator to sort BaseObject object by its indexId value. More...
 
const std::string & getClassName () const
 
unsigned int getObjectId () const
 
int getIndexId () const
 
void setIndexId (int indexId)
 

Private Attributes

std::map< GPDType::Type, PartonDistributionm_partonDistributions
 Map containing stored parton distributions distinguished by associated GPD types. More...
 
std::map< GPDType::Type, PartonDistribution >::const_iterator m_it
 Iterator used to mark a specific entry in GPDResult::m_partonDistributions. More...
 

Additional Inherited Members

- Protected Member Functions inherited from PARTONS::Result< GPDKinematic >
 Result (const std::string &className, ChannelType::Type channelType)
 Default constructor. More...
 
 Result (const std::string &className, ChannelType::Type channelType, const GPDKinematic &kinematic)
 Assignment constructor. More...
 
 Result (const Result &other)
 Copy constructor. More...
 
- Protected Member Functions inherited from PARTONS::BaseObject
 BaseObject (const BaseObject &other)
 Copy constructor. More...
 
void info (const std::string &functionName, const std::string &message) const
 Print info message into logger. More...
 
void debug (const std::string &functionName, const std::string &message) const
 Print debug message into logger. More...
 
void warn (const std::string &functionName, const std::string &message) const
 Print warning message into logger. More...
 
void errorMissingParameter (const std::string &parameterName) const
 Use in automation process to throw exception when a parameter is missing from the XML scenario file. More...
 
- Protected Attributes inherited from PARTONS::Result< GPDKinematic >
ChannelType::Type m_channelType
 Channel type. More...
 
std::string m_computationModuleName
 Name of module used to evaluate this result. More...
 
ResultInfo m_resultInfo
 Information on this result. More...
 
GPDKinematic m_kinematic
 Kinematics associated to this result. More...
 

Detailed Description

Class representing single result of GPD computation.

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:

//evaluate exemplary GPD result
//retrieve GPD service
//load GPD module with the BaseModuleFactory
GPDModule* pGPDModel = Partons::getInstance()->getModuleObjectFactory()->newGPDModule(MMS13Model::classId);
//define GPD kinematics used in computation
GPDKinematic gpdKinematic(-0.1, 0.05, 0., 2., 2.);
//define list of GPD types to be computed
List<GPDType> gpdTypeList;
gpdTypeList.add(GPDType::H);
gpdTypeList.add(GPDType::E);
//evaluate
GPDResult gpdResult = pGPDService->computeGPDModel(gpdKinematic, pGPDModel, gpdTypeList);
//retrieve value of GPD H for up quarks:
double Hu;
//1. retrieve a reference to PartonDistribution object that stores the part of result for GPD type H
const PartonDistribution& partonDistributionH = gpdResult.getPartonDistribution(GPDType::H);
//2. retrieve a reference to QuarkDistribution object that stores the part of result for quark type u
const QuarkDistribution& quarkDistributionHu = partonDistributionH.getQuarkDistribution(QuarkFlavor::UP);
//3. retrieve the value
Hu = quarkDistributionHu.getQuarkDistribution();
//or simply
Hu = gpdResult.getPartonDistribution(GPDType::H).getQuarkDistribution(QuarkFlavor::UP).getQuarkDistribution();
//retrieve value of GPD E for gluons:
double Eg;
//1. retrieve a reference to PartonDistribution object that stores the part of result for GPD type E
const PartonDistribution& partonDistributionE = gpdResult.getPartonDistribution(GPDType::E);
//2. retrieve a reference to GluonDistribution object that stores the part of result for gluons
const GluonDistribution& gluonDistributionE = partonDistributionE.getGluonDistribution();
//3. retrieve the value
Eg = gluonDistributionE.getGluonDistribution();
//or simply
Eg = gpdResult.getPartonDistribution(GPDType::E).getGluonDistribution().getGluonDistribution();
GPDResult()
Default constructor.
Definition: GPDResult.cpp:12
@ H
Twist-2 GPD .
Definition: GPDType.h:46
@ E
Twist-2 GPD .
Definition: GPDType.h:47
GPDModule * newGPDModule(unsigned int classId)
Specialization of ModuleObjectFactory::newModuleObject into a GPDModule.
Definition: ModuleObjectFactory.cpp:173
static Partons * getInstance()
Share a unique pointer of this class.
Definition: Partons.cpp:27
ModuleObjectFactory * getModuleObjectFactory() const
Definition: Partons.cpp:187
ServiceObjectRegistry * getServiceObjectRegistry() const
Definition: Partons.cpp:179
@ UP
Quark flavor up.
Definition: QuarkFlavor.h:60
GPDService * getGPDService() const
Definition: ServiceObjectRegistry.cpp:54

See the documentation of QuarkDistribution and GluonDistribution classes to check what kind of information you can access in objects of those types.

Constructor & Destructor Documentation

◆ GPDResult() [1/3]

PARTONS::GPDResult::GPDResult ( )

Default constructor.

◆ GPDResult() [2/3]

PARTONS::GPDResult::GPDResult ( const GPDKinematic kinematic)

Assignment constructor.

Parameters
kinematicGPD kinematics to be assigned.

◆ GPDResult() [3/3]

PARTONS::GPDResult::GPDResult ( const GPDResult other)

Copy constructor.

Parameters
otherObject to be copied.

◆ ~GPDResult()

PARTONS::GPDResult::~GPDResult ( )
virtual

Destructor.

Member Function Documentation

◆ addPartonDistribution()

void PARTONS::GPDResult::addPartonDistribution ( GPDType::Type  gpdType,
const PartonDistribution partonDistribution 
)

Add parton distribution associated to given GPD type.

Parameters
gpdTypeGPD type of parton distribution to be inserted.
partonDistributionParton distribution to be added.

◆ compare()

void PARTONS::GPDResult::compare ( ComparisonReport rootComparisonReport,
const GPDResult referenceObject,
std::string  parentObjectInfo = "" 
) const

Compare to other GPDResult object and store comparison result in given comparison report.

Parameters
rootComparisonReportReference to comparison report to be used to store comparison result.
referenceObjectReference to object to be compared.
parentObjectInfoAddition information coming from the parent object (if needed).

◆ getLastAvailable()

PartonDistribution & PARTONS::GPDResult::getLastAvailable ( ) const

Get reference to parton distribution marked by the last call of GPDResult::isAvailible() function.

Returns
Reference to selected parton distribution.
See also
GPDResult::isAvailible()

◆ getPartonDistribution()

const PartonDistribution & PARTONS::GPDResult::getPartonDistribution ( GPDType::Type  gpdType) const

Get reference to parton distribution associated to given GPD type.

Parameters
gpdTypeGPD type associated to parton distribution to be selected.
Returns
Reference to selected parton distribution.

◆ getPartonDistributions()

const std::map< GPDType::Type, PartonDistribution > & PARTONS::GPDResult::getPartonDistributions ( ) const

Get reference to map containing stored parton distributions distinguished by associated GPD types.

◆ isAvailable()

bool PARTONS::GPDResult::isAvailable ( const GPDType::Type gpdType) const

Check if the object stores parton distribution of given GPD type.

Parameters
gpdTypeGPD type to be checked.
Returns
True if the object stores parton distribution of given GPD type, otherwise false.
See also
GPDResult::getLastAvailable()

◆ listGPDTypeComputed()

std::vector< GPDType > PARTONS::GPDResult::listGPDTypeComputed ( ) const

Get list of GPD types associated to stored parton distributions.

Returns
Vector of associated types.

◆ setPartonDistributions()

void PARTONS::GPDResult::setPartonDistributions ( const std::map< GPDType::Type, PartonDistribution > &  partonDistributions)

Set map containing stored parton distributions distinguished by associated GPD types.

◆ toString()

std::string PARTONS::GPDResult::toString ( ) const
virtual

Return a pre-formatted characters string for output visualization of class member's values.

Returns
a pre-formatted characters string.

Reimplemented from PARTONS::Result< GPDKinematic >.

Member Data Documentation

◆ m_it

std::map<GPDType::Type, PartonDistribution>::const_iterator PARTONS::GPDResult::m_it
mutableprivate

Iterator used to mark a specific entry in GPDResult::m_partonDistributions.

◆ m_partonDistributions

std::map<GPDType::Type, PartonDistribution> PARTONS::GPDResult::m_partonDistributions
private

Map containing stored parton distributions distinguished by associated GPD types.


The documentation for this class was generated from the following files: