Thermal-FIST  1.3
Package for hadron resonance gas model applications
MomentumDistribution.h
Go to the documentation of this file.
1 /*
2  * Thermal-FIST package
3  *
4  * Copyright (c) 2014-2019 Volodymyr Vovchenko
5  *
6  * GNU General Public License (GPLv3 or later)
7  */
8 #ifndef MOMENTUMDISTRIBUTION_H
9 #define MOMENTUMDISTRIBUTION_H
10 
11 #include <cmath>
12 #include <vector>
13 
14 #include "HRGBase/SplineFunction.h"
17 
18 namespace thermalfist {
19 
25  public:
30  MomentumDistributionBase(int pdgid = 0, double mass = 0.) : m_PDGID(pdgid), m_Mass(mass), m_Normalized(false) { }
31 
34 
36  virtual void Normalize() = 0;
37 
39  virtual double dndp(double p) const = 0;
40 
42  virtual double dndy(double y) const = 0;
43 
45  virtual double dnmtdmt(double mt) const = 0;
46 
48  virtual double d2ndptdy(double pt, double y) const = 0;
49 
51  bool isNormalized() const { return m_Normalized; }
52 
55  void SetAcceptance(Acceptance::AcceptanceFunction *acc_, double ycm_ = 0.) {
56  m_acc = acc_;
57  m_useacc = true;
58  m_ycm = ycm_;
59  }
60 
61  protected:
62  int m_PDGID;
63  double m_Mass;
64  bool m_Normalized;
66  double m_ycm;
67  bool m_useacc;
68  };
69 
70 
78  public:
84  SiemensRasmussenDistribution(int pdgid = 0, double mass = 0., double T = 0.100, double beta = 0.5) :
85  MomentumDistributionBase(pdgid, mass),
86  m_T(T), m_Beta(beta)
87  {
88  m_Gamma = 1. / sqrt(1. - m_Beta * m_Beta);
89  Normalize();
90  m_useacc = false;
91  }
92 
94 
103  void SetParameters(double T, double beta, double mass, int pdgid = 0) {
104  m_T = T;
105  m_Beta = beta;
106  m_Mass = mass;
107  if (pdgid != 0) m_PDGID = pdgid;
108  m_Gamma = 1. / sqrt(1. - m_Beta * m_Beta);
109  Normalize();
110  }
111 
112  // Override functions begin
113 
114  void Normalize();
115 
116  virtual double dndp(double p) const;
117 
118  virtual double dndy(double y) const;
119 
120  virtual double dnmtdmt(double mt) const;
121 
122  virtual double d2ndptdy(double pt, double y) const;
123 
124  // Override functions end
125 
126  private:
127  double w(double p) const {
128  return sqrt(p*p + m_Mass * m_Mass);
129  }
130 
131  double alpha(double p) const {
132  return m_Gamma * m_Beta * p / m_T;
133  }
134 
135  double PAv() const;
136 
137  double m_T;
138  double m_Beta;
139  double m_Gamma;
140  double m_Norm;
141  std::vector<double> m_xlag, m_wlag;
142  };
143 
144 
152  public:
161  BoostInvariantMomentumDistribution(BoostInvariantFreezeoutParametrization* freezeoutModel = NULL, int pdgid = 0, double mass = 0., double T = 0.100, double etamax = 0.5, bool norm = false) :
162  MomentumDistributionBase(pdgid, mass),
163  m_FreezeoutModel(freezeoutModel),
164  m_T(T), m_EtaMax(etamax)
165  {
166  if (m_FreezeoutModel == NULL) {
167  m_FreezeoutModel = new BoostInvariantFreezeoutParametrization();
168  }
169  m_NormY = m_NormPt = m_Norm = 1.;
170  if (norm) Normalize();
171  else Initialize();
172  m_useacc = false;
173  }
174 
176 
177  void Normalize();
178 
180  //virtual double dndy(double y, double pt) const;
181 
183  //virtual double dndysingle(double y, double pt) const;
184 
186  //virtual double dndpt(double pt) const;
187 
188  // Override functions begin
189 
190  virtual double dndp(double /*p*/) const { return 0.; }
191 
192  virtual double dndy(double y) const;
193 
194  virtual double dnmtdmt(double mt) const;
195 
196  virtual double d2ndptdy(double pt, double y) const;
197 
198  // Override functions end
199 
200  protected:
201  virtual double ZetaIntegrandpTYSingleFireball(double zeta, double pt, double y) const;
202  virtual double ZetaIntegrandpT(double zeta, double pt) const;
203 
204  private:
205  void Initialize();
206 
207  virtual double dndysingle(double y) const;
208 
209  virtual double dndptsingle(double pt, double y) const;
210 
212  virtual double dndpt(double pt) const { return pt * dnmtdmt(sqrt(pt * pt + m_Mass * m_Mass)); }
213 
214  virtual double dndpt(double pt, double y) const;
215 
216  BoostInvariantFreezeoutParametrization* m_FreezeoutModel;
217 
218  double m_T;
219  double m_EtaMax;
220  double m_NormY, m_NormPt, m_Norm;
221  std::vector<double> m_xlag, m_wlag;
222  std::vector<double> m_xlegT, m_wlegT;
223  std::vector<double> m_xlegY, m_wlegY;
224  std::vector<double> m_xlegeta, m_wlegeta;
225 
226  SplineFunction m_dndy, m_dndyint;
227  };
228 
229 } // namespace thermalfist
230 
231 
237 namespace thermalfist {
238 
248  public:
257  SSHDistribution(int pdgid = 0, double mass = 0., double T = 0.100, double betas = 0.5, double etamax = 0.5, double npow = 1., bool norm = false) :
258  MomentumDistributionBase(pdgid, mass),
259  m_T(T), m_BetaS(betas), m_EtaMax(etamax), m_n(npow)
260  {
261  m_NormY = m_NormPt = m_Norm = 1.;
262  if (norm) Normalize();
263  else Initialize();
264  m_useacc = false;
265  }
266 
267  virtual ~SSHDistribution() { }
268 
280  void SetParameters(double T, double betas, double etamax, double npow, double mass, int pdgid = 0, bool norm = true) {
281  m_T = T;
282  m_BetaS = betas;
283  m_EtaMax = etamax;
284  m_n = npow;
285  m_Mass = mass;
286  if (pdgid != 0) m_PDGID = pdgid;
287  m_NormY = m_NormPt = m_Norm = 1.;
288  m_Normalized = false;
289  if (norm) Normalize();
290  else Initialize();
291  }
292 
300  void SetMeanBetaT(double betaT) {
301  m_BetaS = (2. + m_n) / 2. * betaT;
302  }
303 
304  void Normalize();
305 
307  virtual double dndy(double y, double pt) const;
308 
310  virtual double dndysingle(double y, double pt) const;
311 
313  virtual double dndpt(double pt) const;
314 
315  // Override functions begin
316 
317  virtual double dndp(double /*p*/) const { return 0.; }
318 
319  virtual double dndy(double y) const;
320 
321  virtual double dnmtdmt(double mt) const;
322 
323  virtual double d2ndptdy(double pt, double y) const;
324 
325  // Override functions end
326 
327  private:
328  void Initialize();
329 
330  virtual double dndysingle(double y) const;
331 
332  virtual double dndptsingle(double pt, double y) const;
333 
334 
335  virtual double dndpt(double pt, double y) const;
336 
337  double w(double p) const {
338  return sqrt(p * p + m_Mass * m_Mass);
339  }
340 
341  double asinh(double x) const {
342  return log(x + sqrt(1. + x * x));
343  }
344 
345  double atanh(double x) const {
346  return 0.5 * log((1. + x) / (1. - x));
347  }
348 
349  double betar(double r) const {
350  if (m_n == 1.)
351  return m_BetaS * r;
352  else if (m_n == 2.)
353  return m_BetaS * r * r;
354  else
355  return m_BetaS * pow(r, m_n);
356  }
357 
358  double rho(double r) const { return atanh(betar(r)); }
359 
360  double MtAv() const;
361 
362  double y2Av() const;
363 
364  double m_T;
365  double m_BetaS, m_EtaMax;
366  double m_NormY, m_NormPt, m_Norm;
367  double m_n;
368  std::vector<double> m_xlag, m_wlag;
369  std::vector<double> m_xlegT, m_wlegT;
370  std::vector<double> m_xlegY, m_wlegY;
371  std::vector<double> m_xlegeta, m_wlegeta;
372 
373  SplineFunction m_dndy, m_dndyint;
374  };
375 
376 } // namespace thermalfist
377 
380 #endif
bool m_Normalized
Whether the distribution has been normalized to unity.
bool m_useacc
Whether the acceptance functions are used.
void SetMeanBetaT(double betaT)
Set the mean transverse flow velocity.
void SetParameters(double T, double beta, double mass, int pdgid=0)
Set the parameters of the Siemens-Rasmussen distribution.
virtual double dndp(double) const
Distribution density over the absolute value of the 3-momentum.
bool isNormalized() const
Whether the distribution has been normalized to unity.
Class implementing the primordial 3-momentum distribution function of certain particle species...
virtual void Normalize()=0
Normalizes the momentum distribution to unity.
Class implementing a simple linear spline.
BoostInvariantMomentumDistribution(BoostInvariantFreezeoutParametrization *freezeoutModel=NULL, int pdgid=0, double mass=0., double T=0.100, double etamax=0.5, bool norm=false)
double m_ycm
Center-of-mass rapidity for the acceptance function.
SiemensRasmussenDistribution(int pdgid=0, double mass=0., double T=0.100, double beta=0.5)
Structure which contains the binomial probabilities for particle with given y and pt to be accepted...
Definition: Acceptance.h:28
void SetParameters(double T, double betas, double etamax, double npow, double mass, int pdgid=0, bool norm=true)
Set the parameters of the longitudinal blast-wave distribution.
virtual double dndp(double p) const =0
Distribution density over the absolute value of the 3-momentum.
virtual double dndy(double y) const =0
Distribution density over the longitudinal rapidity.
virtual double d2ndptdy(double pt, double y) const =0
2D distribution density in rapidity and transverse momentum
void SetAcceptance(Acceptance::AcceptanceFunction *acc_, double ycm_=0.)
Class implementing the momentum distribution of boost-invariant, azimuthally symmetric freeze-out mod...
Base class implementing a longitudinally boost-invariant azimuthally symmetric freeze-out parametriza...
Acceptance::AcceptanceFunction * m_acc
Pointer to acceptance function.
virtual double dndp(double) const
Distribution density over the absolute value of the 3-momentum.
virtual double dnmtdmt(double mt) const =0
Transverse mass distribution.
Class implementing the momentum distribution in the spherically symmetric Blast-Wave model of Siemens...
MomentumDistributionBase(int pdgid=0, double mass=0.)
The main namespace where all classes and functions of the Thermal-FIST library reside.
Class implementing the momentum distribution in the longitudinally symmetric Blast-Wave model...
SSHDistribution(int pdgid=0, double mass=0., double T=0.100, double betas=0.5, double etamax=0.5, double npow=1., bool norm=false)