Skip to content

Commit cba0dfa

Browse files
JStaaalibuild
andauthored
[PWGCF] Added a switch for separating events by the magnetic field polarity (#12814)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 3df07e7 commit cba0dfa

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ struct ThreeParticleCorrelations {
132132
SameKindPair<MyFilteredMCGenCollisions, MyFilteredMCParticles, BinningTypeMC> pairMC{collBinningMC, 5, -1, &cache};
133133

134134
// Process configurables
135+
Configurable<int> confBfieldSwitch{"confBfieldSwitch", 0, "Switch for the detector magnetic field (1 if Pos, -1 if Neg, 0 if both)"};
135136
Configurable<bool> confFakeV0Switch{"confFakeV0Switch", false, "Switch for the fakeV0Filter function"};
136137
Configurable<bool> confRDSwitch{"confRDSwitch", true, "Switch for the radialDistanceFilter function"};
137138

@@ -174,6 +175,7 @@ struct ThreeParticleCorrelations {
174175
rQARegistry.add("hEventCentrality", "hEventCentrality", {HistType::kTH1D, {{centralityAxis}}});
175176
rQARegistry.add("hEventCentrality_MC", "hEventCentrality_MC", {HistType::kTH1D, {{centralityAxis}}});
176177
rQARegistry.add("hEventZvtx", "hEventZvtx", {HistType::kTH1D, {{zvtxAxis}}});
178+
rQARegistry.add("hEventBfield", "hEventBfield", {HistType::kTH1D, {{2, -1, 1}}});
177179
rQARegistry.add("hTrackPt", "hTrackPt", {HistType::kTH1D, {{100, 0, 4}}});
178180
rQARegistry.add("hTrackEta", "hTrackEta", {HistType::kTH1D, {{100, -1, 1}}});
179181
rQARegistry.add("hTrackPhi", "hTrackPhi", {HistType::kTH1D, {{100, (-1. / 2) * constants::math::PI, (5. / 2) * constants::math::PI}}});
@@ -334,8 +336,15 @@ struct ThreeParticleCorrelations {
334336

335337
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
336338
auto bField = getMagneticField(bc.timestamp());
339+
if (confBfieldSwitch != 0) {
340+
if (std::signbit(static_cast<double>(confBfieldSwitch)) != std::signbit(bField)) {
341+
return;
342+
}
343+
}
344+
337345
rQARegistry.fill(HIST("hEventCentrality"), collision.centFT0C());
338346
rQARegistry.fill(HIST("hEventZvtx"), collision.posZ());
347+
rQARegistry.fill(HIST("hEventBfield"), bField);
339348

340349
// Start of the Track QA
341350
for (const auto& track : tracks) {
@@ -455,6 +464,12 @@ struct ThreeParticleCorrelations {
455464

456465
auto bc = coll_1.bc_as<aod::BCsWithTimestamps>();
457466
auto bField = getMagneticField(bc.timestamp());
467+
if (confBfieldSwitch != 0) {
468+
if (std::signbit(static_cast<double>(confBfieldSwitch)) != std::signbit(bField)) {
469+
return;
470+
}
471+
}
472+
458473
for (const auto& [trigger, associate] : soa::combinations(soa::CombinationsFullIndexPolicy(v0_1, track_2))) {
459474
if (v0Filters(coll_1, trigger, tracks) && trackFilters(associate)) {
460475
if (radialDistanceFilter(trigger, associate, bField, true) && fakeV0Filter(trigger, associate)) {

0 commit comments

Comments
 (0)