Skip to content

Conversation

@jaelpark
Copy link
Collaborator

@jaelpark jaelpark commented Aug 4, 2025

No description provided.

@github-actions
Copy link

github-actions bot commented Aug 4, 2025

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

@github-actions github-actions bot changed the title PWGCF: Add CFMultiplicitySet to support multiple auxilary multiplicities/centralities [PWGCF] Add CFMultiplicitySet to support multiple auxilary multiplicities/centralities Aug 4, 2025
output(multiplicities);
}
}
PROCESS_SWITCH(MultiplicitySetBuilder, processEstimators, "Process auxiliary multiplicity/centrality estimators", false);
Copy link
Collaborator

Choose a reason for hiding this comment

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

The workflow will hang if there are not default process function
Is it intended to always run this task?

Copy link
Collaborator Author

@jaelpark jaelpark Aug 4, 2025

Choose a reason for hiding this comment

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

If it hangs, it remains to be solved. Most of the time it won't be needed - only in some specific cases we need the extra estimators (e.g. outliers, systematics). By default it should not run. I first thought about combining it with the existing MultiplicitySelector, but the output tables need to align with the accepted collisions.

Copy link
Collaborator

Choose a reason for hiding this comment

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

As the task is incorporated to the workflow and there is not process function assigned to it most of the times, the workflow will hang. At least it used to be that way
Have you tested locally?

Copy link
Collaborator

@victor-gonzalez victor-gonzalez Aug 4, 2025

Choose a reason for hiding this comment

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

An empty process function subscribed to the collisions table will do the trick

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not yet tested locally. I think if the hang still happens, I can probably do the empty process then as the enabled default.

Copy link
Contributor

Choose a reason for hiding this comment

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

It could not be part of FilterCF simply?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It can be, but then I need one (or more) processDataXYZ functions that subscribe to these multiplicity/centrality tables in addition to the existing one. For now it would add one, which is probably fine though.

{
DECLARE_SOA_COLUMN(Multiplicities, multiplicities, std::vector<float>); //! List of auxiliary multiplicities
}
DECLARE_SOA_TABLE(CFMultiplicitySets, "AOD", "CFMULTSET", cfmultiplicityset::Multiplicities); //! Auxilary multiplicity set table
Copy link
Contributor

Choose a reason for hiding this comment

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

The name doesn't work like this for merging. The first and third names must be the same + s

output(multiplicities);
}
}
PROCESS_SWITCH(MultiplicitySetBuilder, processEstimators, "Process auxiliary multiplicity/centrality estimators", false);
Copy link
Contributor

Choose a reason for hiding this comment

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

It could not be part of FilterCF simply?

@jaelpark
Copy link
Collaborator Author

jaelpark commented Aug 5, 2025

I've moved the output to FilterCF, if that seems better.

Copy link
Contributor

@jgrosseo jgrosseo left a comment

Choose a reason for hiding this comment

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

I am ready to merge with the two doubts below. Feel free to still fix them in this PR or in the next one.

Comment on lines +272 to +284
if constexpr (std::experimental::is_detected<HasMultTables, typename T1::iterator>::value) {
multiplicities.clear();
if (cfgEstimatorBitMask & kCentFT0C)
multiplicities.push_back(collision.centFT0C());
if (cfgEstimatorBitMask & kMultFV0A)
multiplicities.push_back(collision.multFV0A());
if (cfgEstimatorBitMask & kMultNTracksPV)
multiplicities.push_back(collision.multNTracksPV());
if (cfgEstimatorBitMask & kMultNTracksGlobal)
multiplicities.push_back(collision.multNTracksGlobal());
outputMultSets(multiplicities);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

It does not matter much but in principle this code could be in processDataMults. Nothing should speak against filling one table there and the then one would not need the HasMultTables, or am missing something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What about the keepCollision in processDataT? Somehow the multiplicity tables would need to stay synced so they can then ultimately be joined with the collision output table.

{
DECLARE_SOA_COLUMN(Multiplicities, multiplicities, std::vector<float>); //! List of auxiliary multiplicities
}
DECLARE_SOA_TABLE(CFMultiplicitySets, "AOD", "CFMULTIPLICITYSET", cfmultiplicityset::Multiplicities); //! Auxilary multiplicity set table
Copy link
Contributor

Choose a reason for hiding this comment

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

I remember there was a maximal number of characters (14?) for the third argument. Does this work in run time? And does the table in the file has the name o2cfmultiplicitysets?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will test this. I'm not able to test locally at the moment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You're right that the name is clipped to CFMULTIPLICITYS (or o2cfmultiplicitys). It's not ideal so I'll change it in the next PR while making other fixes too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, otherwise the merging does not work

Copy link
Contributor

Choose a reason for hiding this comment

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

@ktf @aalkin in the past this (too long string in the third argument) caused a compilation error? Why is this gone?

@jaelpark jaelpark merged commit c6fec91 into AliceO2Group:master Aug 6, 2025
15 of 16 checks passed
@jaelpark jaelpark deleted the correlationsAuxMult branch August 8, 2025 18:15
jpxrk pushed a commit to jpxrk/O2Physics that referenced this pull request Aug 12, 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

Development

Successfully merging this pull request may close these issues.

3 participants