Skip to content

Commit 6c6dc46

Browse files
authored
Merge branch 'AliceO2Group:master' into INELgt0
2 parents a7492b1 + 24bc6d8 commit 6c6dc46

46 files changed

Lines changed: 8285 additions & 2893 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/mega-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949

5050
# Upload MegaLinter artifacts
5151
- name: Archive production artifacts
52-
uses: actions/upload-artifact@v6
52+
uses: actions/upload-artifact@v7
5353
if: success() || failure()
5454
with:
5555
name: MegaLinter reports

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repos:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
- repo: https://github.com/pre-commit/mirrors-clang-format
10-
rev: v18.1.3 # clang-format version
10+
rev: v20.1.3 # clang-format version (keep synced with https://github.com/alisw/ali-bot/blob/master/.github/workflows/c++-code-formatting.yml)
1111
hooks:
1212
- id: clang-format
1313
- repo: https://github.com/cpplint/cpplint

PWGCF/EbyEFluctuations/Tasks/radialFlowDecorr.cxx

Lines changed: 798 additions & 798 deletions
Large diffs are not rendered by default.

PWGCF/Femto/Core/partitions.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717
#define PWGCF_FEMTO_CORE_PARTITIONS_H_
1818

1919
// collsion selection
20-
#define MAKE_COLLISION_FILTER(selection) \
21-
(o2::aod::femtocollisions::posZ >= selection.vtxZMin && o2::aod::femtocollisions::posZ <= selection.vtxZMax) && \
22-
(o2::aod::femtocollisions::mult >= selection.multMin && o2::aod::femtocollisions::mult <= selection.multMax) && \
23-
(o2::aod::femtocollisions::cent >= selection.centMin && o2::aod::femtocollisions::cent <= selection.centMax) && \
24-
(o2::aod::femtocollisions::magField >= static_cast<int8_t>(selection.magFieldMin) && o2::aod::femtocollisions::magField <= static_cast<int8_t>(selection.magFieldMax)) && \
20+
#define MAKE_COLLISION_FILTER(selection) \
21+
(o2::aod::femtocollisions::posZ >= selection.vtxZMin && o2::aod::femtocollisions::posZ <= selection.vtxZMax) && \
22+
(o2::aod::femtocollisions::mult >= selection.multMin && o2::aod::femtocollisions::mult <= selection.multMax) && \
23+
(o2::aod::femtocollisions::cent >= selection.centMin && o2::aod::femtocollisions::cent <= selection.centMax) && \
24+
(o2::aod::femtocollisions::magField >= o2::framework::expressions::as<int8_t>(selection.magFieldMin) && \
25+
o2::aod::femtocollisions::magField <= o2::framework::expressions::as<int8_t>(selection.magFieldMax)) && \
2526
ncheckbit(o2::aod::femtocollisions::mask, selection.collisionMask)
2627

2728
// macro for track momentum, i.e. ||q|*pT/q| * cosh(eta)

PWGCF/FemtoUniverse/Core/FemtoUniverseDetaDphiStar.h

Lines changed: 39 additions & 39 deletions
Large diffs are not rendered by default.

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx

Lines changed: 66 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
#include "Framework/runDataProcessing.h"
3535
#include "ReconstructionDataFormats/PID.h"
3636

37+
#include "TRandom2.h"
38+
3739
#include <string>
3840
#include <vector>
3941

@@ -173,7 +175,8 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
173175
Configurable<float> confCPRdeltaPhiCutMin{"confCPRdeltaPhiCutMin", 0.0, "Delta Phi min cut for Close Pair Rejection"};
174176
Configurable<float> confCPRdeltaEtaCutMax{"confCPRdeltaEtaCutMax", 0.0, "Delta Eta max cut for Close Pair Rejection"};
175177
Configurable<float> confCPRdeltaEtaCutMin{"confCPRdeltaEtaCutMin", 0.0, "Delta Eta min cut for Close Pair Rejection"};
176-
Configurable<float> confCPRChosenRadii{"confCPRChosenRadii", 0.80, "Delta Eta cut for Close Pair Rejection"};
178+
Configurable<float> confCPRChosenRadii{"confCPRChosenRadii", 0.80, "Chosen CPR radii"};
179+
Configurable<bool> confRandomizeCPR{"confRandomizeCPR", false, "Fill Dete-Dphi histograms in random order: p1, p2 or p2, p1"};
177180

