Thermal-FIST 1.5
Package for hadron resonance gas model applications
Loading...
Searching...
No Matches
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
16namespace 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
A class implementing a bilinear spline.
Routines used for modeling the acceptance effects.
Definition Acceptance.h:19
int ReadAcceptanceFunction(AcceptanceFunction &func, std::string filename)
The main namespace where all classes and functions of the Thermal-FIST library reside.
Definition CosmicEoS.h:9
double dy
Rapidity width of a bin.
Definition Acceptance.h:31
std::vector< double > pts
Vector of bin pT values. One element per bin.
Definition Acceptance.h:35
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
Definition Acceptance.h:37
std::vector< double > probs
Vector of acceptance probabilities for each bin.
Definition Acceptance.h:36
std::vector< double > ys
Vector of bin rapidities. One element per bin.
Definition Acceptance.h:34