cepgen is hosted by Hepforge, IPPP Durham
CepGen N/A
Central exclusive processes event generator
Parameterisation.h
Go to the documentation of this file.
1/*
2 * CepGen: a central exclusive processes event generator
3 * Copyright (C) 2013-2024 Laurent Forthomme
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef CepGen_StructureFunctions_Parameterisation_h
20#define CepGen_StructureFunctions_Parameterisation_h
21
22#include <memory>
23
25
27namespace cepgen::strfun {
29 class Parameterisation : public NamedModule<Parameterisation> {
30 public:
32 ~Parameterisation() override = default;
33
35
37 friend std::ostream& operator<<(std::ostream&, const Parameterisation&);
38
39 virtual bool hasW1W2() const { return false; }
41 inline const sigrat::Parameterisation* sigmaRatio() const { return r_ratio_.get(); }
42
46 Parameterisation& operator()(double xbj, double q2);
47
48 double F2(double xbj, double q2);
49 double FL(double xbj, double q2);
50 double W1(double xbj, double q2);
51 double W2(double xbj, double q2);
52 double FE(double xbj, double q2);
53 double FM(double xbj, double q2);
54 double F1(double xbj, double q2);
55
56 struct Arguments {
57 inline bool operator==(const Arguments& oth) const { return xbj == oth.xbj && q2 == oth.q2; }
58 inline bool valid() const { return q2 >= 0. && xbj >= 0. && xbj < 1.; }
59 friend std::ostream& operator<<(std::ostream&, const Arguments&);
60 double xbj{-1.}, q2{-1.};
61 };
62 struct Values {
63 void clear() { f2 = 0., fl = 0., w1 = 0., w2 = 0., f2 = 0., fm = 0.; }
64 friend std::ostream& operator<<(std::ostream&, const Values&);
65
66 double f2{0.};
67 double fl{0.};
68
69 // alternative quantities
70 double w1{0.};
71 double w2{0.};
72 double fe{0.};
73 double fm{0.};
74 };
75
76 protected:
77 virtual void eval() = 0;
78
80 virtual Parameterisation& computeFL(double xbj, double q2);
82 virtual Parameterisation& computeFL(double xbj, double q2, double r);
83
85
86 //-- fill in the structure functions values
87 Parameterisation& setF1F2(double f1, double f2);
94
96 double tau(double xbj, double q2) const;
98 double gamma2(double xbj, double q2) const;
99 double nu(double xbj, double q2) const;
100
101 private:
103 const std::unique_ptr<sigrat::Parameterisation> r_ratio_;
104
105 protected:
106 const double mp_;
107 const double mp2_;
108 const double inv_mp_;
109 const double mx_min_;
110
112
113 private:
114 Values vals_;
115 bool fl_computed_{false};
116 };
117} // namespace cepgen::strfun
118
119#endif
Base runtime module object.
Definition NamedModule.h:28
A description object for parameters collection.
A generic modelling of the ratio.
Definition SigmaRatio.h:27
Base object for the parameterisation of nucleon structure functions.
friend std::ostream & operator<<(std::ostream &, const Parameterisation &)
Human-readable dump of the SF parameterisation at this (xBj,Q^2) value.
virtual Parameterisation & computeFL(double xbj, double q2)
Compute the longitudinal structure function for a given point.
double gamma2(double xbj, double q2) const
Dimensionless variable .
Parameterisation & setFE(double fe)
Parameterisation & clear()
Reset the structure functions values.
double nu(double xbj, double q2) const
Arguments args_
Last couple computed.
Parameterisation & setF2(double f2)
double tau(double xbj, double q2) const
Compute the dimensionless variable .
Parameterisation & setW2(double w2)
const double inv_mp_
Inverse proton mass, in c^2/GeV.
double W1(double xbj, double q2)
Longitudinal form factor.
const double mx_min_
Minimum diffractive mass, in GeV/c^2.
virtual Parameterisation & computeFL(double xbj, double q2, double r)
Compute the longitudinal structure function for a given point.
const double mp2_
Squared proton mass, in GeV^2/c^4.
~Parameterisation() override=default
double W2(double xbj, double q2)
static ParametersDescription description()
Generic description for the structure functions.
const sigrat::Parameterisation * sigmaRatio() const
double FE(double xbj, double q2)
Electric proton form factor.
double F2(double xbj, double q2)
Transverse structure function.
virtual void eval()=0
Local structure functions evaluation method.
virtual bool hasW1W2() const
provides modelling for W_1/W_2? Longitudinal/transverse cross section ratio parameterisation used to ...
Parameterisation(const ParametersList &)
Parameterisation & setF1F2(double f1, double f2)
double F1(double xbj, double q2)
structure function
double FM(double xbj, double q2)
Magnetic proton form factor.
Parameterisation & setFM(double fm)
Parameterisation & setFL(double fl)
Parameterisation & setW1(double w1)
Parameterisation & operator()(double xbj, double q2)
Compute all relevant structure functions for a given couple.
const double mp_
Proton mass, in GeV/c^2.
double FL(double xbj, double q2)
Longitudinal structure function.
Structure functions modelling scope.
friend std::ostream & operator<<(std::ostream &, const Arguments &)
bool operator==(const Arguments &oth) const
double fe
Electric proton form factor.
double fm
Magnetic proton form factor.
friend std::ostream & operator<<(std::ostream &, const Values &)
double fl
Last computed longitudinal structure function value.
double f2
Last computed transverse structure function value.
double w1
Longitudinal form factor.