Skip to content

[PWGHF] Pt shape study#15613

Draft
deependra170598 wants to merge 4 commits intoAliceO2Group:masterfrom
deependra170598:pt-shape-study
Draft

[PWGHF] Pt shape study#15613
deependra170598 wants to merge 4 commits intoAliceO2Group:masterfrom
deependra170598:pt-shape-study

Conversation

@deependra170598
Copy link
Copy Markdown
Contributor

@deependra170598 deependra170598 commented Apr 1, 2026

Hi @jessica, @stefanopolitano, @fgrosa, @xinyepeng

Could you please review the following PR?

In this PR, I tried to make 3 modifications...

  1. A small fix in PWGHF/TableProducer/candidateCreatorDstar.cxx.
  2. Removed online efficiency weights from PWGHF/D2H/Tasks/taskDstarToD0Pi.cxx, because we are using it offline and online was not technically implemented correctly (This I already discussed offline with @fgrosa months ago). This is actually cleanup.
  3. Implemented online/offline weight for pT shape study.

for the last part, I explain what I did.

It is fully configurable to choose which way we want to apply weight.

Two main configurables:

  1. ptShapeStudy (bool)
  2. useWeightOnline (bool)

Online Weighting (when useWeightOnline is true)

Step 1. First weights (with finer pt bins) to be computed with the combination of https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/Tasks/taskMcGenPtRapShapes.cxx and FONNL page.

Step 2. Weights to be uploaded to ccdb. These weights will be fetched online.

Step 3. For prompt, the weight will be fetched corresponding to pT of current Dstar candidate in loop, then weighted entry is filled in the THnSparse which has wider pT bins for Dstar such that sub-bins are filled in the same corresponding correct wide pT bin of THnSparse. Here ROOT will do the following addition over sub-bins for us.

N_reco (pTD* bin) = sum_{pTD* sub-bins} w(pTD* sub bin) x N_reco (pTD* sub bin) 
N_gen (pTD* bin) = sum_{pTD* sub-bins} w(pTD* sub bin) x N_gen (pTD* sub bin)

Step 4. For Non-prompt, the weight will be fetched corresponding to pT of B mother of current Dstar candidate in the loop. Then the weighted entry for each sub-bins will be filled in the current wide pT bins of Dstar. Here there should not be a confusion if we are filling in incorrect pT bin of Dstar. pT (of Dstar) of wide bin in which weighted entry is to be filled is solely determined by pT of current Dstar candidate in loop not by pT of mother B hadron. In this case following mathematical addition will be done by ROOT for us.

N_reco (pTD* bin) = sum_{pTB bins} w(pT B bin) x N_reco (pT B) and same for N_gen

Note: Positive side of online weight is that No extra axis has been added to THnSparse which can cause memory issue as in light ion or heavy ion we are seeing the memory issue for the same task. Other is our post-processing framework will remain unchanged.

Offline Weighting (when useWeightOnline is false)

Additional THnSparse have been added with fine binned pT axis for either prompt D* or for mother B hadron. Structure of original ThnSparse have not been modified so that those analysers who are already using the same task for analysis on other systems are not get effected and their post processing remain same.

Thanks for review and let me if any modification is needed.

@github-actions github-actions bot added the pwghf PWG-HF label Apr 1, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

O2 linter results: ❌ 0 errors, ⚠️ 1 warnings, 🔕 0 disabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pwghf PWG-HF

Development

Successfully merging this pull request may close these issues.

1 participant