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

Parton distributions for single physics object. More...

Inheritance diagram for PARTONS::PartonDistribution:
PARTONS::BaseObject

Public Member Functions

 PartonDistribution ()
 Default constructor. More...
 
 PartonDistribution (const PartonDistribution &other)
 Copy constructor. More...
 
virtual ~PartonDistribution ()
 Destructor. More...
 
void addQuarkDistribution (const QuarkDistribution &quarkDistribution)
 Add quark distribution associated to given quark flavor that is defined in the object to be added. More...
 
void addQuarkDistribution (QuarkDistribution &quarkDistribution)
 Add quark distribution associated to given quark flavor that is defined in the object to be added. More...
 
const QuarkDistributiongetQuarkDistribution (QuarkFlavor::Type quarkFlavorType) const
 Get reference to quark distribution associated to given quark flavor. More...
 
std::vector< QuarkFlavor::TypelistTypeOfQuarkFlavor ()
 Get list of quark flavors associated to stored quark distributions. More...
 
unsigned int getQuarkDistributionsSize () const
 Get number of quark distributions stored in this object. More...
 
List< QuarkDistributiongetListOfQuarkDistribution () const
 Get list of stored quark distributions. More...
 
double getSinglet ()
 Get sum of singlet values for stored quark distributions. More...
 
virtual std::string toString () const
 Return a pre-formatted characters string for output visualization of class member's values. More...
 
void compare (ComparisonReport &rootComparisonReport, const PartonDistribution &referenceObject, std::string parentObjectInfo="") const
 Compare to other PartonDistribution object and store comparison result in given comparison report. More...
 
const std::map< QuarkFlavor::Type, QuarkDistribution > & getQuarkDistributions () const
 Get reference to map containing stored quark distributions distinguished by associated quark flavors. More...
 
void setQuarkDistributions (const std::map< QuarkFlavor::Type, QuarkDistribution > &quarkDistributions)
 Set map containing stored quark distributions distinguished by associated quark flavors. More...
 
const GluonDistributiongetGluonDistribution () const
 Get reference to gluon distribution. More...
 
void setGluonDistribution (const GluonDistribution &gluonDistribution)
 Set gluon distribution. 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< QuarkFlavor::Type, QuarkDistributionm_quarkDistributions
 Map containing stored quark distributions distinguished by associated quark flavors. More...
 
GluonDistribution m_gluonDistribution
 Gluon distribution. More...
 

Additional Inherited Members

- 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...
 

Detailed Description

Parton distributions for single physics object.

This class is used to store parton distributions for a single physics object (e.g. GPD of a given type). It contains quark distributions (QuarkDistribution objects) and a gluon distribution (GluonDistribution object). Each quark distribution is defined for a different quark flavor. This is illustrated by the following example:

//create new parton distribution
PartonDistribution partonDistribution;
//since it is an empty container now, let us fill it:
//with quark distributions for up and down quarks
QuarkDistribution quarkDistributionUp(QuarkFlavor::UP, 1.123);
QuarkDistribution quarkDistributionDown(QuarkFlavor::DOWN, 0.456);
partonDistribution.addQuarkDistribution(quarkDistributionUp);
partonDistribution.addQuarkDistribution(quarkDistributionDown);
//with gluon distribution
GluonDistribution gluonDistribution(2.345);
partonDistribution.setGluonDistribution(gluonDistribution);
//check what is inside
Partons::getInstance()->getLoggerManager()->info("example", __func__, ElemUtils::Formatter() << "Parton distribution contains: " << partonDistribution.toString());
PartonDistribution()
Default constructor.
Definition: PartonDistribution.cpp:9
ElemUtils::LoggerManager * getLoggerManager() const
Definition: Partons.cpp:191
static Partons * getInstance()
Share a unique pointer of this class.
Definition: Partons.cpp:27
@ UP
Quark flavor up.
Definition: QuarkFlavor.h:60
@ DOWN
Quark flavor down.
Definition: QuarkFlavor.h:61

which gives via Logger:

20-05-2017 09:29:44 [INFO] (example::main) Parton distribution contains: [PartonDistribution]
GluonDistribution = 2.345
u = 1.123
u(+) = 0
u(-) = 0
d = 0.456
d(+) = 0
d(-) = 0
std::string m_className
String that represents class's name used by the LoggerManager's class to know the source of the outpu...
Definition: BaseObject.h:158
unsigned int m_objectId
Unique id identifying each object.
Definition: BaseObject.h:157

