3030#include " Common/Core/trackUtilities.h"
3131#include " Common/DataModel/PIDResponseTOF.h"
3232#include " Common/DataModel/PIDResponseTPC.h"
33-
3433#include " ReconstructionDataFormats/PID.h"
34+
3535#include < CCDB/BasicCCDBManager.h>
3636#include < CCDB/CcdbApi.h>
3737#include < CommonConstants/MathConstants.h>
3838#include < CommonConstants/PhysicsConstants.h>
3939#include < DCAFitter/DCAFitterN.h>
40+ #include < MathUtils/BetheBlochAleph.h>
4041#include < DetectorsBase/Propagator.h>
4142#include < Framework/ASoA.h>
4243#include < Framework/AnalysisDataModel.h>
4546#include < Framework/HistogramRegistry.h>
4647#include < Framework/HistogramSpec.h>
4748#include < Framework/Logger.h>
48- #include < MathUtils/BetheBlochAleph.h>
4949
5050#include < Math/GenVector/Boost.h>
5151#include < Math/Vector4D.h> // IWYU pragma: keep (do not replace with Math/Vector4Dfwd.h)
@@ -100,7 +100,7 @@ enum HfTriggers {
100100 kBtoJPsiPhi ,
101101 kBtoJPsiPrKa ,
102102 kBtoJPsiPi ,
103- kSigmaCP ,
103+ kSigmaCPr ,
104104 kNtriggersHF
105105};
106106
@@ -249,7 +249,7 @@ static const int nTotBeautyParts = static_cast<int>(kNBeautyParticles) + static_
249249static const std::array<std::string, nTotBeautyParts> beautyParticleNames{" Bplus" , " B0toDStar" , " Bc" , " B0" , " Bs" , " Lb" , " Xib" , " BplusToJPsi" , " B0ToJPsi" , " BsToJPsi" , " LbToJPsi" , " BcToJPsi" };
250250static const std::array<int , kNCharmParticles > pdgCodesCharm{421 , 411 , 431 , 4122 , 4232 };
251251static const std::array<std::string, 2 > eventTitles = {" all" , " rejected" };
252- static const std::vector<std::string> hfTriggerNames{filtering::HfHighPt2P::columnLabel(), filtering::HfHighPt3P::columnLabel(), filtering::HfBeauty3P::columnLabel(), filtering::HfBeauty4P::columnLabel(), filtering::HfFemto2P::columnLabel(), filtering::HfFemto3P::columnLabel(), filtering::HfDoubleCharm2P::columnLabel(), filtering::HfDoubleCharm3P::columnLabel(), filtering::HfDoubleCharmMix::columnLabel(), filtering::HfV0Charm2P::columnLabel(), filtering::HfV0Charm3P::columnLabel(), filtering::HfCharmBarToXiBach::columnLabel(), filtering::HfSigmaCPPK::columnLabel(), filtering::HfSigmaC0K0::columnLabel(), filtering::HfPhotonCharm2P::columnLabel(), filtering::HfPhotonCharm3P::columnLabel(), filtering::HfSingleCharm2P::columnLabel(), filtering::HfSingleCharm3P::columnLabel(), filtering::HfSingleNonPromptCharm2P::columnLabel(), filtering::HfSingleNonPromptCharm3P::columnLabel(), filtering::HfCharmBarToXi2Bach::columnLabel(), filtering::HfPrCharm2P::columnLabel(), filtering::HfBtoJPsiKa::columnLabel(), filtering::HfBtoJPsiKstar::columnLabel(), filtering::HfBtoJPsiPhi::columnLabel(), filtering::HfBtoJPsiPrKa::columnLabel(), filtering::HfBtoJPsiPi::columnLabel(), filtering::HfSigmaCP::columnLabel()};
252+ static const std::vector<std::string> hfTriggerNames{filtering::HfHighPt2P::columnLabel(), filtering::HfHighPt3P::columnLabel(), filtering::HfBeauty3P::columnLabel(), filtering::HfBeauty4P::columnLabel(), filtering::HfFemto2P::columnLabel(), filtering::HfFemto3P::columnLabel(), filtering::HfDoubleCharm2P::columnLabel(), filtering::HfDoubleCharm3P::columnLabel(), filtering::HfDoubleCharmMix::columnLabel(), filtering::HfV0Charm2P::columnLabel(), filtering::HfV0Charm3P::columnLabel(), filtering::HfCharmBarToXiBach::columnLabel(), filtering::HfSigmaCPPK::columnLabel(), filtering::HfSigmaC0K0::columnLabel(), filtering::HfPhotonCharm2P::columnLabel(), filtering::HfPhotonCharm3P::columnLabel(), filtering::HfSingleCharm2P::columnLabel(), filtering::HfSingleCharm3P::columnLabel(), filtering::HfSingleNonPromptCharm2P::columnLabel(), filtering::HfSingleNonPromptCharm3P::columnLabel(), filtering::HfCharmBarToXi2Bach::columnLabel(), filtering::HfPrCharm2P::columnLabel(), filtering::HfBtoJPsiKa::columnLabel(), filtering::HfBtoJPsiKstar::columnLabel(), filtering::HfBtoJPsiPhi::columnLabel(), filtering::HfBtoJPsiPrKa::columnLabel(), filtering::HfBtoJPsiPi::columnLabel(), filtering::HfSigmaCPr::columnLabel()};
253253
254254static const std::array<std::string, kNV0 > v0Labels{" #gamma" , " K_{S}^{0}" , " #Lambda" , " #bar{#Lambda}" };
255255static const std::array<std::string, kNV0 > v0Names{" Photon" , " K0S" , " Lambda" , " AntiLambda" };
@@ -875,7 +875,7 @@ inline int16_t HfFilterHelper::isSelectedTrackForSoftPionOrBeauty(const T& track
875875 return kRejected ;
876876 }
877877
878- if constexpr (whichTrigger == kSigmaCPPK || whichTrigger == kSigmaC0K0 || whichTrigger == kSigmaCP ) {
878+ if constexpr (whichTrigger == kSigmaCPPK || whichTrigger == kSigmaC0K0 || whichTrigger == kSigmaCPr ) {
879879
880880 // SigmaC0,++ soft pion pt cut
881881 if (pT < mPtMinSoftPionForSigmaC || pT > mPtMaxSoftPionForSigmaC ) {
@@ -941,7 +941,7 @@ inline int16_t HfFilterHelper::isSelectedTrackForSoftPionOrBeauty(const T& track
941941// / \return true if track passes all cuts
942942template <typename Atrack, typename SpeciesContainer, typename T1, typename T2>
943943inline bool HfFilterHelper::isSelectedTrack4Corr (Atrack const & track, SpeciesContainer const mPIDspecies ,
944- T1 const maxTPC, T2 const maxTOF, float minPt, float maxPt, float ptThreshold, bool tofForced)
944+ T1 const maxTPC, T2 const maxTOF, float minPt, float maxPt, float ptThreshold, bool tofForced)
945945{
946946 // Ensure size consistency
947947 if (mPIDspecies .value .size () != maxTPC.value .size () || mPIDspecies .value .size () != maxTOF.value .size ()) {
@@ -953,19 +953,19 @@ inline bool HfFilterHelper::isSelectedTrack4Corr(Atrack const& track, SpeciesCon
953953 return false ;
954954 }
955955
956- if (track.pt () < minPt || track.pt () > maxPt) {
956+ if (track.pt () < minPt || track.pt () > maxPt){
957957 return false ;
958958 }
959959
960960 for (size_t speciesIndex = 0 ; speciesIndex < mPIDspecies .value .size (); ++speciesIndex) {
961961 float nSigmaTPC;
962962 auto const & pid = mPIDspecies ->at (speciesIndex);
963-
963+
964964 nSigmaTPC = o2::aod::pidutils::tpcNSigma (pid, track);
965965
966966 if (track.pt () > ptThreshold && tofForced && !track.hasTOF ())
967967 return false ;
968-
968+
969969 int parSpecies = -1 ;
970970 float tpcNCls = track.tpcNClsFound ();
971971 float tpcPin = track.tpcInnerParam ();
@@ -980,12 +980,13 @@ inline bool HfFilterHelper::isSelectedTrack4Corr(Atrack const& track, SpeciesCon
980980 } else {
981981 LOGF (fatal, " particle species is not defined in isSelectedTrack4Corr" );
982982 }
983-
983+
984984 // 2. Apply nSigmaTPC using selected calibration
985985 if (mTpcPidCalibrationOption == 1 ) {
986986 // Option 1: post-calibration → no sign dependence
987987 nSigmaTPC = getTPCPostCalib (tpcPin, tpcNCls, eta, nSigmaTPC, parSpecies);
988- }
988+
989+ }
989990 if (mTpcPidCalibrationOption == 2 ) {
990991 float dEdx = track.tpcSignal ();
991992 // Option 2: spline calibration → charge-dependent
@@ -995,14 +996,14 @@ inline bool HfFilterHelper::isSelectedTrack4Corr(Atrack const& track, SpeciesCon
995996 } else {
996997 // Negative track
997998 if (pid == o2::track::PID::Proton) {
998- parSpecies = kAntiPr ;
999- } else if (pid == o2::track::PID::Kaon) {
1000- parSpecies = kAntiKa ;
1001- } else if (pid == o2::track::PID::Pion) {
1002- parSpecies = kAntiPi ;
1003- } else {
1004- LOGF (fatal, " particle species is not defined in isSelectedTrack4Corr" );
1005- }
999+ parSpecies = kAntiPr ;
1000+ } else if (pid == o2::track::PID::Kaon) {
1001+ parSpecies = kAntiKa ;
1002+ } else if (pid == o2::track::PID::Pion) {
1003+ parSpecies = kAntiPi ;
1004+ } else {
1005+ LOGF (fatal, " particle species is not defined in isSelectedTrack4Corr" );
1006+ }
10061007 nSigmaTPC = getTPCSplineCalib (tpcPin, dEdx, parSpecies);
10071008 }
10081009 }
@@ -1034,6 +1035,8 @@ inline bool HfFilterHelper::isSelectedTrack4Corr(Atrack const& track, SpeciesCon
10341035 return true ; // Passed all checks
10351036}
10361037
1038+
1039+
10371040// / Basic selection of proton or deuteron candidates
10381041// / \param track is a track
10391042// / \param trackPar is a track parameter
@@ -1428,7 +1431,7 @@ inline int8_t HfFilterHelper::isSelectedLcInMassRange(const T& pTrackSameChargeF
14281431template <typename T, typename H2>
14291432inline bool HfFilterHelper::selectionSigmaCForScPCorr (const T& pTrackSameChargeFirst, const T& pTrackSameChargeSecond, const T& pTrackOppositeCharge, const T& pTrackSoftPi, const float ptSigmaC, const int8_t isSelectedLc, H2 hMassVsPt, const int & activateQA, float mDeltaMassMinSigmaC , float mDeltaMassMaxSigmaC , float mPtMinSigmaC , float mPtMaxSigmaC )
14301433{
1431- if (ptSigmaC < mPtMinSigmaC || ptSigmaC > mPtMaxSigmaC ) {
1434+ if (ptSigmaC < mPtMinSigmaC || ptSigmaC > mPtMaxSigmaC ){
14321435 return false ;
14331436 }
14341437 bool isSigmaCSelected{false };
@@ -1439,12 +1442,13 @@ inline bool HfFilterHelper::selectionSigmaCForScPCorr(const T& pTrackSameChargeF
14391442 float invMassSigmaCToLcPKPi = RecoDecay::m (std::array{pTrackSameChargeFirst, pTrackOppositeCharge, pTrackSameChargeSecond, pTrackSoftPi}, massDausSigmaCToLcPKPi);
14401443 float deltaMassPKPi = invMassSigmaCToLcPKPi - invMassLcToPKPi;
14411444 isSigmaCSelected = (mDeltaMassMinSigmaC < deltaMassPKPi && deltaMassPKPi < mDeltaMassMaxSigmaC );
1442- if (isSigmaCSelected) {
1443- if (activateQA) {
1444- hMassVsPt->Fill (ptSigmaC, deltaMassPKPi);
1445- }
1445+ if (isSigmaCSelected){
1446+ if (activateQA){
1447+ hMassVsPt->Fill (ptSigmaC, deltaMassPKPi);
1448+ }
14461449 return true ;
14471450 }
1451+
14481452 }
14491453 if (TESTBIT (isSelectedLc, 1 )) {
14501454 // / Lc->piKp case
@@ -1454,18 +1458,21 @@ inline bool HfFilterHelper::selectionSigmaCForScPCorr(const T& pTrackSameChargeF
14541458 float deltaMassPiKP = invMassSigmaCToLcPiKP - invMassLcToPiKP;
14551459
14561460 isSigmaCSelected = (mDeltaMassMinSigmaC < deltaMassPiKP && deltaMassPiKP < mDeltaMassMaxSigmaC );
1457- if (isSigmaCSelected) {
1458- if (activateQA) {
1459- hMassVsPt->Fill (ptSigmaC, deltaMassPiKP);
1460- }
1461+ if (isSigmaCSelected){
1462+ if (activateQA){
1463+ hMassVsPt->Fill (ptSigmaC, deltaMassPiKP);
1464+ }
14611465 return true ;
14621466 }
1467+
14631468 }
14641469
14651470 return isSigmaCSelected;
14661471 // / TODO: add QA plot
14671472}
14681473
1474+
1475+
14691476// / Delta mass selection on SigmaC candidates
14701477template <int charge, typename T, typename H2>
14711478inline int8_t HfFilterHelper::isSelectedSigmaCInDeltaMassRange (const T& pTrackSameChargeFirst, const T& pTrackSameChargeSecond, const T& pTrackOppositeCharge, const T& pTrackSoftPi, const float ptSigmaC, const int8_t isSelectedLc, H2 hMassVsPt, const int & activateQA)
0 commit comments