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 }
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HcalSiPMRadiationDamage::getDarkCurrent
double getDarkCurrent(double intlumi, unsigned index) const
Definition: HcalSiPMRadiationDamage.cc:20
HcalSiPMRadiationDamage::HcalSiPMRadiationDamage
HcalSiPMRadiationDamage()
Definition: HcalSiPMRadiationDamage.cc:7
HcalSiPMRadiationDamage::depVsTemp_
double depVsTemp_
Definition: HcalSiPMRadiationDamage.h:29
edm::ParameterSet
Definition: ParameterSet.h:36
HcalSiPMRadiationDamage::temperatureNew_
double temperatureNew_
Definition: HcalSiPMRadiationDamage.h:27
HcalSiPMRadiationDamage::darkCurrentBase_
std::vector< double > darkCurrentBase_
Definition: HcalSiPMRadiationDamage.h:25
HcalSiPMRadiationDamage::depVsNeutrons_
std::vector< double > depVsNeutrons_
Definition: HcalSiPMRadiationDamage.h:31
HcalSiPMRadiationDamage::temperatureBase_
double temperatureBase_
Definition: HcalSiPMRadiationDamage.h:26
HcalSiPMRadiationDamage::intlumiOffset_
double intlumiOffset_
Definition: HcalSiPMRadiationDamage.h:28
std
Definition: JetResolutionObject.h:76
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
HcalSiPMRadiationDamage.h
HcalSiPMRadiationDamage::intlumiToNeutrons_
double intlumiToNeutrons_
Definition: HcalSiPMRadiationDamage.h:30