CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
EGEtScaleSysModifier::UncertFuncV1 Class Reference
Inheritance diagram for EGEtScaleSysModifier::UncertFuncV1:
EGEtScaleSysModifier::UncertFuncBase

Public Member Functions

 UncertFuncV1 (const edm::ParameterSet &conf)
 
float val (const float et) const override
 
 ~UncertFuncV1 () override
 
- Public Member Functions inherited from EGEtScaleSysModifier::UncertFuncBase
 UncertFuncBase ()
 
virtual ~UncertFuncBase ()
 

Private Attributes

float dEt_
 
float dUncert_
 
float highEt_
 
float highEtUncert_
 
float lowEt_
 
float lowEtUncert_
 

Detailed Description

Definition at line 52 of file EGEtScaleSysModifier.cc.

Constructor & Destructor Documentation

◆ UncertFuncV1()

EGEtScaleSysModifier::UncertFuncV1::UncertFuncV1 ( const edm::ParameterSet conf)
inline

Definition at line 54 of file EGEtScaleSysModifier.cc.

55  : lowEt_(conf.getParameter<double>("lowEt")),
56  highEt_(conf.getParameter<double>("highEt")),
57  lowEtUncert_(conf.getParameter<double>("lowEtUncert")),
58  highEtUncert_(conf.getParameter<double>("highEtUncert")),
59  dEt_(highEt_ - lowEt_),
61  if (highEt_ <= lowEt_)
62  throw cms::Exception("ConfigError") << " highEt " << highEt_ << " is not higher than lowEt " << lowEt_;
63  }

References Exception, highEt_, and lowEt_.

◆ ~UncertFuncV1()

EGEtScaleSysModifier::UncertFuncV1::~UncertFuncV1 ( )
inlineoverride

Definition at line 64 of file EGEtScaleSysModifier.cc.

64 {}

Member Function Documentation

◆ val()

float EGEtScaleSysModifier::UncertFuncV1::val ( const float  et) const
inlineoverridevirtual

Implements EGEtScaleSysModifier::UncertFuncBase.

Definition at line 66 of file EGEtScaleSysModifier.cc.

66  {
67  if (et <= lowEt_)
68  return lowEtUncert_;
69  else if (et >= highEt_)
70  return highEtUncert_;
71  else {
72  return (et - lowEt_) * dUncert_ / dEt_ + lowEtUncert_;
73  }
74  }

References dEt_, dUncert_, EgHLTOffHistBins_cfi::et, highEt_, highEtUncert_, lowEt_, and lowEtUncert_.

Member Data Documentation

◆ dEt_

float EGEtScaleSysModifier::UncertFuncV1::dEt_
private

Definition at line 81 of file EGEtScaleSysModifier.cc.

Referenced by val().

◆ dUncert_

float EGEtScaleSysModifier::UncertFuncV1::dUncert_
private

Definition at line 82 of file EGEtScaleSysModifier.cc.

Referenced by val().

◆ highEt_

float EGEtScaleSysModifier::UncertFuncV1::highEt_
private

Definition at line 78 of file EGEtScaleSysModifier.cc.

Referenced by UncertFuncV1(), and val().

◆ highEtUncert_

float EGEtScaleSysModifier::UncertFuncV1::highEtUncert_
private

Definition at line 80 of file EGEtScaleSysModifier.cc.

Referenced by val().

◆ lowEt_

float EGEtScaleSysModifier::UncertFuncV1::lowEt_
private

Definition at line 77 of file EGEtScaleSysModifier.cc.

Referenced by UncertFuncV1(), and val().

◆ lowEtUncert_

float EGEtScaleSysModifier::UncertFuncV1::lowEtUncert_
private

Definition at line 79 of file EGEtScaleSysModifier.cc.

Referenced by val().

EGEtScaleSysModifier::UncertFuncV1::highEtUncert_
float highEtUncert_
Definition: EGEtScaleSysModifier.cc:80
EGEtScaleSysModifier::UncertFuncV1::lowEtUncert_
float lowEtUncert_
Definition: EGEtScaleSysModifier.cc:79
EGEtScaleSysModifier::UncertFuncV1::dUncert_
float dUncert_
Definition: EGEtScaleSysModifier.cc:82
EGEtScaleSysModifier::UncertFuncV1::dEt_
float dEt_
Definition: EGEtScaleSysModifier.cc:81
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
EGEtScaleSysModifier::UncertFuncV1::lowEt_
float lowEt_
Definition: EGEtScaleSysModifier.cc:77
Exception
Definition: hltDiff.cc:246
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EGEtScaleSysModifier::UncertFuncV1::highEt_
float highEt_
Definition: EGEtScaleSysModifier.cc:78