Repository navigation
[PWGHF] Adding option to include reconstructed rapidity in MC THnSparse in D2H/Tasks/taskDplus.cxx - #18828
[PWGHF] Adding option to include reconstructed rapidity in MC THnSparse in D2H/Tasks/taskDplus.cxx#18828lmattei01 wants to merge 1 commit into
Conversation
|
O2 linter results: ❌ 0 errors, |
|
Hi @lmattei01 , who are you? |
|
@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); | ||
| } |
There was a problem hiding this comment.
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
| } else if (!storeCentrality && !storeOccupancy && storeRecRapidity) { | ||
| registry.fill(HIST("hSparseMassPrompt"), HfHelper::invMassDplusToPiKPi(candidate), candidate.pt(), outputMl[0], outputMl[1], outputMl[2], HfHelper::yDplus(candidate)); |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
@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
Adding option to include reconstructed rapidity in MC THnSparse in D2H/Tasks/taskDplus.cxx