qqbarthreshold is hosted by Hepforge, IPPP Durham
QQbar_threshold
mass_schemes.hpp
Go to the documentation of this file.
1 
28 #pragma once
29 #include <array>
30 #include <string>
31 #include <ostream>
32 
34 namespace QQbar_threshold{
35 
37 
50  PS,
61  MSbarshift = MSshift,
62  MSbar = MSshift,
63  last_mass_scheme = MSbar
64  };
65 
67 
73  struct scheme{
77  double scale;
79  double nu;
80  };
81 
82  inline
83  std::string to_string(scheme s){
84  using std::to_string;
85  static constexpr
86  std::array<char const *, last_mass_scheme + 1> name_strings = {{
87  "PS", "PSshift", "OneS", "OneSshift", "Pole", "MSbar"
88  }};
89  std::string result =
90  std::string{'{'} + name_strings[s.name] + ", " + to_string(s.scale);
91  if((s.name == PS || s.name == PSshift) && (s.scale != s.nu)) {
92  result += ", " + to_string(s.nu);
93  }
94  return result + '}';
95  }
96 
97  inline
98  std::ostream& operator<<(std::ostream& os, scheme s){
99  os << to_string(s);
100  return os;
101  }
102 
103  inline bool is_threshold_mass(scheme_name s){
104  switch(s){
105  case Pole:
106  case PSshift:
107  case OneSshift:
108  case MSbar:
109  return false;
110  default: return true;
111  }
112  }
113 
114  inline bool is_threshold_mass(scheme const & s){
115  return is_threshold_mass(s.name);
116  }
117 
119 
123  inline bool is_shifted_mass(scheme_name s){
124  switch(s){
125  case PSshift:
126  case OneSshift:
127  case MSbar:
128  return true;
129  default: return false;
130  }
131  }
132 
134 
143  switch(s){
144  case PS: return PSshift;
145  case OneS: return OneSshift;
146  default: return s;
147  }
148  }
149 
151 
155  inline bool is_shifted_mass(scheme const & s){
156  return is_shifted_mass(s.name);
157  }
158 }
Definition: alpha_s.hpp:37
double scale
Associated scale.
Definition: mass_schemes.hpp:77
The potential-subtracted insertion scheme.
Definition: mass_schemes.hpp:50
bool is_shifted_mass(scheme_name s)
Determines whether the given scheme is a shifted scheme.
Definition: mass_schemes.hpp:123
The 1S insertion scheme.
Definition: mass_schemes.hpp:54
scheme_name name
Name of the scheme.
Definition: mass_schemes.hpp:75
scheme_name
Names of mass schemes.
Definition: mass_schemes.hpp:48
The potential-subtracted shift scheme.
Definition: mass_schemes.hpp:52
The 1S shift scheme.
Definition: mass_schemes.hpp:56
The pole scheme.
Definition: mass_schemes.hpp:58
The scheme.
Definition: mass_schemes.hpp:60
Mass scheme.
Definition: mass_schemes.hpp:73
double nu
Second associated scale for PS scheme.
Definition: mass_schemes.hpp:79
scheme_name to_shifted_mass(scheme_name s)
Returns the corresponding shifted scheme.
Definition: mass_schemes.hpp:142