Skip to content

Commit 4127978

Browse files
authored
Merge branch 'AliceO2Group:master' into master
2 parents 1a6d7da + 76a312f commit 4127978

File tree

17 files changed

+1751
-760
lines changed

17 files changed

+1751
-760
lines changed

EventFiltering/PWGHF/HFFilter.cxx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ struct HfFilter { // Main struct for HF triggers
116116

117117
// parameters for charm baryons to Xi bachelor
118118
Configurable<LabeledArray<float>> cutsXiCascades{"cutsXiCascades", {cutsCascades[0], 1, 8, labelsEmpty, labelsColumnsCascades}, "Selections for cascades (Xi) for Xi+bachelor triggers"};
119-
Configurable<LabeledArray<float>> cutsXiBachelor{"cutsXiBachelor", {cutsCharmBaryons[0], 1, 8, labelsEmpty, labelsColumnsCharmBarCuts}, "Selections for charm baryons (Xi+Pi, Xi+Ka, Xi+Pi+Pi)"};
119+
Configurable<LabeledArray<float>> cutsXiBachelor{"cutsXiBachelor", {cutsCharmBaryons[0], 1, 11, labelsEmpty, labelsColumnsCharmBarCuts}, "Selections for charm baryons (Xi+Pi, Xi+Ka, Xi+Pi+Pi)"};
120120
Configurable<LabeledArray<double>> cutsTrackCharmBaryonBachelor{"cutsTrackCharmBaryonBachelor", {hf_cuts_single_track::CutsTrack[0], hf_cuts_single_track::NBinsPtTrack, hf_cuts_single_track::NCutVarsTrack, hf_cuts_single_track::labelsPtTrack, hf_cuts_single_track::labelsCutVarTrack}, "Single-track selections per pT bin for charm-baryon bachelor candidates"};
121121
Configurable<LabeledArray<int>> requireStrangenessTracking{"requireStrangenessTracking", {requireStrangenessTrackedXi[0], 1, 2, labelsEmpty, labelsColumnsCharmBaryons}, "Flags to require strangeness tracking for channels with Xi"};
122122

@@ -218,7 +218,7 @@ struct HfFilter { // Main struct for HF triggers
218218
helper.setForceTofForFemto(forceTofProtonForFemto, forceTofDeuteronForFemto);
219219
helper.setV0Selections(cutsGammaK0sLambda->get(0u, 0u), cutsGammaK0sLambda->get(0u, 1u), cutsGammaK0sLambda->get(0u, 2u), cutsGammaK0sLambda->get(0u, 3u), cutsGammaK0sLambda->get(0u, 4u), cutsGammaK0sLambda->get(0u, 5u));
220220
helper.setXiSelections(cutsXiCascades->get(0u, 0u), cutsXiCascades->get(0u, 1u), cutsXiCascades->get(0u, 2u), cutsXiCascades->get(0u, 3u), cutsXiCascades->get(0u, 4u), cutsXiCascades->get(0u, 5u), cutsXiCascades->get(0u, 6u), cutsXiCascades->get(0u, 7u));
221-
helper.setXiBachelorSelections(cutsXiBachelor->get(0u, 0u), cutsXiBachelor->get(0u, 1u), cutsXiBachelor->get(0u, 2u), cutsXiBachelor->get(0u, 3u), cutsXiBachelor->get(0u, 4u), cutsXiBachelor->get(0u, 5u), cutsXiBachelor->get(0u, 6u), cutsXiBachelor->get(0u, 7u));
221+
helper.setXiBachelorSelections(cutsXiBachelor->get(0u, 0u), cutsXiBachelor->get(0u, 1u), cutsXiBachelor->get(0u, 2u), cutsXiBachelor->get(0u, 3u), cutsXiBachelor->get(0u, 4u), cutsXiBachelor->get(0u, 5u), cutsXiBachelor->get(0u, 6u), cutsXiBachelor->get(0u, 7u), cutsXiBachelor->get(0u, 8u), cutsXiBachelor->get(0u, 9u), cutsXiBachelor->get(0u, 10u));
222222
helper.setNsigmaPiCutsForCharmBaryonBachelor(nSigmaPidCuts->get(0u, 4u), nSigmaPidCuts->get(1u, 4u));
223223
helper.setTpcPidCalibrationOption(setTPCCalib);
224224
helper.setMassResolParametrisation(paramCharmMassShape);
@@ -291,10 +291,10 @@ struct HfFilter { // Main struct for HF triggers
291291

292292
for (int iBeautyPart{0}; iBeautyPart < kNBeautyParticles; ++iBeautyPart) {
293293
hMassVsPtB[iBeautyPart] = registry.add<TH2>(Form("fMassVsPt%s", beautyParticleNames[iBeautyPart].data()), Form("#it{M} vs. #it{p}_{T} distribution of triggered %s candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts", beautyParticleNames[iBeautyPart].data()), HistType::kTH2D, {ptAxis, massAxisB[iBeautyPart]});
294-
hCpaVsPtB[iBeautyPart] = registry.add<TH2>(Form("fCpaVsPt%s", beautyParticleNames[iBeautyPart].data()), Form("CPA vs. #it{p}_{T} distribution of triggered %s candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts", beautyParticleNames[iBeautyPart].data()), HistType::kTH2D, {ptAxis, {100, -1, 1}});
295-
hDecayLengthVsPtB[iBeautyPart] = registry.add<TH2>(Form("fDecayLengthVsPt%s", beautyParticleNames[iBeautyPart].data()), Form("DecayLength vs. #it{p}_{T} distribution of triggered %s candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts", beautyParticleNames[iBeautyPart].data()), HistType::kTH2D, {ptAxis, {100, 0, 20}});
294+
hCpaVsPtB[iBeautyPart] = registry.add<TH2>(Form("fCpaVsPt%s", beautyParticleNames[iBeautyPart].data()), Form("CPA vs. #it{p}_{T} distribution of triggered %s candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts", beautyParticleNames[iBeautyPart].data()), HistType::kTH2D, {ptAxis, {500, 0., 1}});
295+
hDecayLengthVsPtB[iBeautyPart] = registry.add<TH2>(Form("fDecayLengthVsPt%s", beautyParticleNames[iBeautyPart].data()), Form("DecayLength vs. #it{p}_{T} distribution of triggered %s candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts", beautyParticleNames[iBeautyPart].data()), HistType::kTH2D, {ptAxis, {500, 0, 0.5}});
296296
if (iBeautyPart != kB0toDStar) {
297-
hImpactParamProductVsPtB[iBeautyPart] = registry.add<TH2>(Form("fImpactParamProductVsPt%s", beautyParticleNames[iBeautyPart].data()), Form("ImpactParamProduct vs. #it{p}_{T} distribution of triggered %s candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts", beautyParticleNames[iBeautyPart].data()), HistType::kTH2D, {ptAxis, {100, -2.5, +2.5}});
297+
hImpactParamProductVsPtB[iBeautyPart] = registry.add<TH2>(Form("fImpactParamProductVsPt%s", beautyParticleNames[iBeautyPart].data()), Form("ImpactParamProduct vs. #it{p}_{T} distribution of triggered %s candidates;#it{p}_{T} (GeV/#it{c});#it{M} (GeV/#it{c}^{2});counts", beautyParticleNames[iBeautyPart].data()), HistType::kTH2D, {ptAxis, {500, -2.5e-3, +2.5e-3}});
298298
}
299299
}
300300
for (int iBeautyPart{kNBeautyParticles}; iBeautyPart < nTotBeautyParts; ++iBeautyPart) {
@@ -953,8 +953,8 @@ struct HfFilter { // Main struct for HF triggers
953953
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, trackParBachelorProton, 2.f, noMatCorr, &dcaInfoBachProton);
954954
}
955955
std::array<float, 3> pVecProton = trackProton.pVector();
956-
auto isSelProton = helper.isSelectedBachelorForCharmBaryon<kPrCharm2P>(trackProton, dcaInfoBachProton);
957-
if (TESTBIT(isSelProton, kProtonForCharmBaryon)) {
956+
bool isSelProton = helper.isSelectedProtonFromLcReso(trackProton);
957+
if (isSelProton) {
958958
if (!keepEvent[kPrCharm2P]) {
959959
// we first look for a D*+
960960
for (const auto& trackBachelorId : trackIdsThisCollision) { // start loop over tracks to find bachelor pion
@@ -1726,7 +1726,7 @@ struct HfFilter { // Main struct for HF triggers
17261726
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, trackParBachelor, 2.f, noMatCorr, &dcaInfoBach);
17271727
}
17281728

1729-
auto isSelBachelor = helper.isSelectedBachelorForCharmBaryon<kCharmBarToXiBach>(track, dcaInfoBach);
1729+
auto isSelBachelor = helper.isSelectedBachelorForCharmBaryon(track, dcaInfoBach);
17301730
if (isSelBachelor == kRejected) {
17311731
continue;
17321732
}
@@ -1770,7 +1770,7 @@ struct HfFilter { // Main struct for HF triggers
17701770
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, trackParBachelorSecond, 2.f, noMatCorr, &dcaInfoBachSecond);
17711771
}
17721772

1773-
auto isSelBachelorSecond = helper.isSelectedBachelorForCharmBaryon<kCharmBarToXiBach>(trackSecond, dcaInfoBachSecond);
1773+
auto isSelBachelorSecond = helper.isSelectedBachelorForCharmBaryon(trackSecond, dcaInfoBachSecond);
17741774
if (!TESTBIT(isSelBachelorSecond, kPionForCharmBaryon)) {
17751775
continue;
17761776
}

EventFiltering/PWGHF/HFFilterHelpers.h

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ static const o2::framework::AxisSpec qtAxis{100, 0.f, 0.25f};
285285
static const o2::framework::AxisSpec bdtAxis{100, 0.f, 1.f};
286286
static const o2::framework::AxisSpec phiAxis{36, 0., o2::constants::math::TwoPI};
287287
static 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
362362
constexpr 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
363363
static 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

367367
constexpr int requireStrangenessTrackedXi[1][2] = {{1, 0}};
368368
static 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>
16371642
inline 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

Comments
 (0)