Alignment
CommonAlignmentProducer
plugins
AlignmentCSCBeamHaloSelectorModule.cc
Go to the documentation of this file.
1
2
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
3
#include "
FWCore/Framework/interface/MakerMacros.h
"
4
#include "
CommonTools/UtilAlgos/interface/ObjectSelectorStream.h
"
5
#include "
Alignment/CommonAlignmentProducer/interface/AlignmentCSCBeamHaloSelector.h
"
6
7
// the following include is necessary to clone all track branches
8
// including recoTrackExtras and TrackingRecHitsOwned.
9
// if you remove it the code will compile, but the cloned
10
// tracks have only the recoTracks branch!
11
#include "
CommonTools/RecoAlgos/interface/TrackSelector.h
"
12
13
struct
CSCBeamHaloConfigSelector
{
14
typedef
std::vector<const reco::Track *>
container
;
15
typedef
container::const_iterator
const_iterator
;
16
typedef
reco::TrackCollection
collection
;
17
18
CSCBeamHaloConfigSelector
(
const
edm::ParameterSet
&
cfg
,
edm::ConsumesCollector
&&iC)
19
:
CSCBeamHaloConfigSelector
(
cfg
, iC) {}
20
CSCBeamHaloConfigSelector
(
const
edm::ParameterSet
&
cfg
,
edm::ConsumesCollector
&iC) :
theSelector
(
cfg
, iC) {}
21
22
const_iterator
begin
()
const
{
return
selected_
.begin(); }
23
const_iterator
end
()
const
{
return
selected_
.end(); }
24
size_t
size
()
const
{
return
selected_
.size(); }
25
26
void
select
(
const
edm::Handle<reco::TrackCollection>
&
c
,
const
edm::Event
&evt,
const
edm::EventSetup
&
/*dummy*/
) {
27
all_
.clear();
28
selected_
.clear();
29
for
(collection::const_iterator
i
=
c
.product()->begin(), iE =
c
.product()->end();
i
!= iE; ++
i
) {
30
all_
.push_back(&*
i
);
31
}
32
selected_
=
theSelector
.
select
(
all_
, evt);
// might add dummy...
33
}
34
35
private
:
36
container
all_
,
selected_
;
37
AlignmentCSCBeamHaloSelector
theSelector
;
38
};
39
40
typedef
ObjectSelectorStream<CSCBeamHaloConfigSelector>
AlignmentCSCBeamHaloSelectorModule
;
41
42
DEFINE_FWK_MODULE
(
AlignmentCSCBeamHaloSelectorModule
);
mps_fire.i
i
Definition:
mps_fire.py:428
ObjectSelectorStream.h
TrackSelector.h
CSCBeamHaloConfigSelector::const_iterator
container::const_iterator const_iterator
Definition:
AlignmentCSCBeamHaloSelectorModule.cc:15
edm::Handle< reco::TrackCollection >
CSCBeamHaloConfigSelector::end
const_iterator end() const
Definition:
AlignmentCSCBeamHaloSelectorModule.cc:23
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
AlignmentCSCBeamHaloSelector
Definition:
AlignmentCSCBeamHaloSelector.h:15
CSCBeamHaloConfigSelector
Definition:
AlignmentCSCBeamHaloSelectorModule.cc:13
CSCBeamHaloConfigSelector::CSCBeamHaloConfigSelector
CSCBeamHaloConfigSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
Definition:
AlignmentCSCBeamHaloSelectorModule.cc:18
edm::ParameterSet
Definition:
ParameterSet.h:47
CSCBeamHaloConfigSelector::theSelector
AlignmentCSCBeamHaloSelector theSelector
Definition:
AlignmentCSCBeamHaloSelectorModule.cc:37
CSCBeamHaloConfigSelector::CSCBeamHaloConfigSelector
CSCBeamHaloConfigSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
Definition:
AlignmentCSCBeamHaloSelectorModule.cc:20
CSCBeamHaloConfigSelector::selected_
container selected_
Definition:
AlignmentCSCBeamHaloSelectorModule.cc:36
CSCBeamHaloConfigSelector::container
std::vector< const reco::Track * > container
Definition:
AlignmentCSCBeamHaloSelectorModule.cc:14
ObjectSelectorStream
CSCBeamHaloConfigSelector::begin
const_iterator begin() const
Definition:
AlignmentCSCBeamHaloSelectorModule.cc:22
edm::EventSetup
Definition:
EventSetup.h:57
AlignmentCSCBeamHaloSelectorModule
ObjectSelectorStream< CSCBeamHaloConfigSelector > AlignmentCSCBeamHaloSelectorModule
Definition:
AlignmentCSCBeamHaloSelectorModule.cc:40
AlignmentCSCBeamHaloSelector::select
Tracks select(const Tracks &tracks, const edm::Event &iEvent) const
select tracks
Definition:
AlignmentCSCBeamHaloSelector.cc:28
HltBtagPostValidation_cff.c
c
Definition:
HltBtagPostValidation_cff.py:31
looper.cfg
cfg
Definition:
looper.py:297
CSCBeamHaloConfigSelector::all_
container all_
Definition:
AlignmentCSCBeamHaloSelectorModule.cc:36
CSCBeamHaloConfigSelector::select
void select(const edm::Handle< reco::TrackCollection > &c, const edm::Event &evt, const edm::EventSetup &)
Definition:
AlignmentCSCBeamHaloSelectorModule.cc:26
CSCBeamHaloConfigSelector::collection
reco::TrackCollection collection
Definition:
AlignmentCSCBeamHaloSelectorModule.cc:16
ConsumesCollector.h
edm::Event
Definition:
Event.h:73
CSCBeamHaloConfigSelector::size
size_t size() const
Definition:
AlignmentCSCBeamHaloSelectorModule.cc:24
AlignmentCSCBeamHaloSelector.h
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