QCD Library
MSbar_mass.hpp
Go to the documentation of this file.
1 
28 #pragma once
29 
30 #include "alpha_s.hpp"
31 #include "gamma_m.hpp"
32 #include "beta.hpp"
33 
35 namespace QCD{
36  namespace detail{
37 
38  //std::min is not constexpr in c++11
39  template<typename T>
40  constexpr T const & min(T const & a, T const & b){
41  return (a<b)?a:b;
42  }
43  }
44 
48  double m;
50  double mu;
52  int nf;
53  };
54 
55  struct Parameters {
56  double alpha_s;
57  double m;
58  };
59 
61  class MSbar_mass{
62  double m0_;
63  double as0_;
64  double mu0_;
65  double abserr_, relerr_;
66  int nf_;
67  int running_order_;
68 
69  std::array<double, 2> evolve(double mu) const;
70 
71  double decouple_mass_up(double alpha_s, threshold const & thr, int nf) const;
72  double decouple_mass_down(double alpha_s, threshold const & thr, int nf) const;
73 
74  MSbar_mass() = default;
75 
76  public:
78  static constexpr int max_running_order =
79  detail::min(gamma_m_max_order, beta_max_order);
80 
82  static constexpr double default_error = 1e-6;
83 
94  MSbar_mass(
96  strong_coupling alpha_s,
97  int order = max_running_order
98  );
99 
111  MSbar_mass(
112  reference_mass m,
113  double alpha_s_mu,
114  int order = max_running_order
115  );
116 
123  double operator()(double scale) const;
124 
126 
130  MSbar_mass decouple_down(threshold thr) const;
131 
133 
137  MSbar_mass remove(threshold thr) const;
138 
140 
144  MSbar_mass decouple_up(threshold thr) const;
145 
147 
151  MSbar_mass add(threshold thr) const;
152 
153  //TODO: fix implementation
154  // /**
155  // * Compute the scale-invariant mass \f$m(m)\f$
156  // *
157  // * @returns The scale-invariant mass
158  // *
159  // */
160  // double to_scale_invariant() const;
161 
168  double to_scale_invariant(double ep) const;
169 
178  template<typename... T>
179  inline double to_SI(T&&... t) const{
180  return to_scale_invariant(std::forward<T>(t)...);
181  }
182 
188  int order() const;
189 
195  int nf() const;
196 
203  Parameters with_alpha_s(double scale) const;
204 
206 
209  MSbar_mass & error(double err);
210 
212 
215  MSbar_mass & abs_error(double abs_err);
216 
218 
221  MSbar_mass & rel_error(double rel_err);
222 
223  };
224 
225 }
QCD beta function.
Implements the running and decoupling of a quark mass in the scheme.
Definition: MSbar_mass.hpp:61
Definition: alpha_s.hpp:35
int nf
Number of active flavours.
Definition: MSbar_mass.hpp:52
Running and decoupling of the strong coupling constant.
double to_SI(T &&... t) const
Definition: MSbar_mass.hpp:179
constexpr unsigned beta_max_order
Highest implemented order of the beta function.
Definition: beta.hpp:43
Implements the running and decoupling of the strong coupling constant.
Definition: alpha_s.hpp:58
double m
Quark mass at the reference scale mu.
Definition: MSbar_mass.hpp:48
double mu
Reference scale.
Definition: MSbar_mass.hpp:50
Value for quark mass at a reference scale.
Definition: MSbar_mass.hpp:46
Threshold for the decoupling of a quark flavour.
Definition: threshold.hpp:42
Mass anomalous dimension in the scheme.