CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlignmentCSCTrackSelectorModule.cc
Go to the documentation of this file.
1 
4 
5 //the selectores used to select the tracks
9 
10 // the following include is necessary to clone all track branches
11 // including recoTrackExtras and TrackingRecHitsOwned.
12 // if you remove it the code will compile, but the cloned
13 // tracks have only the recoTracks branch!
15 
17 
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  {
30  container all;
31  for( reco::TrackCollection::const_iterator i=c.product()->begin();i!=c.product()->end();++i){
32  all.push_back(& * i );
33  }
34  theSelectedTracks = theBaseSelector.select(all, evt); // might add dummy
35  }
36 
37  private:
39 
41 };
42 
44 
int i
Definition: DBlmapReader.cc:9
void select(const edm::Handle< reco::TrackCollection > &c, const edm::Event &evt, const edm::EventSetup &)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:10
CSCTrackConfigSelector(const edm::ParameterSet &cfg)
ObjectSelector< CSCTrackConfigSelector > AlignmentCSCTrackSelectorModule
container::const_iterator const_iterator
T const * product() const
Definition: Handle.h:74
Tracks select(const Tracks &tracks, const edm::Event &evt) const
select tracks
AlignmentCSCTrackSelector theBaseSelector
std::vector< const reco::Track * > container