Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef DVMPCROSSSECTIONTOTAL_H
0002 #define DVMPCROSSSECTIONTOTAL_H
0003 
0004 /**
0005  * @file DVMPCrossSectionTotal.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 "../../../../beans/MesonType.h"
0019 #include "../../../../utils/type/PhysicalType.h"
0020 #include "DVMPCrossSectionUUUMinus.h"
0021 
0022 namespace PARTONS {
0023 
0024 /**
0025  * @class DVMPCrossSectionTotal
0026  * @brief Unpolarized cross-section for electro-production integrated over \f$xB\f$, \f$Q^{2}\f$, \f$t\f$ and angles.
0027  *
0028  * 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.
0029  *
0030  * Unit: \f$\mathrm{nbarn}\f$.
0031  */
0032 class DVMPCrossSectionTotal: public DVMPCrossSectionUUUMinus{
0033 
0034 public:
0035 
0036     static const std::string DVMP_CROSSSECTION_TOTAL_RANGEXb; ///< String used to set integration xB range via XML scenario.
0037     static const std::string DVMP_CROSSSECTION_TOTAL_RANGET; ///< String used to set integration t range via XML scenario.
0038     static const std::string DVMP_CROSSSECTION_TOTAL_RANGEQ2; ///< String used to set integration Q2 range via XML scenario.
0039     static const std::string DVMP_CROSSSECTION_TOTAL_RANGEPHI; ///< String used to set integration phi range via XML scenario.
0040     static const std::string DVMP_CROSSSECTION_TOTAL_RANGEY; ///< String used to set integration y range via XML scenario.
0041     static const std::string DVMP_CROSSSECTION_TOTAL_RANGENu; ///< String used to set integration nu range via XML scenario.
0042     static const std::string DVMP_CROSSSECTION_TOTAL_N0; ///< String used to set number of MC integration iterations per cycle via XML scenario.
0043     static const std::string DVMP_CROSSSECTION_TOTAL_N1; ///< String used to set number of MC integration cycles via XML scenario.
0044     static const std::string DVMP_CROSSSECTION_TOTAL_VIRTUALPHOTOPRODUCTION; ///< String used to set if virtual photo-production should be evaluated.
0045 
0046     /**
0047      * Unique ID to automatically register the class in the registry.
0048      */
0049     static const unsigned int classId;
0050 
0051     /**
0052      * Function for the integration.
0053      */
0054     static double DVMPCrossSectionTotalFunctionA(double* kin, size_t dim,
0055             void* par);
0056 
0057     /**
0058      * Function for the integration.
0059      */
0060     static double DVMPCrossSectionTotalFunctionB(double x, void* params);
0061 
0062     /**
0063      * Constructor.
0064      * @param className Name of class.
0065      */
0066     DVMPCrossSectionTotal(const std::string &className);
0067 
0068     /**
0069      * Destructor.
0070      */
0071     virtual ~DVMPCrossSectionTotal();
0072 
0073     virtual DVMPCrossSectionTotal* clone() const;
0074     virtual void configure(const ElemUtils::Parameters &parameters);
0075 
0076     size_t getNI0() const;
0077     void setNI0(size_t nI0);
0078     size_t getNI1() const;
0079     void setNI1(size_t nI1);
0080     const std::pair<double, double>& getRangeQ2() const;
0081     void setRangeQ2(const std::pair<double, double>& rangeQ2);
0082     const std::pair<double, double>& getRangeT() const;
0083     void setRangeT(const std::pair<double, double>& rangeT);
0084     const std::pair<double, double>& getRangexB() const;
0085     void setRangexB(const std::pair<double, double>& rangexB);
0086     const std::pair<double, double>& getRangeY() const;
0087     void setRangeY(const std::pair<double, double>& rangeY);
0088     const std::pair<double, double>& getRangeNu() const;
0089     void setRangeNu(const std::pair<double, double>& rangeNu);
0090     const std::pair<double, double>& getRangePhi() const;
0091     void setRangePhi(const std::pair<double, double>& rangePhi);
0092     bool isEvaluatePhotoProduction() const;
0093     void setEvaluatePhotoProduction(bool evaluatePhotoProduction);
0094 
0095 protected:
0096 
0097     /**
0098      * Copy constructor.
0099      * @param other Object to be copied.
0100      */
0101     DVMPCrossSectionTotal(const DVMPCrossSectionTotal &other);
0102 
0103     virtual PhysicalType<double> computeObservable(
0104             const DVMPObservableKinematic& kinematic,
0105             const List<GPDType>& gpdType);
0106 
0107 private:
0108 
0109     /**
0110      * Print change of ranges.
0111      */
0112     void printChangeOfRange(const std::string& func, const std::string& name,
0113             const std::pair<double, double>& oldValues,
0114             const std::pair<double, double>& newValues) const;
0115 
0116     /**
0117      * Parse range.
0118      */
0119     std::pair<double, double> parseRange(const std::string& str) const;
0120 
0121     size_t m_nI0;   ///< Number of iteration in single cycle.
0122     size_t m_nI1;   ///< Number of cycles.
0123 
0124     std::pair<double, double> m_rangexB; ///< xB integration range.
0125     std::pair<double, double> m_rangeT; ///< t integration range.
0126     std::pair<double, double> m_rangeQ2; ///< Q2 integration range.
0127     std::pair<double, double> m_rangePhi; ///< phi integration range.
0128     std::pair<double, double> m_rangeY; ///< y integration range.
0129     std::pair<double, double> m_rangeNu; ///< nu integration range.
0130 
0131     bool m_evaluatePhotoProduction; ///< If true, virtual photo-production will be evaluated.
0132 };
0133 
0134 struct DVMPCrossSectionTotalParameters {
0135 
0136     DVMPCrossSectionTotal* m_pDVMPCrossSectionTotal; ///< Pointer to DVMPCrossSectionTotal.
0137     double m_E; ///< Beam energy.
0138     MesonType::Type m_mesonType; ///< Meson type.
0139     List<GPDType> m_gpdType; ///< GPD types.
0140     std::pair<double, double> m_xBCut; ///< y cut.
0141     std::pair<double, double> m_nuCut; ///< nu cut.
0142     std::pair<double, double> m_phiCut; ///< phi cut.
0143     bool m_evaluatePhotoProduction; ///< If true, virtual photo-production will be evaluated.
0144 
0145     double m_y, m_t, m_Q2;
0146 };
0147 
0148 } /* namespace PARTONS */
0149 
0150 #endif /* DVMPCROSSSECTIONTOTAL_H */