src
RecoParticleFlow
PFClusterProducer
interface
CaloRecHitResolutionProvider.h
Go to the documentation of this file.
1
#ifndef RecoParticleFlow_PFClusterProducer_CaloRecHitResolutionProvider_h
2
#define RecoParticleFlow_PFClusterProducer_CaloRecHitResolutionProvider_h
3
4
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
5
6
#include <cmath>
7
8
class
CaloRecHitResolutionProvider
{
9
public
:
10
CaloRecHitResolutionProvider
(
const
edm::ParameterSet
& iConfig) {
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
}
21
22
double
timeResolution2
(
double
energy
) {
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
}
45
46
private
:
47
double
noiseTerm_
;
// Noise term
48
double
constantTerm2_
;
// Constant term
49
50
double
noiseTermLowE_
;
// Noise term for low E
51
double
constantTermLowE2_
;
// Constant term for low E
52
double
corrTermLowE_
;
// 2nd term for low E, different parametrisation
53
54
double
threshLowE_
;
// different parametrisation below
55
double
threshHighE_
;
// resolution constant above
56
57
double
resHighE2_
;
// precompute res at high E
58
};
59
60
#endif
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:307
CaloRecHitResolutionProvider::noiseTermLowE_
double noiseTermLowE_
Definition:
CaloRecHitResolutionProvider.h:50
CaloRecHitResolutionProvider::threshLowE_
double threshLowE_
Definition:
CaloRecHitResolutionProvider.h:54
CaloRecHitResolutionProvider::threshHighE_
double threshHighE_
Definition:
CaloRecHitResolutionProvider.h:55
CaloRecHitResolutionProvider::constantTermLowE2_
double constantTermLowE2_
Definition:
CaloRecHitResolutionProvider.h:51
CaloRecHitResolutionProvider::CaloRecHitResolutionProvider
CaloRecHitResolutionProvider(const edm::ParameterSet &iConfig)
Definition:
CaloRecHitResolutionProvider.h:10
hcalRecHitTable_cff.energy
energy
Definition:
hcalRecHitTable_cff.py:13
res
Definition:
Electron.h:6
CaloRecHitResolutionProvider
Definition:
CaloRecHitResolutionProvider.h:8
ParameterSet.h
CaloRecHitResolutionProvider::resHighE2_
double resHighE2_
Definition:
CaloRecHitResolutionProvider.h:57
CaloRecHitResolutionProvider::constantTerm2_
double constantTerm2_
Definition:
CaloRecHitResolutionProvider.h:48
CaloRecHitResolutionProvider::corrTermLowE_
double corrTermLowE_
Definition:
CaloRecHitResolutionProvider.h:52
edm::ParameterSet
Definition:
ParameterSet.h:48
CaloRecHitResolutionProvider::timeResolution2
double timeResolution2(double energy)
Definition:
CaloRecHitResolutionProvider.h:22
CaloRecHitResolutionProvider::noiseTerm_
double noiseTerm_
Definition:
CaloRecHitResolutionProvider.h:47
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition:
Power.h:29
Generated for CMSSW Reference Manual by
1.8.14