Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:10:15

0001 #ifndef SHRIMPS_Eikonals_Form_Factors_H
0002 #define SHRIMPS_Eikonals_Form_Factors_H
0003 
0004 #include "SHRiMPS/Tools/Parameter_Structures.H"
0005 #include "ATOOLS/Math/Function_Base.H"
0006 #include <vector>
0007 
0008 namespace SHRIMPS {
0009   /*!
0010     \class Form_Factor
0011     \brief The form factor and its Fourier transform, yielding the boundary 
0012     conditions of the differential equations defining the single channel 
0013     eikonals.  
0014 
0015     The two following forms are implemented (and tested):
0016     - Gaussian
0017       \f[
0018       F(q) = 
0019       \beta_0^2\,(1+\kappa)\,\exp\left(-\frac{(1+\kappa)q^2}{\Lambda^2}\right)
0020       \f]
0021     - dipole
0022       \f[
0023       F(q) = \beta_0^2\,(1+\kappa)\,
0024              \frac{\exp\left[-\xi\frac{(1+\kappa)q^2}{\Lambda^2}\right]}
0025               {\left[1+\frac{(1+\kappa)q^2}{\Lambda^2}\right]^2}\,.
0026       \f]
0027     
0028     The important method is Form_Factor::FourierTransform(const double & b) 
0029     yielding the Fourier transform of the form factor at a given impact 
0030     parameter \f$b\f$.  It has been tested to be able to achieve practically 
0031     arbitrary precision.  
0032   */
0033   class Form_Factor : public ATOOLS::Function_Base {
0034   private:
0035     class Norm_Argument : public ATOOLS::Function_Base {
0036     private:
0037       Form_Factor * p_ff;
0038     public:
0039       Norm_Argument(Form_Factor * ff) : p_ff(ff) {}
0040       ~Norm_Argument() { }
0041       double operator()(double q);
0042     };
0043 
0044     class FT_Argument : public ATOOLS::Function_Base {
0045     private:
0046       Form_Factor * p_ff;
0047       double        m_b;
0048     public:
0049       FT_Argument(Form_Factor * ff) : p_ff(ff), m_b(0.) {}
0050       ~FT_Argument() {}
0051       void   SetB(const double & b) { m_b = b; }
0052       double operator()(double q);
0053     };
0054 
0055   private:
0056     FT_Argument   m_ftarg;
0057     int           m_number;
0058     ff_form::code m_form;
0059     double        m_prefactor, m_beta;
0060     double        m_Lambda2, m_kappa, m_xi, m_bmax;
0061     size_t        m_bsteps;
0062     double        m_deltab, m_accu, m_ffmin, m_ffmax;
0063     double        m_ftnorm, m_norm;
0064     int           m_test;
0065 
0066 
0067     std::vector<double> m_values;
0068 
0069     double Norm();
0070     double NormAnalytical();
0071     double CalculateFourierTransform(const double & b);
0072     double AnalyticalFourierTransform(const double & b);
0073     void   FillFourierTransformGrid();
0074     void   FillTestGrid();
0075     bool   GridGood();
0076 
0077     void   TestSpecialFunctions(const std::string & dirname);
0078     void   WriteOutFF_Q(const std::string & dirname);
0079     void   WriteOutFF_B(const std::string & dirname);
0080     void   TestNormAndSpecificBs(const std::string & dirname);
0081     void   TestQ2Selection(const std::string & dirname);
0082   public:
0083     Form_Factor(const FormFactor_Parameters & params);
0084     virtual ~Form_Factor() {}
0085 
0086     void   Initialise();
0087     
0088     double operator()(const double q2);
0089     double operator()() { return 1.; }
0090     double FourierTransform(const double & b=0.) const;
0091     double ImpactParameter(const double & val=0.) const;
0092     double SelectQT2(const double & qt2max=0.,const double & qt2min=0.) const;
0093 
0094     const double & Bmax() const      { return m_bmax;      }
0095     const size_t & Bbins() const     { return m_bsteps;    }
0096     const double & Maximum() const   { return m_ffmax;     }
0097     const double & Prefactor() const { return m_prefactor; }
0098     const double & Beta0() const     { return m_beta;      }
0099     const double & Kappa() const     { return m_kappa;     }
0100     const double & Lambda2() const   { return m_Lambda2;   }
0101     const int    & Number() const    { return m_number;    }
0102 
0103     void Test(const std::string & dirname);
0104   };
0105 }
0106 
0107 #endif