Belle II Software development
ARICHReconstructionPar Class Reference

The Class for ARICH reconstruction parameters. More...

#include <ARICHReconstructionPar.h>

Inheritance diagram for ARICHReconstructionPar:

Public Member Functions

 ARICHReconstructionPar ()
 Default constructor.
 
void initializeDefault ()
 initializes "default" values of parameters
 
void setBackgroundPDF (TF1 *bkgPDF)
 Set background PDF function for cherenkov angle distribution (vs.
 
void setBackgroundPhiPDF (TF2 *bkgPhiPDF)
 Set background PDF function with flattening phi correction.
 
void setThcResolution (TF1 *thcRes)
 Set function for cherenkov angle resolution vs.
 
void setAerogelFOM (const std::vector< float > &aerogelFOM)
 Set aerogel figure of merit for cherenkov photon yield.
 
void setFlatBkgPerPad (const float flatBkgPerPad)
 Set flat background per pad.
 
void setParameters (const std::vector< float > &pars)
 Set additional cherenkov angle PDF parameters.
 
const std::vector< float > & getParameters () const
 Get vector of additional cherenkov angle PDF parameters.
 
const TF1 * getBackgroundPDF () const
 Get background PDF function.
 
const TF2 * getBackgroundPhiPDF () const
 Get background PDF function (with phi correction)
 
double getThcResolution (double momentum) const
 Get Cherenkov angle resolution (without smearing due to pad size!) at given track momentum.
 
double getAerogelFOM (unsigned iLayer) const
 Get aerogel cherenkov photon yield for tile of selected layer.
 
float getFlatBkgPerPad () const
 Get flat background per pad.
 
double getBackgroundPerPad (double th_cer, const std::vector< double > &pars) const
 Get expected number of background hits for pad at given theta.
 
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 in Cherenkov s)pace.
 
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)
 
double getNPadsInRing (double maxThc, double minThc=0.0, double trackTh=0.45) const
 Get average number of pads in ring.
 
void print () const
 Print parameters values.
 

Private Member Functions

 ClassDef (ARICHReconstructionPar, 2)
 ClassDef, must be the last term before the closing {}.
 

Private Attributes

TF2 * m_bkgPhiPDF = NULL
 background PDF function with phi correction
 
TF1 * m_bkgPDF = NULL
 background PDF function (function of theta)
 
TF1 * m_thcResolution = NULL
 cherenkov angle resolution (function of track momentum)
 
std::vector< float > m_pars
 vector of other pdf parameters
 
std::vector< float > m_aerogelFOM
 aerogel figure of merit (for photon yield)
 
float m_flatBkgPerPad = 0.0
 expected background hits per pad (treated flat over detector surface)
 

Detailed Description

The Class for ARICH reconstruction parameters.

This class provides ARICH parameters for reconstruction (i.e. likelihood calculation)

Definition at line 25 of file ARICHReconstructionPar.h.

Constructor & Destructor Documentation

◆ ARICHReconstructionPar()

Default constructor.

Definition at line 30 of file ARICHReconstructionPar.h.

30{};

Member Function Documentation

◆ getAerogelFOM()

double getAerogelFOM ( unsigned  iLayer) const
inline

Get aerogel cherenkov photon yield for tile of selected layer.

Parameters
iLayeraerogel layer
Returns
aerogel cherenkov photon yield

Definition at line 132 of file ARICHReconstructionPar.h.

133 {
134 return m_aerogelFOM.at(iLayer);
135 }
std::vector< float > m_aerogelFOM
aerogel figure of merit (for photon yield)

◆ getBackgroundPDF()

const TF1 * getBackgroundPDF ( ) const
inline

Get background PDF function.

Returns
background PDF function

Definition at line 103 of file ARICHReconstructionPar.h.

104 {
105 return m_bkgPDF;
106 }
TF1 * m_bkgPDF
background PDF function (function of theta)

◆ getBackgroundPerPad()

double getBackgroundPerPad ( double  th_cer,
const std::vector< double > &  pars 
) const

Get expected number of background hits for pad at given theta.

Parameters
th_cerpad theta angle
parsvector of parameters for PDF (beta, track hits HAPD window (1 or 0))
Returns
expected number of backgrond hits on pad

Definition at line 41 of file ARICHReconstructionPar.cc.

42{
43
44 int ipar = 0;
45 for (auto par : pars) {
46 m_bkgPDF->SetParameter(ipar, par);
47 ipar++;
48 }
49 return m_bkgPDF->Eval(th_cer) + m_flatBkgPerPad;
50}
float m_flatBkgPerPad
expected background hits per pad (treated flat over detector surface)

◆ getBackgroundPhiPDF()

const TF2 * getBackgroundPhiPDF ( ) const
inline

Get background PDF function (with phi correction)

Returns
background PDF function - flat with phi dependance

