From 9a7f32ad9c4101a58a0adabe1290425bb5f8628a Mon Sep 17 00:00:00 2001 From: Joey Staa Date: Mon, 1 Sep 2025 15:57:01 +0200 Subject: [PATCH 1/3] Added a switch for separating events by the magnetic field polarity --- .../Tasks/threeParticleCorrelations.cxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx b/PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx index a64d25c6d67..117b9183401 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx @@ -132,6 +132,7 @@ struct ThreeParticleCorrelations { SameKindPair pairMC{collBinningMC, 5, -1, &cache}; // Process configurables + Configurable confBfieldSwitch{"confBfieldSwitch", 0, "Switch for the detector magnetic field (1 if Pos, -1 if Neg, 0 if both)"}; Configurable confFakeV0Switch{"confFakeV0Switch", false, "Switch for the fakeV0Filter function"}; Configurable confRDSwitch{"confRDSwitch", true, "Switch for the radialDistanceFilter function"}; @@ -174,6 +175,7 @@ struct ThreeParticleCorrelations { rQARegistry.add("hEventCentrality", "hEventCentrality", {HistType::kTH1D, {{centralityAxis}}}); rQARegistry.add("hEventCentrality_MC", "hEventCentrality_MC", {HistType::kTH1D, {{centralityAxis}}}); rQARegistry.add("hEventZvtx", "hEventZvtx", {HistType::kTH1D, {{zvtxAxis}}}); + rQARegistry.add("hEventBfield", "hEventBfield", {HistType::kTH1D, {{2, -1, 1}}}); rQARegistry.add("hTrackPt", "hTrackPt", {HistType::kTH1D, {{100, 0, 4}}}); rQARegistry.add("hTrackEta", "hTrackEta", {HistType::kTH1D, {{100, -1, 1}}}); rQARegistry.add("hTrackPhi", "hTrackPhi", {HistType::kTH1D, {{100, (-1. / 2) * constants::math::PI, (5. / 2) * constants::math::PI}}}); @@ -327,15 +329,22 @@ struct ThreeParticleCorrelations { void processSame(MyFilteredCollision const& collision, aod::V0Datas const& v0s, MyFilteredTracks const& tracks, aod::BCsWithTimestamps const&) { - + if (!acceptEvent(collision, true)) { return; } auto bc = collision.bc_as(); auto bField = getMagneticField(bc.timestamp()); + if (confBfieldSwitch != 0) { + if (std::signbit(double(confBfieldSwitch)) != std::signbit(bField)) { + return; + } + } + rQARegistry.fill(HIST("hEventCentrality"), collision.centFT0C()); rQARegistry.fill(HIST("hEventZvtx"), collision.posZ()); + rQARegistry.fill(HIST("hEventBfield"), bField); // Start of the Track QA for (const auto& track : tracks) { @@ -455,6 +464,12 @@ struct ThreeParticleCorrelations { auto bc = coll_1.bc_as(); auto bField = getMagneticField(bc.timestamp()); + if (confBfieldSwitch != 0) { + if (std::signbit(double(confBfieldSwitch)) != std::signbit(bField)) { + return; + } + } + for (const auto& [trigger, associate] : soa::combinations(soa::CombinationsFullIndexPolicy(v0_1, track_2))) { if (v0Filters(coll_1, trigger, tracks) && trackFilters(associate)) { if (radialDistanceFilter(trigger, associate, bField, true) && fakeV0Filter(trigger, associate)) { From 20f993916ee10b3793a2d04aad0818c7570eee72 Mon Sep 17 00:00:00 2001 From: Joey Staa Date: Mon, 1 Sep 2025 16:11:07 +0200 Subject: [PATCH 2/3] Fixed a linting error --- .../Tasks/threeParticleCorrelations.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx b/PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx index 117b9183401..0e6d53d1d80 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx @@ -337,7 +337,7 @@ struct ThreeParticleCorrelations { auto bc = collision.bc_as(); auto bField = getMagneticField(bc.timestamp()); if (confBfieldSwitch != 0) { - if (std::signbit(double(confBfieldSwitch)) != std::signbit(bField)) { + if (std::signbit(static_cast(confBfieldSwitch)) != std::signbit(bField)) { return; } } @@ -465,7 +465,7 @@ struct ThreeParticleCorrelations { auto bc = coll_1.bc_as(); auto bField = getMagneticField(bc.timestamp()); if (confBfieldSwitch != 0) { - if (std::signbit(double(confBfieldSwitch)) != std::signbit(bField)) { + if (std::signbit(static_cast(confBfieldSwitch)) != std::signbit(bField)) { return; } } From c131e84a178ae15837484f9d923892ef74890d1c Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 1 Sep 2025 14:12:34 +0000 Subject: [PATCH 3/3] Please consider the following formatting changes --- .../Tasks/threeParticleCorrelations.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx b/PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx index 0e6d53d1d80..534c88d2cda 100644 --- a/PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx @@ -329,7 +329,7 @@ struct ThreeParticleCorrelations { void processSame(MyFilteredCollision const& collision, aod::V0Datas const& v0s, MyFilteredTracks const& tracks, aod::BCsWithTimestamps const&) { - + if (!acceptEvent(collision, true)) { return; } @@ -338,10 +338,10 @@ struct ThreeParticleCorrelations { auto bField = getMagneticField(bc.timestamp()); if (confBfieldSwitch != 0) { if (std::signbit(static_cast(confBfieldSwitch)) != std::signbit(bField)) { - return; + return; } } - + rQARegistry.fill(HIST("hEventCentrality"), collision.centFT0C()); rQARegistry.fill(HIST("hEventZvtx"), collision.posZ()); rQARegistry.fill(HIST("hEventBfield"), bField); @@ -465,11 +465,11 @@ struct ThreeParticleCorrelations { auto bc = coll_1.bc_as(); auto bField = getMagneticField(bc.timestamp()); if (confBfieldSwitch != 0) { - if (std::signbit(static_cast(confBfieldSwitch)) != std::signbit(bField)) { - return; - } + if (std::signbit(static_cast(confBfieldSwitch)) != std::signbit(bField)) { + return; + } } - + for (const auto& [trigger, associate] : soa::combinations(soa::CombinationsFullIndexPolicy(v0_1, track_2))) { if (v0Filters(coll_1, trigger, tracks) && trackFilters(associate)) { if (radialDistanceFilter(trigger, associate, bField, true) && fakeV0Filter(trigger, associate)) {