File indexing completed on 2023-03-17 10:57:17
0001 #ifndef VertexMonitor_H
0002 #define VertexMonitor_H
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <memory>
0012
0013
0014 #include "FWCore/Utilities/interface/EDGetToken.h"
0015 #include "FWCore/Framework/interface/ConsumesCollector.h"
0016 #include "FWCore/Framework/interface/Frameworkfwd.h"
0017 #include "FWCore/Framework/interface/Event.h"
0018 #include "FWCore/Framework/interface/MakerMacros.h"
0019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0020 #include "DQMServices/Core/interface/DQMStore.h"
0021 #include "DataFormats/VertexReco/interface/Vertex.h"
0022 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0023
0024 class GetLumi;
0025
0026 class VertexMonitor {
0027 public:
0028 typedef dqm::legacy::DQMStore DQMStore;
0029 typedef dqm::legacy::MonitorElement MonitorElement;
0030
0031 VertexMonitor(const edm::ParameterSet&, const edm::InputTag&, const edm::InputTag&, std::string pvLabel);
0032 VertexMonitor(const edm::ParameterSet&,
0033 const edm::InputTag&,
0034 const edm::InputTag&,
0035 std::string pvLabel,
0036 edm::ConsumesCollector& iC);
0037
0038 virtual ~VertexMonitor();
0039 static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0040
0041 virtual void initHisto(DQMStore::IBooker& ibooker);
0042 virtual void analyze(const edm::Event&, const edm::EventSetup&);
0043
0044
0045
0046 edm::ParameterSet conf_;
0047
0048 edm::InputTag primaryVertexInputTag_;
0049 edm::InputTag selectedPrimaryVertexInputTag_;
0050 std::string label_;
0051
0052 edm::EDGetTokenT<reco::VertexCollection> pvToken_;
0053 edm::EDGetTokenT<reco::VertexCollection> selpvToken_;
0054
0055 GetLumi* lumiDetails_;
0056
0057 MonitorElement* NumberOfPVtx;
0058 MonitorElement* NumberOfPVtxVsBXlumi;
0059 MonitorElement* NumberOfPVtxVsGoodPVtx;
0060 MonitorElement* NumberOfGoodPVtx;
0061 MonitorElement* NumberOfGoodPVtxVsBXlumi;
0062 MonitorElement* FractionOfGoodPVtx;
0063 MonitorElement* FractionOfGoodPVtxVsBXlumi;
0064 MonitorElement* FractionOfGoodPVtxVsGoodPVtx;
0065 MonitorElement* FractionOfGoodPVtxVsPVtx;
0066 MonitorElement* NumberOfFakePVtx;
0067 MonitorElement* NumberOfFakePVtxVsBXlumi;
0068 MonitorElement* NumberOfFakePVtxVsGoodPVtx;
0069 MonitorElement* NumberOfBADndofPVtx;
0070 MonitorElement* NumberOfBADndofPVtxVsBXlumi;
0071 MonitorElement* NumberOfBADndofPVtxVsGoodPVtx;
0072
0073 MonitorElement* Chi2oNDFVsGoodPVtx;
0074 MonitorElement* Chi2oNDFVsBXlumi;
0075 MonitorElement* Chi2ProbVsGoodPVtx;
0076 MonitorElement* Chi2ProbVsBXlumi;
0077
0078 MonitorElement* GoodPVtxSumPt;
0079 MonitorElement* GoodPVtxSumPtVsBXlumi;
0080 MonitorElement* GoodPVtxSumPtVsGoodPVtx;
0081
0082 MonitorElement* GoodPVtxNumberOfTracks;
0083 MonitorElement* GoodPVtxNumberOfTracksVsBXlumi;
0084 MonitorElement* GoodPVtxNumberOfTracksVsGoodPVtx;
0085 MonitorElement* GoodPVtxNumberOfTracksVsGoodPVtxNdof;
0086
0087 MonitorElement* GoodPVtxChi2oNDFVsGoodPVtx;
0088 MonitorElement* GoodPVtxChi2oNDFVsBXlumi;
0089 MonitorElement* GoodPVtxChi2ProbVsGoodPVtx;
0090 MonitorElement* GoodPVtxChi2ProbVsBXlumi;
0091
0092 bool doAllPlots_;
0093 bool doPlotsVsBXlumi_;
0094 bool doPlotsVsGoodPVtx_;
0095
0096 std::string histname;
0097 };
0098 #endif