Skip to content

Conversation

@yhou-git
Copy link
Contributor

No description provided.

@github-actions
Copy link

github-actions bot commented Nov 15, 2025

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

@github-actions github-actions bot changed the title Jethadron branch [PWGJE] Jethadron branch Nov 15, 2025
yhou-git added a commit to yhou-git/O2Physics that referenced this pull request Nov 15, 2025
Please consider the following formatting changes to AliceO2Group#13847
@nzardosh
Copy link
Collaborator

Hi. Please squash your commits so we can perform a review
thanks,
Nima

@yhou-git
Copy link
Contributor Author

Hi. Please squash your commits so we can perform a review thanks, Nima

Hello Nima, I'm not quite ready yet, but I will be ready for review once it's sorted. Thanks, Yongzhen

@vkucera
Copy link
Collaborator

vkucera commented Nov 18, 2025

@yhou-git Please use a meaningful PR title.

@yhou-git yhou-git changed the title [PWGJE] Jethadron branch [PWGJE] Add Jet-hadron correlations task into the JE framework Nov 18, 2025
@yhou-git
Copy link
Contributor Author

@yhou-git Please use a meaningful PR title.

Hi Vit, thanks for your reminder, have updated it, thanks a lots. Yongzhen

@vkucera
Copy link
Collaborator

vkucera commented Nov 18, 2025

@yhou-git Please use a meaningful PR title.

Hi Vit, thanks for your reminder, have updated it, thanks a lots. Yongzhen

Thanks to you!

@yhou-git yhou-git marked this pull request as ready for review November 18, 2025 16:17
@nzardosh
Copy link
Collaborator

Hi @yhou-git thanks for letting me know. In general if you are developing your own task its best not to open the PR until you have it ready. In case you are working on a core part of the framework and need intermediate reviews you can open the PR in draft mode

@nzardosh nzardosh marked this pull request as draft November 20, 2025 09:32
@yhou-git
Copy link
Contributor Author

Hi @yhou-git thanks for letting me know. In general if you are developing your own task its best not to open the PR until you have it ready. In case you are working on a core part of the framework and need intermediate reviews you can open the PR in draft mode

Hi @nzardosh, thanks! My task is now ready for review. There are no further changes planned at the moment. please let me know if anything needs adjustment. Thanks again, yongzhen

@nzardosh nzardosh marked this pull request as ready for review November 26, 2025 08:03
Copy link
Collaborator

@nzardosh nzardosh left a comment

Choose a reason for hiding this comment

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

Dear @yhou-git Thanks for the PR. In general I think the code is quite a bit more complicated than it needs to be in places. I have tried to highlight examples so you can go through the code and fix each time the example appears. Thanks!

template <typename TCollision>
float getCentrality(const TCollision& coll) const
{
if (cfgCentEstimator.value == 0)
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 the .value here instead of calling the variable directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need this centrality value to work for different systems. Pb-Pb uses FT0C for centrality, but pp uses FT0M.
Using .value makes the code flexible for both, or other systems.

// ==========================================================
template <typename TCollision>
bool isGoodCollision(const TCollision& coll,
const std::vector<int>& eventSelectionBits, bool skipMBGapEvents,
Copy link
Collaborator

Choose a reason for hiding this comment

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

all the variables other than coll are defined globally in your struct and do not need to be passed to the function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see your point and will test it. My idea was to simplify the selections inside each process.

return false;
}
float cent = getCentrality(coll);
if (cent < centralityMin || cent > centralityMax) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

isnt this already taken care of by the eventCuts filter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is already included.
I only added the extra lines as an additional safety check.

if (cent < centralityMin || cent > centralityMax) {
return false;
}
if (std::abs(coll.posZ()) > vertexZCut) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this can go in the eventCuts filter too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, let me consider whether to retain them or remove them. I shall first test whether removing them changes my results.

double constituentPtMin = -98.0;
double constituentPtMax = 9998.0;
if (jetAreaFractionMin > jetAreaLimit) {
if (jet.area() < jetAreaFractionMin * o2::constants::math::PI * (jet.r() / 100.0) * (jet.r() / 100.0)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this cut is typically done in the jetFinder already, but you can do it here too if you want to be safe

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks very much for pointing it out. I will check if it influences.

auto tracksTuple = std::make_tuple(jets, tracks);
Pair<TCollisions, TJets, TTracks, BinningType> pairData{corrBinning, numberEventsMixed, -1, collisions, tracksTuple, &cache};

for (const auto& [c1, jets1, c2, tracks2] : pairData) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

how does this work? what is it iterating over?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This part follows the event mixing tutorial.
It builds the mixing pools and iterates over the mixed event pairs.
https://github.com/AliceO2Group/O2Physics/blob/master/Tutorials/src/eventMixing.cxx#L220C25-L220C28.

if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits, skipMBGapEvents)) {
continue;
}
if (collision.trackOccupancyInTimeRange() < trackOccupancyInTimeRangeMin || trackOccupancyInTimeRangeMax < collision.trackOccupancyInTimeRange()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

these can all be in filters

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I see and will try to improve it, thanks


if (acceptSplitCollisions == SplitOkCheckFirstAssocCollOnly || acceptSplitCollisions == NonSplitOnly) {
centrality = getCentrality(collisions.begin());
multiplicity = getMultiplicity(collisions.begin());
Copy link
Collaborator

Choose a reason for hiding this comment

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

does the SmallGroups essentially slice the collision table?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so, smallgroups gives only the collisions associated to the current mccollision.

}
}
}
if (!hasSel8Coll || !centralityIsGood || !occupancyIsGood) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

instead of doing this you can put a return in each if statement. For example
if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits, skipMBGapEvents)) {
return;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, I wiil do

}
float jetweight = jet.eventWeight();
double pTHat = 10. / (std::pow(jetweight, 1.0 / pTHatExponent));
for (int N = 1; N < ptHadbins; N++) {
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 this pTHadbins doing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, the purpose was to perform the JJ samples. But I have not updated this section recently. I would like to first review my data points, mainly focusing on the Data and MCD levels. I will update this process accordingly. This pTHadbins value and the related loop will also be removed.

@yhou-git
Copy link
Contributor Author

Dear @yhou-git Thanks for the PR. In general I think the code is quite a bit more complicated than it needs to be in places. I have tried to highlight examples so you can go through the code and fix each time the example appears. Thanks!

Dear Nima @nzardosh, thank you very for the review and suggestions. I will go through this task, simplify it as recommended, and update the PR. I will let you know once the optimizations are completed. Thanks again.

@nzardosh nzardosh self-requested a review December 10, 2025 12:45
@nzardosh nzardosh enabled auto-merge (squash) December 10, 2025 12:45
@nzardosh nzardosh merged commit 2d3e00b into AliceO2Group:master Dec 10, 2025
11 of 13 checks passed
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.

3 participants