CondFormats
EcalObjects
src
EcalMustacheSCParameters.cc
Go to the documentation of this file.
1
#include "
CondFormats/EcalObjects/interface/EcalMustacheSCParameters.h
"
2
#include <algorithm>
3
4
float
EcalMustacheSCParameters::sqrtLogClustETuning
()
const
{
return
sqrtLogClustETuning_
; }
5
6
const
EcalMustacheSCParameters::ParabolaParameters
*
EcalMustacheSCParameters::parabolaParameters
(
7
float
log10ClustE,
float
absSeedEta)
const
{
8
// assume the collection is lexicographically sorted in ascending ParabolaParameters.log10EMin and ascending ParabolaParameters.etaMin
9
// find the matching log10EMin value
10
auto
it1 =
std::lower_bound
(
parabolaParametersCollection_
.begin(),
11
parabolaParametersCollection_
.end(),
12
log10ClustE,
13
[](
const
EcalMustacheSCParameters::ParabolaParameters
&
params
,
const
double
var
) {
14
return
params
.log10EMin <
var
;
15
});
16
if
(it1 !=
parabolaParametersCollection_
.begin()) {
17
--it1;
18
}
19
20
// find the matching log10EMin and etaMin entry going only up to the sets matching for log10ClustE
21
const
auto
vars
= std::make_pair(it1->log10EMin, absSeedEta);
22
auto
it2 =
std::lower_bound
(
23
parabolaParametersCollection_
.begin(),
24
it1 + 1,
25
vars
,
26
[](
const
EcalMustacheSCParameters::ParabolaParameters
&
params
,
const
std::pair<double, double>
vars
) {
27
return
params
.log10EMin <
vars
.first ||
params
.etaMin <
vars
.second;
28
});
29
30
return
(it2 !=
parabolaParametersCollection_
.begin()) ? &*(it2 - 1) :
nullptr
;
31
}
32
33
void
EcalMustacheSCParameters::print
(std::ostream&
out
)
const
{
34
out
<<
"Mustache SC parameters:"
<< std::endl;
35
out
<<
" sqrtLogClustETuning: "
<<
sqrtLogClustETuning_
<< std::endl;
36
out
<<
" Parabola parameters are binned in "
<<
parabolaParametersCollection_
.size() <<
" (log10(E), |eta|) regions."
37
<< std::endl;
38
for
(
const
auto
&
params
:
parabolaParametersCollection_
) {
39
out
<<
" Parameters for log10(E_min)="
<<
params
.log10EMin <<
" and |eta_min|="
<<
params
.etaMin <<
":"
40
<< std::endl;
41
42
out
<<
" pUp:"
<< std::endl;
43
for
(
size_t
i
= 0;
i
<
params
.pUp.size(); ++
i
) {
44
out
<<
" ["
<<
i
<<
"]: "
<<
params
.pUp[
i
] << std::endl;
45
}
46
47
out
<<
" pLow:"
<< std::endl;
48
for
(
size_t
i
= 0;
i
<
params
.pLow.size(); ++
i
) {
49
out
<<
" ["
<<
i
<<
"]: "
<<
params
.pLow[
i
] << std::endl;
50
}
51
52
out
<<
" w0Up:"
<< std::endl;
53
for
(
size_t
i
= 0;
i
<
params
.w0Up.size(); ++
i
) {
54
out
<<
" ["
<<
i
<<
"]: "
<<
params
.w0Up[
i
] << std::endl;
55
}
56
57
out
<<
" w1Up:"
<< std::endl;
58
for
(
size_t
i
= 0;
i
<
params
.w1Up.size(); ++
i
) {
59
out
<<
" ["
<<
i
<<
"]: "
<<
params
.w1Up[
i
] << std::endl;
60
}
61
62
out
<<
" w0Low:"
<< std::endl;
63
for
(
size_t
i
= 0;
i
<
params
.w0Low.size(); ++
i
) {
64
out
<<
" ["
<<
i
<<
"]: "
<<
params
.w0Low[
i
] << std::endl;
65
}
66
67
out
<<
" w1Low:"
<< std::endl;
68
for
(
size_t
i
= 0;
i
<
params
.w1Low.size(); ++
i
) {
69
out
<<
" ["
<<
i
<<
"]: "
<<
params
.w1Low[
i
] << std::endl;
70
}
71
}
72
}
mps_fire.i
i
Definition:
mps_fire.py:428
CalibrationSummaryClient_cfi.params
params
Definition:
CalibrationSummaryClient_cfi.py:14
trigObjTnPSource_cfi.var
var
Definition:
trigObjTnPSource_cfi.py:21
EcalMustacheSCParameters::print
void print(std::ostream &) const
Definition:
EcalMustacheSCParameters.cc:33
vars
vars
Definition:
DeepTauId.cc:164
EcalMustacheSCParameters::parabolaParameters
const ParabolaParameters * parabolaParameters(float log10ClustE, float absSeedEta) const
Definition:
EcalMustacheSCParameters.cc:6
pfDeepBoostedJetPreprocessParams_cfi.lower_bound
lower_bound
Definition:
pfDeepBoostedJetPreprocessParams_cfi.py:15
EcalMustacheSCParameters::sqrtLogClustETuning
float sqrtLogClustETuning() const
Definition:
EcalMustacheSCParameters.cc:4
EcalMustacheSCParameters.h
EcalMustacheSCParameters::sqrtLogClustETuning_
float sqrtLogClustETuning_
Definition:
EcalMustacheSCParameters.h:46
MillePedeFileConverter_cfg.out
out
Definition:
MillePedeFileConverter_cfg.py:31
EcalMustacheSCParameters::parabolaParametersCollection_
std::vector< ParabolaParameters > parabolaParametersCollection_
Definition:
EcalMustacheSCParameters.h:49
EcalMustacheSCParameters::ParabolaParameters
Definition:
EcalMustacheSCParameters.h:18
Generated for CMSSW Reference Manual by
1.8.16