CMS 3D CMS Logo

AlignmentMuonSelectorModule.cc
Go to the documentation of this file.
1 
20 
21 // the following include is necessary to clone all track branches
22 // including recoTrackExtras and TrackingRecHitsOwned.
23 // if you remove it the code will compile, but the cloned
24 // tracks have only the recoMuons branch!
25 
27  typedef std::vector<const reco::Muon *> container;
28  typedef container::const_iterator const_iterator;
30 
32 
33  const_iterator begin() const { return selected_.begin(); }
34  const_iterator end() const { return selected_.end(); }
35  size_t size() const { return selected_.size(); }
36 
37  void select(const edm::Handle<reco::MuonCollection> &c, const edm::Event &evt, const edm::EventSetup & /* dummy*/) {
38  all_.clear();
39  selected_.clear();
40  for (collection::const_iterator i = c.product()->begin(), iE = c.product()->end(); i != iE; ++i) {
41  all_.push_back(&*i);
42  }
43  selected_ = theSelector.select(all_, evt); // might add dummy
44  }
45 
46 private:
49 };
50 
52 
void select(const edm::Handle< reco::MuonCollection > &c, const edm::Event &evt, const edm::EventSetup &)
const_iterator end() const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
const_iterator begin() const
AlignmentMuonSelector theSelector
std::vector< const reco::Muon * > container
Muons select(const Muons &muons, const edm::Event &evt) const
select muons
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
container::const_iterator const_iterator
reco::MuonCollection collection
ObjectSelector< MuonConfigSelector > AlignmentMuonSelectorModule
MuonConfigSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)