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

DVCS CFFs based on neural network analysis. More...

Inheritance diagram for PARTONS::DVCSCFFNN:
PARTONS::DVCSConvolCoeffFunctionModule PARTONS::ConvolCoeffFunctionModule< DVCSConvolCoeffFunctionKinematic, DVCSConvolCoeffFunctionResult > PARTONS::ModuleObject PARTONS::MathIntegratorModule PARTONS::BaseObject

Public Member Functions

 DVCSCFFNN (const std::string &className)
 Constructor. More...
 
virtual ~DVCSCFFNN ()
 Destructor. More...
 
virtual DVCSCFFNNclone () const
 Virtual clone function to allow the factory to clone all derived members object stored in the BaseObjectRegistry. More...
 
virtual void configure (const ElemUtils::Parameters &parameters)
 Provides a generic method to configure all types of modules by passing a Parameters object. 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...
 
virtual void prepareSubModules (const std::map< std::string, PARTONS::BaseObjectData > &subModulesData)
 Method used in automation to prepare all the modules used by this current module and configure them recursively. More...
 
virtual std::complex< double > computeCFF ()
 Method to compute some CFFs. More...
 
void loadParameters (size_t replica, bool printInfo=true)
 Load parameters for a given replica index. More...
 
const std::map< PARTONS::GPDType::Type, std::pair< NumA::NeuralNetwork *, NumA::NeuralNetwork * > > & getNeuralNetworks () const
 Get neural networks. More...
 
void getMeanAndUncertainty (const std::vector< double > &v, double &mean, double &unc) const
 Evaluate mean and uncertainty for a given vector of numbers. More...
 
- Public Member Functions inherited from PARTONS::DVCSConvolCoeffFunctionModule
virtual ~DVCSConvolCoeffFunctionModule ()
 Destructor. More...
 
virtual std::string toString () const
 Return a pre-formatted characters string for output visualization of class member's values. More...
 
virtual void run ()
 
virtual DVCSConvolCoeffFunctionResult compute (const DVCSConvolCoeffFunctionKinematic &kinematic, const List< GPDType > &gpdType=List< GPDType >())
 Computes the coefficient functions at given kinematics. More...
 
virtual List< GPDTypegetListOfAvailableGPDTypeForComputation () const
 Must be implemented in child class. More...
 
PerturbativeQCDOrderType::Type getQCDOrderType () const
 Get order of the perturbative QCD computation. More...
 
void setQCDOrderType (PerturbativeQCDOrderType::Type qcdOrderType)
 Set order of the perturbative QCD computation. More...
 
virtual std::complex< double > computeUnpolarized ()
 Method to compute some CFFs. More...
 
virtual std::complex< double > computePolarized ()
 Method to compute some CFFs. More...
 
- Public Member Functions inherited from PARTONS::ConvolCoeffFunctionModule< DVCSConvolCoeffFunctionKinematic, DVCSConvolCoeffFunctionResult >
virtual ~ConvolCoeffFunctionModule ()
 Destructor. More...
 
GPDModulegetGPDModule () const
 Get pointer to the underlying GPD module. More...
 
void setGPDModule (GPDModule *gpdModule)
 Set pointer to the underlying GPD module. More...
 
bool isGPDModuleDependent () const
 True if this CCF module depends on a GPD module. More...
 
void setIsGPDModuleDependent (bool isGPDModuleDependent)
 True if this CCF module depends on a GPD module. More...
 
- Public Member Functions inherited from PARTONS::ModuleObject
 ModuleObject (const std::string &className, ChannelType::Type channelType)
 Constructor. More...
 
virtual ~ModuleObject ()
 Default destructor. More...
 
unsigned int getReferenceModuleId () const
 Get reference module id. More...
 
void setReferenceModuleId (unsigned int referenceModuleId)
 Set reference module id. More...
 
ChannelType::Type getChannelType () const
 Get channel type. More...
 
- Public Member Functions inherited from PARTONS::BaseObject
 BaseObject (const std::string &className)
 Constructor. More...
 
virtual ~BaseObject ()
 Default destructor. 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)
 
- Public Member Functions inherited from PARTONS::MathIntegratorModule
 MathIntegratorModule ()
 Default constructor. More...
 
