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