See the documentation of QuarkDistribution and GluonDistribution classes to check what kind of information you can access in objects of those types. Check also GPDResult class, where QuarkDistribution objects are used extensively.

Constructor & Destructor Documentation

◆ PartonDistribution() [1/2]

PARTONS::PartonDistribution::PartonDistribution ( )

Default constructor.

◆ PartonDistribution() [2/2]

PARTONS::PartonDistribution::PartonDistribution ( const PartonDistribution other)

Copy constructor.

Parameters
otherObject to be copied.

◆ ~PartonDistribution()

PARTONS::PartonDistribution::~PartonDistribution ( )
virtual

Destructor.

Member Function Documentation

◆ addQuarkDistribution() [1/2]

void PARTONS::PartonDistribution::addQuarkDistribution ( const QuarkDistribution quarkDistribution)

Add quark distribution associated to given quark flavor that is defined in the object to be added.

Parameters
quarkDistributionReference to quark distribution to be added.

◆ addQuarkDistribution() [2/2]

void PARTONS::PartonDistribution::addQuarkDistribution ( QuarkDistribution quarkDistribution)

Add quark distribution associated to given quark flavor that is defined in the object to be added.

Parameters
quarkDistributionReference to quark distribution to be added.

◆ compare()

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

Compare to other PartonDistribution 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).

◆ getGluonDistribution()

const GluonDistribution & PARTONS::PartonDistribution::getGluonDistribution ( ) const

Get reference to gluon distribution.

◆ getListOfQuarkDistribution()

List< QuarkDistribution > PARTONS::PartonDistribution::getListOfQuarkDistribution ( ) const

Get list of stored quark distributions.

Returns
Retrieved List of QuarkDistribution objects.

◆ getQuarkDistribution()

const QuarkDistribution & PARTONS::PartonDistribution::getQuarkDistribution ( QuarkFlavor::Type  quarkFlavorType) const

Get reference to quark distribution associated to given quark flavor.

Parameters
quarkFlavorTypeQuark flavor associated to quark distribution to be selected.
Returns
Reference to selected quark distribution.

◆ getQuarkDistributions()

const std::map< QuarkFlavor::Type, QuarkDistribution > & PARTONS::PartonDistribution::getQuarkDistributions ( ) const

Get reference to map containing stored quark distributions distinguished by associated quark flavors.

◆ getQuarkDistributionsSize()

unsigned int PARTONS::PartonDistribution::getQuarkDistributionsSize ( ) const

Get number of quark distributions stored in this object.

Returns
Number of quark distributions stored in this object.

◆ getSinglet()

double PARTONS::PartonDistribution::getSinglet ( )

Get sum of singlet values for stored quark distributions.

Return
\(\sum_q F^{q(+)}\)
where F is physics object (e.g. GPD) for which distributions are defined.

Note that sum elements are not weighted here by square of corresponding quark charges.

Returns
Sum of singlet values.

◆ listTypeOfQuarkFlavor()

std::vector< QuarkFlavor::Type > PARTONS::PartonDistribution::listTypeOfQuarkFlavor ( )

Get list of quark flavors associated to stored quark distributions.

Returns
Vector of associated flavors.

◆ setGluonDistribution()

void PARTONS::PartonDistribution::setGluonDistribution ( const GluonDistribution gluonDistribution)

Set gluon distribution.

◆ setQuarkDistributions()

void PARTONS::PartonDistribution::setQuarkDistributions ( const std::map< QuarkFlavor::Type, QuarkDistribution > &  quarkDistributions)

Set map containing stored quark distributions distinguished by associated quark flavors.

◆ toString()

std::string PARTONS::PartonDistribution::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::BaseObject.

Member Data Documentation

◆ m_gluonDistribution

GluonDistribution PARTONS::PartonDistribution::m_gluonDistribution
private

Gluon distribution.

◆ m_quarkDistributions

std::map<QuarkFlavor::Type, QuarkDistribution> PARTONS::PartonDistribution::m_quarkDistributions
private

Map containing stored quark distributions distinguished by associated quark flavors.


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