|
28 | 28 |
|
29 | 29 | #include <Math/Vector4D.h> |
30 | 30 |
|
| 31 | +#include <set> |
| 32 | + |
31 | 33 | using namespace o2; |
32 | 34 | using namespace o2::framework; |
33 | 35 | using namespace o2::framework::expressions; |
@@ -129,6 +131,10 @@ struct Omega2012Analysis { |
129 | 131 | Configurable<std::vector<float>> cPionTOFNSigmaCuts{"cPionTOFNSigmaCuts", {3.0f, 3.0f, 3.0f, 3.0f}, "TOF NSigma cuts per pT bin (pion)"}; |
130 | 132 | Configurable<std::vector<int>> cPionTOFRequired{"cPionTOFRequired", {0, 0, 1, 1}, "Require TOF per pT bin (pion)"}; |
131 | 133 |
|
| 134 | + // Xi1530 mass window cut |
| 135 | + Configurable<float> cXi1530Mass{"cXi1530Mass", 1.53, "Xi(1530) mass (GeV/c^2)"}; |
| 136 | + Configurable<float> cXi1530MassWindow{"cXi1530MassWindow", 0.01, "Xi(1530) mass window (GeV/c^2)"}; |
| 137 | + |
132 | 138 | // PDG masses |
133 | 139 | double massK0 = MassK0Short; |
134 | 140 |
|
@@ -475,6 +481,21 @@ struct Omega2012Analysis { |
475 | 481 | return true; |
476 | 482 | } |
477 | 483 |
|
| 484 | + // Xi1530 mass window cut |
| 485 | + template <typename XiType, typename PionType> |
| 486 | + bool xi1530MassCut(const XiType& xi, const PionType& pion) |
| 487 | + { |
| 488 | + // Calculate Xi + pion invariant mass |
| 489 | + ROOT::Math::PxPyPzEVector pXi, pPion, pXi1530; |
| 490 | + pXi = ROOT::Math::PxPyPzEVector(ROOT::Math::PtEtaPhiMVector(xi.pt(), xi.eta(), xi.phi(), xi.mXi())); |
| 491 | + pPion = ROOT::Math::PxPyPzEVector(ROOT::Math::PtEtaPhiMVector(pion.pt(), pion.eta(), pion.phi(), MassPionCharged)); |
| 492 | + pXi1530 = pXi + pPion; |
| 493 | + |
| 494 | + // Check if mass is within Xi(1530) window |
| 495 | + float massDiff = std::abs(pXi1530.M() - cXi1530Mass); |
| 496 | + return massDiff < cXi1530MassWindow; |
| 497 | + } |
| 498 | + |
478 | 499 | // Primary-level cascade kinematics |
479 | 500 | template <typename CascT> |
480 | 501 | bool cascprimaryTrackCut(const CascT& c) |
@@ -801,67 +822,104 @@ struct Omega2012Analysis { |
801 | 822 | { |
802 | 823 | auto cent = collision.cent(); |
803 | 824 |
|
| 825 | + // Collect track IDs used in xi and v0 construction to exclude them from pion selection |
| 826 | + std::set<int> usedTrackIds; |
| 827 | + |
| 828 | + // Collect track IDs from xi cascades |
804 | 829 | for (const auto& xi : cascades) { |
805 | 830 | if (!cascprimaryTrackCut(xi)) |
806 | 831 | continue; |
807 | 832 | if (!casctopCut(xi)) |
808 | 833 | continue; |
809 | 834 |
|
810 | | - for (const auto& v0 : v0s) { |
811 | | - if (!v0CutEnhanced(collision, v0)) |
| 835 | + // Add xi daughter track IDs (proton, pion, bachelor pion) |
| 836 | + usedTrackIds.insert(xi.posTrackId()); |
| 837 | + usedTrackIds.insert(xi.negTrackId()); |
| 838 | + usedTrackIds.insert(xi.bachTrackId()); |
| 839 | + } |
| 840 | + |
| 841 | + // Collect track IDs from v0s |
| 842 | + for (const auto& v0 : v0s) { |
| 843 | + if (!v0CutEnhanced(collision, v0)) |
| 844 | + continue; |
| 845 | + |
| 846 | + // Add v0 daughter track IDs (positive and negative tracks) |
| 847 | + usedTrackIds.insert(v0.posTrackId()); |
| 848 | + usedTrackIds.insert(v0.negTrackId()); |
| 849 | + } |
| 850 | + |
| 851 | + // First loop: xi + pion to check xi1530 mass window |
| 852 | + for (const auto& xi : cascades) { |
| 853 | + if (!cascprimaryTrackCut(xi)) |
| 854 | + continue; |
| 855 | + if (!casctopCut(xi)) |
| 856 | + continue; |
| 857 | + |
| 858 | + for (const auto& pion : tracks) { |
| 859 | + // Skip pion tracks that are already used in xi construction |
| 860 | + if (usedTrackIds.find(pion.globalIndex()) != usedTrackIds.end()) { |
812 | 861 | continue; |
| 862 | + } |
| 863 | + |
| 864 | + // Pion QA before cuts |
| 865 | + histos.fill(HIST("QAbefore/pionPt"), pion.pt()); |
| 866 | + histos.fill(HIST("QAbefore/pionEta"), pion.eta()); |
813 | 867 |
|
814 | | - for (const auto& pion : tracks) { |
815 | | - // Pion QA before cuts |
816 | | - histos.fill(HIST("QAbefore/pionPt"), pion.pt()); |
817 | | - histos.fill(HIST("QAbefore/pionEta"), pion.eta()); |
818 | | - |
819 | | - if constexpr (IsResoMicrotrack) { |
820 | | - histos.fill(HIST("QAbefore/pionDCAxy"), pion.pt(), o2::aod::resomicrodaughter::ResoMicroTrackSelFlag::decodeDCAxy(pion.trackSelectionFlags())); |
821 | | - histos.fill(HIST("QAbefore/pionDCAz"), pion.pt(), o2::aod::resomicrodaughter::ResoMicroTrackSelFlag::decodeDCAz(pion.trackSelectionFlags())); |
822 | | - histos.fill(HIST("QAbefore/pionTPCNSigma"), pion.pt(), o2::aod::resomicrodaughter::PidNSigma::getTPCnSigma(pion.pidNSigmaPiFlag())); |
823 | | - if (pion.hasTOF()) { |
824 | | - histos.fill(HIST("QAbefore/pionTOFNSigma"), pion.pt(), o2::aod::resomicrodaughter::PidNSigma::getTOFnSigma(pion.pidNSigmaPiFlag())); |
825 | | - } |
826 | | - } else { |
827 | | - histos.fill(HIST("QAbefore/pionDCAxy"), pion.pt(), pion.dcaXY()); |
828 | | - histos.fill(HIST("QAbefore/pionDCAz"), pion.pt(), pion.dcaZ()); |
829 | | - histos.fill(HIST("QAbefore/pionTPCNSigma"), pion.pt(), pion.tpcNSigmaPi()); |
830 | | - if (pion.hasTOF()) { |
831 | | - histos.fill(HIST("QAbefore/pionTOFNSigma"), pion.pt(), pion.tofNSigmaPi()); |
832 | | - } |
833 | | - if constexpr (requires { pion.tpcNClsFound(); }) { |
834 | | - histos.fill(HIST("QAbefore/pionTPCNcls"), pion.tpcNClsFound()); |
835 | | - } |
| 868 | + if constexpr (IsResoMicrotrack) { |
| 869 | + histos.fill(HIST("QAbefore/pionDCAxy"), pion.pt(), o2::aod::resomicrodaughter::ResoMicroTrackSelFlag::decodeDCAxy(pion.trackSelectionFlags())); |
| 870 | + histos.fill(HIST("QAbefore/pionDCAz"), pion.pt(), o2::aod::resomicrodaughter::ResoMicroTrackSelFlag::decodeDCAz(pion.trackSelectionFlags())); |
| 871 | + histos.fill(HIST("QAbefore/pionTPCNSigma"), pion.pt(), o2::aod::resomicrodaughter::PidNSigma::getTPCnSigma(pion.pidNSigmaPiFlag())); |
| 872 | + if (pion.hasTOF()) { |
| 873 | + histos.fill(HIST("QAbefore/pionTOFNSigma"), pion.pt(), o2::aod::resomicrodaughter::PidNSigma::getTOFnSigma(pion.pidNSigmaPiFlag())); |
| 874 | + } |
| 875 | + } else { |
| 876 | + histos.fill(HIST("QAbefore/pionDCAxy"), pion.pt(), pion.dcaXY()); |
| 877 | + histos.fill(HIST("QAbefore/pionDCAz"), pion.pt(), pion.dcaZ()); |
| 878 | + histos.fill(HIST("QAbefore/pionTPCNSigma"), pion.pt(), pion.tpcNSigmaPi()); |
| 879 | + if (pion.hasTOF()) { |
| 880 | + histos.fill(HIST("QAbefore/pionTOFNSigma"), pion.pt(), pion.tofNSigmaPi()); |
836 | 881 | } |
| 882 | + if constexpr (requires { pion.tpcNClsFound(); }) { |
| 883 | + histos.fill(HIST("QAbefore/pionTPCNcls"), pion.tpcNClsFound()); |
| 884 | + } |
| 885 | + } |
837 | 886 |
|
838 | | - if (!pionCut<IsResoMicrotrack>(pion)) |
839 | | - continue; |
| 887 | + if (!pionCut<IsResoMicrotrack>(pion)) |
| 888 | + continue; |
840 | 889 |
|
841 | | - // Pion QA after cuts |
842 | | - histos.fill(HIST("QAafter/pionPt"), pion.pt()); |
843 | | - histos.fill(HIST("QAafter/pionEta"), pion.eta()); |
844 | | - |
845 | | - if constexpr (IsResoMicrotrack) { |
846 | | - histos.fill(HIST("QAafter/pionDCAxy"), pion.pt(), o2::aod::resomicrodaughter::ResoMicroTrackSelFlag::decodeDCAxy(pion.trackSelectionFlags())); |
847 | | - histos.fill(HIST("QAafter/pionDCAz"), pion.pt(), o2::aod::resomicrodaughter::ResoMicroTrackSelFlag::decodeDCAz(pion.trackSelectionFlags())); |
848 | | - histos.fill(HIST("QAafter/pionTPCNSigma"), pion.pt(), o2::aod::resomicrodaughter::PidNSigma::getTPCnSigma(pion.pidNSigmaPiFlag())); |
849 | | - if (pion.hasTOF()) { |
850 | | - histos.fill(HIST("QAafter/pionTOFNSigma"), pion.pt(), o2::aod::resomicrodaughter::PidNSigma::getTOFnSigma(pion.pidNSigmaPiFlag())); |
851 | | - } |
852 | | - } else { |
853 | | - histos.fill(HIST("QAafter/pionDCAxy"), pion.pt(), pion.dcaXY()); |
854 | | - histos.fill(HIST("QAafter/pionDCAz"), pion.pt(), pion.dcaZ()); |
855 | | - histos.fill(HIST("QAafter/pionTPCNSigma"), pion.pt(), pion.tpcNSigmaPi()); |
856 | | - if (pion.hasTOF()) { |
857 | | - histos.fill(HIST("QAafter/pionTOFNSigma"), pion.pt(), pion.tofNSigmaPi()); |
858 | | - } |
859 | | - if constexpr (requires { pion.tpcNClsFound(); }) { |
860 | | - histos.fill(HIST("QAafter/pionTPCNcls"), pion.tpcNClsFound()); |
861 | | - } |
| 890 | + // Pion QA after cuts |
| 891 | + histos.fill(HIST("QAafter/pionPt"), pion.pt()); |
| 892 | + histos.fill(HIST("QAafter/pionEta"), pion.eta()); |
| 893 | + |
| 894 | + if constexpr (IsResoMicrotrack) { |
| 895 | + histos.fill(HIST("QAafter/pionDCAxy"), pion.pt(), o2::aod::resomicrodaughter::ResoMicroTrackSelFlag::decodeDCAxy(pion.trackSelectionFlags())); |
| 896 | + histos.fill(HIST("QAafter/pionDCAz"), pion.pt(), o2::aod::resomicrodaughter::ResoMicroTrackSelFlag::decodeDCAz(pion.trackSelectionFlags())); |
| 897 | + histos.fill(HIST("QAafter/pionTPCNSigma"), pion.pt(), o2::aod::resomicrodaughter::PidNSigma::getTPCnSigma(pion.pidNSigmaPiFlag())); |
| 898 | + if (pion.hasTOF()) { |
| 899 | + histos.fill(HIST("QAafter/pionTOFNSigma"), pion.pt(), o2::aod::resomicrodaughter::PidNSigma::getTOFnSigma(pion.pidNSigmaPiFlag())); |
| 900 | + } |
| 901 | + } else { |
| 902 | + histos.fill(HIST("QAafter/pionDCAxy"), pion.pt(), pion.dcaXY()); |
| 903 | + histos.fill(HIST("QAafter/pionDCAz"), pion.pt(), pion.dcaZ()); |
| 904 | + histos.fill(HIST("QAafter/pionTPCNSigma"), pion.pt(), pion.tpcNSigmaPi()); |
| 905 | + if (pion.hasTOF()) { |
| 906 | + histos.fill(HIST("QAafter/pionTOFNSigma"), pion.pt(), pion.tofNSigmaPi()); |
862 | 907 | } |
| 908 | + if constexpr (requires { pion.tpcNClsFound(); }) { |
| 909 | + histos.fill(HIST("QAafter/pionTPCNcls"), pion.tpcNClsFound()); |
| 910 | + } |
| 911 | + } |
| 912 | + |
| 913 | + // Check xi1530 mass window cut |
| 914 | + if (!xi1530MassCut(xi, pion)) |
| 915 | + continue; |
| 916 | + |
| 917 | + // Second loop: v0 for the selected xi-pion pair |
| 918 | + for (const auto& v0 : v0s) { |
| 919 | + if (!v0CutEnhanced(collision, v0)) |
| 920 | + continue; |
863 | 921 |
|
864 | | - // 4-vectors for 3-body |
| 922 | + // 4-vectors for 3-body decay: Xi + K0s + pion |
865 | 923 | ROOT::Math::PxPyPzEVector pXi, pK0s, pPion, pRes; |
866 | 924 | pXi = ROOT::Math::PxPyPzEVector(ROOT::Math::PtEtaPhiMVector(xi.pt(), xi.eta(), xi.phi(), xi.mXi())); |
867 | 925 | pK0s = ROOT::Math::PxPyPzEVector(ROOT::Math::PtEtaPhiMVector(v0.pt(), v0.eta(), v0.phi(), massK0)); |
|
0 commit comments