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 ( 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 
19  resHighE2_ = std::pow((noiseTerm_/threshHighE_), 2) + constantTerm2_;
20  }
T getParameter(std::string const &) const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40

Member Function Documentation

double CaloRecHitResolutionProvider::timeResolution2 ( double  energy)
inline

Definition at line 22 of file CaloRecHitResolutionProvider.h.

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

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

Member Data Documentation

double CaloRecHitResolutionProvider::constantTerm2_
private

Definition at line 54 of file CaloRecHitResolutionProvider.h.

Referenced by CaloRecHitResolutionProvider(), and timeResolution2().

double CaloRecHitResolutionProvider::constantTermLowE2_
private

Definition at line 57 of file CaloRecHitResolutionProvider.h.

Referenced by CaloRecHitResolutionProvider(), and timeResolution2().

double CaloRecHitResolutionProvider::corrTermLowE_
private

Definition at line 58 of file CaloRecHitResolutionProvider.h.

Referenced by CaloRecHitResolutionProvider(), and timeResolution2().

double CaloRecHitResolutionProvider::noiseTerm_
private

Definition at line 53 of file CaloRecHitResolutionProvider.h.

Referenced by CaloRecHitResolutionProvider(), and timeResolution2().

double CaloRecHitResolutionProvider::noiseTermLowE_
private

Definition at line 56 of file CaloRecHitResolutionProvider.h.

Referenced by CaloRecHitResolutionProvider(), and timeResolution2().

double CaloRecHitResolutionProvider::resHighE2_
private

Definition at line 63 of file CaloRecHitResolutionProvider.h.

Referenced by CaloRecHitResolutionProvider(), and timeResolution2().

double CaloRecHitResolutionProvider::threshHighE_
private

Definition at line 61 of file CaloRecHitResolutionProvider.h.

Referenced by CaloRecHitResolutionProvider(), and timeResolution2().

double CaloRecHitResolutionProvider::threshLowE_
private

Definition at line 60 of file CaloRecHitResolutionProvider.h.

Referenced by CaloRecHitResolutionProvider(), and timeResolution2().