@@ -502,7 +502,7 @@ struct HfTrackIndexSkimCreatorTagSelTracks {
502502 selectorKaon.setRangeNSigmaTof (-config.selectionsPid ->get (ChannelKaonPid, 5u ), config.selectionsPid ->get (ChannelKaonPid, 5u )); // 5u == "nSigmaMaxTof"
503503 }
504504
505- // / Apply track-quality (ITS/TPC) + optional ITS-PID preselection for light-nucleus daughters used in charm-nuclei 3-prong channels (Cd/Ct/Ch).
505+ // / Apply track-quality (ITS/TPC) + optional ITS-PID preselection for light-nucleus daughters used in charm-nuclei 3-prong channels (Cd/Ct/Ch/Ca ).
506506 // / \tparam TrackType Track providing ITS/TPC quality accessors.
507507 // / \param track Daughter track to be tested (either prong0 or prong2).
508508 // / \param lightnuclei Species selector: 0=Deuteron, 1=Triton, 2=Helium3.
@@ -3348,9 +3348,15 @@ struct HfTrackIndexSkimCreatorCascades {
33483348 // cascade cuts
33493349 Configurable<double > ptCascCandMin{" ptCascCandMin" , -1 ., " min. pT of the cascade candidate" }; // PbPb 2018: use 1
33503350 Configurable<double > cutInvMassCascLc{" cutInvMassCascLc" , 1 ., " Lc candidate invariant mass difference wrt PDG" }; // for PbPb 2018: use 0.2
3351+ Configurable<double > cutInvMassCascCharmNuclei{" cutInvMassCascCharmNuclei" , 1 ., " charm nuclei candidate invariant mass difference wrt mass threshold" };
3352+
33513353 // Configurable<double> cutCascDCADaughters{"cutCascDCADaughters", .1, "DCA between V0 and bachelor in cascade"};
33523354 // proton PID
33533355 Configurable<bool > applyProtonPid{" applyProtonPid" , false , " Apply proton PID for Lc->pK0S" };
3356+ Configurable<bool > applyDeuteronPid{" applyDeuteronPid" , false , " Apply Deuteron PID for Cd->dK0S" };
3357+ Configurable<bool > applyTritonPid{" applyTritonPid" , false , " Apply Triton PID for Ct->trK0S" };
3358+ Configurable<bool > applyHelium3Pid{" applyHelium3Pid" , false , " Apply Helium3 PID for Ch->HeK0S" };
3359+ Configurable<bool > applyAlphaPid{" applyAlphaPid" , false , " Apply Alpha PID for Ca->AlK0S" };
33543360
33553361 // CCDB
33563362 Configurable<std::string> ccdbUrl{" ccdbUrl" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
@@ -3371,7 +3377,16 @@ struct HfTrackIndexSkimCreatorCascades {
33713377 using FilteredTrackAssocSel = soa::Filtered<soa::Join<aod::TrackAssoc, aod::HfSelTrack>>;
33723378
33733379 Filter filterSelectCollisions = (aod::hf_sel_collision::whyRejectColl == static_cast <o2::hf_evsel::HfCollisionRejectionMask>(0 ));
3374- Filter filterSelectTrackIds = (aod::hf_sel_track::isSelProng & static_cast <uint32_t >(BIT(CandidateType::CandV0bachelor))) != 0u && (!config.applyProtonPid || (aod::hf_sel_track::isIdentifiedPid & static_cast <uint32_t >(BIT(ChannelsProtonPid::LcToPK0S))) != 0u );
3380+
3381+ Filter filterSelectTrackIds =
3382+ ((aod::hf_sel_track::isSelProng & static_cast <uint32_t >(BIT(CandidateType::CandV0bachelor))) != 0u ) &&
3383+
3384+ ((config.applyProtonPid && (aod::hf_sel_track::isIdentifiedPid & static_cast <uint32_t >(BIT(ChannelsProtonPid::LcToPK0S))) != 0u ) ||
3385+ (config.applyDeuteronPid && (aod::hf_sel_track::isIdentifiedPid & static_cast <uint32_t >(BIT(ChannelsDeuteronPid))) != 0u ) ||
3386+ (config.applyTritonPid && (aod::hf_sel_track::isIdentifiedPid & static_cast <uint32_t >(BIT(ChannelsTritonPid))) != 0u ) ||
3387+ (config.applyHelium3Pid && (aod::hf_sel_track::isIdentifiedPid & static_cast <uint32_t >(BIT(ChannelsHeliumPid))) != 0u ) ||
3388+ (config.applyAlphaPid && (aod::hf_sel_track::isIdentifiedPid & static_cast <uint32_t >(BIT(ChannelsAlphaPid))) != 0u ) ||
3389+ (!config.applyProtonPid && !config.applyDeuteronPid && !config.applyTritonPid && !config.applyHelium3Pid && !config.applyAlphaPid));
33753390
33763391 Preslice<FilteredTrackAssocSel> trackIndicesPerCollision = aod::track_association::collisionId;
33773392 Preslice<aod::V0Datas> v0sPerCollision = aod::v0data::collisionId;
@@ -3408,7 +3423,11 @@ struct HfTrackIndexSkimCreatorCascades {
34083423 registry.add (" hVtx2ProngX" , " 2-prong candidates;#it{x}_{sec. vtx.} (cm);entries" , {HistType::kTH1D , {{1000 , -2 ., 2 .}}});
34093424 registry.add (" hVtx2ProngY" , " 2-prong candidates;#it{y}_{sec. vtx.} (cm);entries" , {HistType::kTH1D , {{1000 , -2 ., 2 .}}});
34103425 registry.add (" hVtx2ProngZ" , " 2-prong candidates;#it{z}_{sec. vtx.} (cm);entries" , {HistType::kTH1D , {{1000 , -2 ., 2 .}}});
3411- registry.add (" hMassLcToPK0S" , " #Lambda_{c}^ candidates;inv. mass (p K_{S}^{0}) (GeV/#it{c}^{2});entries" , {HistType::kTH1D , {{500 , 0 ., 5 .}}});
3426+ registry.add (" hMassLcToPK0S" , " #Lambda_{c}^ candidates;inv. mass (p K_{S}^{0}) (GeV/#it{c}^{2});entries" , {HistType::kTH1D , {{500 , 0 ., 5 .}}});
3427+ registry.add (" hMassCdToDeK0S" , " Cd candidates;inv. mass (d K_{S}^{0}) (GeV/#it{c}^{2});entries" , {HistType::kTH1D , {{500 , 2 ., 7 .}}});
3428+ registry.add (" hMassCtToTrK0S" , " Ct candidates;inv. mass (tr K_{S}^{0}) (GeV/#it{c}^{2});entries" , {HistType::kTH1D , {{500 , 2 ., 7 .}}});
3429+ registry.add (" hMassChToHeK0S" , " Ch candidates;inv. mass (he3 K_{S}^{0}) (GeV/#it{c}^{2});entries" , {HistType::kTH1D , {{500 , 2 ., 7 .}}});
3430+ registry.add (" hMassCaToAlK0S" , " Ca candidates;inv. mass (alpha K_{S}^{0}) (GeV/#it{c}^{2});entries" , {HistType::kTH1D , {{500 , 2 ., 7 .}}});
34123431 }
34133432 }
34143433
@@ -3492,7 +3511,25 @@ struct HfTrackIndexSkimCreatorCascades {
34923511 // invariant-mass cut: we do it here, before updating the momenta of bach and V0 during the fitting to save CPU
34933512 // TODO: but one should better check that the value here and after the fitter do not change significantly!!!
34943513 double mass2K0sP = RecoDecay::m (std::array{pVecBach, pVecV0}, std::array{MassProton, MassK0Short});
3495- if ((config.cutInvMassCascLc >= 0 .) && (std::abs (mass2K0sP - MassLambdaCPlus) > config.cutInvMassCascLc )) {
3514+ double mass2K0sDe = RecoDecay::m (std::array{pVecBach, pVecV0}, std::array{MassDeuteron, MassK0Short});
3515+ double mass2K0sTr = RecoDecay::m (std::array{pVecBach, pVecV0}, std::array{MassTriton, MassK0Short});
3516+ double mass2K0sHe = RecoDecay::m (std::array{pVecBach, pVecV0}, std::array{MassHelium3, MassK0Short});
3517+ double mass2K0sAl = RecoDecay::m (std::array{pVecBach, pVecV0}, std::array{MassAlpha, MassK0Short});
3518+
3519+ const auto isIdentifiedPid = bachIdx.isIdentifiedPid ();
3520+ const bool applyAnyBachelorPid = config.applyProtonPid || config.applyDeuteronPid || config.applyTritonPid || config.applyHelium3Pid || config.applyAlphaPid ;
3521+ const bool isChannelLc = !applyAnyBachelorPid || (config.applyProtonPid && TESTBIT (isIdentifiedPid, ChannelsProtonPid::LcToPK0S));
3522+ const bool isChannelCd = config.applyDeuteronPid && TESTBIT (isIdentifiedPid, ChannelsDeuteronPid);
3523+ const bool isChannelCt = config.applyTritonPid && TESTBIT (isIdentifiedPid, ChannelsTritonPid);
3524+ const bool isChannelCh = config.applyHelium3Pid && TESTBIT (isIdentifiedPid, ChannelsHeliumPid);
3525+ const bool isChannelCa = config.applyAlphaPid && TESTBIT (isIdentifiedPid, ChannelsAlphaPid);
3526+
3527+ bool isSelectedLc = isChannelLc && ((config.cutInvMassCascLc < 0 .) || (std::abs (mass2K0sP - MassLambdaCPlus) <= config.cutInvMassCascLc ));
3528+ bool isSelectedCd = isChannelCd && ((config.cutInvMassCascCharmNuclei < 0 .) || (mass2K0sDe - MassDeuteron - MassLambdaCPlus <= config.cutInvMassCascCharmNuclei ));
3529+ bool isSelectedCt = isChannelCt && ((config.cutInvMassCascCharmNuclei < 0 .) || (mass2K0sTr - MassTriton - MassLambdaCPlus <= config.cutInvMassCascCharmNuclei ));
3530+ bool isSelectedCh = isChannelCh && ((config.cutInvMassCascCharmNuclei < 0 .) || (mass2K0sHe - MassHelium3 - MassLambdaCPlus <= config.cutInvMassCascCharmNuclei ));
3531+ bool isSelectedCa = isChannelCa && ((config.cutInvMassCascCharmNuclei < 0 .) || (mass2K0sAl - MassAlpha - MassLambdaCPlus <= config.cutInvMassCascCharmNuclei ));
3532+ if (!isSelectedLc && !isSelectedCd && !isSelectedCt && !isSelectedCh && !isSelectedCa) {
34963533 continue ;
34973534 }
34983535
@@ -3535,6 +3572,17 @@ struct HfTrackIndexSkimCreatorCascades {
35353572 // invariant mass
35363573 // re-calculate invariant masses with updated momenta, to fill the histogram
35373574 mass2K0sP = RecoDecay::m (std::array{pVecBach, pVecV0}, std::array{MassProton, MassK0Short});
3575+ mass2K0sDe = RecoDecay::m (std::array{pVecBach, pVecV0}, std::array{MassDeuteron, MassK0Short});
3576+ mass2K0sTr = RecoDecay::m (std::array{pVecBach, pVecV0}, std::array{MassTriton, MassK0Short});
3577+ mass2K0sHe = RecoDecay::m (std::array{pVecBach, pVecV0}, std::array{MassHelium3, MassK0Short});
3578+ mass2K0sAl = RecoDecay::m (std::array{pVecBach, pVecV0}, std::array{MassAlpha, MassK0Short});
3579+
3580+ isSelectedLc = isChannelLc && ((config.cutInvMassCascLc < 0 .) || (std::abs (mass2K0sP - MassLambdaCPlus) <= config.cutInvMassCascLc ));
3581+ isSelectedCd = isChannelCd && ((config.cutInvMassCascCharmNuclei < 0 .) || (mass2K0sDe - MassDeuteron - MassLambdaCPlus <= config.cutInvMassCascCharmNuclei ));
3582+ isSelectedCt = isChannelCt && ((config.cutInvMassCascCharmNuclei < 0 .) || (mass2K0sTr - MassTriton - MassLambdaCPlus <= config.cutInvMassCascCharmNuclei ));
3583+ isSelectedCh = isChannelCh && ((config.cutInvMassCascCharmNuclei < 0 .) || (mass2K0sHe - MassHelium3 - MassLambdaCPlus <= config.cutInvMassCascCharmNuclei ));
3584+ isSelectedCa = isChannelCa && ((config.cutInvMassCascCharmNuclei < 0 .) || (mass2K0sAl - MassAlpha - MassLambdaCPlus <= config.cutInvMassCascCharmNuclei ));
3585+
35383586 std::array posCasc{0 ., 0 ., 0 .};
35393587 if (config.useDCAFitter ) {
35403588 const auto & cascVtx = df2.getPCACandidate ();
@@ -3550,7 +3598,21 @@ struct HfTrackIndexSkimCreatorCascades {
35503598 registry.fill (HIST (" hVtx2ProngX" ), posCasc[0 ]);
35513599 registry.fill (HIST (" hVtx2ProngY" ), posCasc[1 ]);
35523600 registry.fill (HIST (" hVtx2ProngZ" ), posCasc[2 ]);
3553- registry.fill (HIST (" hMassLcToPK0S" ), mass2K0sP);
3601+ if (isSelectedLc) {
3602+ registry.fill (HIST (" hMassLcToPK0S" ), mass2K0sP);
3603+ }
3604+ if (isSelectedCd) {
3605+ registry.fill (HIST (" hMassCdToDeK0S" ), mass2K0sDe);
3606+ }
3607+ if (isSelectedCt) {
3608+ registry.fill (HIST (" hMassCtToTrK0S" ), mass2K0sTr);
3609+ }
3610+ if (isSelectedCh) {
3611+ registry.fill (HIST (" hMassChToHeK0S" ), mass2K0sHe);
3612+ }
3613+ if (isSelectedCa) {
3614+ registry.fill (HIST (" hMassCaToAlK0S" ), mass2K0sAl);
3615+ }
35543616 }
35553617 } // loop over V0s
35563618 } // loop over tracks
0 commit comments