[PWGCF] Adding a task for two particle correlation in pp#13775
[PWGCF] Adding a task for two particle correlation in pp#13775victor-gonzalez merged 11 commits intoAliceO2Group:masterfrom
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.
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.
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); | ||
| } |
| struct SameEventTag { | ||
| }; | ||
| struct MixedEventTag { | ||
| }; |
There was a problem hiding this comment.
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.
Why templating on TTag? Will not a single function argument work?
There was a problem hiding this comment.
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.
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