virtual ~MathIntegratorModule ()
 Default destructor. More...
 

Static Public Attributes

static const std::string PARAMETER_NAME_REPLICA = "replica"
 Name of parameter to set replica index via xml file. More...
 
static const unsigned int classId
 Unique ID to automatically register the class in the registry. More...
 
- Static Public Attributes inherited from PARTONS::DVCSConvolCoeffFunctionModule
static const std::string DVCS_CONVOL_COEFF_FUNCTION_MODULE_CLASS_NAME
 Type of the module in XML automation. More...
 
- Static Public Attributes inherited from PARTONS::ModuleObject
static const std::string CLASS_NAME = "className"
 
- Static Public Attributes inherited from PARTONS::MathIntegratorModule
static const std::string PARAM_NAME_INTEGRATOR_TYPE
 Parameter used in configureIntegrator() or XML automation to set the type of integrator. More...
 

Protected Member Functions

 DVCSCFFNN (const DVCSCFFNN &other)
 Copy constructor. More...
 
virtual void initModule ()
 Pure virtual function that provides skeleton for module initialization. More...
 
virtual void isModuleWellConfigured ()
 Pure virtual function that provides skeleton to check if the module is well initialized and configured. More...
 
- Protected Member Functions inherited from PARTONS::DVCSConvolCoeffFunctionModule
 DVCSConvolCoeffFunctionModule (const std::string &className)
 Default constructor. More...
 
 DVCSConvolCoeffFunctionModule (const DVCSConvolCoeffFunctionModule &other)
 Copy constructor. More...
 
virtual void setKinematics (const DVCSConvolCoeffFunctionKinematic &kinematic)
 Set internal kinematics. More...
 
- Protected Member Functions inherited from PARTONS::ConvolCoeffFunctionModule< DVCSConvolCoeffFunctionKinematic, DVCSConvolCoeffFunctionResult >
 ConvolCoeffFunctionModule (const std::string &className, ChannelType::Type channelType)
 Constructor. More...
 
 ConvolCoeffFunctionModule (const ConvolCoeffFunctionModule &other)
 Copy constructor. More...
 
void setCurrentGPDType (GPDType::Type gpdType)
 Set current GPD type to be computed. More...
 
- Protected Member Functions inherited from PARTONS::ModuleObject
 ModuleObject (const ModuleObject &other)
 
- 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 Member Functions inherited from PARTONS::MathIntegratorModule
 MathIntegratorModule (const MathIntegratorModule &other)
 Copy constructor. More...
 
void setIntegrator (NumA::IntegratorType1D::Type integratorType)
 Sets a given integrator available in NumA++. More...
 
double integrate (NumA::FunctionType1D *pFunction, double a, double b, std::vector< double > &parameters)
 Computes the integral of a function defined via a functor. More...
 
void configureIntegrator (const ElemUtils::Parameters &parameters)
 Provides a generic method to configure all types of integration routines by passing a Parameters object. More...
 
NumA::Integrator1D * getMathIntegrator ()
 

Private Member Functions

void buildNeuralNetworks ()
 Build all neural networks. More...
 
NumA::NeuralNetwork * buildAndConfigureSingleNeuralNetwork (PARTONS::GPDType::Type gpdType, bool isReal)
 Build single neural network for a given GPD type and CFF RE or Im. More...
 
double getMean (const std::vector< double > &v) const
 Evaluate mean from a given vector. More...
 
double getSigma (const std::vector< double > &v) const
 Evaluate sigma from a given vector. More...
 
size_t removeOutliers (std::vector< double > &v) const
 Remove outliers from a given vector using 3sigma rule. More...
 

Private Attributes

std::map< PARTONS::GPDType::Type, std::pair< NumA::NeuralNetwork *, NumA::NeuralNetwork * > > m_neuralNetworks
 Neural networks. More...
 
std::pair< double, double > m_rangeLog10Xi
 Normalization range: log10xi. More...
 
std::pair< double, double > m_rangeT
 Normalization range: t. More...
 
std::pair< double, double > m_rangeLog10Q2
 Normalization range: log10Q2. More...
 
std::map< PARTONS::GPDType::Type, std::pair< double, double > > m_rangeXiReCFF
 Normalization range: xi*ReCFF. More...
 
