Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef DVCSCROSSSECTIONTOTAL_H
0002 #define DVCSCROSSSECTIONTOTAL_H
0003 
0004 /**
0005  * @file DVCSCrossSectionTotal.h
0006  * @author Pawel Sznajder (NCBJ)
0007  * @date May 17, 2020
0008  * @version 1.0
0009  */
0010 
0011 #include <ElementaryUtils/parameters/Parameters.h>
0012 #include <stddef.h>
0013 #include <string>
0014 #include <utility>
0015 
0016 #include "../../../../beans/gpd/GPDType.h"
0017 #include "../../../../beans/List.h"
0018 #include "../../../../utils/type/PhysicalType.h"
0019 #include "DVCSCrossSectionUUMinus.h"
0020 
0021 namespace PARTONS {
0022 
0023 /**
0024  * @class DVCSCrossSectionTotal
0025  * @brief Unpolarized cross-section for electro-production integrated over \f$xB\f$, \f$Q^{2}\f$, \f$t\f$ and angles.
0026  *
0027  * Default ranges: \f$1E-4 < xB < 0.7\f$, \f$-1 < t < 0\f$, \f$1 < Q^{2} < 1E3\f$ and \f$0 < y < 1\f$. Full integration over angles.
0028  *
0029  * Unit: \f$\mathrm{nbarn}\f$.
0030  */
0031 class DVCSCrossSectionTotal: public DVCSCrossSectionUUMinus {
0032 
0033 public:
0034 
0035     static const std::string DVCS_CROSSSECTION_TOTAL_RANGEXb; ///< String used to set integration xB range via XML scenario.
0036     static const std::string DVCS_CROSSSECTION_TOTAL_RANGET; ///< String used to set integration t range via XML scenario.
0037     static const std::string DVCS_CROSSSECTION_TOTAL_RANGEQ2; ///< String used to set integration Q2 range via XML scenario.
0038     static const std::string DVCS_CROSSSECTION_TOTAL_RANGEPHI; ///< String used to set integration phi range via XML scenario.
0039     static const std::string DVCS_CROSSSECTION_TOTAL_RANGEY; ///< String used to set integration y range via XML scenario.
0040     static const std::string DVCS_CROSSSECTION_TOTAL_N0; ///< String used to set number of MC integration iterations per cycle via XML scenario.
0041     static const std::string DVCS_CROSSSECTION_TOTAL_N1; ///< String used to set number of MC integration cycles via XML scenario.
0042 
0043     /**
0044      * Unique ID to automatically register the class in the registry.
0045      */
0046     static const unsigned int classId;
0047 
0048     /**
0049      * Function for the integration.
0050      */
0051     static double DVCSCrossSectionTotalFunctionA(double* kin, size_t dim,
0052             void* par);
0053 
0054     /**
0055      * Function for the integration.
0056      */
0057     static double DVCSCrossSectionTotalFunctionB(double x, void* params); 
0058 
0059     /**
0060      * Constructor.
0061      * @param className Name of class.
0062      */
0063     DVCSCrossSectionTotal(const std::string &className);
0064 
0065     /**
0066      * Destructor.
0067      */
0068     virtual ~DVCSCrossSectionTotal();
0069 
0070     virtual DVCSCrossSectionTotal* clone() const;
0071     virtual void configure(const ElemUtils::Parameters &parameters);
0072 
0073     size_t getNI0() const;
0074     void setNI0(size_t nI0);
0075     size_t getNI1() const;
0076     void setNI1(size_t nI1);
0077     const std::pair<double, double>& getRangeQ2() const;
0078     void setRangeQ2(const std::pair<double, double>& rangeQ2);
0079     const std::pair<double, double>& getRangeT() const;
0080     void setRangeT(const std::pair<double, double>& rangeT);
0081     const std::pair<double, double>& getRangexB() const;
0082     void setRangexB(const std::pair<double, double>& rangexB);
0083     const std::pair<double, double>& getRangeY() const;
0084     void setRangeY(const std::pair<double, double>& rangeY);
0085     const std::pair<double, double>& getRangePhi() const;
0086     void setRangePhi(const std::pair<double, double>& rangePhi);
0087 
0088 protected:
0089 
0090     /**
0091      * Copy constructor.
0092      * @param other Object to be copied.
0093      */
0094     DVCSCrossSectionTotal(const DVCSCrossSectionTotal &other);
0095 
0096     virtual PhysicalType<double> computeObservable(
0097             const DVCSObservableKinematic& kinematic,
0098             const List<GPDType>& gpdType);
0099 
0100 private:
0101 
0102     /**
0103      * Print change of ranges.
0104      */
0105     void printChangeOfRange(const std::string& func, const std::string& name,
0106             const std::pair<double, double>& oldValues,
0107             const std::pair<double, double>& newValues) const;
0108 
0109     /**
0110      * Parse range.
0111      */
0112     std::pair<double, double> parseRange(const std::string& str) const;
0113 
0114     size_t m_nI0;   ///< Number of iteration in single cycle.
0115     size_t m_nI1;   ///< Number of cycles.
0116 
0117     std::pair<double, double> m_rangexB; ///< xB integration range.
0118     std::pair<double, double> m_rangeT; ///< t integration range.
0119     std::pair<double, double> m_rangeQ2; ///< Q2 integration range.
0120     std::pair<double, double> m_rangePhi; ///< phi integration range.
0121     std::pair<double, double> m_rangeY; ///< y integration range.
0122 };
0123 
0124 struct DVCSCrossSectionTotalParameters {
0125 
0126     DVCSCrossSectionTotal* m_pDVCSCrossSectionTotal; ///< Pointer to DVCSCrossSectionTotal.
0127     double m_E; ///< Beam energy.
0128     List<GPDType> m_gpdType; ///< GPD types.
0129     std::pair<double, double> m_xBCut;
0130     std::pair<double, double> m_phiCut;
0131 
0132     double m_y, m_t, m_Q2;
0133 };
0134 
0135 } /* namespace PARTONS */
0136 
0137 #endif /* DVCSCROSSSECTIONTOTAL_H */