CondFormats
EcalObjects
src
EcalSCDynamicDPhiParameters.cc
Go to the documentation of this file.
1
#include "
CondFormats/EcalObjects/interface/EcalSCDynamicDPhiParameters.h
"
2
3
const
EcalSCDynamicDPhiParameters::DynamicDPhiParameters
*
EcalSCDynamicDPhiParameters::dynamicDPhiParameters
(
4
double
clustE,
double
absSeedEta)
const
{
5
// assume the collection is lexicographically sorted in ascending DynamicDPhiParams.eMin and ascending DynamicDPhiParams.etaMin
6
// find the matching eMin value
7
auto
it1 =
std::lower_bound
(
dynamicDPhiParametersCollection_
.begin(),
8
dynamicDPhiParametersCollection_
.end(),
9
clustE,
10
[](
const
EcalSCDynamicDPhiParameters::DynamicDPhiParameters
&
params
,
const
double
var
) {
11
return
params
.eMin <
var
;
12
});
13
if
(it1 !=
dynamicDPhiParametersCollection_
.begin()) {
14
--it1;
15
}
16
17
// find the matching eMin and etaMin entry going only up to the sets matching for clustE
18
const
auto
vars
= std::make_pair(it1->eMin, absSeedEta);
19
auto
it2 =
std::lower_bound
(
20
dynamicDPhiParametersCollection_
.begin(),
21
it1 + 1,
22
vars
,
23
[](
const
EcalSCDynamicDPhiParameters::DynamicDPhiParameters
&
params
,
const
std::pair<double, double>
vars
) {
24
return
params
.eMin <
vars
.first ||
params
.etaMin <
vars
.second;
25
});
26
27
return
(it2 !=
dynamicDPhiParametersCollection_
.begin()) ? &*(it2 - 1) :
nullptr
;
28
}
29
30
void
EcalSCDynamicDPhiParameters::print
(std::ostream&
out
)
const
{
31
out
<<
"SC dynamic dPhi parameters:"
<< std::endl;
32
out
<<
" Parameters are binned in "
<<
dynamicDPhiParametersCollection_
.size() <<
" (E, |eta|) regions."
<< std::endl;
33
for
(
const
auto
&
params
:
dynamicDPhiParametersCollection_
) {
34
out
<<
" Parameters for E_min="
<<
params
.eMin <<
" and |eta_min|="
<<
params
.etaMin <<
":"
<< std::endl;
35
out
<<
" yoffset: "
<<
params
.yoffset << std::endl;
36
out
<<
" scale: "
<<
params
.scale << std::endl;
37
out
<<
" xoffset: "
<<
params
.xoffset << std::endl;
38
out
<<
" width: "
<<
params
.width << std::endl;
39
out
<<
" saturation: "
<<
params
.saturation << std::endl;
40
out
<<
" cutoff: "
<<
params
.cutoff << std::endl;
41
}
42
}
CalibrationSummaryClient_cfi.params
params
Definition:
CalibrationSummaryClient_cfi.py:14
EcalSCDynamicDPhiParameters::DynamicDPhiParameters
Definition:
EcalSCDynamicDPhiParameters.h:18
trigObjTnPSource_cfi.var
var
Definition:
trigObjTnPSource_cfi.py:21
vars
vars
Definition:
DeepTauId.cc:163
EcalSCDynamicDPhiParameters::print
void print(std::ostream &) const
Definition:
EcalSCDynamicDPhiParameters.cc:30
pfDeepBoostedJetPreprocessParams_cfi.lower_bound
lower_bound
Definition:
pfDeepBoostedJetPreprocessParams_cfi.py:15
EcalSCDynamicDPhiParameters.h
EcalSCDynamicDPhiParameters::dynamicDPhiParameters
const DynamicDPhiParameters * dynamicDPhiParameters(double clustE, double absSeedEta) const
Definition:
EcalSCDynamicDPhiParameters.cc:3
EcalSCDynamicDPhiParameters::dynamicDPhiParametersCollection_
std::vector< DynamicDPhiParameters > dynamicDPhiParametersCollection_
Definition:
EcalSCDynamicDPhiParameters.h:45
MillePedeFileConverter_cfg.out
out
Definition:
MillePedeFileConverter_cfg.py:31
Generated for CMSSW Reference Manual by
1.8.16