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

[12_5_X] Nano: fix matching between pat trigger objects and L1 objects #39954

Merged
merged 1 commit into from
Nov 2, 2022
Merged
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
5 changes: 5 additions & 0 deletions PhysicsTools/NanoAOD/plugins/TriggerObjectTableProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ void TriggerObjectTableProducer::produce(edm::Event &iEvent, const edm::EventSet
for (const auto &sel : sels_) {
if (sel.match(obj) && (sel.skipObjectsNotPassingQualityBits ? (int(sel.qualityBits(obj)) > 0) : true)) {
selected.emplace_back(&obj, &sel);
// cave canem: the object will be taken by whichever selection it matches first, so it
// depends on the order of the selections in the VPSet
break;
}
}
Expand Down Expand Up @@ -254,6 +256,7 @@ void TriggerObjectTableProducer::produce(edm::Event &iEvent, const edm::EventSet
const auto &seed = l1obj.first;
float dr2 = deltaR2(seed, obj);
if (dr2 < best && sel.l1cut(seed)) {
best = dr2;
l1pt[i] = seed.pt();
l1iso[i] = l1obj.second;
l1charge[i] = seed.charge();
Expand All @@ -266,6 +269,7 @@ void TriggerObjectTableProducer::produce(edm::Event &iEvent, const edm::EventSet
const auto &seed = l1obj.first;
float dr2 = deltaR2(seed, obj);
if (dr2 < best && sel.l1cut_2(seed)) {
best = dr2;
l1pt_2[i] = seed.pt();
}
}
Expand All @@ -275,6 +279,7 @@ void TriggerObjectTableProducer::produce(edm::Event &iEvent, const edm::EventSet
for (const auto &seed : *src) {
float dr2 = deltaR2(seed, obj);
if (dr2 < best && sel.l2cut(seed)) {
best = dr2;
l2pt[i] = seed.pt();
}
}
Expand Down