CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Attributes
HFRecalibration Class Reference

#include <HFRecalibration.h>

Public Member Functions

double getCorr (int ieta, int idepth, double lumi)
 
 HFRecalibration (const edm::ParameterSet &pset)
 
 ~HFRecalibration ()
 

Static Public Attributes

static const unsigned int loweriEtaBin = 30
 
static const unsigned int upperiEtaBin = 41
 

Private Attributes

std::vector< double > HFParsAB [2][2]
 
double reCalFactor = 1.0
 

Detailed Description

Definition at line 20 of file HFRecalibration.h.

Constructor & Destructor Documentation

HFRecalibration::HFRecalibration ( const edm::ParameterSet pset)

Definition at line 16 of file HFRecalibration.cc.

References edm::ParameterSet::getParameter().

17 {
18  //HFParsAB[Depth=0/1][A=0/B=1]
19  HFParsAB[0][0] = pset.getParameter<vecOfDoubles>("HFdepthOneParameterA");
20  HFParsAB[0][1] = pset.getParameter<vecOfDoubles>("HFdepthOneParameterB");
21  HFParsAB[1][0] = pset.getParameter<vecOfDoubles>("HFdepthTwoParameterA");
22  HFParsAB[1][1] = pset.getParameter<vecOfDoubles>("HFdepthTwoParameterB");
23 }
T getParameter(std::string const &) const
std::vector< double > vecOfDoubles
std::vector< double > HFParsAB[2][2]
HFRecalibration::~HFRecalibration ( )

Definition at line 25 of file HFRecalibration.cc.

26 { }

Member Function Documentation

double HFRecalibration::getCorr ( int  ieta,
int  idepth,
double  lumi 
)

Definition at line 28 of file HFRecalibration.cc.

References funct::abs(), csvLumiCalc::lumi, and mathSSE::sqrt().

Referenced by HcalDigitizer::darkening(), and HcalHardcodeCalibrations::produceRespCorrs().

29 {
30 
31  // parameterizations provided by James Wetzel
32 
33  ieta = (abs(ieta) - loweriEtaBin);
34 
35  if (ieta < 0 || ieta > 11 || depth < 1 || depth > 2)
36  {
37  return 1.0;
38  }
39 
40  switch (depth)
41  {
42  case 1:
43  reCalFactor = (1 + HFParsAB[0][0][ieta] * sqrt(lumi) + HFParsAB[0][1][ieta] * lumi);
44 
45  case 2:
46  reCalFactor = (1 + HFParsAB[1][0][ieta] * sqrt(lumi) + HFParsAB[1][1][ieta] * lumi);
47  }
48 
49  return reCalFactor;
50 }
std::vector< double > HFParsAB[2][2]
T sqrt(T t)
Definition: SSEVec.h:18
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const unsigned int loweriEtaBin

Member Data Documentation

std::vector<double> HFRecalibration::HFParsAB[2][2]
private

Definition at line 35 of file HFRecalibration.h.

const unsigned int HFRecalibration::loweriEtaBin = 30
static

Definition at line 29 of file HFRecalibration.h.

double HFRecalibration::reCalFactor = 1.0
private

Definition at line 36 of file HFRecalibration.h.

const unsigned int HFRecalibration::upperiEtaBin = 41
static

Definition at line 30 of file HFRecalibration.h.