CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions | Private Attributes
CaloRecHitResolutionProvider Class Reference

#include <CaloRecHitResolutionProvider.h>

Public Member Functions

 CaloRecHitResolutionProvider (const edm::ParameterSet &iConfig)
 
double timeResolution2 (double energy)
 

Private Attributes

double constantTerm2_
 
double constantTermLowE2_
 
double corrTermLowE_
 
double noiseTerm_
 
double noiseTermLowE_
 
double resHighE2_
 
double threshHighE_
 
double threshLowE_
 

Detailed Description

Definition at line 8 of file CaloRecHitResolutionProvider.h.

Constructor & Destructor Documentation

◆ CaloRecHitResolutionProvider()

CaloRecHitResolutionProvider::CaloRecHitResolutionProvider ( const edm::ParameterSet iConfig)
inline

Definition at line 10 of file CaloRecHitResolutionProvider.h.

References constantTerm2_, constantTermLowE2_, corrTermLowE_, edm::ParameterSet::getParameter(), noiseTerm_, noiseTermLowE_, funct::pow(), resHighE2_, threshHighE_, and threshLowE_.

10  {
11  noiseTerm_ = iConfig.getParameter<double>("noiseTerm");
12  constantTerm2_ = std::pow(iConfig.getParameter<double>("constantTerm"), 2);
13  noiseTermLowE_ = iConfig.getParameter<double>("noiseTermLowE");
14  corrTermLowE_ = iConfig.getParameter<double>("corrTermLowE");
15  constantTermLowE2_ = std::pow(iConfig.getParameter<double>("constantTermLowE"), 2);
16  threshLowE_ = iConfig.getParameter<double>("threshLowE");
17  threshHighE_ = iConfig.getParameter<double>("threshHighE");
18 
20  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

Member Function Documentation

◆ timeResolution2()

double CaloRecHitResolutionProvider::timeResolution2 ( double  energy)
inline

Definition at line 22 of file CaloRecHitResolutionProvider.h.

References constantTerm2_, constantTermLowE2_, corrTermLowE_, HCALHighEnergyHPDFilter_cfi::energy, noiseTerm_, noiseTermLowE_, resHighE2_, threshHighE_, and threshLowE_.

22  {
23  double res2 = 10000.;
24 
25  if (energy <= 0.)
26  return res2;
27  else if (energy < threshLowE_) {
28  if (corrTermLowE_ > 0.) { // different parametrisation
29  const double res = noiseTermLowE_ / energy + corrTermLowE_ / (energy * energy);
30  res2 = res * res;
31  } else {
32  const double noiseDivE = noiseTermLowE_ / energy;
33  res2 = noiseDivE * noiseDivE + constantTermLowE2_;
34  }
35  } else if (energy < threshHighE_) {
36  const double noiseDivE = noiseTerm_ / energy;
37  res2 = noiseDivE * noiseDivE + constantTerm2_;
38  } else // if (energy >=threshHighE_)
39  res2 = resHighE2_;
40 
41  if (res2 > 10000.)
42  return 10000.;
43  return res2;
44  }
Definition: Electron.h:6

Member Data Documentation

◆ constantTerm2_

double CaloRecHitResolutionProvider::constantTerm2_
private

Definition at line 48 of file CaloRecHitResolutionProvider.h.

Referenced by CaloRecHitResolutionProvider(), and timeResolution2().

◆ constantTermLowE2_

double CaloRecHitResolutionProvider::constantTermLowE2_
private

Definition at line 51 of file CaloRecHitResolutionProvider.h.

Referenced by CaloRecHitResolutionProvider(), and timeResolution2().

◆ corrTermLowE_

double CaloRecHitResolutionProvider::corrTermLowE_
private

Definition at line 52 of file CaloRecHitResolutionProvider.h.

Referenced by CaloRecHitResolutionProvider(), and timeResolution2().

◆ noiseTerm_

double CaloRecHitResolutionProvider::noiseTerm_
private

Definition at line 47 of file CaloRecHitResolutionProvider.h.

Referenced by CaloRecHitResolutionProvider(), and timeResolution2().

◆ noiseTermLowE_

double CaloRecHitResolutionProvider::noiseTermLowE_
private

Definition at line 50 of file CaloRecHitResolutionProvider.h.

Referenced by CaloRecHitResolutionProvider(), and timeResolution2().

◆ resHighE2_

double CaloRecHitResolutionProvider::resHighE2_
private

Definition at line 57 of file CaloRecHitResolutionProvider.h.

Referenced by CaloRecHitResolutionProvider(), and timeResolution2().

◆ threshHighE_

double CaloRecHitResolutionProvider::threshHighE_
private

Definition at line 55 of file CaloRecHitResolutionProvider.h.

Referenced by CaloRecHitResolutionProvider(), and timeResolution2().

◆ threshLowE_

double CaloRecHitResolutionProvider::threshLowE_
private

Definition at line 54 of file CaloRecHitResolutionProvider.h.

Referenced by CaloRecHitResolutionProvider(), and timeResolution2().