std::map< PARTONS::GPDType::Type, std::pair< double, double > > m_rangeXiImCFF
 Normalization range: xi*ImCFF. More...
 
size_t m_replica
 Replica index. More...
 

Additional Inherited Members

- Protected Attributes inherited from PARTONS::ConvolCoeffFunctionModule< DVCSConvolCoeffFunctionKinematic, DVCSConvolCoeffFunctionResult >
double m_xi
 Skewness. More...
 
double m_t
 Mandelstam variable, momentum transfer on the hadron target (in GeV^2). More...
 
double m_MuF2
 Factorization scale (in GeV^2). More...
 
double m_MuR2
 Renormalization scale (in GeV^2) More...
 
GPDType::Type m_currentGPDComputeType
 GPDType of the current CFF computation. More...
 
GPDModulem_pGPDModule
 Pointer to the underlying GPD module. More...
 
bool m_isGPDModuleDependent
 Boolean (true if this CCF module depends on a GPD module). More...
 
- Protected Attributes inherited from PARTONS::ModuleObject
ModuleObjectFactorym_pModuleObjectFactory
 Pointer tp module object factory. More...
 

Detailed Description

DVCS CFFs based on neural network analysis.

This module returns CFFs as estimated from this fit to world data: Eur.Phys.J. C79 (2019) no.7, 614

Mean values and uncertainties should be estimated from a set of values returned by 101 replicas. To run the evaluation for a given replica one should use either DVCSCFFNN::loadParameters() function, or DVCSCFFNN::configure() with DVCSCFFNN::PARAMETER_NAME_REPLICA parameter (to be used also in xml).

Mean values and uncertainties can be evaluated from a set of values using DVCSCFFNN::getMeanAndUncertainty(). Please note the procedure to remove the outliers.

Constructor & Destructor Documentation

◆ DVCSCFFNN() [1/2]

PARTONS::DVCSCFFNN::DVCSCFFNN ( const std::string &  className)

Constructor.

See BaseObject::BaseObject and ModuleObject::ModuleObject for more details.

Parameters
classNameName of last child class.

◆ ~DVCSCFFNN()

PARTONS::DVCSCFFNN::~DVCSCFFNN ( )
virtual

Destructor.

◆ DVCSCFFNN() [2/2]

PARTONS::DVCSCFFNN::DVCSCFFNN ( const DVCSCFFNN other)
protected

Copy constructor.

Parameters
otherObject to be copied.

Member Function Documentation

◆ buildAndConfigureSingleNeuralNetwork()

NumA::NeuralNetwork * PARTONS::DVCSCFFNN::buildAndConfigureSingleNeuralNetwork ( PARTONS::GPDType::Type  gpdType,
bool  isReal 
)
private

Build single neural network for a given GPD type and CFF RE or Im.

◆ buildNeuralNetworks()

void PARTONS::DVCSCFFNN::buildNeuralNetworks ( )
private

Build all neural networks.

◆ clone()

DVCSCFFNN * PARTONS::DVCSCFFNN::clone ( ) const
virtual

Virtual clone function to allow the factory to clone all derived members object stored in the BaseObjectRegistry.

Returns

Implements PARTONS::DVCSConvolCoeffFunctionModule.

◆ computeCFF()

std::complex< double > PARTONS::DVCSCFFNN::computeCFF ( )
virtual

Method to compute some CFFs.

Can be implemented and used in child class, if needed.

Returns
Complex result.

Reimplemented from PARTONS::DVCSConvolCoeffFunctionModule.

◆ configure()

void PARTONS::DVCSCFFNN::configure ( const ElemUtils::Parameters &  parameters)
virtual

Provides a generic method to configure all types of modules by passing a Parameters object.

Parameters class represents a list of couples key/value (see Parameters class documentation for more info).

Parameters
parametersElemUtils::Parameters object.

Reimplemented from PARTONS::DVCSConvolCoeffFunctionModule.

◆ getMean()

double PARTONS::DVCSCFFNN::getMean ( const std::vector< double > &  v) const
private

Evaluate mean from a given vector.

◆ getMeanAndUncertainty()

void PARTONS::DVCSCFFNN::getMeanAndUncertainty ( const std::vector< double > &  v,
double &  mean,
double &  unc 
) const

