Main Page
Namespaces
Classes
Package Documentation
CalibCalorimetry
HcalAlgos
interface
HcalSiPMnonlinearity.h
Go to the documentation of this file.
1
#ifndef CALIBCALORIMETRY_HCALALGOS_HCALSIPMNONLINEARITY_H
2
#define CALIBCALORIMETRY_HCALALGOS_HCALSIPMNONLINEARITY_H 1
3
4
#include <vector>
5
#include <cassert>
6
7
class
HcalSiPMnonlinearity
{
8
public
:
9
HcalSiPMnonlinearity
(
const
std::vector<float>& pars) {
10
assert(pars.size() == 3);
11
c0
= (double)pars[0];
12
b1
= (double)pars[1];
13
a2
= (double)pars[2];
14
}
15
16
// for Reco
17
inline
double
getRecoCorrectionFactor
(
double
inpixelsfired)
const
{
18
double
x
= inpixelsfired;
19
return
(
a2
* x * x +
b1
* x +
c0
);
20
}
21
22
// for Sim
23
int
getPixelsFired
(
int
inpes)
const
;
24
25
private
:
26
// quadratic coefficients
27
double
a2
,
b1
,
c0
;
28
};
29
30
#endif
HcalSiPMnonlinearity::b1
double b1
Definition:
HcalSiPMnonlinearity.h:27
HcalSiPMnonlinearity::c0
double c0
Definition:
HcalSiPMnonlinearity.h:27
HcalSiPMnonlinearity
Definition:
HcalSiPMnonlinearity.h:7
HcalSiPMnonlinearity::getPixelsFired
int getPixelsFired(int inpes) const
Definition:
HcalSiPMnonlinearity.cc:9
HcalSiPMnonlinearity::getRecoCorrectionFactor
double getRecoCorrectionFactor(double inpixelsfired) const
Definition:
HcalSiPMnonlinearity.h:17
DDAxes::x
HcalSiPMnonlinearity::a2
double a2
Definition:
HcalSiPMnonlinearity.h:27
HcalSiPMnonlinearity::HcalSiPMnonlinearity
HcalSiPMnonlinearity(const std::vector< float > &pars)
Definition:
HcalSiPMnonlinearity.h:9
Generated for CMSSW Reference Manual by
1.8.11