[PWGEM] Fix TTCA weights when using cfgRequireTrueAssociation in PWGEM/Dilepton tasks#15764
Merged
dsekihat merged 2 commits intoAliceO2Group:masterfrom Apr 14, 2026
Merged
[PWGEM] Fix TTCA weights when using cfgRequireTrueAssociation in PWGEM/Dilepton tasks#15764dsekihat merged 2 commits intoAliceO2Group:masterfrom
dsekihat merged 2 commits intoAliceO2Group:masterfrom
Conversation
…DileptonMC.h, SingleTrackQCMC.h, and checkMCPairTemplate.cxx Agent-Logs-Url: https://github.com/feisenhu/O2Physics/sessions/1d6d35c8-a846-4be0-b49e-97d5dba066f8 Co-authored-by: feisenhu <53603353+feisenhu@users.noreply.github.com>
|
O2 linter results: ❌ 631 errors, |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes TTCA (1/N) weight normalization when cfgRequireTrueAssociation=true by ensuring tracks/pairs that would be rejected during histogram filling are also excluded from the TTCA denominator during weight-map construction.
Changes:
- Add
cfgRequireTrueAssociationevent-association guards in single-track TTCA weight map building (dielectron and dimuon paths). - Add the same guard in dilepton TTCA pair weight map building for ULS, LS++, and LS-- loops.
- Mirror the above fix in the
checkMCPairTemplatetask’s pair weight-map construction.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| PWGEM/Dilepton/Tasks/checkMCPairTemplate.cxx | Skips MC-event-mismatched pairs during TTCA weight-map building when true association is required. |
| PWGEM/Dilepton/Core/SingleTrackQCMC.h | Skips MC-event-mismatched tracks during TTCA weight-map building when true association is required. |
| PWGEM/Dilepton/Core/DileptonMC.h | Skips MC-event-mismatched pairs during TTCA weight-map building (ULS/LS++/LS--) when true association is required. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
dsekihat
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
cfgRequireTrueAssociation = true, tracks/pairs failing the MC collision association check were correctly rejected during histogram filling, but still counted in the TTCA weight denominator — causing weights of1/Ninstead of1/1and under-filled histograms.Affected files
PWGEM/Dilepton/Core/SingleTrackQCMC.h—fillTrackWeightMap(): missing check for both electron and muon loopsPWGEM/Dilepton/Core/DileptonMC.h—fillPairWeightMap(): missing check for ULS, LS++, and LS-- combination loopsPWGEM/Dilepton/Tasks/checkMCPairTemplate.cxx—fillPairWeightMap(): same as aboveFix
Added
cfgRequireTrueAssociationguard in each weight-building loop to mirror the filter already applied at fill time:This ensures only tracks/pairs that actually enter histograms are counted in
N, keepingweight = 1/Ncorrect under all configurations.