@@ -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}}});
@@ -327,15 +329,22 @@ struct ThreeParticleCorrelations {
327329
328330 void processSame (MyFilteredCollision const & collision, aod::V0Datas const & v0s, MyFilteredTracks const & tracks, aod::BCsWithTimestamps const &)
329331 {
330-
332+
331333 if (!acceptEvent (collision, true )) {
332334 return ;
333335 }
334336
335337 auto bc = collision.bc_as <aod::BCsWithTimestamps>();
336338 auto bField = getMagneticField (bc.timestamp ());
339+ if (confBfieldSwitch != 0 ) {
340+ if (std::signbit (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 (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