Skip to content

Conversation

@zeptotera
Copy link
Contributor

Updated the LcHadronPair table to include centrality

@github-actions github-actions bot changed the title Centrality changes in Lc-H minimum Bias Analysis [PWGHF] Centrality changes in Lc-H minimum Bias Analysis Jun 22, 2025
@github-actions
Copy link

github-actions bot commented Jun 22, 2025

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

@zeptotera zeptotera changed the title [PWGHF] Centrality changes in Lc-H minimum Bias Analysis [PWGHF] Centrality changes in Lc correlator, Correlation task Jun 22, 2025
@vkucera
Copy link
Collaborator

vkucera commented Jun 22, 2025

Hi @zeptotera , please notice the automatic formatting PR. You don't have to run clang-format at all. There is also the option to use pre-commit hooks. Both options are documented.

@vkucera vkucera marked this pull request as draft June 22, 2025 16:17
@vkucera
Copy link
Collaborator

vkucera commented Jun 22, 2025

Please fix the errors.

Copy link
Collaborator

@fgrosa fgrosa left a comment

Choose a reason for hiding this comment

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

Hi @zeptotera, thanks for the implementation! See my comments below

@zeptotera zeptotera force-pushed the centrality-changes branch from 867bb03 to 8858bd6 Compare July 16, 2025 13:25
@zeptotera zeptotera marked this pull request as ready for review July 16, 2025 13:32
@vkucera vkucera marked this pull request as draft July 16, 2025 13:43
@vkucera
Copy link
Collaborator

vkucera commented Jul 16, 2025

@zeptotera Please do not mark your PR as ready for review if it has conflicts or errors.

