CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CalibrationTrackSelectorModule.cc
Go to the documentation of this file.
1 
4 
5 //the selectores used to select the tracks
7 
8 // the following include is necessary to clone all track branches
9 // including recoTrackExtras and TrackingRecHitsOwned.
10 // if you remove it the code will compile, but the cloned
11 // tracks have only the recoTracks branch!
13 
15 
16  typedef std::vector<const reco::Track*> container;
17  typedef container::const_iterator const_iterator;
19 
21  theBaseSelector(cfg)
22  {
23  //TODO Wrap the BaseSelector into its own PSet
24  theBaseSwitch =
25  cfg.getParameter<bool>("applyBasicCuts") ||
26  cfg.getParameter<bool>("minHitsPerSubDet") ||
27  cfg.getParameter<bool>("applyNHighestPt") ||
28  cfg.getParameter<bool>("applyMultiplicityFilter");
29 
30  }
31 
32  const_iterator begin() const { return theSelectedTracks.begin(); }
33  const_iterator end() const { return theSelectedTracks.end(); }
34  size_t size() const { return theSelectedTracks.size(); }
35 
37  const edm::EventSetup &/*dummy*/)
38  {
39  theSelectedTracks.clear();
40  for( reco::TrackCollection::const_iterator i=c.product()->begin();i!=c.product()->end();++i){
41  theSelectedTracks.push_back(& * i );
42  }
43  // might add EvetSetup to the select(...) method of the Selectors
44  if(theBaseSwitch)
46  }
47 
48 private:
50 
53 
54 };
55 
57 
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
ObjectSelector< SiStripCalTrackConfigSelector > CalibrationTrackSelectorModule
#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:10
SiStripCalTrackConfigSelector(const edm::ParameterSet &cfg)
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:74