From a19cee9e95b219ba489c2996af5b8093603ae993 Mon Sep 17 00:00:00 2001 From: blacwovie Date: Sat, 27 Sep 2025 21:26:43 +0800 Subject: [PATCH 1/3] Update LFhe3HadronTables.h --- PWGLF/DataModel/LFhe3HadronTables.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PWGLF/DataModel/LFhe3HadronTables.h b/PWGLF/DataModel/LFhe3HadronTables.h index 07ce17853ea..01340bb0e2a 100644 --- a/PWGLF/DataModel/LFhe3HadronTables.h +++ b/PWGLF/DataModel/LFhe3HadronTables.h @@ -51,6 +51,8 @@ DECLARE_SOA_COLUMN(MassTOFHe3, massTOFHe3, float); DECLARE_SOA_COLUMN(MassTOFHad, massTOFHad, float); DECLARE_SOA_COLUMN(PIDtrkHe3, pidTrkHe3, uint32_t); DECLARE_SOA_COLUMN(PIDtrkHad, pidTrkHad, uint32_t); +DECLARE_SOA_COLUMN(TrackIDHe3, trackIDHe3, int); +DECLARE_SOA_COLUMN(TrackIDHad, trackIDHad, int); DECLARE_SOA_COLUMN(ItsClusterSizeHe3, itsClusterSizeHe3, uint32_t); DECLARE_SOA_COLUMN(ItsClusterSizeHad, itsClusterSizeHad, uint32_t); @@ -115,7 +117,9 @@ DECLARE_SOA_TABLE(he3HadronTable, "AOD", "HE3HADTABLE", he3HadronTablesNS::SharedClustersHe3, he3HadronTablesNS::SharedClustersHad, he3HadronTablesNS::IsBkgUS, - he3HadronTablesNS::IsBkgEM) + he3HadronTablesNS::IsBkgEM, + he3HadronTablesNS::TrackIDHe3, + he3HadronTablesNS::TrackIDHad) DECLARE_SOA_TABLE(he3HadronTableMC, "AOD", "HE3HADTABLEMC", he3HadronTablesNS::PtMCHe3, he3HadronTablesNS::EtaMCHe3, From be2783267e4a2ee49beb4715031752bf82a76d31 Mon Sep 17 00:00:00 2001 From: blacwovie Date: Sat, 27 Sep 2025 21:27:38 +0800 Subject: [PATCH 2/3] Update he3HadronFemto.cxx --- PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx | 104 ++---------------- 1 file changed, 7 insertions(+), 97 deletions(-) diff --git a/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx b/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx index 3aae88bc3f7..9dd84536493 100644 --- a/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx +++ b/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx @@ -15,7 +15,6 @@ /// \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" @@ -182,8 +181,6 @@ struct He3HadCandidate { // collision information int32_t collisionID = 0; - - float kstarfem = 1.f; }; struct he3HadronFemto { @@ -198,12 +195,10 @@ 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", 3.0f, "DCAz range for tracks"}; + Configurable settingCutDCAz{"settingCutDCAz", 2.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"}; @@ -270,6 +265,7 @@ struct he3HadronFemto { {"hVtxZ", "Vertex distribution in Z;Z (cm)", {HistType::kTH1F, {{400, -20.0, 20.0}}}}, {"hCentralityFT0A", ";Centrality FT0A (%)", {HistType::kTH1F, {{100, 0, 100.0}}}}, {"hCentralityFT0C", ";Centrality FT0C (%)", {HistType::kTH1F, {{100, 0, 100.0}}}}, + {"hNhadPtVsClliID", "CollisionID; #it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {{4000, 0.0, 4000.0f}, {100, 0.0f, 2000.0f}}}}, {"hNcontributor", "Number of primary vertex contributor", {HistType::kTH1F, {{2000, 0.0f, 2000.0f}}}}, {"hTrackSel", "Accepted tracks", {HistType::kTH1F, {{Selections::kAll, -0.5, static_cast(Selections::kAll) - 0.5}}}}, {"hEvents", "; Events;", {HistType::kTH1F, {{3, -0.5, 2.5}}}}, @@ -292,14 +288,6 @@ 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}}}}, - {"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, @@ -440,8 +428,7 @@ struct he3HadronFemto { candidate.tpcNClsCrossedRows() < crossedRowsToFindableRatio * candidate.tpcNClsFindable() || candidate.tpcChi2NCl() > maxChi2NCl || candidate.tpcChi2NCl() < settingCutChi2tpcLow || - candidate.itsChi2NCl() > settingCutChi2NClITS || std::abs(candidate.dcaXY()) > settingCutDCAxy || - std::abs(candidate.dcaZ()) > settingCutDCAz) { + candidate.itsChi2NCl() > settingCutChi2NClITS) { return false; } @@ -622,9 +609,6 @@ struct he3HadronFemto { return false; } - if (std::abs(he3Hadcand.recoPtHad()) < settingCutPtMinHad || std::abs(he3Hadcand.recoPtHad()) > settingCutPtMaxHad) - return false; - he3Hadcand.signHe3 = trackHe3.sign(); he3Hadcand.signHad = trackHad.sign(); if (!settingEnableDCAfitter) { @@ -693,7 +677,6 @@ 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, 1, 2); return true; } @@ -820,7 +803,9 @@ struct he3HadronFemto { he3Hadcand.sharedClustersHe3, he3Hadcand.sharedClustersHad, he3Hadcand.isBkgUS, - he3Hadcand.isBkgEM); + he3Hadcand.isBkgEM, + he3Hadcand.trackIDHe3, + he3Hadcand.trackIDHad); if (isMC) { outputMcTable( he3Hadcand.momHe3MC, @@ -857,81 +842,6 @@ 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 (std::abs(PrTPCnsigma) < 3) - return; - if (std::abs(PrTOFnsigma) < 3) - return; - - float kstar = computeKstar(he3Hadcand); - if (he3Hadcand.isBkgUS == 0) { - if (he3Hadcand.recoPtHe3() > 0) { - mQaRegistry.fill(HIST("hKstarLSmatter"), kstar); - mQaRegistry.fill(HIST("hKstarLSmatter_femto"), he3Hadcand.kstarfem); - } else { - mQaRegistry.fill(HIST("hKstarLSantimatter"), kstar); - mQaRegistry.fill(HIST("hKstarLSantimatter_femto"), he3Hadcand.kstarfem); - } - } else { - if (he3Hadcand.recoPtHe3() > 0) { - mQaRegistry.fill(HIST("hKstarUSmatter"), kstar); - mQaRegistry.fill(HIST("hKstarUSmatter_femto"), he3Hadcand.kstarfem); - } else { - mQaRegistry.fill(HIST("hKstarUSantimatter"), kstar); - mQaRegistry.fill(HIST("hKstarUSantimatter_femto"), he3Hadcand.kstarfem); - } - } - fillHistograms(he3Hadcand); - } template void fillPairs(const Tcollisions& collisions, const Ttracks& tracks, const bool isMixedEvent) @@ -946,7 +856,7 @@ struct he3HadronFemto { if (!fillCandidateInfo(heTrack, hadTrack, collBracket, collisions, he3Hadcand, tracks, isMixedEvent)) { continue; } - fillKstar(he3Hadcand); + fillHistograms(he3Hadcand); auto collision = collisions.rawIteratorAt(he3Hadcand.collisionID); fillTable(he3Hadcand, collision, /*isMC*/ false); } From b4ef51523feab2712c722d5c3fe58a5121d4a0b6 Mon Sep 17 00:00:00 2001 From: blacwovie Date: Sat, 27 Sep 2025 21:29:58 +0800 Subject: [PATCH 3/3] Update he3HadronFemto.cxx --- PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx b/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx index 9dd84536493..76c2bcb7c01 100644 --- a/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx +++ b/PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx @@ -265,7 +265,6 @@ struct he3HadronFemto { {"hVtxZ", "Vertex distribution in Z;Z (cm)", {HistType::kTH1F, {{400, -20.0, 20.0}}}}, {"hCentralityFT0A", ";Centrality FT0A (%)", {HistType::kTH1F, {{100, 0, 100.0}}}}, {"hCentralityFT0C", ";Centrality FT0C (%)", {HistType::kTH1F, {{100, 0, 100.0}}}}, - {"hNhadPtVsClliID", "CollisionID; #it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {{4000, 0.0, 4000.0f}, {100, 0.0f, 2000.0f}}}}, {"hNcontributor", "Number of primary vertex contributor", {HistType::kTH1F, {{2000, 0.0f, 2000.0f}}}}, {"hTrackSel", "Accepted tracks", {HistType::kTH1F, {{Selections::kAll, -0.5, static_cast(Selections::kAll) - 0.5}}}}, {"hEvents", "; Events;", {HistType::kTH1F, {{3, -0.5, 2.5}}}},