Evaluate mean and uncertainty for a given vector of numbers.

The procedure include removing of outliers.

◆ getNeuralNetworks()

const std::map< GPDType::Type, std::pair< NumA::NeuralNetwork *, NumA::NeuralNetwork * > > & PARTONS::DVCSCFFNN::getNeuralNetworks ( ) const

Get neural networks.

◆ getSigma()

double PARTONS::DVCSCFFNN::getSigma ( const std::vector< double > &  v) const
private

Evaluate sigma from a given vector.

◆ initModule()

void PARTONS::DVCSCFFNN::initModule ( )
protectedvirtual

Pure virtual function that provides skeleton for module initialization.

Children must define and override it.

Reimplemented from PARTONS::DVCSConvolCoeffFunctionModule.

◆ isModuleWellConfigured()

void PARTONS::DVCSCFFNN::isModuleWellConfigured ( )
protectedvirtual

Pure virtual function that provides skeleton to check if the module is well initialized and configured.

Children must define and override it.

Reimplemented from PARTONS::DVCSConvolCoeffFunctionModule.

◆ loadParameters()

void PARTONS::DVCSCFFNN::loadParameters ( size_t  replica,
bool  printInfo = true 
)

Load parameters for a given replica index.

◆ prepareSubModules()

void PARTONS::DVCSCFFNN::prepareSubModules ( const std::map< std::string, PARTONS::BaseObjectData > &  subModulesData)
virtual

Method used in automation to prepare all the modules used by this current module and configure them recursively.

The recursion is linked to the imbrication in XML files.
Can be implemented in the child class if it needs modules not needed by the parent class. But there must be first a call to the parent method.

Parameters
subModulesDataData used to retrieve the needed modules and their configuration.

Reimplemented from PARTONS::DVCSConvolCoeffFunctionModule.

◆ removeOutliers()

size_t PARTONS::DVCSCFFNN::removeOutliers ( std::vector< double > &  v) const
private

Remove outliers from a given vector using 3sigma rule.

◆ resolveObjectDependencies()

void PARTONS::DVCSCFFNN::resolveObjectDependencies ( )
virtual

Because of the initialization step order of the program, objects are registered in a total random order and some objects depend on others.

To avoid the problem of pointer resolution order, this method is called by the BaseObjectRegistery after all objects are well registered in it. See BaseObjectRegistry class documentation for more details.

Reimplemented from PARTONS::DVCSConvolCoeffFunctionModule.

Member Data Documentation

◆ classId

const unsigned int PARTONS::DVCSCFFNN::classId
static
Initial value:
=
new DVCSCFFNN("DVCSCFFNN"))
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
DVCSCFFNN(const std::string &className)
Constructor.
Definition: DVCSCFFNN.cpp:30

Unique ID to automatically register the class in the registry.

◆ m_neuralNetworks

std::map<PARTONS::GPDType::Type, std::pair<NumA::NeuralNetwork*, NumA::NeuralNetwork*> > PARTONS::DVCSCFFNN::m_neuralNetworks
private

Neural networks.

◆ m_rangeLog10Q2

std::pair<double, double> PARTONS::DVCSCFFNN::m_rangeLog10Q2
private

Normalization range: log10Q2.

◆ m_rangeLog10Xi

std::pair<double, double> PARTONS::DVCSCFFNN::m_rangeLog10Xi
private

Normalization range: log10xi.

◆ m_rangeT

std::pair<double, double> PARTONS::DVCSCFFNN::m_rangeT
private

Normalization range: t.

◆ m_rangeXiImCFF

std::map<PARTONS::GPDType::Type, std::pair<double, double> > PARTONS::DVCSCFFNN::m_rangeXiImCFF
private

Normalization range: xi*ImCFF.

◆ m_rangeXiReCFF

std::map<PARTONS::GPDType::Type, std::pair<double, double> > PARTONS::DVCSCFFNN::m_rangeXiReCFF
private

Normalization range: xi*ReCFF.

◆ m_replica

size_t PARTONS::DVCSCFFNN::m_replica
private

Replica index.

◆ PARAMETER_NAME_REPLICA

const std::string PARTONS::DVCSCFFNN::PARAMETER_NAME_REPLICA = "replica"
static

Name of parameter to set replica index via xml file.


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