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 
4 
5 //the selectores used to select the tracks
9 
11 
12 // the following include is necessary to clone all track branches
13 // including recoTrackExtras and TrackingRecHitsOwned (in future also "owned clusters"?).
14 // if you remove it the code will compile, but the cloned
15 // tracks have only the recoTracks branch!
17 
19 
20  typedef std::vector<const reco::Track*> container;
21  typedef container::const_iterator const_iterator;
23 
25  theBaseSelector(cfg),
26  theGlobalSelector(cfg.getParameter<edm::ParameterSet>("GlobalSelector")),
27  theTwoBodyDecaySelector(cfg.getParameter<edm::ParameterSet>("TwoBodyDecaySelector"))
28  {
29  //TODO Wrap the BaseSelector into its own PSet
31 
33 
35  }
36 
37  const_iterator begin() const { return theSelectedTracks.begin(); }
38  const_iterator end() const { return theSelectedTracks.end(); }
39  size_t size() const { return theSelectedTracks.size(); }
40 
42  const edm::EventSetup &/*dummy*/)
43  {
44  theSelectedTracks.clear();
45  for( reco::TrackCollection::const_iterator i=c.product()->begin();i!=c.product()->end();++i){
46  theSelectedTracks.push_back(& * i );
47  }
48  // might add EvetSetup to the select(...) method of the Selectors
49  if(theBaseSwitch)
51  if(theGlobalSwitch)
55  }
56 
57 private:
59 
64 
65 };
66 
68 
int i
Definition: DBlmapReader.cc:9
const_iterator begin() const
const_iterator end() const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:10
Tracks select(const Tracks &tracks, const edm::Event &iEvent)
select tracks
AlignmentTwoBodyDecayTrackSelector theTwoBodyDecaySelector
container::const_iterator const_iterator
Tracks select(const Tracks &tracks, const edm::Event &evt) const
select tracks
bool useThisFilter()
returns if any of the Filters is used.
AlignmentGlobalTrackSelector theGlobalSelector
reco::TrackCollection collection
ObjectSelector< TrackConfigSelector > AlignmentTrackSelectorModule
T const * product() const
Definition: Handle.h:74
AlignmentTrackSelector theBaseSelector
Tracks select(const Tracks &tracks, const edm::Event &iEvent)
select tracks
void select(const edm::Handle< reco::TrackCollection > &c, const edm::Event &evt, const edm::EventSetup &)
TrackConfigSelector(const edm::ParameterSet &cfg)
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