Skip to content

Commit 6cb56b5

Browse files
cterrevoalibuild
andauthored
[PWGHF] Added AND option for TPC,TOF pid to Xic (#9816)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 2735b91 commit 6cb56b5

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

PWGHF/TableProducer/candidateSelectorXicToPKPi.cxx

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ struct HfCandidateSelectorXicToPKPi {
4444
Configurable<double> ptCandMin{"ptCandMin", 0., "Lower bound of candidate pT"};
4545
Configurable<double> ptCandMax{"ptCandMax", 36., "Upper bound of candidate pT"};
4646
Configurable<bool> usePid{"usePid", true, "Bool to use or not the PID at filtering level"};
47+
// Combined PID options
48+
Configurable<bool> usePidTpcAndTof{"usePidTpcAndTof", false, "Bool to decide how to combine TPC and TOF PID: true = both (if present, only one otherwise); false = one is enough"};
4749
// TPC PID
4850
Configurable<double> ptPidTpcMin{"ptPidTpcMin", 0.15, "Lower bound of track pT for TPC PID"};
4951
Configurable<double> ptPidTpcMax{"ptPidTpcMax", 20., "Upper bound of track pT for TPC PID"};
@@ -81,7 +83,7 @@ struct HfCandidateSelectorXicToPKPi {
8183
TrackSelectorPr selectorProton;
8284
HfHelper hfHelper;
8385

84-
using TracksSel = soa::Join<aod::Tracks, aod::TracksPidPi, aod::PidTpcTofFullPi, aod::TracksPidKa, aod::PidTpcTofFullKa, aod::TracksPidPr, aod::PidTpcTofFullPr>;
86+
using TracksSel = soa::Join<aod::TracksWExtra, aod::TracksPidPi, aod::PidTpcTofFullPi, aod::TracksPidKa, aod::PidTpcTofFullKa, aod::TracksPidPr, aod::PidTpcTofFullPr>;
8587

8688
void init(InitContext const&)
8789
{
@@ -269,11 +271,24 @@ struct HfCandidateSelectorXicToPKPi {
269271
pidXicToPiKP = 1;
270272
} else {
271273
// track-level PID selection
272-
auto pidTrackPos1Proton = selectorProton.statusTpcOrTof(trackPos1);
273-
auto pidTrackPos2Proton = selectorProton.statusTpcOrTof(trackPos2);
274-
auto pidTrackPos1Pion = selectorPion.statusTpcOrTof(trackPos1);
275-
auto pidTrackPos2Pion = selectorPion.statusTpcOrTof(trackPos2);
276-
auto pidTrackNegKaon = selectorKaon.statusTpcOrTof(trackNeg);
274+
TrackSelectorPID::Status pidTrackPos1Proton = TrackSelectorPID::Accepted;
275+
TrackSelectorPID::Status pidTrackPos2Proton = TrackSelectorPID::Accepted;
276+
TrackSelectorPID::Status pidTrackPos1Pion = TrackSelectorPID::Accepted;
277+
TrackSelectorPID::Status pidTrackPos2Pion = TrackSelectorPID::Accepted;
278+
TrackSelectorPID::Status pidTrackNegKaon = TrackSelectorPID::Accepted;
279+
if (usePidTpcAndTof) {
280+
pidTrackPos1Proton = selectorProton.statusTpcAndTof(trackPos1);
281+
pidTrackPos2Proton = selectorProton.statusTpcAndTof(trackPos2);
282+
pidTrackPos1Pion = selectorPion.statusTpcAndTof(trackPos1);
283+
pidTrackPos2Pion = selectorPion.statusTpcAndTof(trackPos2);
284+
pidTrackNegKaon = selectorKaon.statusTpcAndTof(trackNeg);
285+
} else {
286+
pidTrackPos1Proton = selectorProton.statusTpcOrTof(trackPos1);
287+
pidTrackPos2Proton = selectorProton.statusTpcOrTof(trackPos2);
288+
pidTrackPos1Pion = selectorPion.statusTpcOrTof(trackPos1);
289+
pidTrackPos2Pion = selectorPion.statusTpcOrTof(trackPos2);
290+
pidTrackNegKaon = selectorKaon.statusTpcOrTof(trackNeg);
291+
}
277292

278293
if (pidTrackPos1Proton == TrackSelectorPID::Accepted &&
279294
pidTrackNegKaon == TrackSelectorPID::Accepted &&

0 commit comments

Comments
 (0)