16 double ymin = 0., ymax = 6.;
17 double ptmin = 0., ptmax = 2.5;
21 std::ifstream fin(filename.c_str());
22 if (!fin.is_open())
return 0;
23 fin >> func.
dy >> func.
dpt;
28 while (fin >> ty >> tpt >> prob) {
29 if (tpt<ptmin || tpt>ptmax || ty<ymin || ty>ymax)
continue;
30 func.
ys.push_back(ty);
31 func.
pts.push_back(tpt);
32 func.
probs.push_back(prob);
41 if (ret < 0.) ret = 0.;
42 if (ret > 1.) ret = 1.;
std::vector< double > ys
Vector of bin rapidities. One element per bin.
double getAcceptance(const double &y, const double &pt) const
Binomial acceptance for the given values of y and pt.
double dpt
pT width of a bin
Structure which contains the binomial probabilities for particle with given y and pt to be accepted...
BilinearSplineFunction sfunc
2D spline interpolation of the acceptance function
int ReadAcceptanceFunction(AcceptanceFunction &func, std::string filename)
std::vector< double > probs
Vector of acceptance probabilities for each bin.
double Eval(double x, double y) const
Evaluates interpolated f(x,y)
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.
double dy
Rapidity width of a bin.