CMS 3D CMS Logo

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_, conifer::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
constexpr int pow(int x)
Definition: conifer.h:24

Member Function Documentation

◆ timeResolution2()

double CaloRecHitResolutionProvider::timeResolution2 ( double  energy)
inline

Definition at line 22 of file CaloRecHitResolutionProvider.h.

References constantTerm2_, constantTermLowE2_, corrTermLowE_, hcalRecHitTable_cff::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().