Calibration
Tools
interface
IMASelector.h
Go to the documentation of this file.
1
#ifndef UtilAlgos_IMASelector_h
2
#define UtilAlgos_IMASelector_h
3
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
4
#include "
CommonTools/UtilAlgos/interface/ParameterAdapter.h
"
5
#include <iostream>
6
7
struct
IMASelector
{
8
IMASelector
(
double
ESCOPinMin,
9
double
ESeedOPoutMin,
10
double
PinMPoutOPinMin,
11
double
ESCOPinMax,
12
double
ESeedOPoutMax,
13
double
PinMPoutOPinMax,
14
double
EMPoutMin,
15
double
EMPoutMax)
16
:
ESCOPinMin_
(ESCOPinMin),
17
ESeedOPoutMin_
(ESeedOPoutMin),
18
PinMPoutOPinMin_
(PinMPoutOPinMin),
19
ESCOPinMax_
(ESCOPinMax),
20
ESeedOPoutMax_
(ESeedOPoutMax),
21
PinMPoutOPinMax_
(PinMPoutOPinMax),
22
EMPoutMin_
(EMPoutMin),
23
EMPoutMax_
(EMPoutMax) {}
24
25
template
<
typename
T>
26
bool
operator()
(
const
T
&
t
)
const
{
27
double
pin =
t
.trackMomentumAtVtx().R();
28
double
poMpiOpi = (pin -
t
.trackMomentumOut().R()) / pin;
29
double
ESC =
t
.energy();
30
double
pOut
=
t
.trackMomentumOut().R();
31
double
EseedOPout =
t
.eSeedClusterOverPout();
32
double
EoPin =
t
.eSuperClusterOverP();
33
double
EoPout = (ESC) /
pOut
;
34
return
(poMpiOpi >
PinMPoutOPinMin_
&& poMpiOpi < PinMPoutOPinMax_ && EseedOPout >
ESeedOPoutMin_
&&
35
EseedOPout < ESeedOPoutMax_ && EoPin >
ESCOPinMin_
&& EoPin < ESCOPinMax_ && EoPout >
EMPoutMin_
&&
36
EoPout <
EMPoutMax_
);
37
}
38
39
private
:
40
double
ESCOPinMin_
,
ESeedOPoutMin_
,
PinMPoutOPinMin_
;
41
double
ESCOPinMax_
,
ESeedOPoutMax_
,
PinMPoutOPinMax_
;
42
double
EMPoutMin_
,
EMPoutMax_
;
43
};
44
45
namespace
reco
{
46
namespace
modules
{
47
template
<>
48
struct
ParameterAdapter
<
IMASelector
> {
49
static
IMASelector
make
(
const
edm::ParameterSet
&
cfg
,
edm::ConsumesCollector
& iC) {
50
return
IMASelector
(
cfg
.getParameter<
double
>(
"ESCOPinMin"
),
51
cfg
.getParameter<
double
>(
"ESeedOPoutMin"
),
52
cfg
.getParameter<
double
>(
"PinMPoutOPinMin"
),
53
cfg
.getParameter<
double
>(
"ESCOPinMax"
),
54
cfg
.getParameter<
double
>(
"ESeedOPoutMax"
),
55
cfg
.getParameter<
double
>(
"PinMPoutOPinMax"
),
56
cfg
.getParameter<
double
>(
"EMPoutMin"
),
57
cfg
.getParameter<
double
>(
"EMPoutMax"
));
58
}
59
};
60
}
// namespace modules
61
}
// namespace reco
62
63
#endif
modules
Definition:
MuonCleanerBySegments.cc:35
IMASelector::ESeedOPoutMin_
double ESeedOPoutMin_
Definition:
IMASelector.h:40
L1TrackObjectNtupleMaker_cfg.pOut
pOut
Definition:
L1TrackObjectNtupleMaker_cfg.py:172
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:46
IMASelector::ESCOPinMin_
double ESCOPinMin_
Definition:
IMASelector.h:40
IMASelector::EMPoutMin_
double EMPoutMin_
Definition:
IMASelector.h:42
IMASelector::PinMPoutOPinMin_
double PinMPoutOPinMin_
Definition:
IMASelector.h:40
IMASelector::ESeedOPoutMax_
double ESeedOPoutMax_
Definition:
IMASelector.h:41
IMASelector::EMPoutMax_
double EMPoutMax_
Definition:
IMASelector.h:42
edm::ParameterSet
Definition:
ParameterSet.h:47
IMASelector::IMASelector
IMASelector(double ESCOPinMin, double ESeedOPoutMin, double PinMPoutOPinMin, double ESCOPinMax, double ESeedOPoutMax, double PinMPoutOPinMax, double EMPoutMin, double EMPoutMax)
Definition:
IMASelector.h:8
reco::modules::IMASelector
SingleObjectSelector< reco::GsfElectronCollection, ::IMASelector > IMASelector
Definition:
SealModule.cc:24
SingleObjectSelectorBase
Definition:
SingleObjectSelector.h:26
looper.cfg
cfg
Definition:
looper.py:296
T
long double T
Definition:
Basic3DVectorLD.h:48
IMASelector
Definition:
IMASelector.h:7
reco::modules::ParameterAdapter< IMASelector >::make
static IMASelector make(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
Definition:
IMASelector.h:49
IMASelector::PinMPoutOPinMax_
double PinMPoutOPinMax_
Definition:
IMASelector.h:41
ParameterAdapter.h
ConsumesCollector.h
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:644
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
reco::modules::ParameterAdapter
Definition:
ParameterAdapter.h:12
IMASelector::operator()
bool operator()(const T &t) const
Definition:
IMASelector.h:26
IMASelector::ESCOPinMax_
double ESCOPinMax_
Definition:
IMASelector.h:41
Generated for CMSSW Reference Manual by
1.8.16