Thermal-FIST  1.3
Package for hadron resonance gas model applications
Acceptance.h
Go to the documentation of this file.
1 /*
2  * Thermal-FIST package
3  *
4  * Copyright (c) 2014-2018 Volodymyr Vovchenko
5  *
6  * GNU General Public License (GPLv3 or later)
7  */
8 #ifndef ACCEPTANCE_H
9 #define ACCEPTANCE_H
10 
11 #include <vector>
12 #include <string>
13 
15 
16 namespace thermalfist {
17 
19  namespace Acceptance {
20 
29  bool init;
30 
31  double dy;
32  double dpt;
33 
34  std::vector<double> ys;
35  std::vector<double> pts;
36  std::vector<double> probs;
38 
39  AcceptanceFunction() : dy(), dpt(), ys(), pts(), probs(), sfunc() { init = false; }
40 
41  void setSpline() { sfunc.setData(ys, pts, probs); init = true; }
42 
44  double getAcceptance(const double & y, const double & pt) const;
45  };
46 
47 
48 
52  int ReadAcceptanceFunction(AcceptanceFunction & func, std::string filename);
53  }
54 
55 } // namespace thermalfist
56 
57 #endif
std::vector< double > ys
Vector of bin rapidities. One element per bin.
Definition: Acceptance.h:34
double getAcceptance(const double &y, const double &pt) const
Binomial acceptance for the given values of y and pt.
Definition: Acceptance.cpp:39
void setData(const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &vals)
Structure which contains the binomial probabilities for particle with given y and pt to be accepted...
Definition: Acceptance.h:28
A class implementing a bilinear spline.
BilinearSplineFunction sfunc
2D spline interpolation of the acceptance function
Definition: Acceptance.h:37
int ReadAcceptanceFunction(AcceptanceFunction &func, std::string filename)
Definition: Acceptance.cpp:14
std::vector< double > probs
Vector of acceptance probabilities for each bin.
Definition: Acceptance.h:36
The main namespace where all classes and functions of the Thermal-FIST library reside.
std::vector< double > pts
Vector of bin pT values. One element per bin.
Definition: Acceptance.h:35
double dy
Rapidity width of a bin.
Definition: Acceptance.h:31