Nanga Parbat 1.1.0
A TMD fitting framework
DWS.h
Go to the documentation of this file.
1//
2// Author: Valerio Bertone: valerio.bertone@cern.ch
3//
4
5#pragma once
6
8
9#include <math.h>
10
11namespace NangaParbat
12{
18 {
19 public:
20
21 DWS(): Parameterisation{"DWS", 2, std::vector<double>{0.207309505279, 0.09258432985738}, true}, _Q02(3.2) { };
22
23 double Evaluate(double const&, double const& b, double const& zeta, int const& ifunc) const
24 {
25 if (ifunc < 0 || ifunc >= this->_nfuncs)
26 throw std::runtime_error("[DWS::Evaluate]: function index out of range");
27
28 const double g1 = this->_pars[0];
29 const double g2 = this->_pars[1];
30
31 return exp( - ( g1 + g2 * log(zeta / _Q02) / 2 ) * pow(b, 2) / 2 );
32 };
33
34 double Derive(double const&, double const& b, double const& zeta, int const& ifunc, int const& ipar) const
35 {
36 const double g1 = this->_pars[0];
37 const double g2 = this->_pars[1];
38
39 // Derivative w.r.t. "g1"
40 if (ipar == 0)
41 {
42 const double b2 = b * b;
43 return - b2 * exp( - ( g1 + g2 * log(zeta / _Q02) / 2 ) * b2 / 2 ) / 2;
44 }
45 // Derivative w.r.t. "g2"
46 else if (ipar == 1)
47 {
48 const double b2 = b * b;
49 const double ln = log(zeta / _Q02);
50 return - ln * b2 * exp( - ( g1 + g2 * ln / 2 ) * b2 / 2 ) / 4;
51 }
52 else
53 return 0;
54 };
55
56 std::string LatexFormula() const
57 {
58 return R"delimiter($$f_{\rm NP}(x,\zeta, b_T)=\exp\left[ - \frac{1}{2}\left( g_1 + \frac{1}{2}g_2 \log\left(\frac{\zeta}{Q_0^2}\right) \right) b_T^2 \right]$$)delimiter";
59 };
60
61 std::vector<std::string> GetParameterNames() const
62 {
63 return {R"delimiter($g_1$)delimiter", R"delimiter($g_2$)delimiter"};
64 };
65
66 std::string GetDescription() const
67 {
68 return "Parameterisation used for the Davies-Webber-Stirling TMD analysis.";
69 };
70
71 private:
72 double const _Q02;
73 };
74}
Davies-Webber-Stirling parameterisation derived from the "Parameterisation" mother class.
Definition: DWS.h:18
double Evaluate(double const &, double const &b, double const &zeta, int const &ifunc) const
Virtual function that returns the value of one of the functions.
Definition: DWS.h:23
std::vector< std::string > GetParameterNames() const
Virtual function that returns a vector of strings containing the names of the parameters in LaTex for...
Definition: DWS.h:61
std::string GetDescription() const
Virtual function that returns a short description of the parametrisation.
Definition: DWS.h:66
double Derive(double const &, double const &b, double const &zeta, int const &ifunc, int const &ipar) const
Virtual function that returns the value of the derivative of one of the functions.
Definition: DWS.h:34
std::string LatexFormula() const
Virtual function that returns a string with the formula of the non-perturbative function(s) in LaTex ...
Definition: DWS.h:56
DWS()
Definition: DWS.h:21
double const _Q02
Definition: DWS.h:69
Mother class that implements the main feautures of a functional parameterisation of non-perturbative ...
Definition: parameterisation.h:20
Definition: bstar.h:12