Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:56:13

0001 #ifndef Alignment_CommonAlignmentAlgorithm_AlignmentTrackFromVertexSelector_h
0002 #define Alignment_CommonAlignmentAlgorithm_AlignmentTrackFromVertexSelector_h
0003 
0004 #include "DataFormats/TrackReco/interface/Track.h"
0005 #include "DataFormats/VertexReco/interface/Vertex.h"
0006 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0007 #include "FWCore/Framework/interface/ConsumesCollector.h"
0008 #include "FWCore/Utilities/interface/EDGetToken.h"
0009 #include "FWCore/Utilities/interface/InputTag.h"
0010 #include "TrackingTools/Records/interface/TransientTrackRecord.h"
0011 #include "TrackingTools/TransientTrack/interface/TransientTrackBuilder.h"
0012 #include <vector>
0013 
0014 namespace edm {
0015   class Event;
0016   class ParameterSet;
0017 }  // namespace edm
0018 
0019 class TrackingRecHit;
0020 
0021 class AlignmentTrackFromVertexSelector {
0022 public:
0023   typedef std::vector<const reco::Track*> Tracks;
0024 
0025   /// constructor
0026   AlignmentTrackFromVertexSelector(const edm::ParameterSet& cfg, edm::ConsumesCollector& iC);
0027 
0028   /// destructor
0029   ~AlignmentTrackFromVertexSelector();
0030 
0031   /// select tracks
0032   Tracks select(const edm::Handle<reco::TrackCollection>& tc,
0033                 const edm::Event& evt,
0034                 const edm::EventSetup& setup) const;
0035 
0036   // compute closest vertex
0037   const reco::Vertex* findClosestVertex(const reco::TrackCollection& leptonTracks,
0038                                         const reco::VertexCollection* vertices,
0039                                         const edm::EventSetup& setup) const;
0040 
0041 private:
0042   const edm::ESGetToken<TransientTrackBuilder, TransientTrackRecord> ttbESToken_;
0043   edm::EDGetTokenT<reco::VertexCollection> vertexToken_;
0044   edm::EDGetTokenT<reco::TrackCollection> diLeptonToken_;
0045   bool useClosestVertex_;
0046   unsigned int vertexIndex_;
0047 };
0048 
0049 #endif