[PWGHF] Replace UPC Lc THnSparse with TTree#15786
[PWGHF] Replace UPC Lc THnSparse with TTree#15786Rrantu wants to merge 13 commits intoAliceO2Group:masterfrom
Conversation
|
O2 linter results: ❌ 0 errors, |
|
@Rrantu Columns and tables are parts of the data model. They don't belong in the utility headers. |
|
Hi @vkucera, thanks for the comment, where would you recommend moving the columns and tables to? Would it be acceptable to define them directly in the task? |
Yes, if the tables are not used anywhere else, please put them in the task. |
|
Dear @Rrantu, @vkucera, all codeowners, sorry for interfering, |
No, they are not. |
|
Hi @lubynets, Thanks for the question. In this case, the tables are only used within this task, and the trees are produced specifically for this analysis. Also, there are other tasks that produce trees in a similar way. |
|
Hi @vkucera, could you please take a look at my updated code? |
|
Hi @vkucera, when you have time, could you please take a look at my updated? Thanks! |
| if (gap == o2::aod::sgselector::TrueGap::SingleGapA || gap == o2::aod::sgselector::TrueGap::SingleGapC) { | ||
| std::vector<double> valuesToFill{massLc, pt, outputBkg, outputPrompt, outputFD, static_cast<double>(numPvContributors), static_cast<double>(fitInfo.ampFV0A), static_cast<double>(fitInfo.ampFT0A), static_cast<double>(fitInfo.ampFT0C), static_cast<double>(zdcEnergyZNA), static_cast<double>(zdcEnergyZNC), static_cast<double>(zdcTimeZNA), static_cast<double>(zdcTimeZNC)}; | ||
| registry.get<THnSparse>(HIST("hnLcUpcVarsWithBdt"))->Fill(valuesToFill.data()); | ||
| rowCandUpcBdt(massLc, pt, outputBkg, outputPrompt, outputFD, static_cast<float>(fitInfo.ampFV0A), static_cast<float>(fitInfo.ampFT0A), static_cast<float>(fitInfo.ampFT0C), static_cast<float>(zdcTimeZNA), static_cast<float>(zdcTimeZNC)); |
There was a problem hiding this comment.
What types are the values before casting?
There was a problem hiding this comment.
O2Physics/PWGUD/Core/UDHelpers.h
Line 300 in a839c00
Before casting the values are of type float.
There was a problem hiding this comment.
So why do you cast them to the same type?
Hi @vkucera, actually I am in favour of what suggested by @lubynets and I would avoid to add trees here and I would suggest to use the Lc TreeCreator: https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/TableProducer/treeCreatorLcToPKPi.cxx Grazia |
Hi @gluparel , what are your reasons in favour of that? |
Hi @vkucera @gluparel @lubynets, I agree with Vít’s comments here. Regarding adding a tree to the Lc task, I also understand the concerns raised by Grazia and Oleksii. To avoid making things more complicated, I would suggest that @Rrantu create a new dedicated task in the D2H folder (e.g. taskLcUPC.cxx, or more generally taskCharmUPC.cxx). We could also consider using such a task for all HF UPC analyses (different process function for different particle). This would be more appropriate since the event selection and logic are quite different from the standard Lc or other HF task. what do you think? |
Hello @zhangbiao-phy , @vkucera , my point is that this task is used by various analyses and we would start to add various trees for the various analyses which need different information. Is this the direction we would like to take? Another option is to have a dedicated task for HF UPC analysis as indeed suggested by Biao and this could be indeed a good option for me, since the various UPC analysis use the same event selections but just a different particle creator. |
|
Hi @gluparel @zhangbiao-phy , thanks for your feedback. I like the idea of a common workflow for UPC analyses if a majority of the code can be shared by multiple species. And if the primary output is expected to have many dimensions, it would indeed be worth making it as a tree creator, as @lubynets pointed out. |
Thanks for the suggestion. I will try to separate the UPC part into a new task file |
Thanks @Rrantu , feel free to mark the PR as ready for review when you push the updates. Please do not create a new PR. Just updated this one. |
This PR introduces a transition from THnSparse to TTree in the UPC Lc analysis.
Main changes: