PARTONS  
PARtonic Tomography Of Nucleon Software
New GPD module

Header file template

For a detailed description of each virtual function we refer to its documentation, which is available after left-clicking on the function name. A short explanation is also provided by hovering your mouse pointer on the name.

class MyGPDModel: public PARTONS::GPDModule {
public:
/**
* ID assigned by BaseObjectRegistry.
*/
static const unsigned int classId;
/**
* Default constructor.
* @param className Name of class.
*/
MyGPDModel(const std::string& className);
/**
* Destructor.
*/
virtual ~MyGPDModel();
virtual MyGPDModel* clone() const;
virtual void resolveObjectDependencies();
virtual void configure(const ElemUtils::Parameters &parameters);
protected:
/**
* Copy constructor.
* @param other Object to be copied.
*/
MyGPDModel(const MyGPDModel& other);
virtual void isModuleWellConfigured();
virtual void initModule();
virtual PARTONS::PartonDistribution computeH();
virtual PARTONS::PartonDistribution computeE();
};
Abstract class that provides a skeleton to implement a Generalized Parton Distributions (GPD) module.
Definition: GPDModule.h:36
virtual GPDModule * clone() const =0
Virtual clone function to allow the factory to clone all derived members object stored in the BaseObj...
Parton distributions for single physics object.
Definition: PartonDistribution.h:66

Source code file template

const unsigned int MyGPDModel::classId =
MyGPDModel::MyGPDModel(const std::string &className) : PARTONS::GPDModule(className) {
//relate a specific GPD type with the appropriate function
m_listGPDComputeTypeAvailable.insert(
m_listGPDComputeTypeAvailable.insert(
}
MyGPDModel::MyGPDModel(const MyGPDModel& other) : PARTONS::GPDModule(other) {
}
MyGPDModel::~MyGPDModel() {
}
MyGPDModel* MyGPDModel::clone() const {
return new MyGPDModel(*this);
}
void MyGPDModel::resolveObjectDependencies() {
}
void MyGPDModel::configure(const ElemUtils::Parameters &parameters) {
}
void MyGPDModel::isModuleWellConfigured() {
}
void MyGPDModel::initModule() {
}
PARTONS::PartonDistribution MyGPDModel::computeH() {
//result
//your implementation comes here
...
//return
return result;
}
PARTONS::PartonDistribution MyGPDModel::computeE() {
//see compute::H()
}
unsigned int registerBaseObject(BaseObject *pBaseObject)
Store a unique instance of a module identified by a unique string character key.
Definition: BaseObjectRegistry.cpp:45
static BaseObjectRegistry * getInstance()
Static function to be able to retrieve a unique instance pointer of this class anywhere in the code.
Definition: BaseObjectRegistry.cpp:15
virtual void isModuleWellConfigured()
Pure virtual function that provides skeleton to check if the module is well initialized and configure...
Definition: GPDModule.cpp:413
virtual void configure(const ElemUtils::Parameters &parameters)
Provides a generic method to configure all types of modules by passing a Parameters object.
Definition: GPDModule.cpp:119
virtual PartonDistribution computeH()
This method can be implemented in the child class if the GPD H is available to compute.
Definition: GPDModule.cpp:312
virtual PartonDistribution computeE()
This method can be implemented in the child class if the GPD E is available to compute.
Definition: GPDModule.cpp:317
virtual void initModule()
Pure virtual function that provides skeleton for module initialization.
Definition: GPDModule.cpp:410
@ H
Twist-2 GPD .
Definition: GPDType.h:46
@ E
Twist-2 GPD .
Definition: GPDType.h:47
Definition: BaseObject.cpp:11

Useful variables

These are the most useful variables defined in the abstract classes. They are crucial for the implementation of new GPD modules.