Definition at line 112 of file ARICHReconstructionPar.h.

113 {
114 return m_bkgPhiPDF;
115 }
TF2 * m_bkgPhiPDF
background PDF function with phi correction

◆ getExpectedBackgroundHits()

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)

Parameters
parsvector of parameters for PDF (beta, track hits HAPD window (1 or 0))
minThcinner theta angle of ring
maxThcoutter theta angle of ring
Returns
expected number of backgrond hits in ring

Definition at line 64 of file ARICHReconstructionPar.cc.

65{
66
67 int ipar = 0;
68 for (auto par : pars) {
69 m_bkgPDF->SetParameter(ipar, par);
70 ipar++;
71 }
72
73 // parameters of fit of pol3 to the number of nPads per ring with given theta and width 5mrad
74 const double surf[4] = { -2.19669e-02, 3.59010e+01, -2.77441e+01, 1.43564e+02};
75 double step = 0.005;
76 double thc = minThc + step / 2.;
77 double bkg = 0;
78 while (thc < maxThc) {
79 bkg += (surf[0] + surf[1] * thc + surf[2] * pow(thc, 2) + surf[3] * pow(thc, 3)) * getBackgroundPerPad(thc, pars);
80 thc += step;
81 }
82 return bkg;
83
84}
double getBackgroundPerPad(double th_cer, const std::vector< double > &pars) const
Get expected number of background hits for pad at given theta.

◆ getFlatBkgPerPad()

float getFlatBkgPerPad ( ) const
inline

Get flat background per pad.

Returns
flat background per pad

Definition at line 141 of file ARICHReconstructionPar.h.

142 {
143 return m_flatBkgPerPad;
144 }

◆ getNPadsInRing()

double getNPadsInRing ( double  maxThc,
double  minThc = 0.0,
double  trackTh = 0.45 
) const

Get average number of pads in ring.

Parameters
maxThcoutter theta angle of ring
minThcinner theta angle of ring
trackThtheta angle of track (global coordinates, z axis theta = 0)
Returns
average number of pads in ring

Definition at line 86 of file ARICHReconstructionPar.cc.

87{
88
89 double s1 = sqrt(tan(maxThc)) * pow((tan(maxThc + trackTh) + tan(maxThc - trackTh)) / 2, 3. / 2.);
90 double s2 = 0;
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; // pi*dist^2*s*avg_geo_acc/pad_size
93}
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28

◆ getParameters()

const std::vector< float > & getParameters ( ) const
inline

Get vector of additional cherenkov angle PDF parameters.

Returns
vector of parameters

Definition at line 94 of file ARICHReconstructionPar.h.

95 {
96 return m_pars;
97 }
std::vector< float > m_pars
vector of other pdf parameters

◆ getPhiCorrectedBackgroundPerPad()

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 in Cherenkov s)pace.

Parameters
fi_cer_trkpad phi angle
th_cerpad theta angle
parsvector of parameters for PDF (beta, track hits HAPD window (1 or 0))
Returns
expected number of backgrond hits on pad

Definition at line 52 of file ARICHReconstructionPar.cc.

54{
55
56 int ipar = 0;
57 for (auto par : pars) {
58 m_bkgPhiPDF->SetParameter(ipar, par);
59 ipar++;
60 }
61 return m_flatBkgPerPad * m_bkgPhiPDF->Eval(fi_cer_trk, th_cer);
62}

◆ getThcResolution()

double getThcResolution ( double  momentum) const
inline

Get Cherenkov angle resolution (without smearing due to pad size!) at given track momentum.

Parameters
momentumtrack momentum
Returns
cherenkov angle resolution

Definition at line 122 of file ARICHReconstructionPar.h.

123 {
124 return m_thcResolution->Eval(momentum);
125 }
TF1 * m_thcResolution
cherenkov angle resolution (function of track momentum)

◆ initializeDefault()

void initializeDefault ( )

initializes "default" values of parameters

Definition at line 18 of file ARICHReconstructionPar.cc.

19{
20
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};
22 m_bkgPDF = new TF1("bkgPDF",
23 "0*[0] + (1-[1])*(exp([2]+[3]*x)*[4]) + [1]*(exp([5]+[6]*x)*[7]+x*[8]+x*x*[9])");
24 m_bkgPDF->SetParameters(parsBkg);
25
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");
28 m_thcResolution->SetParameters(parsRes);
29
30 double parsBkgPhi[8] = {0, 0, 6.68258e-02, 6.50048e+00, -1.04876e-01, -7.06652e-03, 1.34111e-01, 1.83823e-01};
31 m_bkgPhiPDF = new TF2("m_bkgPhiPDF",
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 ) )");
33 m_bkgPhiPDF->SetParameters(parsBkgPhi);
34
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};
36 m_flatBkgPerPad = 0.000892;
37
38 m_aerogelFOM = {13.200797, 15.186757};
39}

