diff --git a/PhysicsTools/NanoAOD/plugins/VertexTableProducer.cc b/PhysicsTools/NanoAOD/plugins/VertexTableProducer.cc index ca776d47ae56c..55bce4e8ed283 100644 --- a/PhysicsTools/NanoAOD/plugins/VertexTableProducer.cc +++ b/PhysicsTools/NanoAOD/plugins/VertexTableProducer.cc @@ -135,9 +135,13 @@ void VertexTableProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSe auto otherPVsTable = std::make_unique((*pvsIn).size() > 4 ? 3 : (*pvsIn).size() - 1, "Other" + pvName_, false); std::vector pvsz; - for (size_t i = 1; i < (*pvsIn).size() && i < 4; i++) - pvsz.push_back((*pvsIn)[i - 1].position().z()); + std::vector pvscores; + for (size_t i = 1; i < (*pvsIn).size() && i < 4; i++) { + pvsz.push_back((*pvsIn)[i].position().z()); + pvscores.push_back((*pvsScoreIn).get(pvsIn.id(), i)); + } otherPVsTable->addColumn("z", pvsz, "Z position of other primary vertices, excluding the main PV", 8); + otherPVsTable->addColumn("score", pvscores, "scores of other primary vertices, excluding the main PV", 8); edm::Handle> svsIn; iEvent.getByToken(svs_, svsIn); diff --git a/PhysicsTools/NanoAOD/python/nanoDQM_cfi.py b/PhysicsTools/NanoAOD/python/nanoDQM_cfi.py index d7bcda94674c6..9a2c7572ce5f1 100644 --- a/PhysicsTools/NanoAOD/python/nanoDQM_cfi.py +++ b/PhysicsTools/NanoAOD/python/nanoDQM_cfi.py @@ -551,6 +551,7 @@ plots = cms.VPSet( NoPlot('_size'), Plot1D('z', 'z', 20, -20, 20, 'Z position of other primary vertices, excluding the main PV'), + Plot1D('score', 'score', 20, 0, 300000, 'scores of other primary vertices, excluding the main PV'), ) ), PPSLocalTrack = cms.PSet(