CMS 3D CMS Logo

CalibrationTrackSelectorModule.cc
Go to the documentation of this file.
1 
5 
6 //the selectores used to select the tracks
8 
9 // the following include is necessary to clone all track branches
10 // including recoTrackExtras and TrackingRecHitsOwned.
11 // if you remove it the code will compile, but the cloned
12 // tracks have only the recoTracks branch!
14 
16 
17  typedef std::vector<const reco::Track*> container;
18  typedef container::const_iterator const_iterator;
20 
22  theBaseSelector(cfg)
23  {
24  //TODO Wrap the BaseSelector into its own PSet
26  cfg.getParameter<bool>("applyBasicCuts") ||
27  cfg.getParameter<bool>("minHitsPerSubDet") ||
28  cfg.getParameter<bool>("applyNHighestPt") ||
29  cfg.getParameter<bool>("applyMultiplicityFilter");
30 
31  }
32 
33  const_iterator begin() const { return theSelectedTracks.begin(); }
34  const_iterator end() const { return theSelectedTracks.end(); }
35  size_t size() const { return theSelectedTracks.size(); }
36 
38  const edm::EventSetup &/*dummy*/)
39  {
40  theSelectedTracks.clear();
41  for( reco::TrackCollection::const_iterator i=c.product()->begin();i!=c.product()->end();++i){
42  theSelectedTracks.push_back(& * i );
43  }
44  // might add EvetSetup to the select(...) method of the Selectors
45  if(theBaseSwitch)
47  }
48 
49 private:
50  container theSelectedTracks;
51 
54 
55 };
56 
58 
T getParameter(std::string const &) const
SiStripCalTrackConfigSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
Tracks select(const Tracks &tracks, const edm::Event &evt) const
select tracks
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:15
ObjectSelectorStream< SiStripCalTrackConfigSelector > CalibrationTrackSelectorModule
void select(const edm::Handle< reco::TrackCollection > &c, const edm::Event &evt, const edm::EventSetup &)
std::vector< const reco::Track * > container
T const * product() const
Definition: Handle.h:81