File indexing completed on 2023-03-17 10:45:29
0001 #ifndef PF_PU_FirstVertexTracks_h
0002 #define PF_PU_FirstVertexTracks_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #include <memory>
0022
0023
0024 #include "FWCore/Framework/interface/Frameworkfwd.h"
0025 #include "FWCore/Framework/interface/global/EDProducer.h"
0026
0027 #include "FWCore/Framework/interface/Event.h"
0028 #include "FWCore/Framework/interface/Run.h"
0029 #include "FWCore/Framework/interface/MakerMacros.h"
0030
0031 #include "FWCore/Utilities/interface/InputTag.h"
0032
0033 #include "DataFormats/Common/interface/AssociationMap.h"
0034 #include "DataFormats/Common/interface/OneToManyWithQuality.h"
0035 #include "DataFormats/TrackReco/interface/Track.h"
0036 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0037 #include "DataFormats/VertexReco/interface/Vertex.h"
0038 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0039
0040 typedef edm::AssociationMap<edm::OneToManyWithQuality<reco::VertexCollection, reco::TrackCollection, int> >
0041 TrackToVertexAssMap;
0042 typedef edm::AssociationMap<edm::OneToManyWithQuality<reco::TrackCollection, reco::VertexCollection, int> >
0043 VertexToTrackAssMap;
0044
0045
0046
0047
0048
0049 class PF_PU_FirstVertexTracks : public edm::global::EDProducer<> {
0050 public:
0051 explicit PF_PU_FirstVertexTracks(const edm::ParameterSet&);
0052
0053 static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0054
0055 private:
0056 void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
0057 bool trackMatch(const reco::Track&, const reco::Track&) const;
0058
0059
0060
0061 edm::InputTag input_AssociationType_;
0062
0063 edm::EDGetTokenT<TrackToVertexAssMap> token_TrackToVertexAssMap_;
0064 edm::EDGetTokenT<VertexToTrackAssMap> token_VertexToTrackAssMap_;
0065 edm::EDGetTokenT<reco::TrackCollection> token_generalTracksCollection_;
0066 edm::EDGetTokenT<reco::VertexCollection> token_VertexCollection_;
0067
0068 int input_MinQuality_;
0069 };
0070
0071 #endif