Skip to content

[PWGHF] Adding option to include reconstructed rapidity in MC THnSparse in D2H/Tasks/taskDplus.cxx - #18828

Open
lmattei01 wants to merge 1 commit into
AliceO2Group:masterfrom
lmattei01:myBranch_new
Open

lmattei01 wants to merge 1 commit into
AliceO2Group:masterfrom
lmattei01:myBranch_new

Conversation

@lmattei01

@lmattei01 lmattei01 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Adding option to include reconstructed rapidity in MC THnSparse in D2H/Tasks/taskDplus.cxx

@github-actions

Copy link
Copy Markdown

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

@github-actions github-actions Bot changed the title Adding option to include reconstructed rapidity in MC THnSparse [PWGHF] Adding option to include reconstructed rapidity in MC THnSparse Nov 20, 2026
@vkucera

vkucera commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

Hi @lmattei01 , who are you?

@vkucera

vkucera commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

@lmattei01 Please fix the title. It does not mention which part of HF you changed.

@lmattei01 lmattei01 changed the title [PWGHF] Adding option to include reconstructed rapidity in MC THnSparse [PWGHF] Adding option to include reconstructed rapidity in MC THnSparse in D2H/Tasks/taskDplus.cxx Nov 20, 2026
@lmattei01

Copy link
Copy Markdown
Contributor Author

@lmattei01 Please fix the title. It does not mention which part of HF you changed.

Hi @vkucera , thanks for the suggestion. I am a PhD student working on Jpsi-D+ associated production and I need reconstructed rapidity in the THnSparse of D+ on order to create 2D efficiency maps (pT vs y)

@vkucera

vkucera commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

@lmattei01 Please fix the title. It does not mention which part of HF you changed.

Hi @vkucera , thanks for the suggestion. I am a PhD student working on Jpsi-D+ associated production and I need reconstructed rapidity in the THnSparse of D+ on order to create 2D efficiency maps (pT vs y)

I meant your name. Please add it on your profile and check the rest of the contribution guidelines.

if (storeRecRapidity) {
axes.push_back(thnAxisY);
axesFD.push_back(thnAxisY);
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest you to put it at the end of all the configurable axes (after the other if (store...)); this because other analysers expect axes in a given position, and adding this now might change the position of axes in the outputs, creating confusion in other analyses

Comment on lines +375 to +376
} else if (!storeCentrality && !storeOccupancy && storeRecRapidity) {
registry.fill(HIST("hSparseMassPrompt"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2], HfHelper::yDplus(candidate));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should in principle add all the combinations, in fact currently if a user enables rapidity the rapidity with other optional variables, it gives a runtime error (or you forbid the activation of rapidity with other optional variables, throwing a FATAL with a meaningful error message)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lmattei01, one more suggestion: you can pack all the values to be filled (depending on boolean configurables) to the vector and then call the Fill() function only once. Otherwise when you attempt to foresee all the combinations, the number of LOC will grow in geometric progression.
As a reference you can have a look at the similar code for Lc baryon https://github.com/AliceO2Group/O2Physics/blob/dfbc8da2c9f7ff7cbd1f2cfed3787a3a45510ebb/PWGHF/D2H/Tasks/taskLc.cxx

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.

4 participants