Skip to content

Commit

Permalink
Add scores for other vertices
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgalli committed Oct 28, 2021
1 parent 8e1fc93 commit eb31c6a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion PhysicsTools/NanoAOD/plugins/VertexTableProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,13 @@ void VertexTableProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSe
auto otherPVsTable =
std::make_unique<nanoaod::FlatTable>((*pvsIn).size() > 4 ? 3 : (*pvsIn).size() - 1, "Other" + pvName_, false);
std::vector<float> pvsz;
for (size_t i = 1; i < (*pvsIn).size() && i < 4; i++)
std::vector<float> 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<float>("z", pvsz, "Z position of other primary vertices, excluding the main PV", 8);
otherPVsTable->addColumn<float>("score", pvscores, "scores of other primary vertices, excluding the main PV", 8);

edm::Handle<edm::View<reco::VertexCompositePtrCandidate>> svsIn;
iEvent.getByToken(svs_, svsIn);
Expand Down

0 comments on commit eb31c6a

Please sign in to comment.