CMS 3D CMS Logo

AlignmentTrackSelectorModule.cc
Go to the documentation of this file.
1 
5 
6 //the selectores used to select the tracks
10 
12 
13 // the following include is necessary to clone all track branches
14 // including recoTrackExtras and TrackingRecHitsOwned (in future also "owned clusters"?).
15 // if you remove it the code will compile, but the cloned
16 // tracks have only the recoTracks branch!
18 
20  typedef std::vector<const reco::Track*> container;
21  typedef container::const_iterator const_iterator;
23 
25  : theBaseSelector(cfg, iC),
26  theGlobalSelector(cfg.getParameter<edm::ParameterSet>("GlobalSelector"), iC),
27  theTwoBodyDecaySelector(cfg.getParameter<edm::ParameterSet>("TwoBodyDecaySelector"), iC) {
28  //TODO Wrap the BaseSelector into its own PSet
30 
32 
34  }
35 
36  const_iterator begin() const { return theSelectedTracks.begin(); }
37  const_iterator end() const { return theSelectedTracks.end(); }
38  size_t size() const { return theSelectedTracks.size(); }
39 
40  void select(const edm::Handle<reco::TrackCollection>& c, const edm::Event& evt, const edm::EventSetup& eSetup) {
41  theSelectedTracks.clear();
42  for (reco::TrackCollection::const_iterator i = c.product()->begin(); i != c.product()->end(); ++i) {
43  theSelectedTracks.push_back(&*i);
44  }
45  // might add EvetSetup to the select(...) method of the Selectors
46  if (theBaseSwitch)
48  if (theGlobalSwitch)
52  }
53 
54 private:
56 
61 };
62 
64 
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Tracks select(const Tracks &tracks, const edm::Event &evt, const edm::EventSetup &eSetup) const
select tracks
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
AlignmentTwoBodyDecayTrackSelector theTwoBodyDecaySelector
container::const_iterator const_iterator
Tracks select(const Tracks &tracks, const edm::Event &iEvent, const edm::EventSetup &eSetup)
select tracks
bool useThisFilter()
returns if any of the Filters is used.
AlignmentGlobalTrackSelector theGlobalSelector
Tracks select(const Tracks &tracks, const edm::Event &iEvent, const edm::EventSetup &iSetup)
select tracks
reco::TrackCollection collection
TrackConfigSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
ObjectSelector< TrackConfigSelector > AlignmentTrackSelectorModule
void select(const edm::Handle< reco::TrackCollection > &c, const edm::Event &evt, const edm::EventSetup &eSetup)
const_iterator begin() const
AlignmentTrackSelector theBaseSelector
HLT enums.
bool useThisFilter()
returns if any of the Filters is used.
bool useThisFilter()
returns if any of the Filters is used.
std::vector< const reco::Track * > container