Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Calibration
TkAlCaRecoProducers
plugins
CalibrationTrackSelectorModule.cc
Go to the documentation of this file.
1
2
#include "
CommonTools/UtilAlgos/interface/ObjectSelectorStream.h
"
3
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
4
#include "
FWCore/Framework/interface/MakerMacros.h
"
5
6
// the selectores used to select the tracks
7
#include "
Calibration/TkAlCaRecoProducers/interface/CalibrationTrackSelector.h
"
8
9
// the following include is necessary to clone all track branches
10
// including recoTrackExtras and TrackingRecHitsOwned.
11
// if you remove it the code will compile, but the cloned
12
// tracks have only the recoTracks branch!
13
#include "
CommonTools/RecoAlgos/interface/TrackSelector.h
"
14
15
struct
SiStripCalTrackConfigSelector
{
16
typedef
std::vector<const reco::Track *>
container
;
17
typedef
container::const_iterator
const_iterator
;
18
typedef
reco::TrackCollection
collection
;
19
20
SiStripCalTrackConfigSelector
(
const
edm::ParameterSet
&
cfg
,
edm::ConsumesCollector
&&iC) :
theBaseSelector
(
cfg
) {
21
// TODO Wrap the BaseSelector into its own PSet
22
theBaseSwitch
=
cfg
.getParameter<
bool
>(
"applyBasicCuts"
) ||
cfg
.getParameter<
bool
>(
"minHitsPerSubDet"
) ||
23
cfg
.getParameter<
bool
>(
"applyNHighestPt"
) ||
cfg
.getParameter<
bool
>(
"applyMultiplicityFilter"
);
24
}
25
26
const_iterator
begin
()
const
{
return
theSelectedTracks
.begin(); }
27
const_iterator
end
()
const
{
return
theSelectedTracks
.end(); }
28
size_t
size
()
const
{
return
theSelectedTracks
.size(); }
29
30
void
select
(
const
edm::Handle<reco::TrackCollection>
&
c
,
const
edm::Event
&evt,
const
edm::EventSetup
&
/*dummy*/
) {
31
theSelectedTracks
.clear();
32
for
(reco::TrackCollection::const_iterator
i
=
c
.product()->begin();
i
!=
c
.product()->end(); ++
i
) {
33
theSelectedTracks
.push_back(&*
i
);
34
}
35
// might add EvetSetup to the select(...) method of the Selectors
36
if
(
theBaseSwitch
)
37
theSelectedTracks
=
theBaseSelector
.
select
(
theSelectedTracks
, evt);
38
}
39
40
private
:
41
container
theSelectedTracks
;
42
43
bool
theBaseSwitch
;
44
CalibrationTrackSelector
theBaseSelector
;
45
};
46
47
typedef
ObjectSelectorStream<SiStripCalTrackConfigSelector>
CalibrationTrackSelectorModule
;
48
49
DEFINE_FWK_MODULE
(
CalibrationTrackSelectorModule
);
SiStripCalTrackConfigSelector::theSelectedTracks
container theSelectedTracks
Definition:
CalibrationTrackSelectorModule.cc:41
mps_fire.i
i
Definition:
mps_fire.py:428
ObjectSelectorStream.h
SiStripCalTrackConfigSelector::select
void select(const edm::Handle< reco::TrackCollection > &c, const edm::Event &evt, const edm::EventSetup &)
Definition:
CalibrationTrackSelectorModule.cc:30
TrackSelector.h
SiStripCalTrackConfigSelector::size
size_t size() const
Definition:
CalibrationTrackSelectorModule.cc:28
SiStripCalTrackConfigSelector::end
const_iterator end() const
Definition:
CalibrationTrackSelectorModule.cc:27
SiStripCalTrackConfigSelector::container
std::vector< const reco::Track * > container
Definition:
CalibrationTrackSelectorModule.cc:16
edm::Handle< reco::TrackCollection >
CalibrationTrackSelectorModule
ObjectSelectorStream< SiStripCalTrackConfigSelector > CalibrationTrackSelectorModule
Definition:
CalibrationTrackSelectorModule.cc:47
SiStripCalTrackConfigSelector::theBaseSwitch
bool theBaseSwitch
Definition:
CalibrationTrackSelectorModule.cc:43
MakerMacros.h
CalibrationTrackSelector.h
SiStripCalTrackConfigSelector::collection
reco::TrackCollection collection
Definition:
CalibrationTrackSelectorModule.cc:18
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
edm::ParameterSet
Definition:
ParameterSet.h:47
SiStripCalTrackConfigSelector::const_iterator
container::const_iterator const_iterator
Definition:
CalibrationTrackSelectorModule.cc:17
ObjectSelectorStream
edm::EventSetup
Definition:
EventSetup.h:58
SiStripCalTrackConfigSelector::SiStripCalTrackConfigSelector
SiStripCalTrackConfigSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
Definition:
CalibrationTrackSelectorModule.cc:20
SiStripCalTrackConfigSelector::theBaseSelector
CalibrationTrackSelector theBaseSelector
Definition:
CalibrationTrackSelectorModule.cc:44
looper.cfg
cfg
Definition:
looper.py:296
SiStripCalTrackConfigSelector::begin
const_iterator begin() const
Definition:
CalibrationTrackSelectorModule.cc:26
CalibrationTrackSelector::select
Tracks select(const Tracks &tracks, const edm::Event &evt) const
select tracks
Definition:
CalibrationTrackSelector.cc:92
ConsumesCollector.h
CalibrationTrackSelector
Definition:
CalibrationTrackSelector.h:15
c
auto & c
Definition:
CAHitNtupletGeneratorKernelsImpl.h:56
SiStripCalTrackConfigSelector
Definition:
CalibrationTrackSelectorModule.cc:15
edm::Event
Definition:
Event.h:73
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition:
TrackFwd.h:14
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
Generated for CMSSW Reference Manual by
1.8.16