@@ -600,7 +600,7 @@ class HfFilterHelper
600600 bool isSelectedPhoton (const Photon& photon, const std::array<T, 2 >& dauTracks, const int & activateQA, H2 hV0Selected, std::array<H2, 4 >& hArmPod);
601601 template <typename Casc>
602602 bool isSelectedCascade (const Casc& casc);
603- template <o2::aod::hffilters::HfTriggers whichTrigger, typename T, typename T2>
603+ template <typename T, typename T2>
604604 int16_t isSelectedBachelorForCharmBaryon (const T& track, const T2& dca);
605605 template <bool is4beauty = false , typename T>
606606 bool isSelectedProton4CharmOrBeautyBaryons (const T& track);
@@ -622,7 +622,8 @@ class HfFilterHelper
622622 bool isSelectedXiBach (T const & trackParCasc, T const & trackParBachelor, int8_t isSelBachelor, C const & collision, o2::vertexing::DCAFitterN<2 >& dcaFitter, const int & activateQA, H2 hMassVsPtXiPi, H2 hMassVsPtXiKa);
623623 template <int Nprongs, typename T, typename C, typename H2>
624624 bool isSelectedXiBachBach (T const & trackParCasc, std::array<T, 2 > const & trackParBachelor, C const & collision, o2::vertexing::DCAFitterN<Nprongs>& dcaFitter, const int & activateQA, H2 hMassVsPtXiPiPi);
625-
625+ template <typename T>
626+ bool isSelectedProtonFromLcReso (const T& track);
626627 // helpers
627628 template <typename T>
628629 T computeRelativeMomentum (const std::array<T, 3 >& pTrack, const std::array<T, 3 >& CharmCandMomentum, const T& CharmMass);
@@ -1633,24 +1634,18 @@ inline bool HfFilterHelper::isSelectedCascade(const Casc& casc)
16331634// / \param track is a track
16341635// / \param dca is the 2d array with dcaXY and dcaZ of the track
16351636// / \return 0 if rejected, or a bitmap that contains the information whether it is selected as pion and/or kaon
1636- template <o2::aod::hffilters::HfTriggers whichTrigger, typename T, typename T2>
1637+ template <typename T, typename T2>
16371638inline int16_t HfFilterHelper::isSelectedBachelorForCharmBaryon (const T& track, const T2& dca)
16381639{
1639- int16_t retValue{BIT (kPionForCharmBaryon ) | BIT (kKaonForCharmBaryon ) | BIT ( kProtonForCharmBaryon ) };
1640+ int16_t retValue{BIT (kPionForCharmBaryon ) | BIT (kKaonForCharmBaryon )};
16401641
16411642 if (!track.isGlobalTrackWoDCA ()) {
16421643 return kRejected ;
16431644 }
16441645
16451646 float pt = track.pt ();
1646- if constexpr (whichTrigger == kCharmBarToXiBach ) {
1647- if (pt < mPtMinCharmBaryonBachelor || pt > mPtMaxCharmBaryonBachelor ) {
1648- return kRejected ;
1649- }
1650- } else if constexpr (whichTrigger == kPrCharm2P ) {
1651- if (pt < mPtMinLcResonanceBachelor || pt > mPtMaxLcResonanceBachelor ) {
1652- return kRejected ;
1653- }
1647+ if (pt < mPtMinCharmBaryonBachelor || pt > mPtMaxCharmBaryonBachelor ) {
1648+ return kRejected ;
16541649 }
16551650
16561651 auto pTBinTrack = findBin (mPtBinsTracks , pt);
@@ -1679,18 +1674,14 @@ inline int16_t HfFilterHelper::isSelectedBachelorForCharmBaryon(const T& track,
16791674
16801675 float nSigmaPiTpc = track.tpcNSigmaPi ();
16811676 float nSigmaKaTpc = track.tpcNSigmaKa ();
1682- float nSigmaPrTpc = track.tpcNSigmaPr ();
16831677 float nSigmaPiTof = track.tofNSigmaPi ();
16841678 float nSigmaKaTof = track.tofNSigmaKa ();
1685- float nSigmaPrTof = track.tofNSigmaPr ();
16861679 if (mTpcPidCalibrationOption == 1 ) {
16871680 nSigmaPiTpc = getTPCPostCalib (track, kPi );
16881681 nSigmaKaTpc = getTPCPostCalib (track, kKa );
1689- nSigmaPrTpc = getTPCPostCalib (track, kPr );
16901682 } else if (mTpcPidCalibrationOption == 2 ) {
16911683 nSigmaPiTpc = getTPCSplineCalib (track, (track.sign () > 0 ) ? kPi : kAntiPi );
16921684 nSigmaKaTpc = getTPCSplineCalib (track, (track.sign () > 0 ) ? kKa : kAntiKa );
1693- nSigmaPrTpc = getTPCSplineCalib (track, (track.sign () > 0 ) ? kPr : kAntiPr );
16941685 }
16951686
16961687 if ((track.hasTPC () && std::fabs (nSigmaPiTpc) > mNSigmaTpcPiCharmBaryonBachelor ) && (track.hasTOF () && std::fabs (nSigmaPiTof) > mNSigmaTofPiCharmBaryonBachelor )) {
@@ -1699,9 +1690,6 @@ inline int16_t HfFilterHelper::isSelectedBachelorForCharmBaryon(const T& track,
16991690 if ((track.hasTPC () && std::fabs (nSigmaKaTpc) > mNSigmaTpcPiCharmBaryonBachelor ) && (track.hasTOF () && std::fabs (nSigmaKaTof) > mNSigmaTofPiCharmBaryonBachelor )) {
17001691 CLRBIT (retValue, kKaonForCharmBaryon );
17011692 }
1702- if ((track.hasTPC () && std::fabs (nSigmaPrTpc) > mNSigmaTpcPiCharmBaryonBachelor ) && (track.hasTOF () && std::fabs (nSigmaPrTof) > mNSigmaTpcPiCharmBaryonBachelor )) {
1703- CLRBIT (retValue, kProtonForCharmBaryon );
1704- }
17051693
17061694 return retValue;
17071695}
@@ -1947,6 +1935,25 @@ inline bool HfFilterHelper::isSelectedKaon4Charm3ProngOrBeautyToJPsi(const T& tr
19471935 return true ;
19481936}
19491937
1938+ // / Basic selection of proton candidates forLc and ThetaC decays
1939+ // / \param track is a track
1940+ // / \return true if track passes all cuts
1941+ template <typename T>
1942+ inline bool HfFilterHelper::isSelectedProtonFromLcReso (const T& track)
1943+ {
1944+
1945+ // pt selections
1946+ float pt = track.pt ();
1947+ if (pt < mPtMinLcResonanceBachelor || pt > mPtMaxLcResonanceBachelor ) {
1948+ return false ;
1949+ }
1950+
1951+ // / PID selection
1952+ return isSelectedProton4CharmOrBeautyBaryons<false >(track);
1953+
1954+ return true ;
1955+ }
1956+
19501957// / Method to perform selections for B+ candidates after vertex reconstruction
19511958// / \param pVecTrack0 is the array for the candidate D daughter momentum after reconstruction of secondary vertex
19521959// / \param pVecTrack1 is the array for the candidate bachelor pion momentum after reconstruction of secondary vertex
0 commit comments