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
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
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