@@ -285,7 +285,7 @@ static const o2::framework::AxisSpec qtAxis{100, 0.f, 0.25f};
285285static const o2::framework::AxisSpec bdtAxis{100 , 0 .f , 1 .f };
286286static const o2::framework::AxisSpec phiAxis{36 , 0 ., o2::constants::math::TwoPI};
287287static const std::array<o2::framework::AxisSpec, kNCharmParticles + 23> massAxisC = {o2::framework::AxisSpec{250, 1.65f, 2.15f}, o2::framework::AxisSpec{250, 1.65f, 2.15f}, o2::framework::AxisSpec{250, 1.75f, 2.25f}, o2::framework::AxisSpec{250, 2.05f, 2.55f}, o2::framework::AxisSpec{250, 2.25f, 2.75f}, o2::framework::AxisSpec{200, 0.139f, 0.159f}, o2::framework::AxisSpec{250, 0.f, 0.25f}, o2::framework::AxisSpec{250, 0.f, 0.25f}, o2::framework::AxisSpec{200, 0.48f, 0.88f}, o2::framework::AxisSpec{200, 0.48f, 0.88f}, o2::framework::AxisSpec{200, 1.1f, 1.4f}, o2::framework::AxisSpec{200, 1.1f, 1.4f}, o2::framework::AxisSpec{200, 1.1f, 1.4f}, o2::framework::AxisSpec{200, 1.1f, 1.4f}, o2::framework::AxisSpec{170, 0.13f, 0.3f}, o2::framework::AxisSpec{170, 0.13f, 0.3f}, o2::framework::AxisSpec{200, 0.4f, 0.8f}, o2::framework::AxisSpec{200, 0.4f, 0.8f}, o2::framework::AxisSpec{200, 0.4f, 0.8f}, o2::framework::AxisSpec{200, 0.4f, 0.8f}, o2::framework::AxisSpec{350, 2.3f, 3.0f}, o2::framework::AxisSpec{350, 2.3f, 3.0f}, o2::framework::AxisSpec{350, 2.3f, 3.0f}, o2::framework::AxisSpec{240, 2.4f, 3.6f}, o2::framework::AxisSpec{300, 0.7f, 1.3f}, o2::framework::AxisSpec{300, 0.7f, 1.3f}, o2::framework::AxisSpec{300, 0.7f, 1.3f}, o2::framework::AxisSpec{300, 0.7f, 1.3f}};
288- static const std::array<o2::framework::AxisSpec, nTotBeautyParts> massAxisB = {o2::framework::AxisSpec{500 , 4 .2f , 6 .2f }, o2::framework::AxisSpec{500 , 4 .2f , 6 .2f }, o2::framework::AxisSpec{500 , 4 .2f , 6 .2f }, o2::framework::AxisSpec{500 , 4 .2f , 6 .2f }, o2::framework::AxisSpec{240 , 5 .0f , 6 .2f }, o2::framework::AxisSpec{500 , 4 .2f , 6 .2f }, o2::framework::AxisSpec{500 , 4 .2f , 6 .2f }, o2::framework::AxisSpec{500 , 4 .2f , 6 .2f }, o2::framework::AxisSpec{500 , 4 .2f , 6 .2f }, o2::framework::AxisSpec{240 , 5 .0f , 6 .2f }, o2::framework::AxisSpec{240 , 5 .8f , 7 .0f }};
288+ static const std::array<o2::framework::AxisSpec, nTotBeautyParts> massAxisB = {o2::framework::AxisSpec{500 , 4 .2f , 6 .2f }, o2::framework::AxisSpec{500 , 4 .2f , 6 .2f }, o2::framework::AxisSpec{500 , 4 .2f , 6 .2f }, o2::framework::AxisSpec{500 , 4 .4f , 6 .4f }, o2::framework::AxisSpec{400 , 5 .0f , 6 .6f }, o2::framework::AxisSpec{500 , 4 .2f , 6 .2f }, o2::framework::AxisSpec{500 , 4 .2f , 6 .2f }, o2::framework::AxisSpec{500 , 4 .2f , 6 .2f }, o2::framework::AxisSpec{500 , 4 .2f , 6 .2f }, o2::framework::AxisSpec{400 , 5 .0f , 6 .6f }, o2::framework::AxisSpec{240 , 5 .8f , 7 .0f }};
289289
290290// default values for configurables
291291// channels to trigger on for femto
@@ -361,8 +361,8 @@ static const std::vector<std::string> labelsColumnsV0s = {"CosPaGamma", "CosPaK0
361361// cascades for Xi + bachelor triggers
362362constexpr float cutsCascades[1 ][8 ] = {{0.2 , 1 ., 0.01 , 0.01 , 0.99 , 0.99 , 0.3 , 3 .}}; // ptXiBachelor, deltaMassXi, deltaMassLambda, cosPaXi, cosPaLambda, DCAxyXi, nSigmaPid
363363static const std::vector<std::string> labelsColumnsCascades = {" PtBachelor" , " PtXi" , " DeltaMassXi" , " DeltaMassLambda" , " CosPAXi" , " CosPaLambda" , " DCAxyXi" , " NsigmaPid" };
364- constexpr float cutsCharmBaryons[1 ][8 ] = {{5 ., 5 ., 1000 ., 2.35 , 2.60 , 2.35 , -2 ., -2 .}}; // MinPtXiPi, MinPtXiKa, MinPtXiPiPi, MinMassXiPi, MinMassXiKa, MinMassXiPiPi, CosPaXiBach, CosPaXiBachBach
365- static const std::vector<std::string> labelsColumnsCharmBarCuts = {" MinPtXiPi" , " MinPtXiKa" , " MinPtXiPiPi" , " MinMassXiPi" , " MinMassXiKa" , " MinMassXiPiPi" , " CosPaXiBach" , " CosPaXiBachBach" };
364+ constexpr float cutsCharmBaryons[1 ][11 ] = {{5 ., 5 ., 1000 ., 2.35 , 2.60 , 2.35 , 3 ., 3 ., 2.7 , -2 ., -2 .}}; // MinPtXiPi, MinPtXiKa, MinPtXiPiPi, MinMassXiPi, MinMassXiKa, MinMassXiPiPi, MaxMassXiPi, MaxMassXiKa, MaxMassXiPiPi , CosPaXiBach, CosPaXiBachBach
365+ static const std::vector<std::string> labelsColumnsCharmBarCuts = {" MinPtXiPi" , " MinPtXiKa" , " MinPtXiPiPi" , " MinMassXiPi" , " MinMassXiKa" , " MinMassXiPiPi" , " MaxMassXiPi " , " MaxMassXiKa " , " MaxMassXiPiPi " , " CosPaXiBach" , " CosPaXiBachBach" };
366366
367367constexpr int requireStrangenessTrackedXi[1 ][2 ] = {{1 , 0 }};
368368static const std::vector<std::string> labelsColumnsCharmBaryons = {" CharmBarToXiBach" , " CharmBarToXiBachBach" };
@@ -533,14 +533,17 @@ class HfFilterHelper
533533 mNSigmaTofKaonFromXicResoToSigmaC = nSigmaTof;
534534 }
535535
536- void setXiBachelorSelections (float ptMinXiPi, float ptMinXiKa, float ptMinXiPiPi, float massMinXiPi, float massMinXiKa, float massMinXiPiPi, float cosPaMinXiBach, float cosPaMinXiBachBach)
536+ void setXiBachelorSelections (float ptMinXiPi, float ptMinXiKa, float ptMinXiPiPi, float massMinXiPi, float massMinXiKa, float massMinXiPiPi, float massMaxXiPi, float massMaxXiKa, float massMaxXiPiPi, float cosPaMinXiBach, float cosPaMinXiBachBach)
537537 {
538538 mPtMinXiBach [0 ] = ptMinXiPi;
539539 mPtMinXiBach [1 ] = ptMinXiKa;
540540 mPtMinXiBach [2 ] = ptMinXiPiPi;
541541 mMassMinXiBach [0 ] = massMinXiPi;
542542 mMassMinXiBach [1 ] = massMinXiKa;
543543 mMassMinXiBach [2 ] = massMinXiPiPi;
544+ mMassMaxXiBach [0 ] = massMaxXiPi;
545+ mMassMaxXiBach [1 ] = massMaxXiKa;
546+ mMassMaxXiBach [2 ] = massMaxXiPiPi;
544547 mCosPaMinXiBach [0 ] = cosPaMinXiBach;
545548 mCosPaMinXiBach [1 ] = cosPaMinXiBachBach;
546549 }
@@ -600,7 +603,7 @@ class HfFilterHelper
600603 bool isSelectedPhoton (const Photon& photon, const std::array<T, 2 >& dauTracks, const int & activateQA, H2 hV0Selected, std::array<H2, 4 >& hArmPod);
601604 template <typename Casc>
602605 bool isSelectedCascade (const Casc& casc);
603- template <o2::aod::hffilters::HfTriggers whichTrigger, typename T, typename T2>
606+ template <typename T, typename T2>
604607 int16_t isSelectedBachelorForCharmBaryon (const T& track, const T2& dca);
605608 template <bool is4beauty = false , typename T>
606609 bool isSelectedProton4CharmOrBeautyBaryons (const T& track);
@@ -622,7 +625,8 @@ class HfFilterHelper
622625 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);
623626 template <int Nprongs, typename T, typename C, typename H2>
624627 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-
628+ template <typename T>
629+ bool isSelectedProtonFromLcReso (const T& track);
626630 // helpers
627631 template <typename T>
628632 T computeRelativeMomentum (const std::array<T, 3 >& pTrack, const std::array<T, 3 >& CharmCandMomentum, const T& CharmMass);
@@ -736,6 +740,7 @@ class HfFilterHelper
736740 bool mForceTofDeuteronForFemto = false ; // flag to force TOF PID for deuterons
737741 std::array<float , 3 > mPtMinXiBach {5 ., 5 ., 5 .}; // minimum pT for XiBachelor candidates
738742 std::array<float , 3 > mMassMinXiBach {2.35 , 2.6 , 2.35 }; // minimum invariant-mass for XiBachelor candidates
743+ std::array<float , 3 > mMassMaxXiBach {3.0 , 3.0 , 2.7 }; // maximum invariant-mass for XiBachelor candidates
739744 std::array<float , 2 > mCosPaMinXiBach {-2 .f , -2 .f }; // minimum cosine of pointing angle for XiBachelor candidates
740745 std::array<o2::framework::LabeledArray<double >, kNBeautyParticles > mCutsBhad {}; // selections for B-hadron candidates (DeltaMass, CPA, DecayLength, ImpactParameterProduct)
741746 o2::framework::LabeledArray<double > mCutsBhadToJPsi {}; // selections for B->JPsi candidates (PtMinMu, DeltaMass, CPA, DecayLength)
@@ -1633,24 +1638,18 @@ inline bool HfFilterHelper::isSelectedCascade(const Casc& casc)
16331638// / \param track is a track
16341639// / \param dca is the 2d array with dcaXY and dcaZ of the track
16351640// / \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>
1641+ template <typename T, typename T2>
16371642inline int16_t HfFilterHelper::isSelectedBachelorForCharmBaryon (const T& track, const T2& dca)
16381643{
1639- int16_t retValue{BIT (kPionForCharmBaryon ) | BIT (kKaonForCharmBaryon ) | BIT ( kProtonForCharmBaryon ) };
1644+ int16_t retValue{BIT (kPionForCharmBaryon ) | BIT (kKaonForCharmBaryon )};
16401645
16411646 if (!track.isGlobalTrackWoDCA ()) {
16421647 return kRejected ;
16431648 }
16441649
16451650 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- }
1651+ if (pt < mPtMinCharmBaryonBachelor || pt > mPtMaxCharmBaryonBachelor ) {
1652+ return kRejected ;
16541653 }
16551654
16561655 auto pTBinTrack = findBin (mPtBinsTracks , pt);
@@ -1679,18 +1678,14 @@ inline int16_t HfFilterHelper::isSelectedBachelorForCharmBaryon(const T& track,
16791678
16801679 float nSigmaPiTpc = track.tpcNSigmaPi ();
16811680 float nSigmaKaTpc = track.tpcNSigmaKa ();
1682- float nSigmaPrTpc = track.tpcNSigmaPr ();
16831681 float nSigmaPiTof = track.tofNSigmaPi ();
16841682 float nSigmaKaTof = track.tofNSigmaKa ();
1685- float nSigmaPrTof = track.tofNSigmaPr ();
16861683 if (mTpcPidCalibrationOption == 1 ) {
16871684 nSigmaPiTpc = getTPCPostCalib (track, kPi );
16881685 nSigmaKaTpc = getTPCPostCalib (track, kKa );
1689- nSigmaPrTpc = getTPCPostCalib (track, kPr );
16901686 } else if (mTpcPidCalibrationOption == 2 ) {
16911687 nSigmaPiTpc = getTPCSplineCalib (track, (track.sign () > 0 ) ? kPi : kAntiPi );
16921688 nSigmaKaTpc = getTPCSplineCalib (track, (track.sign () > 0 ) ? kKa : kAntiKa );
1693- nSigmaPrTpc = getTPCSplineCalib (track, (track.sign () > 0 ) ? kPr : kAntiPr );
16941689 }
16951690
16961691 if ((track.hasTPC () && std::fabs (nSigmaPiTpc) > mNSigmaTpcPiCharmBaryonBachelor ) && (track.hasTOF () && std::fabs (nSigmaPiTof) > mNSigmaTofPiCharmBaryonBachelor )) {
@@ -1699,9 +1694,6 @@ inline int16_t HfFilterHelper::isSelectedBachelorForCharmBaryon(const T& track,
16991694 if ((track.hasTPC () && std::fabs (nSigmaKaTpc) > mNSigmaTpcPiCharmBaryonBachelor ) && (track.hasTOF () && std::fabs (nSigmaKaTof) > mNSigmaTofPiCharmBaryonBachelor )) {
17001695 CLRBIT (retValue, kKaonForCharmBaryon );
17011696 }
1702- if ((track.hasTPC () && std::fabs (nSigmaPrTpc) > mNSigmaTpcPiCharmBaryonBachelor ) && (track.hasTOF () && std::fabs (nSigmaPrTof) > mNSigmaTpcPiCharmBaryonBachelor )) {
1703- CLRBIT (retValue, kProtonForCharmBaryon );
1704- }
17051697
17061698 return retValue;
17071699}
@@ -1947,6 +1939,25 @@ inline bool HfFilterHelper::isSelectedKaon4Charm3ProngOrBeautyToJPsi(const T& tr
19471939 return true ;
19481940}
19491941
1942+ // / Basic selection of proton candidates forLc and ThetaC decays
1943+ // / \param track is a track
1944+ // / \return true if track passes all cuts
1945+ template <typename T>
1946+ inline bool HfFilterHelper::isSelectedProtonFromLcReso (const T& track)
1947+ {
1948+
1949+ // pt selections
1950+ float pt = track.pt ();
1951+ if (pt < mPtMinLcResonanceBachelor || pt > mPtMaxLcResonanceBachelor ) {
1952+ return false ;
1953+ }
1954+
1955+ // / PID selection
1956+ return isSelectedProton4CharmOrBeautyBaryons<false >(track);
1957+
1958+ return true ;
1959+ }
1960+
19501961// / Method to perform selections for B+ candidates after vertex reconstruction
19511962// / \param pVecTrack0 is the array for the candidate D daughter momentum after reconstruction of secondary vertex
19521963// / \param pVecTrack1 is the array for the candidate bachelor pion momentum after reconstruction of secondary vertex
@@ -2241,7 +2252,7 @@ inline bool HfFilterHelper::isSelectedXiBach(T const& trackParCasc, T const& tra
22412252 float massXiPi{0 .f };
22422253 if (TESTBIT (isSelBachelor, kPionForCharmBaryon )) {
22432254 massXiPi = RecoDecay::m (std::array{pVecCascade, pVecBachelor}, std::array{massXi, massPi});
2244- if (ptXiBach >= mPtMinXiBach [0 ] && massXiPi >= mMassMinXiBach [0 ] && massXiPi <= 3 . f ) {
2255+ if (ptXiBach >= mPtMinXiBach [0 ] && massXiPi >= mMassMinXiBach [0 ] && massXiPi <= mMassMaxXiBach [ 0 ] ) {
22452256 isSelectedXiPi = true ;
22462257 }
22472258 }
@@ -2250,7 +2261,7 @@ inline bool HfFilterHelper::isSelectedXiBach(T const& trackParCasc, T const& tra
22502261 float massXiKa{0 .f };
22512262 if (TESTBIT (isSelBachelor, kKaonForCharmBaryon )) {
22522263 massXiKa = RecoDecay::m (std::array{pVecCascade, pVecBachelor}, std::array{massXi, massKa});
2253- if (ptXiBach >= mPtMinXiBach [1 ] && massXiKa >= mMassMinXiBach [1 ] && massXiKa <= 3 . f ) {
2264+ if (ptXiBach >= mPtMinXiBach [1 ] && massXiKa >= mMassMinXiBach [1 ] && massXiKa <= mMassMaxXiBach [ 1 ] ) {
22542265 isSelectedXiKa = true ;
22552266 }
22562267 }
@@ -2318,7 +2329,7 @@ inline bool HfFilterHelper::isSelectedXiBachBach(T const& trackParCasc, std::arr
23182329
23192330 // compute mass
23202331 float massXiPiPi = RecoDecay::m (std::array{pVecCascade, pVecBachelorFirst, pVecBachelorSecond}, std::array{massXi, massPi, massPi});
2321- if (massXiPiPi < mMassMinXiBach [2 ] || massXiPiPi > 3 . f ) {
2332+ if (massXiPiPi < mMassMinXiBach [2 ] || massXiPiPi > mMassMaxXiBach [ 2 ] ) {
23222333 return false ;
23232334 }
23242335
0 commit comments