@zeptotera zeptotera marked this pull request as ready for review July 24, 2025 17:41
Comment on lines 318 to 322
if (isMultiplicityDependent) {
registry.add("hMassLcVsPtvsMult", "Lc candidates;inv. mass (p K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH3F, {{axisMassLc}, {axisPtLc}, {axisCent}}});
} else {
registry.add("hMassLcVsPt", "Lc candidates;inv. mass (p K #pi) (GeV/#it{c}^{2});entries", {HistType::kTH2F, {{axisMassLc}, {axisPtLc}}});
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see any relation to multiplicity.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do you need hMassLcVsPt?

Copy link
Contributor Author

@zeptotera zeptotera Jul 25, 2025

Choose a reason for hiding this comment

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

Okay, We have changed the name of the histogram to have hMassLcVsPtvsCent

hMassLcVsPt is filled so that other people who want the histogram without centrality can still access it and the merge creates a safe working environment for existing Analyzers, This was added based on Antonio’s suggestion.

Copy link
Collaborator

Choose a reason for hiding this comment

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

What is unsafe about projecting hMassLcVsPtvsCent along the centrality axis?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Projecting along the centrality axis works fine for us too. We only kept the separate hMassLcVsPt upon Antonio’s suggestion, so that others using the same task without centrality wouldn’t need to change anything. If you think it's better to just keep one and project, we’re happy to update it — please suggest.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest a single histogram.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi @vkucera I am not sure what is the recommended process in HF when adding new things to an exciting analysis task that is being used by others. During the discussion with coordinators, we agreed that while extending this task to perform a multiplicity based study, Tushar adds flags and additional histograms in a way that has minimal impact on current analyzers. Changing a 2D histogram to a 3D will disrupt others, which we would like to minimize. If you still insist on changing it, I would appreciate if you could share a reasoning to do it as well.

Copy link
Collaborator

@vkucera vkucera Jul 31, 2025

Choose a reason for hiding this comment

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

Hi @deepathoms @apalasciano , here is how I see the two scenarios:

  • split conditional histograms
    • pros
      • no change for current users
    • cons
      • bigger code
      • more code branching at many places -> less maintainable, more error-prone
      • lot of code duplication -> less maintainable, more error-prone
      • analysis-dependent output
      • train duplication for different analyses
  • no split histograms
    • pros
      • smaller code -> more maintainable, safer
      • no branching nor duplication -> more maintainable, safer
      • Same output can be used for all analyses.
    • cons
      • changing histogram name in the postprocessing code?

IMO, the drawbacks of the split scenario and the benefits of the no-split scenario are far more important than protecting users from changing a histogram name in their local scripts. One can even keep the current histogram name.

Concerning the projection, I don't see how it changes anything for the users. You said

Changing a 2D histogram to a 3D will disrupt others

but I don't understand what you mean here.

  • There is no change of a 2D histogram into a 3D histogram. There is a change from a kTHnSparseF histogram with N axes to a kTHnSparseF histogram with N + 1 axes.
  • The signature of the THnSparse::Projection method does not depend on the number of object axes.

In general, I don't agree that keeping the framework interface and the output intact should be a top priority. The framework is evolving based on the analysis needs and we should be able to collaborate on the evolution of the common code, not fragment it and protect it from changes.

We have introduced breaking changes even in the core code many times before. We communicated them to the community in an announcement and explained the consequences. It's just about communication.

Comment on lines 223 to 227
if (isMultiplicityDependent) {
registry.add("hCorrel2DVsPtSidebandsWithCentrality", stringLcHadron + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}, {axisCentFT0M}}});
} else {
registry.add("hCorrel2DVsPtSidebands", stringLcHadron + stringSideband + stringDeltaPhi + stringDeltaEta + stringPtLc + stringPtHadron + "entries", {HistType::kTHnSparseF, {{axisDeltaPhi}, {axisDeltaEta}, {axisPtCorr}, {axisPtHadron}, {axisPoolBin}}});
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment about two histograms

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hCorrel2DvsPtSidebands is filled so that other people who want the histogram without centrality can still access it and the merge creates a safe working environment for existing Analyzers, This was added based on Antonio’s suggestion.

@vkucera vkucera marked this pull request as draft July 24, 2025 17:45
@zeptotera
Copy link
Contributor Author

Hi @fcatalan92 @fcolamar @gluparel @deepathoms @mmazzilli @mfaggin @hahassan7 @jpxrk @apalasciano @zhangbiao-phy @NicoleBastid @vkucera

I have addressed and implemented all the requested changes in the PR. A few of the questions raised seem to be beyond the scope of this PR. We would appreciate it if the PR could be approved at the earliest so we can proceed further.

Thanks!

@vkucera
Copy link
Collaborator

vkucera commented Jul 30, 2025

If you wish your PR to be reviewed, please use the button "Ready for review".
So far there seem to be still unaddressed comments though.

@zeptotera zeptotera marked this pull request as ready for review July 31, 2025 16:03
fgrosa
fgrosa previously approved these changes Aug 4, 2025
Copy link
Collaborator

@fgrosa fgrosa left a comment

Choose a reason for hiding this comment

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

Ok for what concerns my comments!

@vkucera vkucera marked this pull request as draft August 13, 2025 07:55
@zeptotera
Copy link
Contributor Author

Hi @fcatalan92 @fcolamar @gluparel @deepathoms @mmazzilli @mfaggin @hahassan7 @jpxrk @apalasciano @zhangbiao-phy @NicoleBastid @vkucera,

We’ve updated the tasks according to Vit’s suggestions. Could you please review and approve the PR?

@zeptotera zeptotera marked this pull request as ready for review August 18, 2025 10:43
Copy link
Collaborator

@vkucera vkucera left a comment

Choose a reason for hiding this comment

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

Hi @zeptotera , thanks for removing the split histograms. Please see my comments on a few remaining issues.

@zeptotera
Copy link
Contributor Author

Hi @vkucera, We have made changes according to your latest suggestions, Can you please review and Approve the PR?

Copy link
Collaborator

@vkucera vkucera left a comment

Choose a reason for hiding this comment

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

Thanks @zeptotera for addressing my comments.

@vkucera vkucera enabled auto-merge (squash) August 18, 2025 16:15
@vkucera vkucera merged commit e9bd27c into AliceO2Group:master Aug 18, 2025
15 checks passed
@zeptotera zeptotera deleted the centrality-changes branch August 30, 2025 08:52
ThePhDane pushed a commit to ThePhDane/O2Physics that referenced this pull request Nov 3, 2025
jloemker pushed a commit to jloemker/O2Physics that referenced this pull request Nov 11, 2025
alibuild pushed a commit to alibuild/O2Physics that referenced this pull request Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

4 participants