Skip to content

Commit 7e6c9ce

Browse files
ddobrigkalibuild
andauthored
[PWGLF] Protect against accidental acceptance of TPC-only V0s (#10908)
Co-authored-by: David Dobrigkeit Chinellato <david.dobrigkeit.chinellato.cern.ch> Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
1 parent 9fc8940 commit 7e6c9ce

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ struct StrangenessBuilder {
818818
// process candidate with helper, generate properties for consulting
819819
// <false>: do not apply selections: do as much as possible to preserve
820820
// candidate at this level and do not select with topo selections
821-
if (straHelper.buildV0Candidate<false>(v0tableGrouped[iV0].collisionIds[ic], collision.posX(), collision.posY(), collision.posZ(), pTrack, nTrack, posTrackPar, negTrackPar, true, false)) {
821+
if (straHelper.buildV0Candidate<false>(v0tableGrouped[iV0].collisionIds[ic], collision.posX(), collision.posY(), collision.posZ(), pTrack, nTrack, posTrackPar, negTrackPar, true, false, true)) {
822822
// candidate built, check pointing angle
823823
if (straHelper.v0.pointingAngle < bestPointingAngle) {
824824
bestPointingAngle = straHelper.v0.pointingAngle;
@@ -1294,7 +1294,7 @@ struct StrangenessBuilder {
12941294
}
12951295
}
12961296

1297-
if (!straHelper.buildV0Candidate(v0.collisionId, pvX, pvY, pvZ, posTrack, negTrack, posTrackPar, negTrackPar, v0.isCollinearV0, mEnabledTables[kV0Covs])) {
1297+
if (!straHelper.buildV0Candidate(v0.collisionId, pvX, pvY, pvZ, posTrack, negTrack, posTrackPar, negTrackPar, v0.isCollinearV0, mEnabledTables[kV0Covs], true)) {
12981298
products.v0dataLink(-1, -1);
12991299
continue;
13001300
}

PWGLF/Utils/strangenessBuilderHelper.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,8 @@ class strangenessBuilderHelper
272272
TTrackParametrization& positiveTrackParam,
273273
TTrackParametrization& negativeTrackParam,
274274
bool useCollinearFit = false,
275-
bool calculateCovariance = false)
275+
bool calculateCovariance = false,
276+
bool acceptTPCOnly = false)
276277
{
277278
if constexpr (useSelections) {
278279
// verify track quality
@@ -293,6 +294,14 @@ class strangenessBuilderHelper
293294
v0 = {};
294295
return false;
295296
}
297+
if (!acceptTPCOnly && !positiveTrack.hasITS()) {
298+
v0 = {};
299+
return false;
300+
}
301+
if (!acceptTPCOnly && !negativeTrack.hasITS()) {
302+
v0 = {};
303+
return false;
304+
}
296305
}
297306

298307
// Calculate DCA with respect to the collision associated to the V0
@@ -624,7 +633,7 @@ class strangenessBuilderHelper
624633
auto posTrackPar = getTrackParCov(positiveTrack);
625634
auto negTrackPar = getTrackParCov(negativeTrack);
626635

627-
if (!buildV0Candidate(collisionIndex, pvX, pvY, pvZ, positiveTrack, negativeTrack, posTrackPar, negTrackPar, false, processCovariances)) {
636+
if (!buildV0Candidate(collisionIndex, pvX, pvY, pvZ, positiveTrack, negativeTrack, posTrackPar, negTrackPar, false, processCovariances, false)) {
628637
return false;
629638
}
630639
if (!buildCascadeCandidate(collisionIndex, pvX, pvY, pvZ, v0, positiveTrack, negativeTrack, bachelorTrack, calculateBachelorBaryonVariables, useCascadeMomentumAtPV, processCovariances)) {

0 commit comments

Comments
 (0)