Belle II Software development
CDCDedxSigmaPred.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <framework/database/DBObjPtr.h>
12
13#include <cdc/utilities/CDCDedxWidgetSigma.h>
14#include <cdc/dbobjects/CDCDedxMeanPars.h>
15#include <cdc/dbobjects/CDCDedxSigmaPars.h>
16
17#include <vector>
18
19#include <memory>
20#include <cmath>
21
22#include <string>
23#include <iostream>
24#include <fstream>
25
26namespace Belle2 {
37
38 public:
39
43 void setParameters(std::string infile);
44
48 void setParameters();
49
53 void printParameters(std::string infile);
54
58 double getSigma(double dedx, double nhit, double cos, double timereso);
59
63 double nhitPrediction(double nhit);
64
68 double ionzPrediction(double dedx);
69
73 double cosPrediction(double cos);
74
78 double getDedxPars(int i) { return m_dedxpars[i]; };
79
83 void setDedxPars(int i, double val) { m_dedxpars[i] = val; };
84
88 double getNHitPars(int i) { return m_nhitpars[i]; };
89
93 void setNHitPars(int i, double val) { m_nhitpars[i] = val; };
94
98 double getCosPars(int i) { return m_cospars[i]; };
99
103 void setCosPars(int i, double val) { m_cospars[i] = val; };
104
105 private:
106
107 double m_dedxpars[2];
108 double m_cospars[10];
109 double m_nhitpars[5];
113 };
115} // Belle2 namespace
Class to hold the prediction of resolution depending dE/dx, nhit, and cos(theta)
double ionzPrediction(double dedx)
Return sigma from the ionization parameterization.
void setParameters()
set the parameters
const DBObjPtr< CDCDedxSigmaPars > m_DBSigmaPars
db object for dE/dx resolution parameters
double getSigma(double dedx, double nhit, double cos, double timereso)
Return the predicted resolution depending on dE/dx, nhit, and cos(theta)
double cosPrediction(double cos)
Return sigma from the cos parameterization.
double m_dedxpars[2]
parameters for sigma vs.
void setNHitPars(int i, double val)
set the nhit parameters
double getCosPars(int i)
get the cos(theta) parameters
double getDedxPars(int i)
get the dedx parameters
void setDedxPars(int i, double val)
set the dedx parameters
double nhitPrediction(double nhit)
Return sigma from the nhit parameterization.
void setCosPars(int i, double val)
set the cos(theta) parameters
void printParameters(std::string infile)
write the parameters in file
double m_cospars[10]
parameters for sigma vs.
double getNHitPars(int i)
get the nhit parameters
double m_nhitpars[5]
parameters for sigma vs.
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Abstract base class for different kinds of events.