Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-02 08:51:43

0001 #ifndef DVCS_CFF_CONSTANT_H
0002 #define DVCS_CFF_CONSTANT_H
0003 
0004 /**
0005  * @file DVCSCFFConstant.h
0006  * @author Nabil CHOUIKA (SPhN / CEA Saclay)
0007  * @author Pawel Sznajder (IPNO)
0008  * @date 09 November 2014
0009  * @version 1.0
0010  */
0011 
0012 #include <ElementaryUtils/parameters/GenericType.h>
0013 #include <ElementaryUtils/parameters/Parameters.h>
0014 #include <complex>
0015 #include <map>
0016 #include <string>
0017 
0018 #include "../../../beans/gpd/GPDType.h"
0019 #include "DVCSConvolCoeffFunctionModule.h"
0020 
0021 namespace PARTONS {
0022 
0023 /**
0024  * @class DVCSCFFConstant
0025  *
0026  * Module to set CFF values via automation or via configure() function.
0027  */
0028 class DVCSCFFConstant: public DVCSConvolCoeffFunctionModule {
0029 
0030 public:
0031 
0032     static const unsigned int classId; ///< Unique ID to automatically register the class in the registry.
0033 
0034     static const std::string PARAMETER_NAME_CFF_VALUES; ///< Key name to set several CFFs via automation.
0035 
0036     static const std::string PARAMETER_NAME_CFF_H_Re; ///< Key name to set real part of CFF H via automation.
0037     static const std::string PARAMETER_NAME_CFF_H_Im; ///< Key name to set imaginary part of CFF H via automation.
0038     static const std::string PARAMETER_NAME_CFF_E_Re; ///< Key name to set real part of CFF E via automation.
0039     static const std::string PARAMETER_NAME_CFF_E_Im; ///< Key name to set imaginary part of CFF E via automation.
0040     static const std::string PARAMETER_NAME_CFF_Ht_Re; ///< Key name to set real part of CFF Ht via automation.
0041     static const std::string PARAMETER_NAME_CFF_Ht_Im; ///< Key name to set imaginary part of CFF Ht via automation.
0042     static const std::string PARAMETER_NAME_CFF_Et_Re; ///< Key name to set real part of CFF Et via automation.
0043     static const std::string PARAMETER_NAME_CFF_Et_Im; ///< Key name to set imaginary part of CFF Et via automation.
0044 
0045     /**
0046      * Constructor.
0047      * See BaseObject::BaseObject and ModuleObject::ModuleObject for more details.
0048      * @param className Name of last child class.
0049      */
0050     DVCSCFFConstant(const std::string &className);
0051 
0052     virtual DVCSCFFConstant* clone() const;
0053 
0054     /**
0055      * Default destructor.
0056      */
0057     virtual ~DVCSCFFConstant();
0058 
0059     virtual void configure(const ElemUtils::Parameters &parameters);
0060     virtual std::complex<double> computeCFF();
0061 
0062     /**
0063      * Get map containing CFFs.
0064      */
0065     const std::map<GPDType::Type, std::complex<double> >& getCFFs() const;
0066 
0067     /**
0068      * Set map containing CFFs.
0069      * @param cffs Map to be set.
0070      */
0071     void setCFFs(const std::map<GPDType::Type, std::complex<double> >& cffs);
0072 
0073     /**
0074      * Get specific CFF.
0075      @param gpdType Type of CFF to be get.
0076      */
0077     const std::complex<double>& getCFF(GPDType::Type gpdType) const;
0078 
0079     /**
0080      * Set specific CFF.
0081      @param gpdType Type of CFF to be set.
0082      @param cff CFF to be set.
0083      */
0084     void setCFF(GPDType::Type gpdType, const std::complex<double>& cff);
0085 
0086 protected:
0087 
0088     /**
0089      * Copy constructor.
0090      @param other Object to be copied.
0091      */
0092     DVCSCFFConstant(const DVCSCFFConstant &other);
0093 
0094     virtual void initModule();
0095     virtual void isModuleWellConfigured();
0096 
0097 private:
0098 
0099     /**
0100      * Print error in configure in case of setting CFFs via ambiguous keys.
0101      @param key Name of key to help localize error.
0102      */
0103     void printErrorInConfigure(const std::string& key) const;
0104 
0105     /**
0106      * Set single value in configure.
0107      @param gpdType CFF type to be set.
0108      @param isRealPart True if real part to be set.
0109      @param value Value to be set.
0110      */
0111     void configureValue(GPDType::Type gpdType, bool isRealPart,
0112             const ElemUtils::GenericType& value);
0113 
0114     /**
0115      * CFFs stored by type of GPD.
0116      * See GPDType.
0117      */
0118     std::map<GPDType::Type, std::complex<double> > m_CFFs;
0119 };
0120 
0121 } /* namespace PARTONS */
0122 
0123 #endif /* DVCS_CFF_CONSTANT_H */