CbmRoot
Acceptance.h
Go to the documentation of this file.
1 #ifndef ACCEPTANCE_H
2 #define ACCEPTANCE_H
3 
5 #include "TMath.h"
6 #include <vector>
7 
8 namespace Acceptance {
9 
11  Double_t dy, dpt;
12  std::vector<Double_t> ys, pts, probs;
14  void setSpline() { sfunc.setData(ys, pts, probs); }
15  Double_t getAcceptance(const Double_t& y, const Double_t& pt) const;
16  AcceptanceFunction() : dy(), dpt(), ys(), pts(), probs(), sfunc() {}
17  };
18 
20  Double_t p1, p2, p3;
22  double p2_ = 0.,
23  double p3_ = 1.)
24  : p1(p1_), p2(p2_), p3(p3_) {}
25  Double_t f(double p) { return p1 - p2 * TMath::Exp(-p * p / 2. / p3 / p3); }
26  };
27 
28  int ReadAcceptanceFunction(AcceptanceFunction& func, TString filename);
29 } // namespace Acceptance
30 
31 #endif
Acceptance::AcceptanceFunction::pts
std::vector< Double_t > pts
Definition: Acceptance.h:12
Acceptance::AcceptanceFunction::getAcceptance
Double_t getAcceptance(const Double_t &y, const Double_t &pt) const
Definition: Acceptance.cxx:33
Acceptance::AcceptanceFunction::AcceptanceFunction
AcceptanceFunction()
Definition: Acceptance.h:16
Acceptance::AcceptanceFunction::sfunc
BilinearSplineFunction sfunc
Definition: Acceptance.h:13
Acceptance::AcceptanceFunction::setSpline
void setSpline()
Definition: Acceptance.h:14
Acceptance::ReconstructionEfficiencyFunction::ReconstructionEfficiencyFunction
ReconstructionEfficiencyFunction(double p1_=1., double p2_=0., double p3_=1.)
Definition: Acceptance.h:21
Acceptance::ReconstructionEfficiencyFunction::f
Double_t f(double p)
Definition: Acceptance.h:25
Acceptance::AcceptanceFunction::dy
Double_t dy
Definition: Acceptance.h:11
Acceptance
Definition: Acceptance.h:8
Acceptance::AcceptanceFunction
Definition: Acceptance.h:10
BilinearSplineFunction::setData
void setData(const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &vals)
Definition: CbmBilinearSplineFunction.h:36
Acceptance::ReconstructionEfficiencyFunction
Definition: Acceptance.h:19
Acceptance::ReconstructionEfficiencyFunction::p1
Double_t p1
Definition: Acceptance.h:20
Acceptance::ReconstructionEfficiencyFunction::p3
Double_t p3
Definition: Acceptance.h:20
BilinearSplineFunction
Definition: CbmBilinearSplineFunction.h:21
Acceptance::AcceptanceFunction::dpt
Double_t dpt
Definition: Acceptance.h:11
Acceptance::AcceptanceFunction::ys
std::vector< Double_t > ys
Definition: Acceptance.h:12
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
Acceptance::ReadAcceptanceFunction
int ReadAcceptanceFunction(AcceptanceFunction &func, TString filename)
Definition: Acceptance.cxx:7
Acceptance::ReconstructionEfficiencyFunction::p2
Double_t p2
Definition: Acceptance.h:20
Acceptance::AcceptanceFunction::probs
std::vector< Double_t > probs
Definition: Acceptance.h:12
CbmBilinearSplineFunction.h