test
CMS 3D CMS Logo

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

#include <ECALRecHitResolutionProvider.h>

Public Member Functions

 ECALRecHitResolutionProvider (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 7 of file ECALRecHitResolutionProvider.h.

Constructor & Destructor Documentation

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

Definition at line 9 of file ECALRecHitResolutionProvider.h.

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

9  {
10  noiseTerm_ = iConfig.getParameter<double>("noiseTerm");
11  constantTerm2_ = std::pow(iConfig.getParameter<double>("constantTerm"), 2);
12  noiseTermLowE_ = iConfig.getParameter<double>("noiseTermLowE");
13  corrTermLowE_ = iConfig.getParameter<double>("corrTermLowE");
14  constantTermLowE2_ = std::pow(iConfig.getParameter<double>("constantTermLowE"), 2);
15  threshLowE_ = iConfig.getParameter<double>("threshLowE");
16  threshHighE_ = iConfig.getParameter<double>("threshHighE");
17 
18  resHighE2_ = std::pow((noiseTerm_/threshHighE_), 2) + constantTerm2_;
19  }
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 ECALRecHitResolutionProvider::timeResolution2 ( double  energy)
inline

Definition at line 21 of file ECALRecHitResolutionProvider.h.

References constantTerm2_, constantTermLowE2_, corrTermLowE_, relval_parameters_module::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  {
29  if (corrTermLowE_ > 0.) {// different parametrisation
30  const double res = noiseTermLowE_/energy + corrTermLowE_/(energy*energy);
31  res2 = res*res;
32  }
33  else {
34  const double noiseDivE = noiseTermLowE_/energy;
35  res2 = noiseDivE*noiseDivE + constantTermLowE2_;
36  }
37  }
38  else if (energy < threshHighE_) {
39  const double noiseDivE = noiseTerm_/energy;
40  res2 = noiseDivE*noiseDivE + constantTerm2_;
41  }
42  else // if (energy >=threshHighE_)
43  res2 = resHighE2_;
44 
45  if (res2 > 10000.)
46  return 10000.;
47  return res2;
48 
49  }

Member Data Documentation

double ECALRecHitResolutionProvider::constantTerm2_
private

Definition at line 53 of file ECALRecHitResolutionProvider.h.

Referenced by ECALRecHitResolutionProvider(), and timeResolution2().

double ECALRecHitResolutionProvider::constantTermLowE2_
private

Definition at line 56 of file ECALRecHitResolutionProvider.h.

Referenced by ECALRecHitResolutionProvider(), and timeResolution2().

double ECALRecHitResolutionProvider::corrTermLowE_
private

Definition at line 57 of file ECALRecHitResolutionProvider.h.

Referenced by ECALRecHitResolutionProvider(), and timeResolution2().

double ECALRecHitResolutionProvider::noiseTerm_
private

Definition at line 52 of file ECALRecHitResolutionProvider.h.

Referenced by ECALRecHitResolutionProvider(), and timeResolution2().

double ECALRecHitResolutionProvider::noiseTermLowE_
private

Definition at line 55 of file ECALRecHitResolutionProvider.h.

Referenced by ECALRecHitResolutionProvider(), and timeResolution2().

double ECALRecHitResolutionProvider::resHighE2_
private

Definition at line 62 of file ECALRecHitResolutionProvider.h.

Referenced by ECALRecHitResolutionProvider(), and timeResolution2().

double ECALRecHitResolutionProvider::threshHighE_
private

Definition at line 60 of file ECALRecHitResolutionProvider.h.

Referenced by ECALRecHitResolutionProvider(), and timeResolution2().

double ECALRecHitResolutionProvider::threshLowE_
private

Definition at line 59 of file ECALRecHitResolutionProvider.h.

Referenced by ECALRecHitResolutionProvider(), and timeResolution2().