CMS 3D CMS Logo

AlignmentTracksFromVertexSelectorModule.cc
Go to the documentation of this file.
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  typedef std::vector<const reco::Track *> container;
16  typedef container::const_iterator const_iterator;
18 
20 
21  const_iterator begin() const { return theSelectedTracks.begin(); }
22  const_iterator end() const { return theSelectedTracks.end(); }
23  size_t size() const { return theSelectedTracks.size(); }
24 
27  }
28 
29 private:
31 
33 };
34 
35 class AlignmentTrackFromVertexSelectorModule : public ObjectSelector<TrackFromVertexConfigSelector> {
36 public:
39  static void fillDescriptions(edm::ConfigurationDescriptions &descriptions) {
41  desc.setComment("Alignment Tracks Selector from Vertices");
42  desc.add<edm::InputTag>("src", edm::InputTag("generalTracks"));
43  desc.add<bool>("filter", false);
44  desc.add<edm::InputTag>("vertices", edm::InputTag("offlinePrimaryVertices"));
45  desc.add<edm::InputTag>("leptonTracks", edm::InputTag("ALCARECOTkAlDiMuon"));
46  desc.add<bool>("useClosestVertexToDilepton", false);
47  desc.add<unsigned int>("vertexIndex", 0);
48  descriptions.addWithDefaultLabel(desc);
49  }
50 };
51 
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
void select(const edm::Handle< reco::TrackCollection > &c, const edm::Event &evt, const edm::EventSetup &setup)
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
TrackFromVertexConfigSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
Tracks select(const edm::Handle< reco::TrackCollection > &tc, const edm::Event &evt, const edm::EventSetup &setup) const
select tracks
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)