CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  typedef std::vector<const reco::Track *> container;
17  typedef container::const_iterator const_iterator;
19 
21  // TODO Wrap the BaseSelector into its own PSet
22  theBaseSwitch = cfg.getParameter<bool>("applyBasicCuts") || cfg.getParameter<bool>("minHitsPerSubDet") ||
23  cfg.getParameter<bool>("applyNHighestPt") || cfg.getParameter<bool>("applyMultiplicityFilter");
24  }
25 
26  const_iterator begin() const { return theSelectedTracks.begin(); }
27  const_iterator end() const { return theSelectedTracks.end(); }
28  size_t size() const { return theSelectedTracks.size(); }
29 
30  void select(const edm::Handle<reco::TrackCollection> &c, const edm::Event &evt, const edm::EventSetup & /*dummy*/) {
31  theSelectedTracks.clear();
32  for (reco::TrackCollection::const_iterator i = c.product()->begin(); i != c.product()->end(); ++i) {
33  theSelectedTracks.push_back(&*i);
34  }
35  // might add EvetSetup to the select(...) method of the Selectors
36  if (theBaseSwitch)
38  }
39 
40 private:
42 
45 };
46 
48 
SiStripCalTrackConfigSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
const edm::EventSetup & c
ObjectSelector< SiStripCalTrackConfigSelector > CalibrationTrackSelectorModule
tuple cfg
Definition: looper.py:296
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Tracks select(const Tracks &tracks, const edm::Event &evt) const
select tracks
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
void select(const edm::Handle< reco::TrackCollection > &c, const edm::Event &evt, const edm::EventSetup &)
T const * product() const
Definition: Handle.h:70
std::vector< const reco::Track * > container
T getParameter(std::string const &) const
Definition: ParameterSet.h:303