Skip to content

Commit 760f85b

Browse files
authored
[PWGHF,Trigger] Fix bugs for B->JPsi(->mumu) triggers (AliceO2Group#10736)
1 parent abdec46 commit 760f85b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

EventFiltering/PWGHF/HFFilter.cxx

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

716716
// Beauty with JPsi
717717
if (preselJPsiToMuMu) {
718-
if (TESTBIT(helper.isSelectedTrackForSoftPionOrBeauty<kBtoJPsiKa>(track, trackParThird, dcaThird), kForBeauty)) { // same for all channels
718+
if (!TESTBIT(helper.isSelectedTrackForSoftPionOrBeauty<kBtoJPsiKa>(track, trackParThird, dcaThird), kForBeauty)) { // same for all channels
719719
continue;
720720
}
721721
std::array<float, 3> pVecPosVtx{}, pVecNegVtx{}, pVecThirdVtx{}, pVecFourthVtx{};
@@ -753,7 +753,7 @@ struct HfFilter { // Main struct for HF triggers
753753
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, trackParFourth, 2.f, noMatCorr, &dcaFourth);
754754
getPxPyPz(trackParFourth, pVecFourth);
755755
}
756-
if (TESTBIT(helper.isSelectedTrackForSoftPionOrBeauty<kBtoJPsiKa>(trackFourth, trackParFourth, dcaFourth), kForBeauty)) { // same for all channels
756+
if (!TESTBIT(helper.isSelectedTrackForSoftPionOrBeauty<kBtoJPsiKa>(trackFourth, trackParFourth, dcaFourth), kForBeauty)) { // same for all channels
757757
continue;
758758
}
759759
if (df4.process(trackParPos, trackParNeg, trackParThird, trackParFourth) != 0) {

EventFiltering/PWGHF/HFFilterHelpers.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ namespace hf_trigger_cuts_presel_beauty
320320
{
321321
static constexpr int nBinsPt = 2;
322322
static constexpr int nCutVars = 4;
323-
static constexpr int nCutVarsBtoJPsi = 4;
323+
static constexpr int nCutVarsBtoJPsi = 6;
324324
// default values for the pT bin edges (can be used to configure histogram axis)
325325
// common for any beauty candidate
326326
constexpr double binsPt[nBinsPt + 1] = {
@@ -332,14 +332,14 @@ auto vecBinsPt = std::vector<double>{binsPt, binsPt + nBinsPt + 1};
332332
constexpr double cuts[nBinsPt][nCutVars] = {{0.4, -1, -1, 10.}, /* 0 < pt < 5 */
333333
{0.4, -1, -1, 10.}}; /* 5 < pt < 1000 */
334334

335-
constexpr double cutsBtoJPsi[nBinsPt][nCutVarsBtoJPsi] = {{1., 0.6, 0.9, 0.02}, /* 0 < pt < 5 */
336-
{1., 0.8, 0.9, 0.02}}; /* 5 < pt < 1000 */
335+
constexpr double cutsBtoJPsi[nBinsPt][nCutVarsBtoJPsi] = {{1., 0.6, 0.9, 0.02, 0.02, 0.1}, /* 0 < pt < 5 */
336+
{1., 0.8, 0.9, 0.02, 0.02, 0.1}}; /* 5 < pt < 1000 */
337337

338338
// row labels
339339
static const std::vector<std::string> labelsPt{};
340340
// column labels
341341
static const std::vector<std::string> labelsColumnsTopolBeauty = {"DeltaMassB", "minCPA", "minDecayLength", "maxImpParProd"};
342-
static const std::vector<std::string> labelsColumnsCutsBeautyToJPsi = {"minPtMuon", "DeltaMassB", "minCPA", "minDecayLength"};
342+
static const std::vector<std::string> labelsColumnsCutsBeautyToJPsi = {"minPtMuon", "DeltaMassB", "minCPA", "minDecayLength", "DeltaMassKK", "DeltaMassKPi"};
343343

344344
} // namespace hf_trigger_cuts_presel_beauty
345345

@@ -2154,7 +2154,7 @@ inline int8_t HfFilterHelper::isSelectedBhadronToJPsi(std::array<T1, Nprongs> pV
21542154
bool isSecondProton = isSelectedProton4CharmOrBeautyBaryons<true>(tracksDauNoMu[1]);
21552155
auto massKaKa = RecoDecay::m(std::array{pVecDauTracks[2], pVecDauTracks[3]}, std::array{massKa, massKa});
21562156
if (isFirstKaon && isSeconKaon) {
2157-
if (std::fabs(massKaKa - massPhi) < 0.02f) {
2157+
if (std::fabs(massKaKa - massPhi) < mCutsBhadToJPsi.get(binPtB, 4u)) {
21582158
auto massJPsiKaKa = RecoDecay::m(std::array{pVecJPsi, pVecDauTracks[2], pVecDauTracks[3]}, std::array{massJPsi, massKa, massKa});
21592159
if (std::fabs(massJPsiKaKa - massBs) < mCutsBhadToJPsi.get(binPtB, 1u)) {
21602160
SETBIT(isSelected, kBsToJPsi);
@@ -2166,7 +2166,7 @@ inline int8_t HfFilterHelper::isSelectedBhadronToJPsi(std::array<T1, Nprongs> pV
21662166
}
21672167
if (isFirstKaon) {
21682168
auto massKaPi = RecoDecay::m(std::array{pVecDauTracks[2], pVecDauTracks[3]}, std::array{massKa, massPi});
2169-
if (std::fabs(massKaPi - massPhi) < 0.1f) {
2169+
if (std::fabs(massKaPi - massK0Star892) < mCutsBhadToJPsi.get(binPtB, 5u)) {
21702170
auto massJPsiKaPi = RecoDecay::m(std::array{pVecJPsi, pVecDauTracks[2], pVecDauTracks[3]}, std::array{massJPsi, massKa, massPi});
21712171
if (std::fabs(massJPsiKaPi - massB0) < mCutsBhadToJPsi.get(binPtB, 1u)) {
21722172
SETBIT(isSelected, kB0ToJPsi);
@@ -2178,7 +2178,7 @@ inline int8_t HfFilterHelper::isSelectedBhadronToJPsi(std::array<T1, Nprongs> pV
21782178
}
21792179
if (isSeconKaon) {
21802180
auto massPiKa = RecoDecay::m(std::array{pVecDauTracks[2], pVecDauTracks[3]}, std::array{massPi, massKa});
2181-
if (std::fabs(massPiKa - massPhi) < 0.1f) {
2181+
if (std::fabs(massPiKa - massK0Star892) < mCutsBhadToJPsi.get(binPtB, 5u)) {
21822182
auto massJPsiPiKa = RecoDecay::m(std::array{pVecJPsi, pVecDauTracks[2], pVecDauTracks[3]}, std::array{massJPsi, massPi, massKa});
21832183
if (std::fabs(massJPsiPiKa - massB0) < mCutsBhadToJPsi.get(binPtB, 1u)) {
21842184
SETBIT(isSelected, kB0ToJPsi);

0 commit comments

Comments
 (0)