From 6ab462a1d2ed2da09f7e0f6819d453b64ee01703 Mon Sep 17 00:00:00 2001 From: blacwovie Date: Wed, 17 Sep 2025 23:06:29 +0800 Subject: [PATCH 1/4] add kstar function --- PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx | 93 ++++++++++++++++++- 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx b/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx index 975572e927e..8df74909073 100644 --- a/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx +++ b/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx @@ -18,6 +18,7 @@ #include "PWGLF/DataModel/EPCalibrationTables.h" #include "PWGLF/DataModel/LFhe3HadronTables.h" #include "PWGLF/Utils/svPoolCreator.h" +#include "PWGCF/FemtoWorld/Core/FemtoWorldMath.h" #include "Common/Core/PID/PIDTOF.h" #include "Common/Core/PID/TPCPIDResponse.h" @@ -181,6 +182,8 @@ struct He3HadCandidate { // collision information int32_t collisionID = 0; + + float kstarfem = 1.f; }; struct he3HadronFemto { @@ -287,6 +290,14 @@ struct he3HadronFemto { {"h2NsigmaHadronTPC_preselection", "NsigmaHe3 TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(had)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}}, {"h2NsigmaHadronTOF", "NsigmaHadron TOF distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(had)", {HistType::kTH2F, {{20, -5.0f, 5.0f}, {200, -5.0f, 5.0f}}}}, {"h2NsigmaHadronTOF_preselection", "NsigmaHadron TOF distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(had)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}}, + {"hkStar_LS_M", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, + {"hkStar_LS_A", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, + {"hkStar_US_M", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, + {"hkStar_US_A", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, + {"hkStar_LS_M_femto", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, + {"hkStar_LS_A_femto", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, + {"hkStar_US_M_femto", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, + {"hkStar_US_A_femto", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, }, OutputObjHandlingPolicy::AnalysisObject, false, @@ -676,6 +687,7 @@ struct he3HadronFemto { beta = std::min(1.f - 1.e-6f, std::max(1.e-4f, beta)); /// sometimes beta > 1 or < 0, to be checked he3Hadcand.massTOFHad = trackHad.tpcInnerParam() * std::sqrt(1.f / (beta * beta) - 1.f); } + he3Hadcand.kstarfem = o2::analysis::femtoWorld::FemtoWorldMath::getkstar(trackHad, o2::constants::physics::MassPiPlus, trackHe3, o2::constants::physics::MassHelium3); return true; } @@ -839,6 +851,85 @@ struct he3HadronFemto { } // ================================================================================================================== + double computePrTPCnsig(double InnerParamTPCHad, double SignalTPCHad) + { + double m_BBparamsProton[6] = {-54.42066571222577, 0.2857381250239097, 1.247140602468868, 0.6297483918147729, 2.985438833884555, 0.09}; + + float TPCinnerParam = InnerParamTPCHad; + float expTPCSignal = o2::tpc::BetheBlochAleph((TPCinnerParam / 0.9382721), m_BBparamsProton[0], m_BBparamsProton[1], m_BBparamsProton[2], m_BBparamsProton[3], m_BBparamsProton[4]); + double resoTPC{expTPCSignal * m_BBparamsProton[5]}; + return ((SignalTPCHad - expTPCSignal) / resoTPC); + } + + double tofNSigmaCalculation(double MassTOFHad, double ptHad) + { + double fExpTOFMassHad = 0.9487; // Proton mass in TOF + const float kp0 = 1.22204e-02; + const float kp1 = 7.48467e-01; + + double fSigmaTOFMassHad = (kp0 * TMath::Exp(kp1 * TMath::Abs(ptHad))) * fExpTOFMassHad; + double fNSigmaTOFHad = (MassTOFHad - fExpTOFMassHad) / fSigmaTOFMassHad; + return fNSigmaTOFHad; + } + + static float computeKstar(const He3HadCandidate& he3Hadcand) + { + const float massHe = o2::constants::physics::MassHelium3; + const float massHad = o2::constants::physics::MassPiPlus; + + const ROOT::Math::PtEtaPhiMVector He(std::abs(he3Hadcand.recoPtHe3()), he3Hadcand.recoEtaHe3(), he3Hadcand.recoPhiHe3(), massHe); + const ROOT::Math::PtEtaPhiMVector Had(std::abs(he3Hadcand.recoPtHad()), he3Hadcand.recoEtaHad(), he3Hadcand.recoPhiHad(), massHad); + const ROOT::Math::PtEtaPhiMVector trackSum = He + Had; + + const float beta = trackSum.Beta(); + const float betax = beta * std::cos(trackSum.Phi()) * std::sin(trackSum.Theta()); + const float betay = beta * std::sin(trackSum.Phi()) * std::sin(trackSum.Theta()); + const float betaz = beta * std::cos(trackSum.Theta()); + + ROOT::Math::PxPyPzMVector HeCMS(He); + ROOT::Math::PxPyPzMVector HadCMS(Had); + + const ROOT::Math::Boost boostPRF = ROOT::Math::Boost(-betax, -betay, -betaz); + HeCMS = boostPRF(HeCMS); + HadCMS = boostPRF(HadCMS); + + const ROOT::Math::PxPyPzMVector RelKstar = HeCMS - HadCMS; + return 0.5 * RelKstar.P(); + } + + void fillKstar(const He3HadCandidate& he3Hadcand) + { + double PrTPCnsigma = computePrTPCnsig(he3Hadcand.momHadTPC, he3Hadcand.tpcSignalHad); + double PrTOFnsigma = tofNSigmaCalculation(he3Hadcand.massTOFHad, he3Hadcand.recoPtHad()); + if (abs(PrTPCnsigma) < 3) + return; + if (abs(PrTOFnsigma) < 3) + return; + if (abs(he3Hadcand.dcaxyHe3) > 0.2 || abs(he3Hadcand.dcaxyHad) > 0.3 || abs(he3Hadcand.dcazHad) > 0.3) + return; + if (std::abs(he3Hadcand.recoPtHad()) < 0.14 || std::abs(he3Hadcand.recoPtHad()) > 4) + return; + fillHistograms(he3Hadcand); + + float kstar = computeKstar(he3Hadcand); + if (he3Hadcand.isBkgUS == 0) { + if (he3Hadcand.recoPtHe3() > 0) { + mQaRegistry.fill(HIST("hkStar_LS_M"), kstar); + mQaRegistry.fill(HIST("hkStar_LS_M_femto"), he3Hadcand.kstarfem); + } else { + mQaRegistry.fill(HIST("hkStar_LS_A"), kstar); + mQaRegistry.fill(HIST("hkStar_LS_A_femto"), he3Hadcand.kstarfem); + } + } else { + if (he3Hadcand.recoPtHe3() > 0) { + mQaRegistry.fill(HIST("hkStar_US_M"), kstar); + mQaRegistry.fill(HIST("hkStar_US_M_femto"), he3Hadcand.kstarfem); + } else { + mQaRegistry.fill(HIST("hkStar_US_A"), kstar); + mQaRegistry.fill(HIST("hkStar_US_A_femto"), he3Hadcand.kstarfem); + } + } + } template void fillPairs(const Tcollisions& collisions, const Ttracks& tracks, const bool isMixedEvent) @@ -853,7 +944,7 @@ struct he3HadronFemto { if (!fillCandidateInfo(heTrack, hadTrack, collBracket, collisions, he3Hadcand, tracks, isMixedEvent)) { continue; } - fillHistograms(he3Hadcand); + fillKstar(he3Hadcand); auto collision = collisions.rawIteratorAt(he3Hadcand.collisionID); fillTable(he3Hadcand, collision, /*isMC*/ false); } From 46920709a89641e6cf69ba16a165893f055fb3a8 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 17 Sep 2025 15:08:45 +0000 Subject: [PATCH 2/4] Please consider the following formatting changes --- PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx b/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx index 8df74909073..fe466d034ca 100644 --- a/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx +++ b/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx @@ -15,10 +15,10 @@ /// \author Your Name (your.email@cern.ch) /// \since April 2025 +#include "PWGCF/FemtoWorld/Core/FemtoWorldMath.h" #include "PWGLF/DataModel/EPCalibrationTables.h" #include "PWGLF/DataModel/LFhe3HadronTables.h" #include "PWGLF/Utils/svPoolCreator.h" -#include "PWGCF/FemtoWorld/Core/FemtoWorldMath.h" #include "Common/Core/PID/PIDTOF.h" #include "Common/Core/PID/TPCPIDResponse.h" From a2e9a2888653ebaa4a68e7c214c5125ea7836671 Mon Sep 17 00:00:00 2001 From: blacwovie Date: Thu, 18 Sep 2025 17:56:37 +0800 Subject: [PATCH 3/4] Update he3HadronFemto.cxx --- PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx b/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx index fe466d034ca..444458c9836 100644 --- a/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx +++ b/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx @@ -198,10 +198,12 @@ struct he3HadronFemto { Configurable settingCutRigidityMinHe3{"settingCutRigidityMinHe3", 0.8f, "Minimum rigidity for He3"}; Configurable settingCutEta{"settingCutEta", 0.9f, "Eta cut on daughter track"}; Configurable settingCutDCAxy{"settingCutDCAxy", 2.0f, "DCAxy range for tracks"}; - Configurable settingCutDCAz{"settingCutDCAz", 2.0f, "DCAz range for tracks"}; + Configurable settingCutDCAz{"settingCutDCAz", 3.0f, "DCAz range for tracks"}; Configurable settingCutChi2tpcLow{"settingCutChi2tpcLow", 0.5f, "Low cut on TPC chi2"}; Configurable settingCutInvMass{"settingCutInvMass", 0.0f, "Invariant mass upper limit"}; Configurable settingCutPtMinhe3Had{"settingCutPtMinhe3Had", 0.0f, "Minimum PT cut on he3Had4"}; + Configurable settingCutPtMinHad{"settingCutPtMinHad", 0.0f, "Minimum PT cut on Hadron"}; + Configurable settingCutPtMaxHad{"settingCutPtMaxHad", 0.0f, "Maximum PT cut on Hadron"}; Configurable settingCutClSizeItsHe3{"settingCutClSizeItsHe3", 4.0f, "Minimum ITS cluster size for He3"}; Configurable settingCutNCls{"settingCutNCls", 5.0f, "Minimum ITS Ncluster for tracks"}; Configurable settingCutChi2NClITS{"settingCutChi2NClITS", 36.f, "Maximum ITS Chi2 for tracks"}; @@ -290,14 +292,14 @@ struct he3HadronFemto { {"h2NsigmaHadronTPC_preselection", "NsigmaHe3 TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(had)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}}, {"h2NsigmaHadronTOF", "NsigmaHadron TOF distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(had)", {HistType::kTH2F, {{20, -5.0f, 5.0f}, {200, -5.0f, 5.0f}}}}, {"h2NsigmaHadronTOF_preselection", "NsigmaHadron TOF distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TOF}(had)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}}, - {"hkStar_LS_M", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, - {"hkStar_LS_A", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, - {"hkStar_US_M", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, - {"hkStar_US_A", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, - {"hkStar_LS_M_femto", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, - {"hkStar_LS_A_femto", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, - {"hkStar_US_M_femto", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, - {"hkStar_US_A_femto", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, + {"hKstarLSmatter", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, + {"hKstarLSantimatter", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, + {"hKstarUSmatter", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, + {"hKstarUSantimatter", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, + {"hKstarLSmatter_femto", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, + {"hKstarLSantimatter_femto", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, + {"hKstarUSmatter_femto", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, + {"hKstarUSantimatter_femto", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, }, OutputObjHandlingPolicy::AnalysisObject, false, @@ -438,7 +440,8 @@ struct he3HadronFemto { candidate.tpcNClsCrossedRows() < crossedRowsToFindableRatio * candidate.tpcNClsFindable() || candidate.tpcChi2NCl() > maxChi2NCl || candidate.tpcChi2NCl() < settingCutChi2tpcLow || - candidate.itsChi2NCl() > settingCutChi2NClITS) { + candidate.itsChi2NCl() > settingCutChi2NClITS || candidate.dcaXY() > settingCutDCAxy || + candidate.dcaZ() > settingCutDCAz) { return false; } @@ -619,6 +622,9 @@ struct he3HadronFemto { return false; } + if(he3Hadcand.recoPtHad() < settingCutPtMinHad || he3Hadcand.recoPtHad() > settingCutPtMaxHad) return false; + + he3Hadcand.signHe3 = trackHe3.sign(); he3Hadcand.signHad = trackHad.sign(); if (!settingEnableDCAfitter) { @@ -905,28 +911,23 @@ struct he3HadronFemto { return; if (abs(PrTOFnsigma) < 3) return; - if (abs(he3Hadcand.dcaxyHe3) > 0.2 || abs(he3Hadcand.dcaxyHad) > 0.3 || abs(he3Hadcand.dcazHad) > 0.3) - return; - if (std::abs(he3Hadcand.recoPtHad()) < 0.14 || std::abs(he3Hadcand.recoPtHad()) > 4) - return; - fillHistograms(he3Hadcand); float kstar = computeKstar(he3Hadcand); if (he3Hadcand.isBkgUS == 0) { if (he3Hadcand.recoPtHe3() > 0) { - mQaRegistry.fill(HIST("hkStar_LS_M"), kstar); - mQaRegistry.fill(HIST("hkStar_LS_M_femto"), he3Hadcand.kstarfem); + mQaRegistry.fill(HIST("hKstarLSmatter"), kstar); + mQaRegistry.fill(HIST("hKstarLSmatter_femto"), he3Hadcand.kstarfem); } else { - mQaRegistry.fill(HIST("hkStar_LS_A"), kstar); - mQaRegistry.fill(HIST("hkStar_LS_A_femto"), he3Hadcand.kstarfem); + mQaRegistry.fill(HIST("hKstarLSantimatter"), kstar); + mQaRegistry.fill(HIST("hKstarLSantimatter_femto"), he3Hadcand.kstarfem); } } else { if (he3Hadcand.recoPtHe3() > 0) { - mQaRegistry.fill(HIST("hkStar_US_M"), kstar); - mQaRegistry.fill(HIST("hkStar_US_M_femto"), he3Hadcand.kstarfem); + mQaRegistry.fill(HIST("hKstarUSmatter"), kstar); + mQaRegistry.fill(HIST("hKstarUSmatter_femto"), he3Hadcand.kstarfem); } else { - mQaRegistry.fill(HIST("hkStar_US_A"), kstar); - mQaRegistry.fill(HIST("hkStar_US_A_femto"), he3Hadcand.kstarfem); + mQaRegistry.fill(HIST("hKstarUSantimatter"), kstar); + mQaRegistry.fill(HIST("hKstarUSantimatter_femto"), he3Hadcand.kstarfem); } } } @@ -945,6 +946,7 @@ struct he3HadronFemto { continue; } fillKstar(he3Hadcand); + fillHistograms(he3Hadcand); auto collision = collisions.rawIteratorAt(he3Hadcand.collisionID); fillTable(he3Hadcand, collision, /*isMC*/ false); } From 21c8972cda107f0733c893f73e83bdbbfc4d92d8 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Thu, 18 Sep 2025 09:57:14 +0000 Subject: [PATCH 4/4] Please consider the following formatting changes --- PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx b/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx index 444458c9836..74c37c05518 100644 --- a/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx +++ b/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx @@ -440,7 +440,7 @@ struct he3HadronFemto { candidate.tpcNClsCrossedRows() < crossedRowsToFindableRatio * candidate.tpcNClsFindable() || candidate.tpcChi2NCl() > maxChi2NCl || candidate.tpcChi2NCl() < settingCutChi2tpcLow || - candidate.itsChi2NCl() > settingCutChi2NClITS || candidate.dcaXY() > settingCutDCAxy || + candidate.itsChi2NCl() > settingCutChi2NClITS || candidate.dcaXY() > settingCutDCAxy || candidate.dcaZ() > settingCutDCAz) { return false; } @@ -622,8 +622,8 @@ struct he3HadronFemto { return false; } - if(he3Hadcand.recoPtHad() < settingCutPtMinHad || he3Hadcand.recoPtHad() > settingCutPtMaxHad) return false; - + if (he3Hadcand.recoPtHad() < settingCutPtMinHad || he3Hadcand.recoPtHad() > settingCutPtMaxHad) + return false; he3Hadcand.signHe3 = trackHe3.sign(); he3Hadcand.signHad = trackHad.sign();