9#include <arich/dbobjects/ARICHReconstructionPar.h>
21 double parsBkg[10] = {0, 1, 8.764830e+00, -4.815370e+00, 3.268570e-06, 8.518560e+00, -9.609710e+00, 9.769060e-06, 1.095350e-02, -1.322410e-02};
23 "0*[0] + (1-[1])*(exp([2]+[3]*x)*[4]) + [1]*(exp([5]+[6]*x)*[7]+x*[8]+x*x*[9])");
26 double parsRes[4] = {1.12147e-01, 3.81701e+00, 0.0093, -6.14984e-04};
27 m_thcResolution =
new TF1(
"thcResolution",
"([p0]*exp(-[p1]*x)+[p2]+[p3]*x-((x>3)?[p3]*(x-3):0))*1.35");
30 double parsBkgPhi[8] = {0, 0, 6.68258e-02, 6.50048e+00, -1.04876e-01, -7.06652e-03, 1.34111e-01, 1.83823e-01};
32 "[0]*0 + [1]*0 + 1/( ([2]*exp(y*[3]) + [4])*cos(x/2)*cos(x/2)*cos(x/2)*cos(x/2) + sqrt([5] + [6]*y + [7]*y*y ) )");
35 m_pars = {0.098304138, 5.973590e-02, 21, 0.88, 3.7, 0.357, 0.46, 1, 0.12, 0.12, 0.02, 1.5, 0.0288};
45 for (
auto par : pars) {
53 const std::vector<double>& pars)
const
57 for (
auto par : pars) {
68 for (
auto par : pars) {
74 const double surf[4] = { -2.19669e-02, 3.59010e+01, -2.77441e+01, 1.43564e+02};
76 double thc = minThc + step / 2.;
78 while (thc < maxThc) {
79 bkg += (surf[0] + surf[1] * thc + surf[2] * pow(thc, 2) + surf[3] * pow(thc, 3)) *
getBackgroundPerPad(thc, pars);
89 double s1 =
sqrt(tan(maxThc)) * pow((tan(maxThc + trackTh) + tan(maxThc - trackTh)) / 2, 3. / 2.);
91 if (minThc > 0) s2 =
sqrt(tan(minThc)) * pow((tan(minThc + trackTh) + tan(minThc - trackTh)) / 2, 3. / 2.);
92 return 3.1416 * 0.18 * 0.18 * (s1 - s2) * 0.6 / 0.005 / 0.005;
98 cout << endl <<
"-----bkg PDF-----" << endl;
101 std::vector<double> bkgPars(Npar, 0);
102 m_bkgPDF->GetParameters(bkgPars.data());
103 for (
int i = 0; i < Npar; i++)cout << Form(
"bkg Pars %d = %e", i, bkgPars[i]) << endl;
105 cout << endl <<
"-----bkg phi corr PDF-----" << endl;
108 std::vector<double> bkgPhiCorPars(Npar2, 0);
110 for (
int i = 0; i < Npar2; i++)cout << Form(
"bkg Pars %d = %e", i, bkgPhiCorPars[i]) << endl;
112 cout << endl <<
"-----flat backgroud per pad-----" << endl;
115 cout << endl <<
"----additional parameters (for wide gaus, quartz etc.)-----" << endl;
116 for (
int i = 0; i < (int)
m_pars.size(); i++) {
117 printf(
"m_pars[%d] = %e\n", i,
m_pars[i]);
120 cout << endl <<
"----Aerogel FOM-----" << endl;
125 cout << endl <<
"----- Resolution PDF-----" << endl;
129 for (
int i = 0; i < 4; i++)cout << Form(
"resolution Pars %d = %e", i, resPars[i]) << endl;
double getBackgroundPerPad(double th_cer, const std::vector< double > &pars) const
Get expected number of background hits for pad at given theta.
void initializeDefault()
initializes "default" values of parameters
std::vector< float > m_pars
vector of other pdf parameters
double getPhiCorrectedBackgroundPerPad(double fi_cer_trk, double th_cer, const std::vector< double > &pars) const
Get expected number of background hits for pad at given theta at given phi_Cer_trk (flat background i...
double getNPadsInRing(double maxThc, double minThc=0.0, double trackTh=0.45) const
Get average number of pads in ring.
TF2 * m_bkgPhiPDF
background PDF function with phi correction
TF1 * m_thcResolution
cherenkov angle resolution (function of track momentum)
void print() const
Print parameters values.
double getExpectedBackgroundHits(const std::vector< double > &pars, double minThc=0.1, double maxThc=0.5) const
Get number of expected background hits in ring (0.1<theta<0.5rad by default)
std::vector< float > m_aerogelFOM
aerogel figure of merit (for photon yield)
float m_flatBkgPerPad
expected background hits per pad (treated flat over detector surface)
TF1 * m_bkgPDF
background PDF function (function of theta)
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.