From e8f4692237fd7b76dd9b6cdfee43c44c1ab9505c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?BiaoZhang=20=28=E5=BC=A0=E5=BD=AA=29?= <52267892+zhangbiao-phy@users.noreply.github.com> Date: Thu, 5 Feb 2026 13:29:49 +0100 Subject: [PATCH 1/2] Update HFFilter.cxx --- EventFiltering/PWGHF/HFFilter.cxx | 41 +++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/EventFiltering/PWGHF/HFFilter.cxx b/EventFiltering/PWGHF/HFFilter.cxx index bdebd70a9d8..a76b5846fae 100644 --- a/EventFiltering/PWGHF/HFFilter.cxx +++ b/EventFiltering/PWGHF/HFFilter.cxx @@ -814,22 +814,37 @@ struct HfFilter { // Main struct for HF triggers } } // end beauty selection - // 2-prong femto - if (!keepEvent[kFemto2P] && enableFemtoChannels->get(0u, 0u) && isD0CharmTagged && track.collisionId() == thisCollId) { - bool isProton = helper.isSelectedTrack4Femto(track, trackParThird, activateQA, hPrDePID[0], hPrDePID[1], kProtonForFemto); - if (isProton) { - float relativeMomentum = helper.computeRelativeMomentum(pVecThird, pVec2Prong, massD0); - if (applyOptimisation) { - optimisationTreeFemto(thisCollId, o2::constants::physics::Pdg::kD0, pt2Prong, scores[0], scores[1], scores[2], relativeMomentum, track.tpcNSigmaPr(), track.tofNSigmaPr(), track.tpcNSigmaDe(), track.tofNSigmaDe()); + // 2-prong femto + bool isProtonForCharm2Prong = helper.isSelectedTrack4Femto(track, trackParThird, activateQA, hPrDePID[0], hPrDePID[1], kProtonForFemto); + bool isDeuteronForCharm2Prong = helper.isSelectedTrack4Femto(track, trackParThird, activateQA, hPrDePID[2], hPrDePID[3], kDeuteronForFemto); + + if (track.collisionId() == thisCollId) { + if (isProtonForCharm2Prong && !keepEvent[kFemto2P] && enableFemtoChannels->get(0u, 0u) && isD0CharmTagged) { + float relativeMomentum = helper.computeRelativeMomentum(pVecThird, pVec2Prong, massD0); + if (applyOptimisation) { + optimisationTreeFemto(thisCollId, o2::constants::physics::Pdg::kD0, pt2Prong, scores[0], scores[1], scores[2], relativeMomentum, track.tpcNSigmaPr(), track.tofNSigmaPr(), track.tpcNSigmaDe(), track.tofNSigmaDe()); + } + if (relativeMomentum < femtoMaxRelativeMomentum) { + keepEvent[kFemto2P] = true; + if (activateQA) { + hCharmProtonKstarDistr[kD0]->Fill(relativeMomentum); + } + } } - if (relativeMomentum < femtoMaxRelativeMomentum) { - keepEvent[kFemto2P] = true; - if (activateQA) { - hCharmProtonKstarDistr[kD0]->Fill(relativeMomentum); + + if (isDeuteronForCharm2Prong && !keepEvent[kFemto2P] && enableFemtoChannels->get(1u, 0u) && isD0CharmTagged) { + float relativeMomentum = helper.computeRelativeMomentum(pVecThird, pVec2Prong, massD0); + if (applyOptimisation) { + optimisationTreeFemto(thisCollId, o2::constants::physics::Pdg::kD0, pt2Prong, scores[0], scores[1], scores[2], relativeMomentum, track.tpcNSigmaPr(), track.tofNSigmaPr(), track.tpcNSigmaDe(), track.tofNSigmaDe()); + } + if (relativeMomentum < femtoMaxRelativeMomentum) { + keepEvent[kFemto2P] = true; + if (activateQA) { + hCharmDeuteronKstarDistr[kD0]->Fill(relativeMomentum); + } } } - } - } // end femto selection + } // end femto charm 2prong selection // Beauty with JPsi if (preselJPsiToMuMu) { From 869c9a10d965b792bb783503090ca2503233cb65 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Thu, 5 Feb 2026 12:31:19 +0000 Subject: [PATCH 2/2] Please consider the following formatting changes --- EventFiltering/PWGHF/HFFilter.cxx | 52 +++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/EventFiltering/PWGHF/HFFilter.cxx b/EventFiltering/PWGHF/HFFilter.cxx index a76b5846fae..999af2224ec 100644 --- a/EventFiltering/PWGHF/HFFilter.cxx +++ b/EventFiltering/PWGHF/HFFilter.cxx @@ -814,37 +814,37 @@ struct HfFilter { // Main struct for HF triggers } } // end beauty selection - // 2-prong femto - bool isProtonForCharm2Prong = helper.isSelectedTrack4Femto(track, trackParThird, activateQA, hPrDePID[0], hPrDePID[1], kProtonForFemto); - bool isDeuteronForCharm2Prong = helper.isSelectedTrack4Femto(track, trackParThird, activateQA, hPrDePID[2], hPrDePID[3], kDeuteronForFemto); - - if (track.collisionId() == thisCollId) { - if (isProtonForCharm2Prong && !keepEvent[kFemto2P] && enableFemtoChannels->get(0u, 0u) && isD0CharmTagged) { - float relativeMomentum = helper.computeRelativeMomentum(pVecThird, pVec2Prong, massD0); - if (applyOptimisation) { - optimisationTreeFemto(thisCollId, o2::constants::physics::Pdg::kD0, pt2Prong, scores[0], scores[1], scores[2], relativeMomentum, track.tpcNSigmaPr(), track.tofNSigmaPr(), track.tpcNSigmaDe(), track.tofNSigmaDe()); - } - if (relativeMomentum < femtoMaxRelativeMomentum) { - keepEvent[kFemto2P] = true; - if (activateQA) { - hCharmProtonKstarDistr[kD0]->Fill(relativeMomentum); - } + // 2-prong femto + bool isProtonForCharm2Prong = helper.isSelectedTrack4Femto(track, trackParThird, activateQA, hPrDePID[0], hPrDePID[1], kProtonForFemto); + bool isDeuteronForCharm2Prong = helper.isSelectedTrack4Femto(track, trackParThird, activateQA, hPrDePID[2], hPrDePID[3], kDeuteronForFemto); + + if (track.collisionId() == thisCollId) { + if (isProtonForCharm2Prong && !keepEvent[kFemto2P] && enableFemtoChannels->get(0u, 0u) && isD0CharmTagged) { + float relativeMomentum = helper.computeRelativeMomentum(pVecThird, pVec2Prong, massD0); + if (applyOptimisation) { + optimisationTreeFemto(thisCollId, o2::constants::physics::Pdg::kD0, pt2Prong, scores[0], scores[1], scores[2], relativeMomentum, track.tpcNSigmaPr(), track.tofNSigmaPr(), track.tpcNSigmaDe(), track.tofNSigmaDe()); + } + if (relativeMomentum < femtoMaxRelativeMomentum) { + keepEvent[kFemto2P] = true; + if (activateQA) { + hCharmProtonKstarDistr[kD0]->Fill(relativeMomentum); } } + } - if (isDeuteronForCharm2Prong && !keepEvent[kFemto2P] && enableFemtoChannels->get(1u, 0u) && isD0CharmTagged) { - float relativeMomentum = helper.computeRelativeMomentum(pVecThird, pVec2Prong, massD0); - if (applyOptimisation) { - optimisationTreeFemto(thisCollId, o2::constants::physics::Pdg::kD0, pt2Prong, scores[0], scores[1], scores[2], relativeMomentum, track.tpcNSigmaPr(), track.tofNSigmaPr(), track.tpcNSigmaDe(), track.tofNSigmaDe()); - } - if (relativeMomentum < femtoMaxRelativeMomentum) { - keepEvent[kFemto2P] = true; - if (activateQA) { - hCharmDeuteronKstarDistr[kD0]->Fill(relativeMomentum); - } + if (isDeuteronForCharm2Prong && !keepEvent[kFemto2P] && enableFemtoChannels->get(1u, 0u) && isD0CharmTagged) { + float relativeMomentum = helper.computeRelativeMomentum(pVecThird, pVec2Prong, massD0); + if (applyOptimisation) { + optimisationTreeFemto(thisCollId, o2::constants::physics::Pdg::kD0, pt2Prong, scores[0], scores[1], scores[2], relativeMomentum, track.tpcNSigmaPr(), track.tofNSigmaPr(), track.tpcNSigmaDe(), track.tofNSigmaDe()); + } + if (relativeMomentum < femtoMaxRelativeMomentum) { + keepEvent[kFemto2P] = true; + if (activateQA) { + hCharmDeuteronKstarDistr[kD0]->Fill(relativeMomentum); } } - } // end femto charm 2prong selection + } + } // end femto charm 2prong selection // Beauty with JPsi if (preselJPsiToMuMu) {