Skip to content

Commit d939269

Browse files
[PWGHF,Trigger] Add bachelor ptcuts in Lc resonances (#10596)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent abd62f2 commit d939269

File tree

2 files changed

+51
-29
lines changed

2 files changed

+51
-29
lines changed

EventFiltering/PWGHF/HFFilter.cxx

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ struct HfFilter { // Main struct for HF triggers
7575
// nsigma PID (except for V0 and cascades)
7676
Configurable<LabeledArray<float>> nSigmaPidCuts{"nSigmaPidCuts", {cutsNsigma[0], 4, 8, labelsRowsNsigma, labelsColumnsNsigma}, "Nsigma cuts for ITS/TPC/TOF PID (except for V0 and cascades)"};
7777
// min and max pts for tracks and bachelors (except for V0 and cascades)
78-
Configurable<LabeledArray<float>> ptCuts{"ptCuts", {cutsPt[0], 2, 8, labelsRowsCutsPt, labelsColumnsCutsPt}, "minimum and maximum pT for bachelor tracks (except for V0 and cascades)"};
78+
Configurable<LabeledArray<float>> ptCuts{"ptCuts", {cutsPt[0], 2, 9, labelsRowsCutsPt, labelsColumnsCutsPt}, "minimum and maximum pT for bachelor tracks (except for V0 and cascades)"};
7979

8080
// parameters for high-pT triggers
8181
Configurable<LabeledArray<float>> ptThresholds{"ptThresholds", {cutsHighPtThresholds[0], 1, 2, labelsEmpty, labelsColumnsHighPtThresholds}, "pT treshold for high pT charm hadron candidates for kHighPt triggers in GeV/c"};
@@ -204,6 +204,7 @@ struct HfFilter { // Main struct for HF triggers
204204
helper.setPtLimitsProtonForFemto(ptCuts->get(0u, 2u), ptCuts->get(1u, 2u));
205205
helper.setPtLimitsDeuteronForFemto(ptCuts->get(0u, 6u), ptCuts->get(1u, 6u));
206206
helper.setPtLimitsCharmBaryonBachelor(ptCuts->get(0u, 3u), ptCuts->get(1u, 3u));
207+
helper.setPtLimitsLcResonanceBachelor(ptCuts->get(0u, 8u), ptCuts->get(1u, 8u));
207208
helper.setCutsSingleTrackBeauty(cutsTrackBeauty3Prong, cutsTrackBeauty4Prong, cutsTrackBeauty4Prong);
208209
helper.setCutsSingleTrackCharmBaryonBachelor(cutsTrackCharmBaryonBachelor);
209210
helper.setCutsBhadrons(cutsBplus, cutsBzeroToDstar, cutsBzero, cutsBs, cutsLb, cutsXib);
@@ -549,7 +550,7 @@ struct HfFilter { // Main struct for HF triggers
549550

550551
// Beauty with D0
551552
if (!keepEvent[kBeauty3P] && isD0BeautyTagged) {
552-
auto isTrackSelected = helper.isSelectedTrackForSoftPionOrBeauty<kBeauty3P>(track, trackParThird, dcaThird);
553+
int16_t isTrackSelected = helper.isSelectedTrackForSoftPionOrBeauty<kBeauty3P>(track, trackParThird, dcaThird);
553554
if (TESTBIT(isTrackSelected, kForBeauty) && ((TESTBIT(selD0InMass, 0) && track.sign() < 0) || (TESTBIT(selD0InMass, 1) && track.sign() > 0))) { // D0 pi- and D0bar pi+
554555
auto massCand = RecoDecay::m(std::array{pVec2Prong, pVecThird}, std::array{massD0, massPi});
555556
auto pVecBeauty3Prong = RecoDecay::pVec(pVec2Prong, pVecThird);
@@ -857,7 +858,7 @@ struct HfFilter { // Main struct for HF triggers
857858
getPxPyPz(trackParBachelor, pVecBachelor);
858859
}
859860

860-
int isTrackSelected = helper.isSelectedTrackForSoftPionOrBeauty<kV0Charm2P>(trackBachelor, trackParBachelor, dcaBachelor);
861+
auto isTrackSelected = helper.isSelectedTrackForSoftPionOrBeauty<kV0Charm2P>(trackBachelor, trackParBachelor, dcaBachelor);
861862
if (TESTBIT(isTrackSelected, kSoftPion) && ((TESTBIT(selD0InMass, 0) && trackBachelor.sign() > 0) || (TESTBIT(selD0InMass, 1) && trackBachelor.sign() < 0))) {
862863
std::array<float, 2> massDausD0{massPi, massKa};
863864
auto massD0dau = massD0Cand;
@@ -943,17 +944,17 @@ struct HfFilter { // Main struct for HF triggers
943944
if (!keepEvent[kPrCharm2P] && isD0SignalTagged && (TESTBIT(selD0InMass, 0) || TESTBIT(selD0InMass, 1))) {
944945
for (const auto& trackProtonId : trackIdsThisCollision) { // start loop over tracks selecting only protons
945946
auto trackProton = tracks.rawIteratorAt(trackProtonId.trackId());
946-
std::array<float, 3> pVecProton = trackProton.pVector();
947+
auto trackParBachelorProton = getTrackPar(trackProton);
947948
if (trackProton.globalIndex() == trackPos.globalIndex() || trackProton.globalIndex() == trackNeg.globalIndex()) {
948949
continue;
949950
}
950-
// minimal track selections
951-
if (!trackProton.isGlobalTrackWoDCA() || std::fabs(trackProton.pt()) < 0.3f) {
952-
continue;
951+
gpu::gpustd::array<float, 2> dcaInfoBachProton;
952+
if (trackProton.collisionId() != thisCollId) {
953+
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, trackParBachelorProton, 2.f, noMatCorr, &dcaInfoBachProton);
953954
}
954-
// PID selection
955-
bool isProton = helper.isSelectedProton4CharmOrBeautyBaryons(trackProton);
956-
if (isProton) {
955+
std::array<float, 3> pVecProton = trackProton.pVector();
956+
auto isSelProton = helper.isSelectedBachelorForCharmBaryon<kPrCharm2P>(trackProton, dcaInfoBachProton);
957+
if (isSelProton == kProtonForCharmBaryon) {
957958
if (!keepEvent[kPrCharm2P]) {
958959
// we first look for a D*+
959960
for (const auto& trackBachelorId : trackIdsThisCollision) { // start loop over tracks to find bachelor pion
@@ -968,7 +969,7 @@ struct HfFilter { // Main struct for HF triggers
968969
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, trackParBachelor, 2.f, noMatCorr, &dcaBachelor);
969970
getPxPyPz(trackParBachelor, pVecBachelor);
970971
}
971-
int isTrackSelected = helper.isSelectedTrackForSoftPionOrBeauty<kPrCharm2P>(trackBachelor, trackParBachelor, dcaBachelor);
972+
auto isTrackSelected = helper.isSelectedTrackForSoftPionOrBeauty<kPrCharm2P>(trackBachelor, trackParBachelor, dcaBachelor);
972973
if (TESTBIT(isTrackSelected, kSoftPion) && ((TESTBIT(selD0InMass, 0) && trackBachelor.sign() > 0) || (TESTBIT(selD0InMass, 1) && trackBachelor.sign() < 0))) {
973974
std::array<float, 2> massDausD0{massPi, massKa};
974975
auto massD0dau = massD0Cand;
@@ -1390,7 +1391,7 @@ struct HfFilter { // Main struct for HF triggers
13901391
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, trackParSoftPi, 2.f, noMatCorr, &dcaSoftPi);
13911392
getPxPyPz(trackParSoftPi, pVecSoftPi);
13921393
}
1393-
int8_t isSoftPionSelected = helper.isSelectedTrackForSoftPionOrBeauty<kSigmaCPPK>(trackSoftPi, trackParSoftPi, dcaSoftPi);
1394+
int16_t isSoftPionSelected = helper.isSelectedTrackForSoftPionOrBeauty<kSigmaCPPK>(trackSoftPi, trackParSoftPi, dcaSoftPi);
13941395
if (TESTBIT(isSoftPionSelected, kSoftPionForSigmaC) /*&& (TESTBIT(is3Prong[2], 0) || TESTBIT(is3Prong[2], 1))*/) {
13951396

13961397
// check the mass of the SigmaC++ candidate
@@ -1596,7 +1597,7 @@ struct HfFilter { // Main struct for HF triggers
15961597
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, trackParSoftPi, 2.f, noMatCorr, &dcaSoftPi);
15971598
getPxPyPz(trackParSoftPi, pVecSoftPi);
15981599
}
1599-
int8_t isSoftPionSelected = helper.isSelectedTrackForSoftPionOrBeauty<kSigmaC0K0>(trackSoftPi, trackParSoftPi, dcaSoftPi);
1600+
int16_t isSoftPionSelected = helper.isSelectedTrackForSoftPionOrBeauty<kSigmaC0K0>(trackSoftPi, trackParSoftPi, dcaSoftPi);
16001601
if (TESTBIT(isSoftPionSelected, kSoftPionForSigmaC) /*&& (TESTBIT(is3Prong[2], 0) || TESTBIT(is3Prong[2], 1))*/) {
16011602

16021603
// check the mass of the SigmaC0 candidate
@@ -1725,7 +1726,7 @@ struct HfFilter { // Main struct for HF triggers
17251726
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, trackParBachelor, 2.f, noMatCorr, &dcaInfoBach);
17261727
}
17271728

1728-
auto isSelBachelor = helper.isSelectedBachelorForCharmBaryon(track, dcaInfoBach);
1729+
auto isSelBachelor = helper.isSelectedBachelorForCharmBaryon<kCharmBarToXiBach>(track, dcaInfoBach);
17291730
if (isSelBachelor == kRejected) {
17301731
continue;
17311732
}
@@ -1769,7 +1770,7 @@ struct HfFilter { // Main struct for HF triggers
17691770
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, trackParBachelorSecond, 2.f, noMatCorr, &dcaInfoBachSecond);
17701771
}
17711772

1772-
auto isSelBachelorSecond = helper.isSelectedBachelorForCharmBaryon(trackSecond, dcaInfoBachSecond);
1773+
auto isSelBachelorSecond = helper.isSelectedBachelorForCharmBaryon<kCharmBarToXiBach>(trackSecond, dcaInfoBachSecond);
17731774
if (!TESTBIT(isSelBachelorSecond, kPionForCharmBaryon)) {
17741775
continue;
17751776
}

EventFiltering/PWGHF/HFFilterHelpers.h

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ enum bachelorTrackSelection {
127127
kSoftPionForBeauty,
128128
kPionForCharmBaryon,
129129
kKaonForCharmBaryon,
130+
kProtonForCharmBaryon,
130131
kSoftPionForSigmaC
131132
};
132133

@@ -296,9 +297,9 @@ constexpr float cutsPtThresholdsForFemto[1][2] = {{8., 1.4}}; // proton, deutero
296297
static const std::vector<std::string> labelsColumnsPtThresholdsForFemto = {"Proton", "Deuteron"};
297298

298299
// min and max pT for all tracks combined (except for V0 and cascades)
299-
constexpr float cutsPt[2][8] = {{1., 0.1, 0.8, 0.5, 0.1, 0.2, 0.4, 0.5},
300-
{100000., 100000., 5., 100000., 100000., 100000., 100000., 100000.}}; // beauty, D*, femto, SigmaC, Xic*+ -> SigmaC++K-, beauty to JPsi
301-
static const std::vector<std::string> labelsColumnsCutsPt = {"Beauty", "DstarPlus", "PrForFemto", "CharmBaryon", "SoftPiSigmaC", "SoftKaonXicResoToSigmaC", "DeForFemto", "BeautyToJPsi"};
300+
constexpr float cutsPt[2][9] = {{1., 0.1, 0.8, 0.5, 0.1, 0.2, 0.4, 0.5, 0.3},
301+
{100000., 100000., 5., 100000., 100000., 100000., 100000., 100000., 100000.}}; // beauty, D*, femto, SigmaC, Xic*+ -> SigmaC++K-, beauty to JPsi, Lc*->D0p
302+
static const std::vector<std::string> labelsColumnsCutsPt = {"Beauty", "DstarPlus", "PrForFemto", "CharmBaryon", "SoftPiSigmaC", "SoftKaonXicResoToSigmaC", "DeForFemto", "BeautyToJPsi", "PrForLcReso"};
302303
static const std::vector<std::string> labelsRowsCutsPt = {"Minimum", "Maximum"};
303304

304305
// PID cuts
@@ -472,6 +473,11 @@ class HfFilterHelper
472473
mPtMinCharmBaryonBachelor = minPt;
473474
mPtMaxCharmBaryonBachelor = maxPt;
474475
}
476+
void setPtLimitsLcResonanceBachelor(float minPt, float maxPt)
477+
{
478+
mPtMinLcResonanceBachelor = minPt;
479+
mPtMaxLcResonanceBachelor = maxPt;
480+
}
475481

476482
void setNsigmaProtonCutsForFemto(std::array<float, 4> nSigmaCuts) { mNSigmaPrCutsForFemto = nSigmaCuts; }
477483
void setNsigmaDeuteronCutsForFemto(std::array<float, 4> nSigmaCuts) { mNSigmaDeCutsForFemto = nSigmaCuts; }
@@ -565,7 +571,7 @@ class HfFilterHelper
565571
template <typename T>
566572
bool isSelectedHighPt3Prong(const T& pt);
567573
template <o2::aod::hffilters::HfTriggers whichTrigger, typename T, typename T1, typename T2>
568-
int8_t isSelectedTrackForSoftPionOrBeauty(const T& track, const T1& trackPar, const T2& dca);
574+
int16_t isSelectedTrackForSoftPionOrBeauty(const T& track, const T1& trackPar, const T2& dca);
569575
template <typename T1, typename T2, typename H2>
570576
bool isSelectedTrack4Femto(const T1& track, const T2& trackPar, const int& activateQA, H2 hTPCPID, H2 hTOFPID, const int& trackSpecies);
571577
template <typename T>
@@ -594,8 +600,8 @@ class HfFilterHelper
594600
bool isSelectedPhoton(const Photon& photon, const std::array<T, 2>& dauTracks, const int& activateQA, H2 hV0Selected, std::array<H2, 4>& hArmPod);
595601
template <typename Casc>
596602
bool isSelectedCascade(const Casc& casc);
597-
template <typename T, typename T2>
598-
int8_t isSelectedBachelorForCharmBaryon(const T& track, const T2& dca);
603+
template <o2::aod::hffilters::HfTriggers whichTrigger, typename T, typename T2>
604+
int16_t isSelectedBachelorForCharmBaryon(const T& track, const T2& dca);
599605
template <bool is4beauty = false, typename T>
600606
bool isSelectedProton4CharmOrBeautyBaryons(const T& track);
601607
template <typename T, typename U>
@@ -668,12 +674,14 @@ class HfFilterHelper
668674
float mPtMinProtonForFemto{0.8}; // minimum pt for the proton for femto
669675
float mPtMinDeuteronForFemto{0.8}; // minimum pt for the deuteron for femto
670676
float mPtMinCharmBaryonBachelor{0.5}; // minimum pt for the bachelor pion from Xic/Omegac decays
677+
float mPtMinLcResonanceBachelor{0.3}; // minimum pt for the bachelor proton from Lc resonance decays
671678
float mPtMaxSoftPionForDstar{2.}; // maximum pt for the D*+ soft pion
672679
float mPtMaxBeautyBachelor{100000.}; // maximum pt for the b-hadron pion daughter
673680
float mPtMaxBeautyToJPsiBachelor{100000.}; // maximum pt for the b-hadron -> JPsi X daughters (not the muons)
674681
float mPtMaxProtonForFemto{5.0}; // maximum pt for the proton for femto
675682
float mPtMaxDeuteronForFemto{5.0}; // maximum pt for the deuteron for femto
676683
float mPtMaxCharmBaryonBachelor{100000.}; // maximum pt for the bachelor pion from Xic/Omegac decays
684+
float mPtMaxLcResonanceBachelor{100000.}; // maximum pt for the bachelor proton from Lc resonance decays
677685
float mPtThresholdProtonForFemto{8.}; // pt threshold to change strategy for proton PID for femto
678686
float mPtThresholdDeuteronForFemto{1.4}; // pt threshold to change strategy for deuteron PID for femto
679687
float mPtMinSigmaCZero{0.f}; // pt min SigmaC0 candidate
@@ -766,10 +774,10 @@ inline bool HfFilterHelper::isSelectedHighPt3Prong(const T& pt)
766774
/// \param dca is the 2d array with dcaXY and dcaZ of the track
767775
/// \return a flag that encodes the selection for soft pions BIT(kSoftPion), tracks for beauty BIT(kForBeauty), or soft pions for beauty BIT(kSoftPionForBeauty)
768776
template <o2::aod::hffilters::HfTriggers whichTrigger, typename T, typename T1, typename T2>
769-
inline int8_t HfFilterHelper::isSelectedTrackForSoftPionOrBeauty(const T& track, const T1& trackPar, const T2& dca)
777+
inline int16_t HfFilterHelper::isSelectedTrackForSoftPionOrBeauty(const T& track, const T1& trackPar, const T2& dca)
770778
{
771779

772-
int8_t retValue{BIT(kSoftPion) | BIT(kForBeauty) | BIT(kSoftPionForBeauty) | BIT(kSoftPionForSigmaC)};
780+
int16_t retValue{BIT(kSoftPion) | BIT(kForBeauty) | BIT(kSoftPionForBeauty) | BIT(kSoftPionForSigmaC)};
773781

774782
if (!track.isGlobalTrackWoDCA()) {
775783
return kRejected;
@@ -939,7 +947,7 @@ inline bool HfFilterHelper::isSelectedTrack4Femto(const T1& track, const T2& tra
939947
return false;
940948
}
941949
} else {
942-
if (NSigmaTOF > nSigmaCuts[2] || NSigmaTPC < -nSigmaCuts[0]) { // Use combined TPC and TOF above the threshold
950+
if (NSigmaTOF < -nSigmaCuts[1] || NSigmaTPC < -nSigmaCuts[0]) { // Use combined TPC and TOF above the threshold
943951
return false;
944952
}
945953
}
@@ -1625,18 +1633,24 @@ inline bool HfFilterHelper::isSelectedCascade(const Casc& casc)
16251633
/// \param track is a track
16261634
/// \param dca is the 2d array with dcaXY and dcaZ of the track
16271635
/// \return 0 if rejected, or a bitmap that contains the information whether it is selected as pion and/or kaon
1628-
template <typename T, typename T2>
1629-
inline int8_t HfFilterHelper::isSelectedBachelorForCharmBaryon(const T& track, const T2& dca)
1636+
template <o2::aod::hffilters::HfTriggers whichTrigger, typename T, typename T2>
1637+
inline int16_t HfFilterHelper::isSelectedBachelorForCharmBaryon(const T& track, const T2& dca)
16301638
{
1631-
int8_t retValue{BIT(kPionForCharmBaryon) | BIT(kKaonForCharmBaryon)};
1639+
int16_t retValue{BIT(kPionForCharmBaryon) | BIT(kKaonForCharmBaryon) | BIT(kProtonForCharmBaryon)};
16321640

16331641
if (!track.isGlobalTrackWoDCA()) {
16341642
return kRejected;
16351643
}
16361644

16371645
float pt = track.pt();
1638-
if (pt < mPtMinCharmBaryonBachelor || pt > mPtMaxCharmBaryonBachelor) {
1639-
return kRejected;
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+
}
16401654
}
16411655

16421656
auto pTBinTrack = findBin(mPtBinsTracks, pt);
@@ -1665,14 +1679,18 @@ inline int8_t HfFilterHelper::isSelectedBachelorForCharmBaryon(const T& track, c
16651679

16661680
float nSigmaPiTpc = track.tpcNSigmaPi();
16671681
float nSigmaKaTpc = track.tpcNSigmaKa();
1682+
float nSigmaPrTpc = track.tpcNSigmaPr();
16681683
float nSigmaPiTof = track.tofNSigmaPi();
16691684
float nSigmaKaTof = track.tofNSigmaKa();
1685+
float nSigmaPrTof = track.tofNSigmaPr();
16701686
if (mTpcPidCalibrationOption == 1) {
16711687
nSigmaPiTpc = getTPCPostCalib(track, kPi);
16721688
nSigmaKaTpc = getTPCPostCalib(track, kKa);
1689+
nSigmaPrTpc = getTPCPostCalib(track, kPr);
16731690
} else if (mTpcPidCalibrationOption == 2) {
16741691
nSigmaPiTpc = getTPCSplineCalib(track, (track.sign() > 0) ? kPi : kAntiPi);
16751692
nSigmaKaTpc = getTPCSplineCalib(track, (track.sign() > 0) ? kKa : kAntiKa);
1693+
nSigmaPrTpc = getTPCSplineCalib(track, (track.sign() > 0) ? kPr : kAntiPr);
16761694
}
16771695

16781696
if ((track.hasTPC() && std::fabs(nSigmaPiTpc) > mNSigmaTpcPiCharmBaryonBachelor) && (track.hasTOF() && std::fabs(nSigmaPiTof) > mNSigmaTofPiCharmBaryonBachelor)) {
@@ -1681,6 +1699,9 @@ inline int8_t HfFilterHelper::isSelectedBachelorForCharmBaryon(const T& track, c
16811699
if ((track.hasTPC() && std::fabs(nSigmaKaTpc) > mNSigmaTpcPiCharmBaryonBachelor) && (track.hasTOF() && std::fabs(nSigmaKaTof) > mNSigmaTofPiCharmBaryonBachelor)) {
16821700
CLRBIT(retValue, kKaonForCharmBaryon);
16831701
}
1702+
if ((track.hasTPC() && std::fabs(nSigmaPrTpc) > mNSigmaTpcPiCharmBaryonBachelor) && (track.hasTOF() && std::fabs(nSigmaPrTof) > mNSigmaTpcPiCharmBaryonBachelor)) {
1703+
CLRBIT(retValue, kProtonForCharmBaryon);
1704+
}
16841705

16851706
return retValue;
16861707
}

0 commit comments

Comments
 (0)