CMS 3D CMS Logo

AlignmentCSCTrackSelectorModule.cc
Go to the documentation of this file.
1 
5 
6 //the selectores used to select the tracks
10 
11 // the following include is necessary to clone all track branches
12 // including recoTrackExtras and TrackingRecHitsOwned.
13 // if you remove it the code will compile, but the cloned
14 // tracks have only the recoTracks branch!
16 
18  typedef std::vector<const reco::Track *> container;
19  typedef container::const_iterator const_iterator;
21 
23 
24  const_iterator begin() const { return theSelectedTracks.begin(); }
25  const_iterator end() const { return theSelectedTracks.end(); }
26  size_t size() const { return theSelectedTracks.size(); }
27 
28  void select(const edm::Handle<reco::TrackCollection> &c, const edm::Event &evt, const edm::EventSetup & /*dummy*/) {
29  container all;
30  for (reco::TrackCollection::const_iterator i = c.product()->begin(); i != c.product()->end(); ++i) {
31  all.push_back(&*i);
32  }
33  theSelectedTracks = theBaseSelector.select(all, evt); // might add dummy
34  }
35 
36 private:
38 
40 };
41 
43 
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:25
void select(const edm::Handle< reco::TrackCollection > &c, const edm::Event &evt, const edm::EventSetup &)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
ObjectSelector< CSCTrackConfigSelector > AlignmentCSCTrackSelectorModule
std::vector< const reco::Track * > container
container::const_iterator const_iterator
CSCTrackConfigSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
AlignmentCSCTrackSelector theBaseSelector
Tracks select(const Tracks &tracks, const edm::Event &evt) const
select tracks