1515// / \author CMY
1616// / \date 2025-04-10
1717
18- #include < TH1F.h>
19- #include < TDirectory.h>
20- #include < THn.h>
21- #include < TLorentzVector.h>
22- #include < TMath.h>
23- #include < TObjArray.h>
24- #include < TFile.h>
25- #include < TH2F.h>
26- #include < TLorentzVector.h>
27-
28- #include < cmath>
29- #include < string>
30- #include < algorithm>
31- #include < vector>
32- #include < array>
33- #include < cstdlib>
34- #include < iterator> // std::prev
35-
36- #include " Framework/ASoAHelpers.h"
37- #include " Framework/runDataProcessing.h"
38- #include " Framework/AnalysisTask.h"
39- #include " Framework/AnalysisDataModel.h"
40- #include " Framework/HistogramRegistry.h"
41- #include " Framework/StepTHn.h"
18+ #include " PWGCF/Femto/DataModel/PionDeuteronTables.h"
19+ #include " PWGLF/DataModel/EPCalibrationTables.h"
20+ #include " PWGLF/Utils/svPoolCreator.h"
4221
4322#include " Common/Core/PID/PIDTOF.h"
4423#include " Common/Core/PID/TPCPIDResponse.h"
5231#include " Common/DataModel/PIDResponseITS.h"
5332#include " Common/DataModel/TrackSelectionTables.h"
5433#include " Common/TableProducer/PID/pidTOFBase.h"
55-
5634#include " EventFiltering/Zorro.h"
5735#include " EventFiltering/ZorroSummary.h"
5836
5937#include " CCDB/BasicCCDBManager.h"
60- #include " DetectorsBase/Propagator.h"
61- #include " DetectorsBase/GeometryManager.h"
62- #include " DataFormatsTPC/BetheBlochAleph.h"
63- #include " DataFormatsParameters/GRPObject.h"
6438#include " DataFormatsParameters/GRPMagField.h"
39+ #include " DataFormatsParameters/GRPObject.h"
40+ #include " DataFormatsTPC/BetheBlochAleph.h"
41+ #include " DetectorsBase/GeometryManager.h"
42+ #include " DetectorsBase/Propagator.h"
43+ #include " Framework/ASoAHelpers.h"
44+ #include " Framework/AnalysisDataModel.h"
45+ #include " Framework/AnalysisTask.h"
46+ #include " Framework/HistogramRegistry.h"
47+ #include " Framework/StepTHn.h"
48+ #include " Framework/runDataProcessing.h"
6549#include " ReconstructionDataFormats/Track.h"
6650
67- #include " PWGLF/DataModel/EPCalibrationTables.h"
68- #include " PWGCF/Femto/DataModel/PionDeuteronTables.h"
69- #include " PWGLF/Utils/svPoolCreator.h"
51+ #include " Math/Boost.h"
52+ #include " Math/Vector4D.h"
53+ #include < TDirectory.h>
54+ #include < TFile.h>
55+ #include < TH1F.h>
56+ #include < TH2F.h>
57+ #include < THn.h>
58+ #include < TMath.h>
59+ #include < TObjArray.h>
60+
61+ #include < algorithm>
62+ #include < array>
63+ #include < cmath>
64+ #include < cstdlib>
65+ #include < iterator> // std::prev
66+ #include < string>
67+ #include < vector>
7068
7169using namespace o2 ;
7270using namespace o2 ::framework;
@@ -236,6 +234,10 @@ struct PiDeuteronFemto {
236234 {" hDePitInvMass" , " ; M(De + p) (GeV/#it{c}^{2})" , {HistType::kTH1F , {{300 , 3 .74f , 4 .34f }}}},
237235 {" hDePt" , " #it{p}_{T} distribution; #it{p}_{T} (GeV/#it{c})" , {HistType::kTH1F , {{240 , -6 .0f , 6 .0f }}}},
238236 {" hPiPt" , " Pt distribution; #it{p}_{T} (GeV/#it{c})" , {HistType::kTH1F , {{120 , -3 .0f , 3 .0f }}}},
237+ {" hDeEta" , " eta distribution; #eta(De)" , {HistType::kTH1F , {{200 , -1 .0f , 1 .0f }}}},
238+ {" hPiEta" , " eta distribution; #eta(#pi)" , {HistType::kTH1F , {{200 , -1 .0f , 1 .0f }}}},
239+ {" hDePhi" , " phi distribution; phi(De)" , {HistType::kTH1F , {{600 , -4 .0f , 4 .0f }}}},
240+ {" hPiPhi" , " phi distribution; phi(#pi)" , {HistType::kTH1F , {{600 , -4 .0f , 4 .0f }}}},
239241 {" h2dEdxDecandidates" , " dEdx distribution; #it{p} (GeV/#it{c}); dE/dx (a.u.)" , {HistType::kTH2F , {{200 , -5 .0f , 5 .0f }, {100 , 0 .0f , 2000 .0f }}}},
240242 {" 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 }}}},
241243 {" 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 }}}},
@@ -250,6 +252,7 @@ struct PiDeuteronFemto {
250252 {" hkStar_LS_A" , " ;kStar (GeV/c)" , {HistType::kTH1F , {{300 , 0 .0f , 3 .0f }}}},
251253 {" hkStar_US_M" , " ;kStar (GeV/c)" , {HistType::kTH1F , {{300 , 0 .0f , 3 .0f }}}},
252254 {" hkStar_US_A" , " ;kStar (GeV/c)" , {HistType::kTH1F , {{300 , 0 .0f , 3 .0f }}}},
255+ {" hkStar_All" , " ;kStar (GeV/c)" , {HistType::kTH1F , {{300 , 0 .0f , 3 .0f }}}},
253256 {" hisBkgEM" , " ; isBkgEM;" , {HistType::kTH1F , {{3 , -1 , 2 }}}}},
254257 OutputObjHandlingPolicy::AnalysisObject,
255258 false ,
@@ -691,6 +694,10 @@ struct PiDeuteronFemto {
691694 {
692695 mQaRegistry .fill (HIST (" hDePt" ), piDecand.recoPtDe ());
693696 mQaRegistry .fill (HIST (" hPiPt" ), piDecand.recoPtPi ());
697+ mQaRegistry .fill (HIST (" hDeEta" ), piDecand.recoEtaDe ());
698+ mQaRegistry .fill (HIST (" hPiEta" ), piDecand.recoEtaPi ());
699+ mQaRegistry .fill (HIST (" hDePhi" ), piDecand.recoPhiDe ());
700+ mQaRegistry .fill (HIST (" hPiPhi" ), piDecand.recoPhiPi ());
694701 mQaRegistry .fill (HIST (" hDePitInvMass" ), piDecand.invMass );
695702 mQaRegistry .fill (HIST (" hdcaxyDe" ), piDecand.dcaxyDe );
696703 mQaRegistry .fill (HIST (" hdcazDe" ), piDecand.dcazDe );
@@ -722,21 +729,27 @@ struct PiDeuteronFemto {
722729
723730 double computeKstar (const PiDecandidate& piDecand)
724731 {
725- TLorentzVector he3, hadron;
726- float massHe3 = 2.80839 ;
727- float massHad = 0.1395704 ;
728- he3.SetPtEtaPhiM (abs (piDecand.recoPtDe ()), piDecand.recoEtaDe (), piDecand.recoPhiDe (), massHe3);
729- hadron.SetPtEtaPhiM (abs (piDecand.recoPtPi ()), piDecand.recoEtaPi (), piDecand.recoPhiPi (), massHad);
730-
731- TLorentzVector p_total_lab = he3 + hadron;
732- TVector3 v_cm = p_total_lab.BoostVector ();
733- TLorentzVector p1_cm = he3;
734- TLorentzVector p2_cm = hadron;
735- p1_cm.Boost (-v_cm);
736- p2_cm.Boost (-v_cm);
737- TLorentzVector p_diff_cm = p1_cm - p2_cm;
738- 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 ());
739- return kStar / 2.0 ;
732+ constexpr double massDe = o2::constants::physics::MassDeuteron;
733+ constexpr double massHad = o2::constants::physics::MassPiPlus;
734+
735+ const ROOT::Math::PtEtaPhiMVector De (std::abs (piDecand.recoPtDe ()), piDecand.recoEtaDe (), piDecand.recoPhiDe (), massDe);
736+ const ROOT::Math::PtEtaPhiMVector Had (std::abs (piDecand.recoPtPi ()), piDecand.recoEtaPi (), piDecand.recoPhiPi (), massHad);
737+ const ROOT::Math::PtEtaPhiMVector trackSum = De + Had;
738+
739+ const float beta = trackSum.Beta ();
740+ const float betax = beta * std::cos (trackSum.Phi ()) * std::sin (trackSum.Theta ());
741+ const float betay = beta * std::sin (trackSum.Phi ()) * std::sin (trackSum.Theta ());
742+ const float betaz = beta * std::cos (trackSum.Theta ());
743+
744+ ROOT::Math::PxPyPzMVector DeCMS (De);
745+ ROOT::Math::PxPyPzMVector HadCMS (Had);
746+
747+ const ROOT::Math::Boost boostPRF = ROOT::Math::Boost (-betax, -betay, -betaz);
748+ DeCMS = boostPRF (DeCMS);
749+ HadCMS = boostPRF (HadCMS);
750+
751+ const ROOT::Math::PxPyPzMVector RelKstar = DeCMS - HadCMS;
752+ return 0.5 * RelKstar.P ();
740753 }
741754
742755 void fillKstar (const PiDecandidate& piDecand)
@@ -771,6 +784,7 @@ struct PiDeuteronFemto {
771784 mQaRegistry .fill (HIST (" hkStar_US_A" ), kstar);
772785 }
773786 }
787+ mQaRegistry .fill (HIST (" hkStar_All" ), kstar);
774788 }
775789
776790 // ==================================================================================================================
0 commit comments