-
Notifications
You must be signed in to change notification settings - Fork 613
[PWGCF] Adding a task for two particle correlation in pp #13775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PWGCF] Adding a task for two particle correlation in pp #13775
Conversation
|
O2 linter results: ❌ 1 errors, |
|
Hi reviewers The errors remaining in the O2 linter correspond to workflow names from other task, I did not want to change them to not affect the work of other analysis. Could you approve this PR ignoring them? or Have I change the names to? |
|
Error while checking build/O2Physics/o2 for dacf271 at 2025-11-12 02:28: Full log here. |
|
@JosueMtzGar Please, fix the compiler error |
| if (minMultiplicity <= multiplicity) { | ||
| histos.fill(HIST("sameEvent2D"), deltaEta, deltaPhi); | ||
| } | ||
| if (minMultiplicity <= multiplicity && multiplicity <= range1Max) { | ||
| histos.fill(HIST("sameEvent_2_10"), deltaEta, deltaPhi); | ||
| } | ||
| if (range2Min <= multiplicity && multiplicity <= range2Max) { | ||
| histos.fill(HIST("sameEvent_11_20"), deltaEta, deltaPhi); | ||
| } | ||
| if (range3Min <= multiplicity && multiplicity <= range3Max) { | ||
| histos.fill(HIST("sameEvent_21_30"), deltaEta, deltaPhi); | ||
| } | ||
| if (range4Min <= multiplicity && multiplicity <= range4Max) { | ||
| histos.fill(HIST("sameEvent_31_40"), deltaEta, deltaPhi); | ||
| } | ||
| if (range5Min <= multiplicity && multiplicity <= range5Max) { | ||
| histos.fill(HIST("sameEvent_41_50"), deltaEta, deltaPhi); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is performed in a double inner loop of tracks, all the conditionals will be explored although only one, as much, will be true
This increase the execution CPU without any purpose
Is there a better way of implement it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now, I am using a else if conditional and a final continue to reduce the steps in the exploration
| if (minMultiplicity <= multiplicity) { | ||
| histos.fill(HIST("mixedEvent2D"), deltaEta, deltaPhi); | ||
| } | ||
| if (minMultiplicity <= multiplicity && multiplicity <= range1Max) { | ||
| histos.fill(HIST("mixedEvent_2_10"), deltaEta, deltaPhi); | ||
| } | ||
| if (range2Min <= multiplicity && multiplicity <= range2Max) { | ||
| histos.fill(HIST("mixedEvent_11_20"), deltaEta, deltaPhi); | ||
| } | ||
| if (range3Min <= multiplicity && multiplicity <= range3Max) { | ||
| histos.fill(HIST("mixedEvent_21_30"), deltaEta, deltaPhi); | ||
| } | ||
| if (range4Min <= multiplicity && multiplicity <= range4Max) { | ||
| histos.fill(HIST("mixedEvent_31_40"), deltaEta, deltaPhi); | ||
| } | ||
| if (range5Min <= multiplicity && multiplicity <= range5Max) { | ||
| histos.fill(HIST("mixedEvent_41_50"), deltaEta, deltaPhi); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
| struct SameEventTag { | ||
| }; | ||
| struct MixedEventTag { | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why structs and not a single enum with two constant named values?
| return true; | ||
| } | ||
|
|
||
| template <typename TTarget, typename TTracks, typename TTag> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why templating on TTag? Will not a single function argument work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was one way I found to implement a difference in the histogram filling between same and mixed events. Now I’ve figured out how to do this in the other tasks using an enum. I’m not sure which approach is more efficient, but I guess the enum is simpler.
…e for event count by multiplicity range
victor-gonzalez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, fix linter warnings in the new code for the next iteration
|
BTW, you haven't replied to my questions about why the |
I am adding a new task for the calculus of two particle correlation in pp in order to calculate the baseline in a template fit