CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
21  typedef std::vector<const reco::Track*> container;
22  typedef container::const_iterator const_iterator;
24 
26  theBaseSelector(cfg),
27  theGlobalSelector(cfg.getParameter<edm::ParameterSet>("GlobalSelector")),
28  theTwoBodyDecaySelector(cfg.getParameter<edm::ParameterSet>("TwoBodyDecaySelector"))
29  {
30  //TODO Wrap the BaseSelector into its own PSet
32 
34 
36  }
37 
38  const_iterator begin() const { return theSelectedTracks.begin(); }
39  const_iterator end() const { return theSelectedTracks.end(); }
40  size_t size() const { return theSelectedTracks.size(); }
41 
43  const edm::EventSetup& eSetup)
44  {
45  theSelectedTracks.clear();
46  for( reco::TrackCollection::const_iterator i=c.product()->begin();i!=c.product()->end();++i){
47  theSelectedTracks.push_back(& * i );
48  }
49  // might add EvetSetup to the select(...) method of the Selectors
50  if(theBaseSwitch)
52  if(theGlobalSwitch)
56  }
57 
58 private:
60 
65 
66 };
67 
69 
int i
Definition: DBlmapReader.cc:9
tuple cfg
Definition: looper.py:259
const_iterator begin() const
const_iterator end() const
ObjectSelectorStream< TrackConfigSelector > AlignmentTrackSelectorModule
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:13
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)
T const * product() const
Definition: Handle.h:81
void select(const edm::Handle< reco::TrackCollection > &c, const edm::Event &evt, const edm::EventSetup &eSetup)
AlignmentTrackSelector theBaseSelector
Tracks select(const Tracks &tracks, const edm::Event &evt, const edm::EventSetup &eSetup) const
select tracks
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