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);
 
 
   40    double ret = 
sfunc.Eval(y, pt);
 
   41    if (ret < 0.) ret = 0.;
 
   42    if (ret > 1.) ret = 1.;
 
 
int ReadAcceptanceFunction(AcceptanceFunction &func, std::string filename)
 
The main namespace where all classes and functions of the Thermal-FIST library reside.
 
Structure which contains the binomial probabilities for particle with given y and pt to be accepted.
 
double dpt
pT width of a bin
 
double dy
Rapidity width of a bin.
 
std::vector< double > pts
Vector of bin pT values. One element per bin.
 
double getAcceptance(const double &y, const double &pt) const
Binomial acceptance for the given values of y and pt.
 
BilinearSplineFunction sfunc
2D spline interpolation of the acceptance function
 
std::vector< double > probs
Vector of acceptance probabilities for each bin.
 
std::vector< double > ys
Vector of bin rapidities. One element per bin.