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];
b1
=(double)pars[1];
a2
=(double)pars[2];
12
}
13
14
// for Reco
15
inline
double
getRecoCorrectionFactor
(
double
inpixelsfired)
const
{
16
double
x
=inpixelsfired;
return
(
a2
*x*x +
b1
*x +
c0
);
17
}
18
19
// for Sim
20
int
getPixelsFired
(
int
inpes)
const
;
21
22
private
:
23
// quadratic coefficients
24
double
a2
,
b1
,
c0
;
25
};
26
27
#endif
HcalSiPMnonlinearity::b1
double b1
Definition:
HcalSiPMnonlinearity.h:24
HcalSiPMnonlinearity::c0
double c0
Definition:
HcalSiPMnonlinearity.h:24
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:15
DDAxes::x
HcalSiPMnonlinearity::a2
double a2
Definition:
HcalSiPMnonlinearity.h:24
HcalSiPMnonlinearity::HcalSiPMnonlinearity
HcalSiPMnonlinearity(const std::vector< float > &pars)
Definition:
HcalSiPMnonlinearity.h:9
Generated for CMSSW Reference Manual by
1.8.11