Repository navigation
Conversation
The charm-hadron-track femto producer stored only a single pass/fail bit for the custom kaon PID, so PID variations required a separate producer (train) per variation. Producer: bit 0 of the PID container keeps the nominal selection; bit i (i >= 1) is filled with the i-th entry of the new nSigmaTpcKaMaxVar, nSigmaCombKaMaxVar, nSigmaCombKaTightMaxVar and nSigmaTpcPiMinVar vectors (defaults: tight 2.5/2.5/1.5/3.5 and loose 3.5/3.5/2.5/2.5). The pion rejection is varied too, since pions in the TPC-only region dominate the kaon contamination. Add a KaonPidBitCounter QA histogram. Task: select kaons with ncheckbit(pidcut, pidBitTrack1Ka) instead of pidcut == 1. The default 1 keeps the nominal selection and is backward compatible with existing derived data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FDUEnrich
requested review from
NicoleBastid,
alibuild,
apalasciano,
deepathoms,
fcatalan92,
fcolamar,
fgrosa,
gluparel,
hahassan7,
jpxrk,
mfaggin,
mmazzilli,
singhra1994,
stefanopolitano,
vkucera,
xinyepeng and
zhangbiao-phy
as code owners
November 24, 2026 15:17
|
O2 linter results: ❌ 0 errors, |
Kaons from heavy-flavour decays keep the kSecondaryFromHF origin in the derived tables (no change to the FemtoDream data model). For these kaons the producer now stores in motherPDG the PDG code of the HF-hadron ancestor: the beauty hadron if there is a beauty ancestor, otherwise the closest charm hadron. The task uses it to fill Track_one_MC/hDCAxy_SecondaryFromCharm and hDCAxy_SecondaryFromBeauty, with the same axes as the existing hDCAxy_SecondaryFromHF template (their sum equals it bin by bin), so the charm and beauty contributions can be reweighted separately. To derive kaon-level weights from weights defined on the HF hadron, the producer adds AnalysisQA/hKaonFromCharm and hKaonFromBeauty (kaon pT, HF-ancestor pT, |PDG| of the HF ancestor). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Use the RecoDecay PDG divisor and quark constants instead of hard-coded numbers (pdg/explicit-code). - Rename KaonPidThresholds to HfKaonPidThresholds (pwghf/name/struct-class). - Book the kaon HF-ancestor QA histograms for |trkPDGCode| == 321, as they are filled based on the absolute PDG code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on PID variations - The charm/beauty split only needs the origin: drop findCharmHadronAncestor, isBeautyHadron and the HF-ancestor QA histograms. For kaons from a beauty-hadron decay chain, motherPDG stores the beauty-hadron ancestor given by RecoDecay::getParticleOrigin; motherPDG of all other particles is unchanged. The task classifies kSecondaryFromHF kaons as beauty if motherPDG is a beauty hadron and as charm otherwise. - Default kaon PID variations follow the Run 2 strategy: only the Method2 nSigmaComb threshold is varied (tight 2.7, loose 3.3), all other thresholds stay at their nominal values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FDUEnrich
marked this pull request as draft
November 24, 2026 17:04
… and track trees Add the PWGHF tables HfFemtoPairPids and HfFemtoTrkPids with the producer pidcut of the associated track. They are filled together with every row of FDHfCharmTrkPairs and FDHfTrk, so they join row by row. Running the task with the loosest kaon PID bit then allows the nominal and tight selections to be applied offline on the pair tree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The kaon purity and the PID systematic uncertainty are obtained with the existing framework (MC AnalysisResults, producer configurables, output trees). Keep only the charm/beauty split of the HF-decay kaon DCA templates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tracks in pairs Book and fill hDCAxy_SecondaryFromCharm and hDCAxy_SecondaryFromBeauty also in Track_allSelected_MC, next to hDCAxy_SecondaryFromHF of the tracks in same-event pairs (filled per pair, after the k* cut). The pair-level DCA templates are the ones used in the template fit, and the charm/beauty fraction can differ from the one of all tracks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Splits the DCA template of kaons from heavy-flavour decays into charm and beauty origin, so the two contributions can be reweighted separately in the template fit. Only PWGHF files are changed; the FemtoDream data model is untouched.
kSecondaryFromHF.motherPDG(debug table) now stores the beauty-hadron ancestor returned byRecoDecay::getParticleOrigin.motherPDGof every other particle is unchanged.hDCAxy_SecondaryFromCharmandhDCAxy_SecondaryFromBeauty, booked only for MC with kaons as particle 1, in two folders next to the existinghDCAxy_SecondaryFromHF:Track_one_MC: all selected tracks, filled once per track;Track_allSelected_MC: tracks in same-event pairs, filled per pair after the k* cut. These are the templates used in the pair-level fit; the charm/beauty fraction can differ from that of all tracks.kSecondaryFromHFkaon goes to the beauty template ifmotherPDGis a beauty hadron, otherwise to the charm template.hDCAxy_SecondaryFromHF, and in each folder the two templates add up to it bin by bin.Local test (MC, Λc–K, same input)
FDParticletable (includingpidcut), MC truth, origin column (master vs this branch)Track_one_MC/Debug/hPDGmother_SecondaryFromHF(beauty-origin kaons now show the beauty-hadron ancestor, by design)Track_one_MCHF templateTrack_allSelected_MCHF templatemotherPDGThe local sample has no MC-matched Λc, so the pair-level check was run with a local test-only change (not in this PR) that also accepts background candidates in the MC partition.
Note: on current master, running
hf-candidate-creator-3prong-expressionswithprocessMclocally needsmult-cent-table: processMonteCarlo = 1, becauseMultsExtraMCis now joined. This is not related to this PR.🤖 Generated with Claude Code