From d3f622f1a9fc43a40d3279b9718adb66dfc5a77c Mon Sep 17 00:00:00 2001 From: blacwovie Date: Wed, 25 Jun 2025 14:39:21 +0800 Subject: [PATCH 1/6] fixing De mass in computing kstar and adding eta phi histo --- PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx b/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx index 9acef964220..7285291fe1f 100644 --- a/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx +++ b/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx @@ -236,6 +236,10 @@ struct PiDeuteronFemto { {"hDePitInvMass", "; M(De + p) (GeV/#it{c}^{2})", {HistType::kTH1F, {{300, 3.74f, 4.34f}}}}, {"hDePt", "#it{p}_{T} distribution; #it{p}_{T} (GeV/#it{c})", {HistType::kTH1F, {{240, -6.0f, 6.0f}}}}, {"hPiPt", "Pt distribution; #it{p}_{T} (GeV/#it{c})", {HistType::kTH1F, {{120, -3.0f, 3.0f}}}}, + {"hDeEta", "eta distribution; #eta(De)", {HistType::kTH1F, {{200, -1.0f, 1.0f}}}}, + {"hPiEta", "eta distribution; #eta(#pi)", {HistType::kTH1F, {{200, -1.0f, 1.0f}}}}, + {"hDePhi", "phi distribution; phi(De)", {HistType::kTH1F, {{600, -4.0f, 4.0f}}}}, + {"hPiPhi", "phi distribution; phi(#pi)", {HistType::kTH1F, {{600, -4.0f, 4.0f}}}}, {"h2dEdxDecandidates", "dEdx distribution; #it{p} (GeV/#it{c}); dE/dx (a.u.)", {HistType::kTH2F, {{200, -5.0f, 5.0f}, {100, 0.0f, 2000.0f}}}}, {"h2NsigmaDeTPC", "NsigmaDe TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(De)", {HistType::kTH2F, {{20, -5.0f, 5.0f}, {200, -5.0f, 5.0f}}}}, {"h2NsigmaDeTPC_preselection", "NsigmaDe TPC distribution; #it{p}_{T} (GeV/#it{c}); n#sigma_{TPC}(De)", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {400, -10.0f, 10.0f}}}}, @@ -691,6 +695,10 @@ struct PiDeuteronFemto { { mQaRegistry.fill(HIST("hDePt"), piDecand.recoPtDe()); mQaRegistry.fill(HIST("hPiPt"), piDecand.recoPtPi()); + mQaRegistry.fill(HIST("hDeEta"), piDecand.recoEtaDe()); + mQaRegistry.fill(HIST("hPiEta"), piDecand.recoEtaPi()); + mQaRegistry.fill(HIST("hDePhi"), piDecand.recoPhiDe()); + mQaRegistry.fill(HIST("hPiPhi"), piDecand.recoPhiPi()); mQaRegistry.fill(HIST("hDePitInvMass"), piDecand.invMass); mQaRegistry.fill(HIST("hdcaxyDe"), piDecand.dcaxyDe); mQaRegistry.fill(HIST("hdcazDe"), piDecand.dcazDe); @@ -722,15 +730,15 @@ struct PiDeuteronFemto { double computeKstar(const PiDecandidate& piDecand) { - TLorentzVector he3, hadron; - float massHe3 = 2.80839; + TLorentzVector De, hadron; + float massDe = 1.8756; float massHad = 0.1395704; - he3.SetPtEtaPhiM(abs(piDecand.recoPtDe()), piDecand.recoEtaDe(), piDecand.recoPhiDe(), massHe3); + De.SetPtEtaPhiM(abs(piDecand.recoPtDe()), piDecand.recoEtaDe(), piDecand.recoPhiDe(), massDe); hadron.SetPtEtaPhiM(abs(piDecand.recoPtPi()), piDecand.recoEtaPi(), piDecand.recoPhiPi(), massHad); - TLorentzVector p_total_lab = he3 + hadron; + TLorentzVector p_total_lab = De + hadron; TVector3 v_cm = p_total_lab.BoostVector(); - TLorentzVector p1_cm = he3; + TLorentzVector p1_cm = De; TLorentzVector p2_cm = hadron; p1_cm.Boost(-v_cm); p2_cm.Boost(-v_cm); From e4df87179c235d3b9be8cc4f4d21c4c7d6a7974b Mon Sep 17 00:00:00 2001 From: blacwovie Date: Wed, 25 Jun 2025 17:08:57 +0800 Subject: [PATCH 2/6] add all kstar QA --- PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx b/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx index 7285291fe1f..abaa3e24e69 100644 --- a/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx +++ b/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx @@ -254,6 +254,7 @@ struct PiDeuteronFemto { {"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_All", ";kStar (GeV/c)", {HistType::kTH1F, {{300, 0.0f, 3.0f}}}}, {"hisBkgEM", "; isBkgEM;", {HistType::kTH1F, {{3, -1, 2}}}}}, OutputObjHandlingPolicy::AnalysisObject, false, @@ -779,6 +780,7 @@ struct PiDeuteronFemto { mQaRegistry.fill(HIST("hkStar_US_A"), kstar); } } + mQaRegistry.fill(HIST("hkStar_All"), kstar); } // ================================================================================================================== From 037f63282690e459d39eae6baf81682a5c0f14f8 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 25 Jun 2025 09:09:29 +0000 Subject: [PATCH 3/6] Please consider the following formatting changes --- PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx b/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx index abaa3e24e69..f2bc56cfca5 100644 --- a/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx +++ b/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx @@ -780,7 +780,7 @@ struct PiDeuteronFemto { mQaRegistry.fill(HIST("hkStar_US_A"), kstar); } } - mQaRegistry.fill(HIST("hkStar_All"), kstar); + mQaRegistry.fill(HIST("hkStar_All"), kstar); } // ================================================================================================================== From 611a90a9806fe4e4ad31bdadb9ce8874d4e55c22 Mon Sep 17 00:00:00 2001 From: blacwovie Date: Wed, 25 Jun 2025 19:12:40 +0800 Subject: [PATCH 4/6] fix O2linter bug in computekstar --- PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx | 41 +++++++++++-------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx b/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx index f2bc56cfca5..d930e2d513f 100644 --- a/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx +++ b/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx @@ -18,12 +18,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include @@ -33,6 +31,9 @@ #include #include // std::prev +#include "Math/Vector4D.h" +#include "Math/Boost.h" + #include "Framework/ASoAHelpers.h" #include "Framework/runDataProcessing.h" #include "Framework/AnalysisTask.h" @@ -731,21 +732,27 @@ struct PiDeuteronFemto { double computeKstar(const PiDecandidate& piDecand) { - TLorentzVector De, hadron; - float massDe = 1.8756; - float massHad = 0.1395704; - De.SetPtEtaPhiM(abs(piDecand.recoPtDe()), piDecand.recoEtaDe(), piDecand.recoPhiDe(), massDe); - hadron.SetPtEtaPhiM(abs(piDecand.recoPtPi()), piDecand.recoEtaPi(), piDecand.recoPhiPi(), massHad); - - TLorentzVector p_total_lab = De + hadron; - TVector3 v_cm = p_total_lab.BoostVector(); - TLorentzVector p1_cm = De; - TLorentzVector p2_cm = hadron; - p1_cm.Boost(-v_cm); - p2_cm.Boost(-v_cm); - TLorentzVector p_diff_cm = p1_cm - p2_cm; - double kStar = sqrt(p_diff_cm.X() * p_diff_cm.X() + p_diff_cm.Y() * p_diff_cm.Y() + p_diff_cm.Z() * p_diff_cm.Z()); - return kStar / 2.0; + constexpr double massDe = 1.8756; + constexpr double massHad = 0.1395704; + + const ROOT::Math::PtEtaPhiMVector De(std::abs(piDecand.recoPtDe()), piDecand.recoEtaDe(), piDecand.recoPhiDe(), massDe); + const ROOT::Math::PtEtaPhiMVector Had(std::abs(piDecand.recoPtPi()), piDecand.recoEtaPi(), piDecand.recoPhiPi(), massHad); + const ROOT::Math::PtEtaPhiMVector trackSum = De + 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 DeCMS(De); + ROOT::Math::PxPyPzMVector HadCMS(Had); + + const ROOT::Math::Boost boostPRF = ROOT::Math::Boost(-betax, -betay, -betaz); + DeCMS = boostPRF(DeCMS); + HadCMS = boostPRF(HadCMS); + + const ROOT::Math::PxPyPzMVector RelKstar = DeCMS - HadCMS; + return 0.5 * RelKstar.P(); } void fillKstar(const PiDecandidate& piDecand) From 99bcc1214c0a679cfba24575346b8d98ce4dc270 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 25 Jun 2025 11:13:13 +0000 Subject: [PATCH 5/6] Please consider the following formatting changes --- PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx | 63 +++++++++---------- 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx b/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx index d930e2d513f..9ac43a665bf 100644 --- a/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx +++ b/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx @@ -15,31 +15,9 @@ /// \author CMY /// \date 2025-04-10 -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include // std::prev - -#include "Math/Vector4D.h" -#include "Math/Boost.h" - -#include "Framework/ASoAHelpers.h" -#include "Framework/runDataProcessing.h" -#include "Framework/AnalysisTask.h" -#include "Framework/AnalysisDataModel.h" -#include "Framework/HistogramRegistry.h" -#include "Framework/StepTHn.h" +#include "PWGCF/Femto/DataModel/PionDeuteronTables.h" +#include "PWGLF/DataModel/EPCalibrationTables.h" +#include "PWGLF/Utils/svPoolCreator.h" #include "Common/Core/PID/PIDTOF.h" #include "Common/Core/PID/TPCPIDResponse.h" @@ -53,21 +31,40 @@ #include "Common/DataModel/PIDResponseITS.h" #include "Common/DataModel/TrackSelectionTables.h" #include "Common/TableProducer/PID/pidTOFBase.h" - #include "EventFiltering/Zorro.h" #include "EventFiltering/ZorroSummary.h" #include "CCDB/BasicCCDBManager.h" -#include "DetectorsBase/Propagator.h" -#include "DetectorsBase/GeometryManager.h" -#include "DataFormatsTPC/BetheBlochAleph.h" -#include "DataFormatsParameters/GRPObject.h" #include "DataFormatsParameters/GRPMagField.h" +#include "DataFormatsParameters/GRPObject.h" +#include "DataFormatsTPC/BetheBlochAleph.h" +#include "DetectorsBase/GeometryManager.h" +#include "DetectorsBase/Propagator.h" +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisDataModel.h" +#include "Framework/AnalysisTask.h" +#include "Framework/HistogramRegistry.h" +#include "Framework/StepTHn.h" +#include "Framework/runDataProcessing.h" #include "ReconstructionDataFormats/Track.h" -#include "PWGLF/DataModel/EPCalibrationTables.h" -#include "PWGCF/Femto/DataModel/PionDeuteronTables.h" -#include "PWGLF/Utils/svPoolCreator.h" +#include "Math/Boost.h" +#include "Math/Vector4D.h" +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include // std::prev +#include +#include using namespace o2; using namespace o2::framework; From c7ad2886e2b93ef4e4f5844bdb07743cece25039 Mon Sep 17 00:00:00 2001 From: blacwovie Date: Wed, 25 Jun 2025 19:25:03 +0800 Subject: [PATCH 6/6] fix mass number O2linter bug --- PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx b/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx index 9ac43a665bf..3bb1c43e499 100644 --- a/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx +++ b/PWGCF/Femto/TableProducer/PiDeuteronFemto.cxx @@ -729,8 +729,8 @@ struct PiDeuteronFemto { double computeKstar(const PiDecandidate& piDecand) { - constexpr double massDe = 1.8756; - constexpr double massHad = 0.1395704; + constexpr double massDe = o2::constants::physics::MassDeuteron; + constexpr double massHad = o2::constants::physics::MassPiPlus; const ROOT::Math::PtEtaPhiMVector De(std::abs(piDecand.recoPtDe()), piDecand.recoEtaDe(), piDecand.recoPhiDe(), massDe); const ROOT::Math::PtEtaPhiMVector Had(std::abs(piDecand.recoPtPi()), piDecand.recoEtaPi(), piDecand.recoPhiPi(), massHad);