Alignment
CommonAlignmentProducer
plugins
AlignmentCSCOverlapSelectorModule.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/AlignmentCSCOverlapSelector.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
CSCOverlapConfigSelector
{
14
typedef
std::vector<const reco::Track *>
container
;
15
typedef
container::const_iterator
const_iterator
;
16
typedef
reco::TrackCollection
collection
;
17
18
CSCOverlapConfigSelector
(
const
edm::ParameterSet
&
cfg
,
edm::ConsumesCollector
&&iC) :
theSelector
(
cfg
) {}
19
20
const_iterator
begin
()
const
{
return
selected_
.begin(); }
21
const_iterator
end
()
const
{
return
selected_
.end(); }
22
size_t
size
()
const
{
return
selected_
.size(); }
23
24
void
select
(
const
edm::Handle<reco::TrackCollection>
&
c
,
const
edm::Event
&evt,
const
edm::EventSetup
&
/*dummy*/
) {
25
all_
.clear();
26
selected_
.clear();
27
for
(collection::const_iterator
i
=
c
.product()->begin(), iE =
c
.product()->end();
i
!= iE; ++
i
) {
28
all_
.push_back(&*
i
);
29
}
30
selected_
=
theSelector
.
select
(
all_
, evt);
// might add dummy...
31
}
32
33
private
:
34
container
all_
,
selected_
;
35
AlignmentCSCOverlapSelector
theSelector
;
36
};
37
38
typedef
ObjectSelectorStream<CSCOverlapConfigSelector>
AlignmentCSCOverlapSelectorModule
;
39
40
DEFINE_FWK_MODULE
(
AlignmentCSCOverlapSelectorModule
);
mps_fire.i
i
Definition:
mps_fire.py:428
ObjectSelectorStream.h
TrackSelector.h
CSCOverlapConfigSelector::theSelector
AlignmentCSCOverlapSelector theSelector
Definition:
AlignmentCSCOverlapSelectorModule.cc:35
CSCOverlapConfigSelector::end
const_iterator end() const
Definition:
AlignmentCSCOverlapSelectorModule.cc:21
AlignmentCSCOverlapSelector::select
Tracks select(const Tracks &tracks, const edm::Event &iEvent) const
select tracks
Definition:
AlignmentCSCOverlapSelector.cc:32
CSCOverlapConfigSelector::collection
reco::TrackCollection collection
Definition:
AlignmentCSCOverlapSelectorModule.cc:16
edm::Handle< reco::TrackCollection >
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
CSCOverlapConfigSelector::selected_
container selected_
Definition:
AlignmentCSCOverlapSelectorModule.cc:34
edm::ParameterSet
Definition:
ParameterSet.h:47
AlignmentCSCOverlapSelector.h
CSCOverlapConfigSelector
Definition:
AlignmentCSCOverlapSelectorModule.cc:13
CSCOverlapConfigSelector::select
void select(const edm::Handle< reco::TrackCollection > &c, const edm::Event &evt, const edm::EventSetup &)
Definition:
AlignmentCSCOverlapSelectorModule.cc:24
CSCOverlapConfigSelector::size
size_t size() const
Definition:
AlignmentCSCOverlapSelectorModule.cc:22
CSCOverlapConfigSelector::all_
container all_
Definition:
AlignmentCSCOverlapSelectorModule.cc:34
ObjectSelectorStream
CSCOverlapConfigSelector::container
std::vector< const reco::Track * > container
Definition:
AlignmentCSCOverlapSelectorModule.cc:14
edm::EventSetup
Definition:
EventSetup.h:58
CSCOverlapConfigSelector::const_iterator
container::const_iterator const_iterator
Definition:
AlignmentCSCOverlapSelectorModule.cc:15
looper.cfg
cfg
Definition:
looper.py:297
AlignmentCSCOverlapSelector
Definition:
AlignmentCSCOverlapSelector.h:14
AlignmentCSCOverlapSelectorModule
ObjectSelectorStream< CSCOverlapConfigSelector > AlignmentCSCOverlapSelectorModule
Definition:
AlignmentCSCOverlapSelectorModule.cc:38
CSCOverlapConfigSelector::begin
const_iterator begin() const
Definition:
AlignmentCSCOverlapSelectorModule.cc:20
ConsumesCollector.h
c
auto & c
Definition:
CAHitNtupletGeneratorKernelsImpl.h:46
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
CSCOverlapConfigSelector::CSCOverlapConfigSelector
CSCOverlapConfigSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
Definition:
AlignmentCSCOverlapSelectorModule.cc:18
Generated for CMSSW Reference Manual by
1.8.16