CMS 3D CMS Logo

HcalHardcodeParameters.cc
Go to the documentation of this file.
2 
3 HcalHardcodeParameters::HcalHardcodeParameters(double pedestal, double pedestalWidth, const std::vector<double>& gain, const std::vector<double>& gainWidth, int zsThreshold,
4  int qieType, const std::vector<double>& qieOffset, const std::vector<double>& qieSlope, int mcShape, int recoShape,
5  double photoelectronsToAnalog, const std::vector<double>& darkCurrent)
6 : pedestal_(pedestal),
7  pedestalWidth_(pedestalWidth),
8  gain_(gain),
9  gainWidth_(gainWidth),
10  zsThreshold_(zsThreshold),
11  qieType_(qieType),
12  qieOffset_(qieOffset),
13  qieSlope_(qieSlope),
14  mcShape_(mcShape),
15  recoShape_(recoShape),
16  photoelectronsToAnalog_(photoelectronsToAnalog),
17  darkCurrent_(darkCurrent),
18  doSipmRadiationDamage_(false)
19 {
20 }
21 
23 : pedestal_(p.getParameter<double>("pedestal")),
24  pedestalWidth_(p.getParameter<double>("pedestalWidth")),
25  gain_(p.getParameter<std::vector<double>>("gain")),
26  gainWidth_(p.getParameter<std::vector<double>>("gainWidth")),
27  zsThreshold_(p.getParameter<int>("zsThreshold")),
28  qieType_(p.getParameter<int>("qieType")),
29  qieOffset_(p.getParameter<std::vector<double>>("qieOffset")),
30  qieSlope_(p.getParameter<std::vector<double>>("qieSlope")),
31  mcShape_(p.getParameter<int>("mcShape")),
32  recoShape_(p.getParameter<int>("recoShape")),
33  photoelectronsToAnalog_(p.getParameter<double>("photoelectronsToAnalog")),
34  darkCurrent_(p.getParameter<std::vector<double>>("darkCurrent")),
35  doSipmRadiationDamage_(p.getParameter<bool>("doRadiationDamage"))
36 {
38 }
39 
40 const double HcalHardcodeParameters::darkCurrent(unsigned index, double intlumi) const {
41  if(doSipmRadiationDamage_ and intlumi>0) return sipmRadiationDamage_.getDarkCurrent(intlumi,index);
42  return darkCurrent_.at(index);
43 }
44 
T getParameter(std::string const &) const
std::vector< double > qieSlope_
std::vector< double > gainWidth_
HcalSiPMRadiationDamage sipmRadiationDamage_
std::vector< double > darkCurrent_
std::vector< double > gain_
double getDarkCurrent(double intlumi, unsigned index) const
const double darkCurrent(unsigned index, double intlumi) const
static const char gain_[]
std::vector< double > qieOffset_