CMS 3D CMS Logo

HcalSiPMRadiationDamage.cc
Go to the documentation of this file.
2 
3 #include <vector>
4 #include <cmath>
5 
6 //default constructor
8  : temperatureBase_(0.0), temperatureNew_(0.0), intlumiOffset_(0.0), depVsTemp_(0.0), intlumiToNeutrons_(0.0) {}
9 
10 HcalSiPMRadiationDamage::HcalSiPMRadiationDamage(std::vector<double> darkCurrentBase, const edm::ParameterSet& p)
11  : darkCurrentBase_(darkCurrentBase),
12  temperatureBase_(p.getParameter<double>("temperatureBase")),
13  temperatureNew_(p.getParameter<double>("temperatureNew")),
14  intlumiOffset_(p.getParameter<double>("intlumiOffset")),
15  depVsTemp_(p.getParameter<double>("depVsTemp")),
16  intlumiToNeutrons_(p.getParameter<double>("intlumiToNeutrons")),
17  depVsNeutrons_(p.getParameter<std::vector<double>>("depVsNeutrons")) {}
18 
19 //accounts for both lumi dependence and temp dependence
20 double HcalSiPMRadiationDamage::getDarkCurrent(double intlumi, unsigned index) const {
21  intlumi -= intlumiOffset_;
22  if (intlumi <= 0)
23  return darkCurrentBase_.at(index);
24  double darkCurrentNewLumi = darkCurrentBase_.at(index) + depVsNeutrons_.at(index) * (intlumi * intlumiToNeutrons_);
25  double darkCurrentNewTemp = darkCurrentNewLumi * std::exp(depVsTemp_ * (temperatureNew_ - temperatureBase_));
26  return darkCurrentNewTemp;
27 }
std::vector< double > depVsNeutrons_
std::vector< double > darkCurrentBase_
double getDarkCurrent(double intlumi, unsigned index) const