CMS 3D CMS Logo

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