178181
Configurable<bool> isPairIdentical{"isPairIdentical", true, "'true' for identical particles, 'false' for non-identical particles"};
179182
struct : o2::framework::ConfigurableGroup {
@@ -230,6 +233,8 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
230233

231234
HistogramRegistry sphericityRegistry{"SphericityHisto", {}, OutputObjHandlingPolicy::AnalysisObject, true, true};
232235

236+
TRandom2* randgen;
237+
233238
/// TPC Pion/Kaon/Proton Sigma selection (general)
234239
bool isNSigma(float mom, float nsigmaTPC, float nsigmaTOF)
235240
{
@@ -473,7 +478,21 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
473478
}
474479

475480
if (confIsCPR.value) {
476-
if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
481+
double rand;
482+
auto part1 = p1;
483+
auto part2 = p2;
484+
485+
if (confRandomizeCPR) {
486+
randgen = new TRandom2(0);
487+
rand = randgen->Rndm();
488+
489+
if (rand > 0.5) {
490+
part1 = p2;
491+
part2 = p1;
492+
}
493+
delete randgen;
494+
}
495+
if (pairCloseRejection.isClosePair(part1, part2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
477496
continue;
478497
}
479498
}
@@ -503,7 +522,21 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
503522
}
504523

505524
if (confIsCPR.value) {
506-
if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
525+
double rand;
526+
auto part1 = p1;
527+
auto part2 = p2;
528+
529+
if (confRandomizeCPR) {
530+
randgen = new TRandom2(0);
531+
rand = randgen->Rndm();
532+
533+
if (rand > 0.5) {
534+
part1 = p2;
535+
part2 = p1;
536+
}
537+
delete randgen;
538+
}
539+
if (pairCloseRejection.isClosePair(part1, part2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
507540
continue;
508541
}
509542
}
@@ -638,7 +671,21 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
638671
}
639672

640673
if (confIsCPR.value) {
641-
if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::mixed)) {
674+
double rand;
675+
auto part1 = p1;
676+
auto part2 = p2;
677+
678+
if (confRandomizeCPR) {
679+
randgen = new TRandom2(0);
680+
rand = randgen->Rndm();
681+
682+
if (rand > 0.5) {
683+
part1 = p2;
684+
part2 = p1;
685+
}
686+
delete randgen;
687+
}
688+
if (pairCloseRejection.isClosePair(part1, part2, parts, magFieldTesla, femto_universe_container::EventType::mixed)) {
642689
continue;
643690
}
644691
}
@@ -799,7 +846,21 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
799846
}
800847

