@@ -96,6 +96,9 @@ struct HfDataCreatorDV0Reduced {
9696 Configurable<float > maxV0DCA{" maxV0DCA" , 0.1 , " maximum DCA for K0S and Lambda" };
9797 Configurable<float > minV0dauDCA{" minV0dauDCA" , 0.05 , " minimum DCA for V0 daughters" };
9898 Configurable<float > maxV0dauDCA{" maxV0dauDCA" , 1 ., " maximum DCA for V0 daughters" };
99+ Configurable<float > maxNsigmaPrForLambda{" maxNsigmaPrForLambda" , 4 ., " maximum proton NSigma in TPC and TOF for Lambdas" };
100+
101+
99102
100103 // material correction for track propagation
101104 o2::base::MatLayerCylSet* lut;
@@ -106,6 +109,7 @@ struct HfDataCreatorDV0Reduced {
106109
107110 using CandsDplusFiltered = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelDplusToPiKPi>>;
108111 using CandDstarFiltered = soa::Filtered<soa::Join<aod::HfD0FromDstar, aod::HfCandDstar, aod::HfSelDstarToD0Pi>>;
112+ using BigTracksPID = soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::pidTPCFullKa, aod::pidTOFFullKa, aod::pidTPCFullPr, aod::pidTOFFullPr>;
109113
110114 Filter filterSelectDplus = (aod::hf_sel_candidate_dplus::isSelDplusToPiKPi >= selectionFlagDplus);
111115 Filter filterSelectedCandDstar = (aod::hf_sel_candidate_dstar::isSelDstarToD0Pi == selectionFlagDstarToD0Pi);
@@ -155,8 +159,8 @@ struct HfDataCreatorDV0Reduced {
155159 // / \param v0 is the v0 candidate
156160 // / \param collision is the current collision
157161 // / \return a bitmap with mass hypotesis if passes all cuts
158- template <typename V0, typename Coll>
159- inline uint8_t isSelectedV0 (const V0& v0, const Coll& collision, const std::array<int , 3 >& dDaughtersIDs)
162+ template <typename V0, typename Coll, typename Tr >
163+ inline uint8_t isSelectedV0 (const V0& v0, const Coll& collision, const std::array<Tr, 2 >& dauTracks, const std::array< int , 3 >& dDaughtersIDs)
160164 {
161165 uint8_t isSelected{BIT (K0s) | BIT (Lambda) | BIT (AntiLambda)};
162166 // reject VOs that share daughters with D
@@ -190,6 +194,15 @@ struct HfDataCreatorDV0Reduced {
190194 if (TESTBIT (isSelected, AntiLambda) && std::fabs (v0.mAntiLambda () - MassLambda0) > deltaMassLambda) {
191195 CLRBIT (isSelected, AntiLambda);
192196 }
197+ // PID (Lambda/AntiLambda only)
198+ float nSigmaPrTpc[2 ] = {dauTracks[0 ].tpcNSigmaPr (), dauTracks[1 ].tpcNSigmaPr ()};
199+ float nSigmaPrTof[2 ] = {dauTracks[0 ].tofNSigmaPr (), dauTracks[1 ].tofNSigmaPr ()};
200+ if (TESTBIT (isSelected, Lambda) && ((dauTracks[0 ].hasTPC () && std::fabs (nSigmaPrTpc[0 ]) > maxNsigmaPrForLambda) || (dauTracks[0 ].hasTOF () && std::fabs (nSigmaPrTof[0 ]) > maxNsigmaPrForLambda))) {
201+ CLRBIT (isSelected, Lambda);
202+ }
203+ if (TESTBIT (isSelected, AntiLambda) && ((dauTracks[1 ].hasTPC () && std::fabs (nSigmaPrTpc[1 ]) > maxNsigmaPrForLambda) || (dauTracks[1 ].hasTOF () && std::fabs (nSigmaPrTof[1 ]) > maxNsigmaPrForLambda))) {
204+ CLRBIT (isSelected, AntiLambda);
205+ }
193206 return isSelected;
194207 }
195208
@@ -259,8 +272,10 @@ struct HfDataCreatorDV0Reduced {
259272
260273 // Loop on V0 candidates
261274 for (const auto & v0 : V0s) {
262- v0_type = isSelectedV0 (v0, collision,prongIdsD);
275+ auto posTrack = v0.posTrack_as <BigTracksPID>();
276+ auto negTrack = v0.negTrack_as <BigTracksPID>();
263277 // Apply selsection
278+ v0_type = isSelectedV0 (v0, collision, std::array{posTrack, negTrack}, prongIdsD);
264279 if (v0_type == 0 ){
265280 continue ;
266281 }
0 commit comments