◆ print()

void print ( ) const

Print parameters values.

Definition at line 95 of file ARICHReconstructionPar.cc.

96{
97
98 cout << endl << "-----bkg PDF-----" << endl;
99 m_bkgPDF->Print();
100 int Npar = m_bkgPDF->GetNpar();
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;
104
105 cout << endl << "-----bkg phi corr PDF-----" << endl;
106 m_bkgPhiPDF->Print();
107 int Npar2 = m_bkgPhiPDF->GetNpar();
108 std::vector<double> bkgPhiCorPars(Npar2, 0);
109 m_bkgPhiPDF->GetParameters(bkgPhiCorPars.data());
110 for (int i = 0; i < Npar2; i++)cout << Form("bkg Pars %d = %e", i, bkgPhiCorPars[i]) << endl;
111
112 cout << endl << "-----flat backgroud per pad-----" << endl;
113 cout << " flat background per pad is " << m_flatBkgPerPad << endl;
114
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]);
118 }
119
120 cout << endl << "----Aerogel FOM-----" << endl;
121 for (int i = 0; i < (int)m_aerogelFOM.size(); i++) {
122 printf("m_aerogelFOM[%d] = %f\n", i, m_aerogelFOM[i]);
123 }
124
125 cout << endl << "----- Resolution PDF-----" << endl;
126 m_thcResolution->Print();
127 double resPars[4];
128 m_thcResolution->GetParameters(resPars);
129 for (int i = 0; i < 4; i++)cout << Form("resolution Pars %d = %e", i, resPars[i]) << endl;
130
131}

◆ setAerogelFOM()

void setAerogelFOM ( const std::vector< float > &  aerogelFOM)
inline

Set aerogel figure of merit for cherenkov photon yield.

Parameters
aerogelFOMvector of aerogel layers FOMs

Definition at line 67 of file ARICHReconstructionPar.h.

68 {
69 m_aerogelFOM = aerogelFOM;
70 }

◆ setBackgroundPDF()

void setBackgroundPDF ( TF1 *  bkgPDF)
inline

Set background PDF function for cherenkov angle distribution (vs.

theta)

Parameters
bkgPDFbackground PDF

Definition at line 39 of file ARICHReconstructionPar.h.

40 {
41 m_bkgPDF = bkgPDF;
42 }

◆ setBackgroundPhiPDF()

void setBackgroundPhiPDF ( TF2 *  bkgPhiPDF)
inline

Set background PDF function with flattening phi correction.

Parameters
bkgPhiPDFbackground PDF f(phi, theta)

Definition at line 48 of file ARICHReconstructionPar.h.

49 {
50 m_bkgPhiPDF = bkgPhiPDF;
51 }

◆ setFlatBkgPerPad()

void setFlatBkgPerPad ( const float  flatBkgPerPad)
inline

Set flat background per pad.

Parameters
flatBkgPerPadvalue of flat background per pad

Definition at line 76 of file ARICHReconstructionPar.h.

77 {
78 m_flatBkgPerPad = flatBkgPerPad;
79 }

◆ setParameters()

void setParameters ( const std::vector< float > &  pars)
inline

Set additional cherenkov angle PDF parameters.

Parameters
parsvector of parameters

Definition at line 85 of file ARICHReconstructionPar.h.

86 {
87 m_pars = pars;
88 }

◆ setThcResolution()

void setThcResolution ( TF1 *  thcRes)
inline

Set function for cherenkov angle resolution vs.

momentum

Parameters
thcRescherenkov angle resolution vs. momentum function

Definition at line 58 of file ARICHReconstructionPar.h.

59 {
60 m_thcResolution = thcRes;
61 }

Member Data Documentation

◆ m_aerogelFOM

std::vector<float> m_aerogelFOM
private

aerogel figure of merit (for photon yield)

Definition at line 194 of file ARICHReconstructionPar.h.

◆ m_bkgPDF

TF1* m_bkgPDF = NULL
mutableprivate

background PDF function (function of theta)

Definition at line 191 of file ARICHReconstructionPar.h.

◆ m_bkgPhiPDF

TF2* m_bkgPhiPDF = NULL
mutableprivate

background PDF function with phi correction

Definition at line 190 of file ARICHReconstructionPar.h.

◆ m_flatBkgPerPad

float m_flatBkgPerPad = 0.0
private

expected background hits per pad (treated flat over detector surface)

Definition at line 195 of file ARICHReconstructionPar.h.

◆ m_pars

std::vector<float> m_pars
private

vector of other pdf parameters

Definition at line 193 of file ARICHReconstructionPar.h.

◆ m_thcResolution

TF1* m_thcResolution = NULL
private

cherenkov angle resolution (function of track momentum)

Definition at line 192 of file ARICHReconstructionPar.h.


The documentation for this class was generated from the following files: