Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: exclude main PV from OtherPV_z in nano #35872

Merged
merged 3 commits into from
Nov 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions 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++)
pvsz.push_back((*pvsIn)[i - 1].position().z());
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
1 change: 1 addition & 0 deletions PhysicsTools/NanoAOD/python/nanoDQM_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down