Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef TCSCROSSSECTIONTOTAL_H
0002 #define TCSCROSSSECTIONTOTAL_H
0003 
0004 /**
0005  * @file TCSCrossSectionTotal.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 "TCSCrossSectionUU.h"
0020 
0021 namespace PARTONS {
0022 
0023 /**
0024  * @class TCSCrossSectionTotal
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$-1 < t < 0\f$, \f$1 < Q'^{2} < 1E3\f$ and \f$0 < y < 1\f$, \f$Q2min < Q^{2} < 0.1\f$. Full integration over angles.
0028  *
0029  * Unit: \f$\mathrm{nbarn}\f$.
0030  */
0031 class TCSCrossSectionTotal: public TCSCrossSectionUU {
0032 
0033 public:
0034 
0035     static const std::string TCS_CROSSSECTION_TOTAL_RANGET; ///< String used to set integration t range via XML scenario.
0036     static const std::string TCS_CROSSSECTION_TOTAL_RANGEQ2PRIM; ///< String used to set integration Q2Prim range via XML scenario.
0037     static const std::string TCS_CROSSSECTION_TOTAL_RANGEPHI; ///< String used to set integration phi range via XML scenario.
0038     static const std::string TCS_CROSSSECTION_TOTAL_RANGETHETA; ///< String used to set integration theta range via XML scenario.
0039     static const std::string TCS_CROSSSECTION_TOTAL_RANGEY; ///< String used to set integration y range via XML scenario.
0040     static const std::string TCS_CROSSSECTION_TOTAL_RANGEQ2; ///< String used to set integration Q2 range via XML scenario.
0041     static const std::string TCS_CROSSSECTION_TOTAL_N0; ///< String used to set number of MC integration iterations per cycle via XML scenario.
0042     static const std::string TCS_CROSSSECTION_TOTAL_N1; ///< String used to set number of MC integration cycles via XML scenario.
0043 
0044     static const std::string TCS_CROSSSECTION_TOTAL_PHIEPSILON; ///< String used to set epsilon skipped arroung phiL = PI via XML scenario.
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 TCSCrossSectionTotalFunctionA(double* kin, size_t dim,
0055             void* par);
0056 
0057     /**
0058      * Function for the integration.
0059      */
0060     static double TCSCrossSectionTotalFunctionB(double x, void* params); 
0061 
0062    /**
0063      * Function for the integration.
0064      */
0065     static double TCSCrossSectionTotalFunctionC(double x, void* params); 
0066 
0067     /**
0068      * Constructor.
0069      * @param className Name of class.
0070      */
0071     TCSCrossSectionTotal(const std::string &className);
0072 
0073     /**
0074      * Destructor.
0075      */
0076     virtual ~TCSCrossSectionTotal();
0077 
0078     virtual TCSCrossSectionTotal* clone() const;
0079     virtual void configure(const ElemUtils::Parameters &parameters);
0080 
0081     size_t getNI0() const;
0082     void setNI0(size_t nI0);
0083     size_t getNI1() const;
0084     void setNI1(size_t nI1);
0085     const std::pair<double, double>& getRangeT() const;
0086     void setRangeT(const std::pair<double, double>& rangeT);
0087     const std::pair<double, double>& getRangeQ2Prim() const;
0088     void setRangeQ2Prim(const std::pair<double, double>& rangeQ2Prim);
0089     const std::pair<double, double>& getRangePhi() const;
0090     void setRangePhi(const std::pair<double, double>& rangePhi);
0091     const std::pair<double, double>& getRangeTheta() const;
0092     void setRangeTheta(const std::pair<double, double>& rangeTheta);
0093     const std::pair<double, double>& getRangeY() const;
0094     void setRangeY(const std::pair<double, double>& rangeY);
0095     const std::pair<double, double>& getRangeQ2() const;
0096     void setRangeQ2(const std::pair<double, double>& rangeQ2);
0097     double getPhiEpsilon() const;
0098     void setPhiEpsilon(double phiEpsilon);
0099 
0100 protected:
0101 
0102     /**
0103      * Copy constructor.
0104      * @param other Object to be copied.
0105      */
0106     TCSCrossSectionTotal(const TCSCrossSectionTotal &other);
0107 
0108     virtual PhysicalType<double> computeObservable(
0109             const TCSObservableKinematic& kinematic,
0110             const List<GPDType>& gpdType);
0111 
0112 private:
0113 
0114     /**
0115      * Print change of ranges.
0116      */
0117     void printChangeOfRange(const std::string& func, const std::string& name,
0118             const std::pair<double, double>& oldValues,
0119             const std::pair<double, double>& newValues) const;
0120 
0121     /**
0122      * Parse range.
0123      */
0124     std::pair<double, double> parseRange(const std::string& str) const;
0125 
0126     size_t m_nI0;   ///< Number of iteration in single cycle.
0127     size_t m_nI1;   ///< Number of cycles.
0128 
0129     std::pair<double, double> m_rangeT; ///< t integration range.
0130     std::pair<double, double> m_rangeQ2Prim; ///< Q2Prim integration range.
0131     std::pair<double, double> m_rangePhi; ///< phi integration range.
0132     std::pair<double, double> m_rangeTheta; ///< phi integration range.
0133     std::pair<double, double> m_rangeY; ///< y integration range.
0134     std::pair<double, double> m_rangeQ2; ///< Q2 integration range.
0135 
0136     double m_phiEpsilon; ///< Cut out phi = pi.
0137 };
0138 
0139 struct TCSCrossSectionTotalParameters {
0140 
0141     TCSCrossSectionTotal* m_pTCSCrossSectionTotal; ///< Pointer to TCSCrossSectionTotal.
0142     double m_Ee; ///< Beam energy.
0143     List<GPDType> m_gpdType; ///< GPD types.
0144     std::pair<double, double> m_phiCut;
0145     std::pair<double, double> m_thetaCut;
0146 
0147     double m_t, m_Q2Prim;
0148     double m_Egamma; 
0149     double m_phi;
0150 
0151     double m_phiEpsilon;
0152 };
0153 
0154 } /* namespace PARTONS */
0155 
0156 #endif /* TCSCROSSSECTIONTOTAL_H */