Calibration
Tools
interface
PhiRangeSelector.h
Go to the documentation of this file.
1
#ifndef UtilAlgos_PhiRangeSelector_h
2
#define UtilAlgos_PhiRangeSelector_h
3
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
4
#include "
CommonTools/UtilAlgos/interface/ParameterAdapter.h
"
5
6
struct
PhiRangeSelector
{
7
PhiRangeSelector
(
double
phiMin
,
double
phiMax
) :
phiMin_
(
phiMin
),
phiMax_
(
phiMax
) {}
8
template
<
typename
T>
9
bool
operator()
(
const
T
&
t
)
const
{
10
double
phi
=
t
.phi();
11
return
(
phi
>=
phiMin_
&&
phi
<=
phiMax_
);
12
}
13
14
private
:
15
double
phiMin_
,
phiMax_
;
16
};
17
18
namespace
reco
{
19
namespace
modules
{
20
template
<>
21
struct
ParameterAdapter
<
PhiRangeSelector
> {
22
static
PhiRangeSelector
make
(
const
edm::ParameterSet
&
cfg
,
edm::ConsumesCollector
& iC) {
23
return
PhiRangeSelector
(
cfg
.getParameter<
double
>(
"phiMin"
),
cfg
.getParameter<
double
>(
"phiMax"
));
24
}
25
};
26
}
// namespace modules
27
}
// namespace reco
28
29
#endif
reco::modules::PhiRangeSelector
SingleObjectSelector< reco::GsfElectronCollection, ::PhiRangeSelector > PhiRangeSelector
Definition:
SealModule.cc:21
modules
Definition:
ZHLTMatchFilter.cc:17
PhiRangeSelector::phiMax_
double phiMax_
Definition:
PhiRangeSelector.h:15
PhiRangeSelector::operator()
bool operator()(const T &t) const
Definition:
PhiRangeSelector.h:9
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:45
AlignmentTrackSelector_cfi.phiMin
phiMin
Definition:
AlignmentTrackSelector_cfi.py:18
reco::modules::ParameterAdapter< PhiRangeSelector >::make
static PhiRangeSelector make(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
Definition:
PhiRangeSelector.h:22
AlignmentTrackSelector_cfi.phiMax
phiMax
Definition:
AlignmentTrackSelector_cfi.py:17
OrderedSet.t
t
Definition:
OrderedSet.py:90
edm::ParameterSet
Definition:
ParameterSet.h:36
PhiRangeSelector
Definition:
PhiRangeSelector.h:6
PhiRangeSelector::phiMin_
double phiMin_
Definition:
PhiRangeSelector.h:15
SingleObjectSelectorBase
Definition:
SingleObjectSelector.h:26
looper.cfg
cfg
Definition:
looper.py:297
DDAxes::phi
T
long double T
Definition:
Basic3DVectorLD.h:48
ParameterAdapter.h
ConsumesCollector.h
PhiRangeSelector::PhiRangeSelector
PhiRangeSelector(double phiMin, double phiMax)
Definition:
PhiRangeSelector.h:7
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
reco::modules::ParameterAdapter
Definition:
ParameterAdapter.h:12
Generated for CMSSW Reference Manual by
1.8.16