801848
if (confIsCPR.value) {
802-
if (pairCloseRejection.isClosePair(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::mixed)) {
849+
double rand;
850+
auto part1 = p1;
851+
auto part2 = p2;
852+
853+
if (confRandomizeCPR) {
854+
randgen = new TRandom2(0);
855+
rand = randgen->Rndm();
856+
857+
if (rand > 0.5) {
858+
part1 = p2;
859+
part2 = p1;
860+
}
861+
delete randgen;
862+
}
863+
if (pairCloseRejection.isClosePair(part1, part2, parts, magFieldTesla, femto_universe_container::EventType::mixed)) {
803864
return;
804865
}
805866
}

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.cxx

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "Framework/O2DatabasePDGPlugin.h"
3030
#include "Framework/runDataProcessing.h"
3131

32+
#include "TRandom2.h"
3233
#include <TFile.h>
3334
#include <TH1.h>
3435
#include <TPDGCode.h>
@@ -174,6 +175,7 @@ struct FemtoUniversePairTaskTrackV0Extended {
174175
Configurable<float> confCPRdeltaEtaCutMax{"confCPRdeltaEtaCutMax", 0.0, "Delta Eta max cut for Close Pair Rejection"};
175176
Configurable<float> confCPRdeltaEtaCutMin{"confCPRdeltaEtaCutMin", 0.0, "Delta Eta min cut for Close Pair Rejection"};
176177
Configurable<float> confCPRChosenRadii{"confCPRChosenRadii", 0.80, "Delta Eta cut for Close Pair Rejection"};
178+
Configurable<bool> confRandomizeCPR{"confRandomizeCPR", false, "Fill Dete-Dphi histograms in random order: v01, v02 or v02, v01 - does not apply to track-V0"};
177179
} ConfCPR;
178180

179181
// Efficiency
@@ -204,6 +206,8 @@ struct FemtoUniversePairTaskTrackV0Extended {
204206
std::unique_ptr<TH1> pEffHistp2;
205207
Service<o2::ccdb::BasicCCDBManager> ccdb;
206208

209+
TRandom2* randgen;
210+
207211
bool isNSigmaCombined(float mom, float nsigmaTPCParticle, float nsigmaTOFParticle, bool hasTOF)
208212
{
209213
if (mom <= confmom || hasTOF == 0) {
@@ -741,9 +745,23 @@ struct FemtoUniversePairTaskTrackV0Extended {
741745
}
742746

743747
if (ConfCPR.confIsCPR.value) {
744-
if (ConfCPR.confRectV0V0CPR && pairCloseRejectionV0.isClosePair<true>(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
748+
double rand;
749+
auto part1 = p1;
750+
auto part2 = p2;
751+
752+
if (ConfCPR.confRandomizeCPR) {
753+
randgen = new TRandom2(0);
754+
rand = randgen->Rndm();
755+
756+
if (rand > 0.5) {
757+
part1 = p2;
758+
part2 = p1;
759+
}
760+
delete randgen;
761+
}
762+
if (ConfCPR.confRectV0V0CPR && pairCloseRejectionV0.isClosePair<true>(part1, part2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
745763
return false;
746-
} else if (!ConfCPR.confRectV0V0CPR && pairCloseRejectionV0.isClosePair<false>(p1, p2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
764+
} else if (!ConfCPR.confRectV0V0CPR && pairCloseRejectionV0.isClosePair<false>(part1, part2, parts, magFieldTesla, femto_universe_container::EventType::same)) {
747765
return false;
748766
}
749767
}
@@ -1119,9 +1137,23 @@ struct FemtoUniversePairTaskTrackV0Extended {
11191137
continue;
11201138
}
11211139
if (ConfCPR.confIsCPR.value) {
1122-
if (ConfCPR.confRectV0V0CPR && pairCloseRejectionV0.isClosePair<true>(p1, p2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) {
1140+
double rand;
1141+
auto part1 = p1;
1142+
auto part2 = p2;
1143+
1144+
if (ConfCPR.confRandomizeCPR) {
1145+
randgen = new TRandom2(0);
1146+
rand = randgen->Rndm();
1147+
1148+
if (rand > 0.5) {
1149+
part1 = p2;
1150+
part2 = p1;
1151+
}
1152+
delete randgen;
1153+
}
1154+
if (ConfCPR.confRectV0V0CPR && pairCloseRejectionV0.isClosePair<true>(part1, part2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) {
11231155
continue;
1124-
} else if (!ConfCPR.confRectV0V0CPR && pairCloseRejectionV0.isClosePair<false>(p1, p2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) {
1156+
} else if (!ConfCPR.confRectV0V0CPR && pairCloseRejectionV0.isClosePair<false>(part1, part2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) {
11251157
continue;
11261158
}
11271159
}
@@ -1447,7 +1479,21 @@ struct FemtoUniversePairTaskTrackV0Extended {
14471479
continue;
14481480
}
14491481
if (ConfCPR.confIsCPR.value) {
1450-
if (pairCloseRejectionV0.isClosePair(p1, p2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) {
1482+
double rand;
1483+
auto part1 = p1;
1484+
auto part2 = p2;
1485+
1486+
if (ConfCPR.confRandomizeCPR) {
1487+
randgen = new TRandom2(0);
1488+
rand = randgen->Rndm();
1489+
1490+
if (rand > 0.5) {
1491+
part1 = p2;
1492+
part2 = p1;
1493+
}
1494+
delete randgen;
1495+
}
1496+
if (pairCloseRejectionV0.isClosePair(part1, part2, parts, magFieldTesla1, femto_universe_container::EventType::mixed)) {
14511497
continue;
14521498
}
14531499
}

0 commit comments

Comments
 (0)