diff --git a/PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx b/PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx index aacb5a870ae..3934c770ebf 100644 --- a/PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx +++ b/PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx @@ -135,7 +135,7 @@ struct hyperRecoTask { Configurable TPCRigidityMinHe{"TPCRigidityMinHe", 0.2, "Minimum rigidity of the helium candidate"}; Configurable etaMax{"eta", 1., "eta daughter"}; Configurable nSigmaMaxHe{"nSigmaMaxHe", 5, "helium dEdx cut (n sigma)"}; - Configurable nTPCClusMinHe{"nTPCClusMinHe", 80, "helium NTPC clusters cut"}; + Configurable nTPCClusMin{"nTPCClusMin", 70, "helium NTPC clusters cut"}; Configurable mcSignalOnly{"mcSignalOnly", true, "If true, save only signal in MC"}; // Define o2 fitter, 2-prong, active memory (no need to redefine per event) @@ -148,6 +148,7 @@ struct hyperRecoTask { float piMass = o2::constants::physics::MassPionCharged; Configurable useCustomVertexer{"useCustomVertexer", false, "Use custom vertexer"}; + Configurable skipAmbiTracks{"skipAmbiTracks", false, "Skip ambiguous tracks"}; Configurable customVertexerTimeMargin{"customVertexerTimeMargin", 800, "Time margin for custom vertexer (ns)"}; Configurable> cfgBetheBlochParams{"cfgBetheBlochParams", {betheBlochDefault[0], 1, 6, particleNames, betheBlochParNames}, "TPC Bethe-Bloch parameterisation for He3"}; Configurable cfgCompensatePIDinTracking{"cfgCompensatePIDinTracking", true, "If true, divide tpcInnerParam by the electric charge"}; @@ -209,6 +210,9 @@ struct hyperRecoTask { fitter.setMatCorrType(static_cast(mat)); svCreator.setTimeMargin(customVertexerTimeMargin); + if (skipAmbiTracks) { + svCreator.setSkipAmbiTracks(); + } const AxisSpec rigidityAxis{rigidityBins, "#it{p}^{TPC}/#it{z}"}; const AxisSpec dedxAxis{dedxBins, "d#it{E}/d#it{x}"}; @@ -496,7 +500,7 @@ struct hyperRecoTask { } auto& heTrack = isHe ? posTrack : negTrack; auto& piTrack = isHe ? negTrack : posTrack; - if (heTrack.tpcNClsFound() < nTPCClusMinHe) { + if (heTrack.tpcNClsFound() < nTPCClusMin || piTrack.tpcNClsFound() < nTPCClusMin) { continue; } @@ -521,17 +525,12 @@ struct hyperRecoTask { if (std::abs(track.eta()) > etaMax) continue; - if (!track.hasITS()) + if (!track.hasITS() || track.tpcNClsFound() < nTPCClusMin) continue; auto nSigmaHe = computeNSigmaHe3(track); bool isHe = nSigmaHe > -1 * nSigmaMaxHe; int pdgHypo = isHe ? heDauPdg : 211; - - if (isHe && track.tpcNClsFound() < nTPCClusMinHe) { - continue; - } - svCreator.appendTrackCand(track, collisions, pdgHypo, ambiguousTracks, bcs); } auto& svPool = svCreator.getSVCandPool(collisions); diff --git a/PWGLF/Utils/svPoolCreator.h b/PWGLF/Utils/svPoolCreator.h index fbf09f618b7..a89e14ceb7a 100644 --- a/PWGLF/Utils/svPoolCreator.h +++ b/PWGLF/Utils/svPoolCreator.h @@ -60,6 +60,7 @@ class svPoolCreator void setTimeMargin(float timeMargin) { timeMarginNS = timeMargin; } void setFitter(const o2::vertexing::DCAFitterN<2>& fitter) { this->fitter = fitter; } + void setSkipAmbiTracks() { skipAmbiTracks = true; } o2::vertexing::DCAFitterN<2>* getFitter() { return &fitter; } std::array, 4> getTrackCandPool() { return trackCandPool; } @@ -76,7 +77,7 @@ class svPoolCreator if (trackCand.template collision_as().has_bc()) { globalBC = trackCand.template collision_as().template bc_as().globalBC(); } - } else { + } else if (!skipAmbiTracks) { for (const auto& ambTrack : ambiTracks) { if (ambTrack.trackId() != trackCand.globalIndex()) { continue; @@ -88,6 +89,8 @@ class svPoolCreator globalBC = ambTrack.bc_as().begin().globalBC(); break; } + } else { + globalBC = -1; } if (globalBC == -1) { @@ -219,6 +222,7 @@ class svPoolCreator int track0Pdg; int track1Pdg; float timeMarginNS = 600.; + bool skipAmbiTracks = false; std::unordered_map> tmap; std::array, 4> trackCandPool; // Sorting: dau0 pos, dau0 neg, dau1 pos, dau1 neg