Skip to content

Commit d29ffec

Browse files
committed
Added a switch for the radialDistanceFilter function
1 parent 52d7ad8 commit d29ffec

File tree

1 file changed

+39
-35
lines changed

1 file changed

+39
-35
lines changed

PWGCF/MultiparticleCorrelations/Tasks/threeParticleCorrelations.cxx

Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ struct ThreeParticleCorrelations {
120120
SameKindPair<MyFilteredMCGenCollisions, MyFilteredMCParticles, BinningTypeMC> pairMC{collBinningMC, 5, -1, &cache};
121121

122122
// Process configurables
123-
Configurable<bool> confFilterSwitch{"confFilterSwitch", false, "Switch for the fakeV0Filter function"};
123+
Configurable<bool> confFakeV0Switch{"confFakeV0Switch", false, "Switch for the fakeV0Filter function"};
124+
Configurable<bool> confRDSwitch{"confRDSwitch", true, "Switch for the radialDistanceFilter function"};
124125

125126
// Efficiency histograms
126127
TH2D** hEffPions = new TH2D*[2];
@@ -770,7 +771,7 @@ struct ThreeParticleCorrelations {
770771
bool fakeV0Filter(const V0Cand& v0, const TrackCand& track)
771772
{
772773

773-
if (confFilterSwitch) {
774+
if (confFakeV0Switch) {
774775

775776
if (trackPID(track)[0] == kaonID) { // Kaons
776777
return kTRUE;
@@ -814,45 +815,48 @@ struct ThreeParticleCorrelations {
814815
bool radialDistanceFilter(const V0Cand& v0, const TrackCand& track, double B, bool Mix)
815816
{
816817

817-
auto proton = v0.template posTrack_as<MyFilteredTracks>();
818-
if (v0Sign(v0) == -1) {
819-
proton = v0.template negTrack_as<MyFilteredTracks>();
820-
}
821-
822-
double dEta = proton.eta() - track.eta();
823-
if (std::abs(dEta) > dEtaMin) {
824-
return kTRUE;
825-
}
826-
827-
double dPhiStar;
828-
double dPhi = proton.phi() - track.phi();
829-
double phaseProton = (-0.3 * B * proton.sign()) / (2 * proton.pt());
830-
double phaseTrack = (-0.3 * B * track.sign()) / (2 * track.pt());
831-
832-
for (double r = rMin; r <= rMax; r += 0.01) {
833-
dPhiStar = RecoDecay::constrainAngle(dPhi + std::asin(phaseProton * r) - std::asin(phaseTrack * r), -constants::math::PIHalf);
834-
835-
if (r == rMin) {
836-
if (!Mix) {
837-
rPhiStarRegistry.fill(HIST("hSEProtonPreCut"), dPhiStar, dEta);
838-
} else {
839-
rPhiStarRegistry.fill(HIST("hMEProtonPreCut"), dPhiStar, dEta);
840-
}
818+
if (confRDSwitch) {
819+
820+
auto proton = v0.template posTrack_as<MyFilteredTracks>();
821+
if (v0Sign(v0) == -1) {
822+
proton = v0.template negTrack_as<MyFilteredTracks>();
841823
}
842824

843-
if (std::abs(dPhiStar) < dPhiStarMin) {
844-
return kFALSE;
825+
double dEta = proton.eta() - track.eta();
826+
if (std::abs(dEta) > dEtaMin) {
827+
return kTRUE;
845828
}
846829

847-
if (r == rMin) {
848-
if (!Mix) {
849-
rPhiStarRegistry.fill(HIST("hSEProtonPostCut"), dPhiStar, dEta);
850-
} else {
851-
rPhiStarRegistry.fill(HIST("hMEProtonPostCut"), dPhiStar, dEta);
852-
}
830+
double dPhiStar;
831+
double dPhi = proton.phi() - track.phi();
832+
double phaseProton = (-0.3 * B * proton.sign()) / (2 * proton.pt());
833+
double phaseTrack = (-0.3 * B * track.sign()) / (2 * track.pt());
834+
835+
for (double r = rMin; r <= rMax; r += 0.01) {
836+
dPhiStar = RecoDecay::constrainAngle(dPhi + std::asin(phaseProton * r) - std::asin(phaseTrack * r), -constants::math::PIHalf);
837+
838+
if (r == rMin) {
839+
if (!Mix) {
840+
rPhiStarRegistry.fill(HIST("hSEProtonPreCut"), dPhiStar, dEta);
841+
} else {
842+
rPhiStarRegistry.fill(HIST("hMEProtonPreCut"), dPhiStar, dEta);
843+
}
844+
}
845+
846+
if (std::abs(dPhiStar) < dPhiStarMin) {
847+
return kFALSE;
848+
}
849+
850+
if (r == rMin) {
851+
if (!Mix) {
852+
rPhiStarRegistry.fill(HIST("hSEProtonPostCut"), dPhiStar, dEta);
853+
} else {
854+
rPhiStarRegistry.fill(HIST("hMEProtonPostCut"), dPhiStar, dEta);
855+
}
856+
}
853857
}
854858
}
855-
859+
856860
return kTRUE;
857861
}
858862
};

0 commit comments

Comments
 (0)