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 ObjectSelectorStream<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 
TrackFromVertexConfigSelector::select
void select(const edm::Handle< reco::TrackCollection > &c, const edm::Event &evt, const edm::EventSetup &setup)
Definition: AlignmentTracksFromVertexSelectorModule.cc:25
TrackFromVertexConfigSelector
Definition: AlignmentTracksFromVertexSelectorModule.cc:14
ObjectSelectorStream.h
AlignmentTrackFromVertexSelectorModule::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: AlignmentTracksFromVertexSelectorModule.cc:39
TrackSelector.h
TrackFromVertexConfigSelector::theBaseSelector
AlignmentTrackFromVertexSelector theBaseSelector
Definition: AlignmentTracksFromVertexSelectorModule.cc:32
TrackFromVertexConfigSelector::TrackFromVertexConfigSelector
TrackFromVertexConfigSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
Definition: AlignmentTracksFromVertexSelectorModule.cc:19
TrackFromVertexConfigSelector::const_iterator
container::const_iterator const_iterator
Definition: AlignmentTracksFromVertexSelectorModule.cc:16
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
TrackFromVertexConfigSelector::container
std::vector< const reco::Track * > container
Definition: AlignmentTracksFromVertexSelectorModule.cc:15
edm::Handle< reco::TrackCollection >
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
MakerMacros.h
TrackFromVertexConfigSelector::end
const_iterator end() const
Definition: AlignmentTracksFromVertexSelectorModule.cc:22
AlignmentTrackFromVertexSelectorModule
Definition: AlignmentTracksFromVertexSelectorModule.cc:35
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
TrackFromVertexConfigSelector::collection
reco::TrackCollection collection
Definition: AlignmentTracksFromVertexSelectorModule.cc:17
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlignmentTrackFromVertexSelector::select
Tracks select(const edm::Handle< reco::TrackCollection > &tc, const edm::Event &evt, const edm::EventSetup &setup) const
select tracks
Definition: AlignmentTracksFromVertexSelector.cc:72
edm::ParameterSet
Definition: ParameterSet.h:47
TrackFromVertexConfigSelector::size
size_t size() const
Definition: AlignmentTracksFromVertexSelectorModule.cc:23
ObjectSelectorStream
AlignmentTrackFromVertexSelector
Definition: AlignmentTracksFromVertexSelector.h:21
edm::EventSetup
Definition: EventSetup.h:58
looper.cfg
cfg
Definition: looper.py:296
AlignmentTrackFromVertexSelectorModule::AlignmentTrackFromVertexSelectorModule
AlignmentTrackFromVertexSelectorModule(const edm::ParameterSet &ps)
Definition: AlignmentTracksFromVertexSelectorModule.cc:37
AlignmentTracksFromVertexSelector.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
TrackFromVertexConfigSelector::begin
const_iterator begin() const
Definition: AlignmentTracksFromVertexSelectorModule.cc:21
TrackFromVertexConfigSelector::theSelectedTracks
container theSelectedTracks
Definition: AlignmentTracksFromVertexSelectorModule.cc:30
ConsumesCollector.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
edm::ConfigurationDescriptions::addWithDefaultLabel
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:87