File indexing completed on 2024-04-06 12:22:12
0001 #ifndef __L1Trigger_VertexFinder_InputData_h__
0002 #define __L1Trigger_VertexFinder_InputData_h__
0003
0004 #include "FWCore/Framework/interface/Event.h"
0005 #include "FWCore/Framework/interface/MakerMacros.h"
0006 #include "FWCore/Framework/interface/EventSetup.h"
0007 #include "FWCore/Utilities/interface/ESGetToken.h"
0008 #include "FWCore/Framework/interface/Frameworkfwd.h"
0009 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0010 #include "L1Trigger/VertexFinder/interface/Stub.h"
0011 #include "L1Trigger/VertexFinder/interface/TP.h"
0012 #include "L1Trigger/VertexFinder/interface/Vertex.h"
0013 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0014 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0015 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0016 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0017 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0018
0019 #include <vector>
0020
0021 namespace l1tVertexFinder {
0022
0023 typedef edm::Ptr<TrackingParticle> TrackingParticlePtr;
0024 typedef std::map<TrackingParticlePtr, edm::RefToBase<TrackingParticle>> TPPtrToRefMap;
0025
0026 class AnalysisSettings;
0027 class Stub;
0028
0029
0030
0031
0032 class InputData {
0033 public:
0034
0035 InputData();
0036 InputData(const edm::Event& iEvent,
0037 const edm::EventSetup& iSetup,
0038 const AnalysisSettings& settings,
0039 const edm::EDGetTokenT<edm::HepMCProduct> hepMCToken,
0040 const edm::EDGetTokenT<edm::View<reco::GenParticle>> genParticlesToken,
0041 const edm::EDGetTokenT<edm::View<TrackingParticle>> tpToken,
0042 const edm::EDGetTokenT<edm::ValueMap<l1tVertexFinder::TP>> tpValueMapToken,
0043 const edm::EDGetTokenT<DetSetVec> stubToken,
0044 const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> tTopoToken,
0045 const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> tGeomToken);
0046 ~InputData();
0047
0048
0049 struct SortVertexByPt {
0050 inline bool operator()(const Vertex vertex0, const Vertex vertex1) { return (vertex0.pT() > vertex1.pT()); }
0051 };
0052
0053
0054 struct SortVertexByZ0 {
0055 inline bool operator()(const Vertex vertex0, const Vertex vertex1) { return (vertex0.z0() < vertex1.z0()); }
0056 };
0057
0058
0059 const TPPtrToRefMap& getTPPtrToRefMap() const { return tpPtrToRefMap_; }
0060
0061 const Vertex& getHepMCVertex() const { return hepMCVertex_; }
0062
0063 const Vertex& getGenVertex() const { return genVertex_; }
0064
0065 const Vertex& getPrimaryVertex() const { return vertex_; }
0066
0067 const std::vector<Vertex>& getPileUpVertices() const { return vertices_; }
0068
0069 const std::vector<Vertex>& getRecoPileUpVertices() const { return recoVertices_; }
0070
0071 const float genPt() const { return genPt_; }
0072 const float genPt_PU() const { return genPt_PU_; }
0073
0074 private:
0075 Vertex hepMCVertex_;
0076 Vertex genVertex_;
0077 Vertex vertex_;
0078 std::vector<Vertex> vertices_;
0079 std::vector<Vertex> recoVertices_;
0080 std::vector<Stub>
0081 vAllStubs_;
0082
0083 TPPtrToRefMap tpPtrToRefMap_;
0084 float genPt_;
0085 float genPt_PU_;
0086 };
0087
0088 }
0089
0090 #endif