Skip to content

Conversation

@fgrosa
Copy link
Collaborator

@fgrosa fgrosa commented Nov 28, 2025

@Luca610 @vkucera this PR implements the refactory discussed to improve the compilation time of O2Physics. In particular, I splitted the derived data creator in 3, one for each D meson species, by keeping the possibility to have combinations with V0, or tracks, or both in all the three new derived data creators.

Before merging I would still like to test it and compare the outputs with the current version to be sure that I did not introduce any bug.

Pinging for info other users @zhangbiao-phy @cterrevo

@github-actions github-actions bot added the pwghf PWG-HF label Nov 28, 2025
@github-actions
Copy link

github-actions bot commented Nov 28, 2025

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

@github-actions github-actions bot changed the title Refactory of charm reso derived data creator to improve compilation time [PWGHF] Refactory of charm reso derived data creator to improve compilation time Nov 28, 2025
Please consider the following formatting changes to AliceO2Group#14027
@vkucera
Copy link
Collaborator

vkucera commented Nov 28, 2025

Thanks a lot @fgrosa !
Please make sure that there are no errors or warnings left before marking it ready for review.
There seem to be many duplicated sections that would be worth factoring out.

Please consider the following formatting changes to AliceO2Group#14027
@fgrosa
Copy link
Collaborator Author

fgrosa commented Dec 1, 2025

Thanks a lot @fgrosa ! Please make sure that there are no errors or warnings left before marking it ready for review. There seem to be many duplicated sections that would be worth factoring out.

Hi @vkucera, thanks for the feedback! I still factored out histograms and most of the configurables, and I simplified a bit the event selection. I would consider it as satisfactory for this version (further improvements can of course be implemented in the future), to merge it in a ~short timescale. However, before marking as ready for review however I still want to test it to make sure that it does not introduces bugs to the analysis.

Comment on lines +145 to +149
o2::framework::Configurable<float> maxEta{"maxEta", 0.8, "maximum pseudorapidity for single tracks to be paired with D mesons"};
o2::framework::Configurable<float> minPt{"minPt", 0.1, "minimum pT for single tracks to be paired with D mesons"};
o2::framework::Configurable<float> maxNsigmaTpcPi{"maxNsigmaTpcPi", -1., "maximum pion NSigma in TPC for single tracks to be paired with D mesons; set negative to reject"};
o2::framework::Configurable<float> maxNsigmaTpcKa{"maxNsigmaTpcKa", -1., "maximum kaon NSigma in TPC for single tracks to be paired with D mesons; set negative to reject"};
o2::framework::Configurable<float> maxNsigmaTpcPr{"maxNsigmaTpcPr", 3., "maximum proton NSigma in TPC for single tracks to be paired with D mesons; set negative to reject"};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Min, Max are attributes, not quantities, so should be appended at the end.

Comment on lines 155 to 160
o2::framework::Configurable<float> cutMassDMin{"cutMassDMin", 1.83, "minimum mass for D0 and Dplus candidates"}; // o2-linter: disable=pdg/explicit-mass (false positive)
o2::framework::Configurable<float> cutMassDMax{"cutMassDMax", 1.92, "maximum mass for D0 and Dplus candidates"}; // o2-linter: disable=pdg/explicit-mass (false positive)
o2::framework::Configurable<float> cutMassDstarMin{"cutMassDstarMin", 0.139, "minimum mass for Dstar candidates"}; // o2-linter: disable=pdg/explicit-mass (false positive)
o2::framework::Configurable<float> cutMassDstarMax{"cutMassDstarMax", 0.175, "maximum mass for Dstar candidates"}; // o2-linter: disable=pdg/explicit-mass (false positive)
o2::framework::Configurable<float> cutMassK0sMin{"cutMassK0sMin", 0.485, "minimum mass for K0s candidates"}; // o2-linter: disable=pdg/explicit-mass (false positive)
o2::framework::Configurable<float> cutMassK0sMax{"cutMassK0sMax", 0.509, "maximum mass for K0s candidates"}; // o2-linter: disable=pdg/explicit-mass (false positive)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The prefix cut is redundant.

@fgrosa
Copy link
Collaborator Author

fgrosa commented Dec 2, 2025

I tested the code for two cases (D*+V0 and D+V0) and it gives exactly the same output as the previous version (see small example below for one distribution, they are all the same between old and new version).
image
@vkucera I also implemented your latest suggestions, except for the renaming of configurables. Since they are used in several hyperloop wagons I prefer not to modify them at this stage, also because there are several cases to be tested (I would ask @Luca610 to help me by checking from the hyperloop wagons he has already defined that he gets what is expected in all cases), and changing the name of configurables introduces an unnecessary complication.

@vkucera
Copy link
Collaborator

vkucera commented Dec 2, 2025

Thanks a lot @fgrosa for addressing the comments. Fine for the configurables. However, there are remaining issues reported by the linter which would be better to fix before merging.

@fgrosa
Copy link
Collaborator Author

fgrosa commented Dec 2, 2025

Thanks a lot @fgrosa for addressing the comments. Fine for the configurables. However, there are remaining issues reported by the linter which would be better to fix before merging.

Also warnings addressed!

@vkucera
Copy link
Collaborator

vkucera commented Dec 2, 2025

Thanks a lot @fgrosa for addressing the comments. Fine for the configurables. However, there are remaining issues reported by the linter which would be better to fix before merging.

Also warnings addressed!

Perfect! Thanks!

@alibuild
Copy link
Collaborator

alibuild commented Dec 2, 2025

Error while checking build/O2Physics/o2 for 27b13d0 at 2025-12-02 16:44:

## sw/BUILD/O2Physics-latest/log
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
Error in cling::AutoLoadingVisitor::InsertIntoAutoLoadingState:
/sw/SOURCES/O2Physics/14027-slc9_x86-64/0/PWGHF/D2H/TableProducer/dataCreatorJpsiHadReduced.cxx:267:19: error: redeclaration of 'constexpr const int NumBinsEvents'
ninja: build stopped: subcommand failed.

Full log here.

@fgrosa fgrosa enabled auto-merge (squash) December 2, 2025 16:21
Copy link
Collaborator

@alibuild alibuild left a comment

Choose a reason for hiding this comment

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

Auto-approving on behalf of @fgrosa.

@fgrosa fgrosa merged commit 2e1908a into AliceO2Group:master Dec 2, 2025
13 checks passed
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.

3 participants