RecoTracker
ConversionSeedGenerators
plugins
TrackChargeSelector.h
Go to the documentation of this file.
1
#ifndef TrackingForConversion_TrackChargeSelector_h
2
#define TrackingForConversion_TrackChargeSelector_h
3
/* \class TrackChargeSelector
4
*
5
* \author Domenico Giordano, CERN
6
*
7
*/
8
9
struct
TrackChargeSelector
{
10
TrackChargeSelector
(
int
charge
) :
charge_
(
charge
) {}
11
template
<
typename
T>
12
bool
operator()
(
const
T
&
t
)
const
{
13
return
(
t
.charge() ==
charge_
);
14
}
15
16
private
:
17
int
charge_
;
18
};
19
20
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
21
#include "
CommonTools/UtilAlgos/interface/ParameterAdapter.h
"
22
23
namespace
reco
{
24
namespace
modules
{
25
26
template
<>
27
struct
ParameterAdapter
<
TrackChargeSelector
> {
28
static
TrackChargeSelector
make
(
const
edm::ParameterSet
&
cfg
,
edm::ConsumesCollector
& iC) {
29
return
TrackChargeSelector
(
cfg
.getParameter<
int
>(
"charge"
));
30
}
31
};
32
33
}
// namespace modules
34
}
// namespace reco
35
36
#endif
reco::modules::ParameterAdapter< TrackChargeSelector >::make
static TrackChargeSelector make(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
Definition:
TrackChargeSelector.h:28
TrackChargeSelector
Definition:
TrackChargeSelector.h:9
modules
Definition:
MuonCleanerBySegments.cc:35
TrackChargeSelector::operator()
bool operator()(const T &t) const
Definition:
TrackChargeSelector.h:12
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:45
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition:
ALCARECOTkAlJpsiMuMu_cff.py:47
reco::modules::TrackChargeSelector
SingleObjectSelector< TrackCollection, ::TrackChargeSelector > TrackChargeSelector
Definition:
TrackChargeSelector.cc:9
edm::ParameterSet
Definition:
ParameterSet.h:47
TrackChargeSelector::charge_
int charge_
Definition:
TrackChargeSelector.h:17
SingleObjectSelectorBase
Definition:
SingleObjectSelector.h:26
looper.cfg
cfg
Definition:
looper.py:297
T
long double T
Definition:
Basic3DVectorLD.h:48
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
TrackChargeSelector::TrackChargeSelector
TrackChargeSelector(int charge)
Definition:
TrackChargeSelector.h:10
Generated for CMSSW Reference Manual by
1.8.16