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 
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 
19  typedef std::vector<const reco::Track*> container;
20  typedef container::const_iterator const_iterator;
22 
24 
25  const_iterator begin() const { return theSelectedTracks.begin(); }
26  const_iterator end() const { return theSelectedTracks.end(); }
27  size_t size() const { return theSelectedTracks.size(); }
28 
29  void select( const edm::Handle<reco::TrackCollection> & c, const edm::Event & evt, const edm::EventSetup &/*dummy*/)
30  {
31  container all;
32  for( reco::TrackCollection::const_iterator i=c.product()->begin();i!=c.product()->end();++i){
33  all.push_back(& * i );
34  }
35  theSelectedTracks = theBaseSelector.select(all, evt); // might add dummy
36  }
37 
38  private:
40 
42 };
43 
45 
int i
Definition: DBlmapReader.cc:9
tuple cfg
Definition: looper.py:259
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:13
container::const_iterator const_iterator
T const * product() const
Definition: Handle.h:81
Tracks select(const Tracks &tracks, const edm::Event &evt) const
select tracks
CSCTrackConfigSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
AlignmentCSCTrackSelector theBaseSelector
ObjectSelectorStream< CSCTrackConfigSelector > AlignmentCSCTrackSelectorModule
std::vector< const reco::Track * > container