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 
11 HcalSiPMRadiationDamage::HcalSiPMRadiationDamage(std::vector<double> darkCurrentBase, const edm::ParameterSet & p) :
12  darkCurrentBase_(darkCurrentBase),
13  temperatureBase_(p.getParameter<double>("temperatureBase")),
14  temperatureNew_(p.getParameter<double>("temperatureNew")),
15  intlumiOffset_(p.getParameter<double>("intlumiOffset")),
16  depVsTemp_(p.getParameter<double>("depVsTemp")),
17  intlumiToNeutrons_(p.getParameter<double>("intlumiToNeutrons")),
18  depVsNeutrons_(p.getParameter<std::vector<double>>("depVsNeutrons"))
19 {}
20 
21 //accounts for both lumi dependence and temp dependence
22 double HcalSiPMRadiationDamage::getDarkCurrent(double intlumi, unsigned index) const {
23  intlumi -= intlumiOffset_;
24  if(intlumi<=0) return darkCurrentBase_.at(index);
25  double darkCurrentNewLumi = darkCurrentBase_.at(index) + depVsNeutrons_.at(index)*(intlumi*intlumiToNeutrons_);
26  double darkCurrentNewTemp = darkCurrentNewLumi*std::exp(depVsTemp_*(temperatureNew_ - temperatureBase_));
27  return darkCurrentNewTemp;
28 }
std::vector< double > depVsNeutrons_
std::vector< double > darkCurrentBase_
double getDarkCurrent(double intlumi, unsigned index) const