From 2ba3211cdad7c28bc86c896e18c1f4a17b1bd667 Mon Sep 17 00:00:00 2001 From: suyoupeng <109774812+15071832337@users.noreply.github.com> Date: Fri, 17 Oct 2025 15:25:55 +0800 Subject: [PATCH] Add files via upload --- .../Strangeness/lambdaJetpolarization.cxx | 552 +----------------- 1 file changed, 23 insertions(+), 529 deletions(-) diff --git a/PWGLF/Tasks/Strangeness/lambdaJetpolarization.cxx b/PWGLF/Tasks/Strangeness/lambdaJetpolarization.cxx index 0dab522e35f..d399b213435 100644 --- a/PWGLF/Tasks/Strangeness/lambdaJetpolarization.cxx +++ b/PWGLF/Tasks/Strangeness/lambdaJetpolarization.cxx @@ -60,10 +60,8 @@ using namespace o2::framework; using namespace o2::framework::expressions; struct LfMyV0s { - HistogramRegistry registry{"registry"}; + HistogramRegistry registryData{"registryData", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; - HistogramRegistry registryV0Data{"registryV0Data", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; - HistogramRegistry registryLongitudinalPolarization{"registryLongitudinalPolarization", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; Configurable zVtx{"zVtx", 10.0, "Maximum zVertex"}; Configurable rJet{"rJet", 0.4, "Jet resolution parameter R"}; @@ -166,60 +164,6 @@ struct LfMyV0s { ConfigurableAxis TProfile2DaxisPt{"#it{p}_{T} (GeV/#it{c})", {VARIABLE_WIDTH, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.2, 3.7, 4.2, 5, 6, 8, 10, 12}, "pt axis for histograms"}; ConfigurableAxis TProfile2DaxisMass{"Mass p#pi (GeV/#it{c^{2}})", {VARIABLE_WIDTH, 1.10068, 1.10668, 1.11068, 1.11268, 1.11368, 1.11468, 1.11568, 1.11668, 1.11768, 1.11868, 1.12068, 1.12468, 1.13068}, "Mass axis for histograms"}; - registry.add("hMassLambda", "hMassLambda", {HistType::kTH1F, {invMassLambdaAxis}}); - registry.add("V0pTInLab", "V0pTInLab", kTH1F, {axisPT}); - registry.add("hMassVsPtLambda", "hMassVsPtLambda", {HistType::kTH2F, {ptAxis, invMassLambdaAxis}}); - registry.add("hMassVsPtAntiLambda", "hMassVsPtAntiLambda", {HistType::kTH2F, {ptAxis, invMassLambdaAxis}}); - - registry.add("V0pxInLab", "V0pxInLab", kTH1F, {axisPx}); - registry.add("V0pyInLab", "V0pyInLab", kTH1F, {axisPy}); - registry.add("V0pzInLab", "V0pzInLab", kTH1F, {axisPz}); - - registry.add("V0pxInRest_frame", "V0pxInRest_frame", kTH1F, {axisPx}); - registry.add("V0pyInRest_frame", "V0pyInRest_frame", kTH1F, {axisPy}); - registry.add("V0pzInRest_frame", "V0pzInRest_frame", kTH1F, {axisPz}); - - registry.add("JetpxInLab", "JetpxInLab", kTH1F, {axisPx}); - registry.add("JetpyInLab", "JetpyInLab", kTH1F, {axisPy}); - registry.add("JetpzInLab", "JetpzInLab", kTH1F, {axisPz}); - registry.add("JetpTInLab", "JetpTInLab", kTH1F, {axisPT}); - - registry.add("LeadingJetpx", "LeadingJetpx", kTH1F, {axisPx}); - registry.add("LeadingJetpy", "LeadingJetpy", kTH1F, {axisPy}); - registry.add("LeadingJetpz", "LeadingJetpz", kTH1F, {axisPz}); - registry.add("LeadingJetpT", "LeadingJetpT", kTH1F, {axisPT}); - - registry.add("V0protonpxInLab", "V0protonpxInLab", kTH1F, {axisPx}); - registry.add("V0protonpyInLab", "V0protonpyInLab", kTH1F, {axisPy}); - registry.add("V0protonpzInLab", "V0protonpzInLab", kTH1F, {axisPz}); - registry.add("V0protonphiInLab", "V0protonphiInLab", kTH1F, {axisPhi}); - - registry.add("V0protonpxInRest_frame", "V0protonpxInRest_frame", kTH1F, {axisPx}); - registry.add("V0protonpyInRest_frame", "V0protonpyInRest_frame", kTH1F, {axisPy}); - registry.add("V0protonpzInRest_frame", "V0protonpzInRest_frame", kTH1F, {axisPz}); - registry.add("V0protonMassInRest_frame", "V0protonMassInRest_frame", kTH1F, {axisMass}); - registry.add("V0protonphiInRest_frame", "V0protonphiInRest_frame", kTH1F, {axisPhi}); - - registry.add("V0protonpxInJetV0frame", "V0protonpxInJetV0frame", kTH1F, {axisPx}); - registry.add("V0protonpyInJetV0frame", "V0protonpyInJetV0frame", kTH1F, {axisPy}); - registry.add("V0protonpzInJetV0frame", "V0protonpzInJetV0frame", kTH1F, {axisPz}); - registry.add("V0protonphiInJetV0frame", "V0protonphiInJetV0frame", kTH1F, {axisPhi}); - registry.add("V0antiprotonphiInJetV0frame", "V0antiprotonphiInJetV0frame", kTH1F, {axisPhi}); - - registry.add("V0LambdapxInJetV0frame", "V0LambdapxInJetV0frame", kTH1F, {axisPx}); - registry.add("V0LambdapyInJetV0frame", "V0LambdapyInJetV0frame", kTH1F, {axisPy}); - registry.add("V0LambdapzInJetV0frame", "V0LambdapzInJetV0frame", kTH1F, {axisPz}); - - registry.add("hLambdamassandSinPhi", "hLambdamassandSinPhi", kTH2F, {{200, 0.9, 1.2}, {200, -1, 1}}); - registry.add("hAntiLambdamassandSinPhi", "hAntiLambdamassandSinPhi", kTH2F, {{200, 0.9, 1.2}, {200, -1, 1}}); - registry.add("profile", "Invariant Mass vs sin(phi)", {HistType::kTProfile, {{200, 0.9, 1.2}}}); - registry.add("profileAntiV0", "Invariant Mass vs sin(phi)", {HistType::kTProfile, {{200, 0.9, 1.2}}}); - registry.add("hLambdaPhiandSinPhi", "hLambdaPhiandSinPhi", kTH2F, {{200, -TMath::Pi() / 2, TMath::Pi() / 2}, {200, -1, 1}}); - registry.add("hAntiLambdaPhiandSinPhi", "hAntiLambdaPhiandSinPhi", kTH2F, {{200, -TMath::Pi() / 2, TMath::Pi() / 2}, {200, -1, 1}}); - - registry.add("V0LambdaprotonPhi", "V0LambdaprotonPhi", {HistType::kTH1F, {{200, -TMath::Pi() / 2, TMath::Pi() / 2}}}); - registry.add("V0AntiLambdaprotonPhi", "V0AntiLambdaprotonPhi", {HistType::kTH1F, {{200, -TMath::Pi() / 2, TMath::Pi() / 2}}}); - registryData.add("number_of_events_vsmultiplicity", "number of events in data vs multiplicity", HistType::kTH1D, {{101, 0, 101, "Multiplicity percentile"}}); registryData.add("h_track_pt", "track pT;#it{p}_{T,track} (GeV/#it{c});entries", kTH1F, {{200, 0., 200.}}); registryData.add("h_track_eta", "track #eta;#eta_{track};entries", kTH1F, {{100, -1.f, 1.f}}); @@ -245,8 +189,8 @@ struct LfMyV0s { registryData.add("LambdaPtMass", "LambdaPtMass", HistType::kTH2F, {ptAxis, invMassLambdaAxis}); registryData.add("AntiLambdaPtMass", "AntiLambdaPtMass", HistType::kTH2F, {ptAxis, invMassLambdaAxis}); - registryData.add("hMassLambda", "hMassLambda", {HistType::kTH1F, {{invMassLambdaAxis}}}); - registryData.add("hMassAntiLambda", "hMassAntiLambda", {HistType::kTH1F, {{invMassLambdaAxis}}}); + registryData.add("hMassLambda", "hMassLambda", {HistType::kTH1F, {invMassLambdaAxis}}); + registryData.add("hMassAntiLambda", "hMassAntiLambda", {HistType::kTH1F, {invMassLambdaAxis}}); registryData.add("V0pTInLab", "V0pTInLab", kTH1F, {axisPT}); registryData.add("V0pxInLab", "V0pxInLab", kTH1F, {axisPx}); @@ -272,6 +216,7 @@ struct LfMyV0s { registryData.add("JetQA/JetpxInLab", "JetpxInLab", kTH1F, {axisPx}); registryData.add("JetQA/JetpyInLab", "JetpyInLab", kTH1F, {axisPy}); registryData.add("JetQA/JetpzInLab", "JetpzInLab", kTH1F, {axisPz}); + registryData.add("JetQA/JetptInLab", "JetptInLab", kTH1F, {axisPT}); registryData.add("protonQA/V0protonpxInRest_frame", "V0protonpxInRest_frame", kTH1F, {axisPx}); registryData.add("protonQA/V0protonpyInRest_frame", "V0protonpyInRest_frame", kTH1F, {axisPy}); @@ -288,6 +233,7 @@ struct LfMyV0s { registryData.add("JetQA/JetpxInV0", "JetpxInV0", kTH1F, {axisPx}); registryData.add("JetQA/JetpyInV0", "JetpyInV0", kTH1F, {axisPy}); registryData.add("JetQA/JetpzInV0", "JetpzInV0", kTH1F, {axisPz}); + registryData.add("JetQA/JetptInV0", "JetptInV0", kTH1F, {axisPT}); registryData.add("protonQA/V0protonpxInJetframe", "V0protonpxInJetframe", kTH1F, {axisPx}); registryData.add("protonQA/V0protonpyInJetframe", "V0protonpyInJetframe", kTH1F, {axisPy}); @@ -304,6 +250,7 @@ struct LfMyV0s { registryData.add("JetQA/JetpxInJetframe", "JetpxInJetframe", kTH1F, {axisPx}); registryData.add("JetQA/JetpyInJetframe", "JetpyInJetframe", kTH1F, {axisPy}); registryData.add("JetQA/JetpzInJetframe", "JetpzInJetframe", kTH1F, {axisPz}); + registryData.add("JetQA/JetptInJetframe", "JetptInJetframe", kTH1F, {axisPT}); registryData.add("protonQA/V0protonpxInJetV0frame", "V0protonpxInJetV0frame", kTH1F, {axisPx}); registryData.add("protonQA/V0protonpyInJetV0frame", "V0protonpyInJetV0frame", kTH1F, {axisPy}); @@ -320,6 +267,7 @@ struct LfMyV0s { registryData.add("JetQA/JetpxInJetV0frame", "JetpxInJetV0frame", kTH1F, {axisPx}); registryData.add("JetQA/JetpyInJetV0frame", "JetpyInJetV0frame", kTH1F, {axisPy}); registryData.add("JetQA/JetpzInJetV0frame", "JetpzInJetV0frame", kTH1F, {axisPz}); + registryData.add("JetQA/JetptInJetV0frame", "JetptInJetV0frame", kTH1F, {axisPT}); registryData.add("V0LambdapxInJetV0frame", "V0LambdapxInJetV0frame", kTH1F, {axisPx}); registryData.add("V0LambdapyInJetV0frame", "V0LambdapyInJetV0frame", kTH1F, {axisPy}); @@ -383,122 +331,6 @@ struct LfMyV0s { registryData.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(19, "TPC nsigma Pos Dau"); registryData.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(20, "Armenteros-Podolansky"); } - - registryV0Data.add("hLambdaPt", "hLambdaPt", {HistType::kTH1F, {ptAxis}}); - registryV0Data.add("hAntiLambdaPt", "hAntiLambdaPt", {HistType::kTH1F, {ptAxis}}); - - registryV0Data.add("hMassVsPtLambda", "hMassVsPtLambda", {HistType::kTH2F, {ptAxis, invMassLambdaAxis}}); - registryV0Data.add("hMassVsPtAntiLambda", "hMassVsPtAntiLambda", {HistType::kTH2F, {ptAxis, invMassLambdaAxis}}); - registryV0Data.add("hMassLambda", "hMassLambda", {HistType::kTH1F, {invMassLambdaAxis}}); - registryV0Data.add("hMassAntiLambda", "hMassAntiLambda", {HistType::kTH1F, {invMassLambdaAxis}}); - registryV0Data.add("nV0sPerEvent", "nV0sPerEvent", kTH1F, {{10, 0.0, 10.0}}); - registryV0Data.add("nV0sPerEventsel", "nV0sPerEventsel", kTH1F, {{10, 0.0, 10.0}}); - - registryV0Data.add("hprotoncosthetainLab", "hprotoncosthetainLab", kTH1F, {{200, -1.f, 1.f}}); - registryV0Data.add("hprotonsinthetainLab", "hprotonsinthetainLab", kTH1F, {{200, -1.f, 1.f}}); - registryV0Data.add("hprotonthetainLab", "hprotonthetainLab", kTH1F, {axisTheta}); - - registryV0Data.add("hprotoncosthetainV0", "hprotoncosthetainV0", kTH1F, {{200, -1.f, 1.f}}); - registryV0Data.add("hprotonsinthetainV0", "hprotonsinthetainV0", kTH1F, {{200, -1.f, 1.f}}); - registryV0Data.add("hprotonthetainV0", "hprotonthetainV0", kTH1F, {{200, 0.f, TMath::Pi()}}); - - registryV0Data.add("hprotoncosthetainJetV0", "hprotoncosthetainJetV0", kTH1F, {{200, -1.f, 1.f}}); - registryV0Data.add("hprotonsinthetainJetV0", "hprotonsinthetainJetV0", kTH1F, {{200, -1.f, 1.f}}); - registryV0Data.add("hprotonthetainJetV0", "hprotonthetainJetV0", kTH1F, {{200, 0.f, TMath::Pi()}}); - - registryV0Data.add("hprotoncosSquarethetainLab", "hprotoncosSquarethetainLab", kTH1F, {{200, -1.f, 1.f}}); - registryV0Data.add("hprotoncosSquarethetainV0", "hprotoncosSquarethetainV0", kTH1F, {{200, -1.f, 1.f}}); - registryV0Data.add("hprotoncosSquarethetainJetV0", "hprotoncosSquarethetainJetV0", kTH1F, {{200, -1.f, 1.f}}); - - registryV0Data.add("hLambdamassandSinthetainV0", "hLambdamassandSinthetainV0", kTH2F, {{200, 0.9, 1.2}, {200, -1, 1}}); - registryV0Data.add("hLambdamassandCosthetainV0", "hLambdamassandCosthetainV0", kTH2F, {{200, 0.9, 1.2}, {200, -1, 1}}); - registryV0Data.add("hLambdamassandCosSquarethetainV0", "hLambdamassandCosSquarethetainV0", kTH2F, {{200, 0.9, 1.2}, {200, -1, 1}}); - - registryV0Data.add("hLambdamassandSinthetainJetV0", "hLambdamassandSinthetainJetV0", kTH2F, {{200, 0.9, 1.2}, {200, -1, 1}}); - registryV0Data.add("hLambdamassandCosthetainJetV0", "hLambdamassandCosthetainJetV0", kTH2F, {{200, 0.9, 1.2}, {200, -1, 1}}); - registryV0Data.add("hLambdamassandCosSquarethetainJetV0", "hLambdamassandCosSquarethetainJetV0", kTH2F, {{200, 0.9, 1.2}, {200, -1, 1}}); - - registryV0Data.add("AverageSinthetainV0", "AverageSinthetainV0", {HistType::kTProfile, {{200, 0.9, 1.2}}}); - registryV0Data.add("AverageCosSquarethetainV0", "AverageCosSquarethetainV0", {HistType::kTProfile, {{200, 0.9, 1.2}}}); - - registryV0Data.add("AverageSinthetainJetV0", "AverageSinthetainJetV0", {HistType::kTProfile, {{200, 0.9, 1.2}}}); - registryV0Data.add("AverageCosSquarethetainJetV0", "AverageCosSquarethetainJetV0", {HistType::kTProfile, {{200, 0.9, 1.2}}}); - - // LongitudinalPolarization event selection - registryLongitudinalPolarization.add("hNEvents", "hNEvents", {HistType::kTH1D, {{10, 0.f, 10.f}}}); - registryLongitudinalPolarization.get(HIST("hNEvents"))->GetXaxis()->SetBinLabel(1, "all"); - registryLongitudinalPolarization.get(HIST("hNEvents"))->GetXaxis()->SetBinLabel(2, "sel8"); - registryLongitudinalPolarization.get(HIST("hNEvents"))->GetXaxis()->SetBinLabel(3, "TVX"); - registryLongitudinalPolarization.get(HIST("hNEvents"))->GetXaxis()->SetBinLabel(4, "zvertex"); - registryLongitudinalPolarization.get(HIST("hNEvents"))->GetXaxis()->SetBinLabel(5, "TFBorder"); - registryLongitudinalPolarization.get(HIST("hNEvents"))->GetXaxis()->SetBinLabel(6, "ITSROFBorder"); - registryLongitudinalPolarization.get(HIST("hNEvents"))->GetXaxis()->SetBinLabel(7, "isTOFVertexMatched"); - registryLongitudinalPolarization.get(HIST("hNEvents"))->GetXaxis()->SetBinLabel(8, "isNoSameBunchPileup"); - registryLongitudinalPolarization.get(HIST("hNEvents"))->GetXaxis()->SetBinLabel(9, "Applied selection"); - - registryLongitudinalPolarization.add("hMassVsPtLambda", "hMassVsPtLambda", {HistType::kTH2F, {ptAxis, invMassLambdaAxis}}); - registryLongitudinalPolarization.add("hMassLambda", "hMassLambda", {HistType::kTH1F, {invMassLambdaAxis}}); - registryLongitudinalPolarization.add("hMassVsPtAntiLambda", "hMassVsPtAntiLambda", {HistType::kTH2F, {ptAxis, invMassLambdaAxis}}); - - registryLongitudinalPolarization.add("hMassLambdasel", "hMassLambdasel", {HistType::kTH1F, {invMassLambdaAxis}}); - registryLongitudinalPolarization.add("hMassAntiLambdasel", "hMassAntiLambdasel", {HistType::kTH1F, {invMassLambdaAxis}}); - registryLongitudinalPolarization.add("hMassVsPtLambdasel", "hMassVsPtLambdasel", {HistType::kTH2F, {ptAxis, invMassLambdaAxis}}); - registryLongitudinalPolarization.add("hMassVsPtAntiLambdasel", "hMassVsPtAntiLambdasel", {HistType::kTH2F, {ptAxis, invMassLambdaAxis}}); - - registryLongitudinalPolarization.add("V0pxInRest_frame", "V0pxInRest_frame", kTH1F, {axisPx}); - registryLongitudinalPolarization.add("V0pyInRest_frame", "V0pyInRest_frame", kTH1F, {axisPy}); - registryLongitudinalPolarization.add("V0pzInRest_frame", "V0pzInRest_frame", kTH1F, {axisPz}); - - registryLongitudinalPolarization.add("nV0sPerEvent", "nV0sPerEvent", kTH1F, {{10, 0.0, 10.0}}); - registryLongitudinalPolarization.add("nV0sPerEventsel", "nV0sPerEventsel", kTH1F, {{10, 0.0, 10.0}}); - - registryLongitudinalPolarization.add("hprotoncosthetainV0", "hprotoncosthetainV0", kTH1F, {{200, -1.f, 1.f}}); - registryLongitudinalPolarization.add("hprotoncosSquarethetainV0", "hprotoncosSquarethetainV0", kTH1F, {{200, -1.f, 1.f}}); - registryLongitudinalPolarization.add("hLambdamassandCosthetaInV0", "hLambdamassandCosthetaInV0", kTH2F, {{200, 0.9, 1.2}, {200, -1, 1}}); - registryLongitudinalPolarization.add("TProfile2DLambdaPtMassCostheta", "", kTProfile2D, {TProfile2DaxisMass, TProfile2DaxisPt}); - registryLongitudinalPolarization.add("TProfile2DLambdaPtMassCosSquareTheta", "", kTProfile2D, {TProfile2DaxisMass, TProfile2DaxisPt}); - registryLongitudinalPolarization.add("TH2FLambdaPtCostheta", "", kTH2F, {axisCostheta, TProfile2DaxisPt}); - - registryLongitudinalPolarization.add("hprotonThetaInLab", "hprotonThetaInLab", kTH1F, {axisTheta}); - registryLongitudinalPolarization.add("hprotonPhiInLab", "hprotonPhiInLab", kTH1F, {axisPhi}); - registryLongitudinalPolarization.add("hprotonPhiInV0", "hprotonPhiInV0", kTH1F, {axisPhi}); - registryLongitudinalPolarization.add("hAntiprotonThetaInLab", "hAntiprotonThetaInLab", kTH1F, {axisTheta}); - - registryLongitudinalPolarization.add("hprotonTheta", "hprotonTheta", kTH1F, {axisTheta}); - registryLongitudinalPolarization.add("hAntiprotonTheta", "hAntiprotonTheta", kTH1F, {axisTheta}); - - registryLongitudinalPolarization.add("hantiprotoncosthetainV0", "hantiprotoncosthetainV0", kTH1F, {{200, -1.f, 1.f}}); - registryLongitudinalPolarization.add("hantiprotoncosSquarethetainV0", "hantiprotoncosSquarethetainV0", kTH1F, {{200, -1.f, 1.f}}); - registryLongitudinalPolarization.add("hAntiLambdamassandCosthetaInV0", "hAntiLambdamassandCosthetaInV0", kTH2F, {{200, 0.9, 1.2}, {200, -1, 1}}); - registryLongitudinalPolarization.add("TProfile2DAntiLambdaPtMassCostheta", "TProfile2DAntiLambdaPtMassCostheta", kTProfile2D, {TProfile2DaxisMass, TProfile2DaxisPt}); - registryLongitudinalPolarization.add("TProfile2DAntiLambdaPtMassCosSquareTheta", "TProfile2DAntiLambdaPtMassCosSquareTheta", kTProfile2D, {TProfile2DaxisMass, TProfile2DaxisPt}); - registryLongitudinalPolarization.add("TProfile1DLambdaPtMassCostheta", "Invariant Mass vs cos(#theta)", {HistType::kTProfile, {{200, 0.9, 1.2}}}); - registryLongitudinalPolarization.add("TProfile1DAntiLambdaPtMassCostheta", "Invariant Mass vs cos(#theta)", {HistType::kTProfile, {{200, 0.9, 1.2}}}); - registryLongitudinalPolarization.add("TH2FAntiLambdaPtCostheta", "", kTH2F, {axisCostheta, TProfile2DaxisPt}); - - if (doQA) { - registryLongitudinalPolarization.add("QA/hv0sSelection", ";Sel", {HistType::kTH1D, {{22, 0., 22.}}}); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(1, "all"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(2, "Event selection"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(3, "Radius"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(4, "Eta Daughters"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(5, "Dau DCA to PV"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(6, "DCA Daughters"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(7, "min ITS hits"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(8, "has TOF 1 Leg"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(9, "has TOF 2 Legs"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(10, "TPC NCl"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(11, "TPC Cls Shared"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(12, "ITS Chi2"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(13, "TPC Chi2"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(14, "cosPA"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(15, "rapidity"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(16, "ctau"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(17, "v0 rej"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(18, "TPC nsigma Neg Dau"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(19, "TPC nsigma Pos Dau"); - registryLongitudinalPolarization.get(HIST("QA/hv0sSelection"))->GetXaxis()->SetBinLabel(20, "Armenteros-Podolansky"); - } } double massPr = o2::constants::physics::MassProton; double massLambda = o2::constants::physics::MassLambda; @@ -564,171 +396,6 @@ struct LfMyV0s { } // aod::MyCollision const& collision - void processJetV0Analysis(aod::MyTable const& myv0s, aod::MyTableJet const& myJets) - { - - for (auto& candidate : myv0s) { - registry.fill(HIST("hMassLambda"), candidate.v0Lambdamass()); - registry.fill(HIST("V0pTInLab"), candidate.v0pt()); - registry.fill(HIST("hMassVsPtLambda"), candidate.v0pt(), candidate.v0Lambdamass()); - registry.fill(HIST("V0pxInLab"), candidate.v0px()); - registry.fill(HIST("V0pyInLab"), candidate.v0py()); - registry.fill(HIST("V0pzInLab"), candidate.v0pz()); - registry.fill(HIST("V0protonpxInLab"), candidate.v0protonpx()); - registry.fill(HIST("V0protonpyInLab"), candidate.v0protonpy()); - registry.fill(HIST("V0protonpzInLab"), candidate.v0protonpz()); - double protonsinPhiInLab = candidate.v0protonpy() / sqrt(candidate.v0protonpx() * candidate.v0protonpx() + candidate.v0protonpy() * candidate.v0protonpy()); - registry.fill(HIST("V0protonphiInLab"), protonsinPhiInLab); - double PLambda = sqrt(candidate.v0px() * candidate.v0px() + candidate.v0py() * candidate.v0py() + candidate.v0pz() * candidate.v0pz()); - double ELambda = sqrt(candidate.v0Lambdamass() * candidate.v0Lambdamass() + PLambda * PLambda); - TMatrixD pLabV0(4, 1); - pLabV0(0, 0) = ELambda; - pLabV0(1, 0) = candidate.v0px(); - pLabV0(2, 0) = candidate.v0py(); - pLabV0(3, 0) = candidate.v0pz(); - TMatrixD V0InV0(4, 1); - V0InV0 = LorentzTransInV0frame(ELambda, candidate.v0px(), candidate.v0py(), candidate.v0pz()) * pLabV0; - registry.fill(HIST("V0pxInRest_frame"), V0InV0(1, 0)); - registry.fill(HIST("V0pyInRest_frame"), V0InV0(2, 0)); - registry.fill(HIST("V0pzInRest_frame"), V0InV0(3, 0)); - } - for (auto& candidate : myv0s) { - double PLambda = sqrt(candidate.v0px() * candidate.v0px() + candidate.v0py() * candidate.v0py() + candidate.v0pz() * candidate.v0pz()); - double ELambda = sqrt(candidate.v0Lambdamass() * candidate.v0Lambdamass() + PLambda * PLambda); - TMatrixD pLabproton(4, 1); - double protonE = sqrt(massPr * massPr + candidate.v0protonpx() * candidate.v0protonpx() + candidate.v0protonpy() * candidate.v0protonpy() + candidate.v0protonpz() * candidate.v0protonpz()); - pLabproton(0, 0) = protonE; - pLabproton(1, 0) = candidate.v0protonpx(); - pLabproton(2, 0) = candidate.v0protonpy(); - pLabproton(3, 0) = candidate.v0protonpz(); - TMatrixD protonInV0(4, 1); - protonInV0 = LorentzTransInV0frame(ELambda, candidate.v0px(), candidate.v0py(), candidate.v0pz()) * pLabproton; - double protonMassInV0 = sqrt(protonInV0(0, 0) * protonInV0(0, 0) - protonInV0(1, 0) * protonInV0(1, 0) - protonInV0(2, 0) * protonInV0(2, 0) - protonInV0(3, 0) * protonInV0(3, 0)); - registry.fill(HIST("V0protonMassInRest_frame"), protonMassInV0); - registry.fill(HIST("V0protonpxInRest_frame"), protonInV0(1, 0)); - registry.fill(HIST("V0protonpyInRest_frame"), protonInV0(2, 0)); - registry.fill(HIST("V0protonpzInRest_frame"), protonInV0(3, 0)); - double protonsinPhiInV0frame = protonInV0(2, 0) / sqrt(protonInV0(1, 0) * protonInV0(1, 0) + protonInV0(2, 0) * protonInV0(2, 0)); - registry.fill(HIST("V0protonphiInRest_frame"), protonsinPhiInV0frame); - } - - for (auto& Jet : myJets) { - registry.fill(HIST("JetpxInLab"), Jet.jetpx()); - registry.fill(HIST("JetpyInLab"), Jet.jetpy()); - registry.fill(HIST("JetpzInLab"), Jet.jetpz()); - registry.fill(HIST("JetpTInLab"), Jet.jetpt()); - } - } - PROCESS_SWITCH(LfMyV0s, processJetV0Analysis, "processJetV0Analysis", true); - void processLeadingJetV0Analysis(aod::MyTable const& myv0s, aod::MyTableLeadingJet const& myleadingJets) - { - for (auto& LeadingJet : myleadingJets) { - int V0Numbers = 0; - double protonsinPhiInJetV0frame = 0; - for (auto& candidate : myv0s) { - if (candidate.mycollisionv0() == LeadingJet.mycollisionleadingjet()) { - V0Numbers = V0Numbers + 1; - double PLambda = sqrt(candidate.v0px() * candidate.v0px() + candidate.v0py() * candidate.v0py() + candidate.v0pz() * candidate.v0pz()); - double ELambda = sqrt(candidate.v0Lambdamass() * candidate.v0Lambdamass() + PLambda * PLambda); - double protonE = sqrt(massPr * massPr + candidate.v0protonpx() * candidate.v0protonpx() + candidate.v0protonpy() * candidate.v0protonpy() + candidate.v0protonpz() * candidate.v0protonpz()); - - TMatrixD pLabV0(4, 1); - pLabV0(0, 0) = ELambda; - pLabV0(1, 0) = candidate.v0px(); - pLabV0(2, 0) = candidate.v0py(); - pLabV0(3, 0) = candidate.v0pz(); - - TMatrixD lambdaInJet(4, 1); - lambdaInJet = MyTMatrixTranslationToJet(LeadingJet.leadingjetpx(), LeadingJet.leadingjetpy(), LeadingJet.leadingjetpz(), candidate.v0px(), candidate.v0py(), candidate.v0pz()) * pLabV0; - - TMatrixD lambdaInJetV0(4, 1); - lambdaInJetV0 = LorentzTransInV0frame(ELambda, lambdaInJet(1, 0), lambdaInJet(2, 0), lambdaInJet(3, 0)) * MyTMatrixTranslationToJet(LeadingJet.leadingjetpx(), LeadingJet.leadingjetpy(), LeadingJet.leadingjetpz(), candidate.v0px(), candidate.v0py(), candidate.v0pz()) * pLabV0; - registry.fill(HIST("V0LambdapxInJetV0frame"), lambdaInJetV0(1, 0)); - registry.fill(HIST("V0LambdapyInJetV0frame"), lambdaInJetV0(2, 0)); - registry.fill(HIST("V0LambdapzInJetV0frame"), lambdaInJetV0(3, 0)); - - TMatrixD pLabproton(4, 1); - pLabproton(0, 0) = protonE; - pLabproton(1, 0) = candidate.v0protonpx(); - pLabproton(2, 0) = candidate.v0protonpy(); - pLabproton(3, 0) = candidate.v0protonpz(); - TMatrixD protonInJetV0(4, 1); - protonInJetV0 = LorentzTransInV0frame(ELambda, lambdaInJet(1, 0), lambdaInJet(2, 0), lambdaInJet(3, 0)) * MyTMatrixTranslationToJet(LeadingJet.leadingjetpx(), LeadingJet.leadingjetpy(), LeadingJet.leadingjetpz(), candidate.v0px(), candidate.v0py(), candidate.v0pz()) * pLabproton; - registry.fill(HIST("V0protonpxInJetV0frame"), protonInJetV0(1, 0)); - registry.fill(HIST("V0protonpyInJetV0frame"), protonInJetV0(2, 0)); - registry.fill(HIST("V0protonpzInJetV0frame"), protonInJetV0(3, 0)); - protonsinPhiInJetV0frame = protonsinPhiInJetV0frame + protonInJetV0(2, 0) / sqrt(protonInJetV0(1, 0) * protonInJetV0(1, 0) + protonInJetV0(2, 0) * protonInJetV0(2, 0)); - } - } - for (auto& candidate : myv0s) { - if (candidate.mycollisionv0() == LeadingJet.mycollisionleadingjet()) { - registry.fill(HIST("V0protonphiInJetV0frame"), protonsinPhiInJetV0frame / V0Numbers); - registry.fill(HIST("hLambdamassandSinPhi"), candidate.v0Lambdamass(), protonsinPhiInJetV0frame / V0Numbers); - registry.fill(HIST("hLambdaPhiandSinPhi"), TMath::ASin(protonsinPhiInJetV0frame / V0Numbers), protonsinPhiInJetV0frame / V0Numbers); - registry.fill(HIST("V0LambdaprotonPhi"), TMath::ASin(protonsinPhiInJetV0frame / V0Numbers)); - registry.fill(HIST("profile"), candidate.v0Lambdamass(), protonsinPhiInJetV0frame / V0Numbers); - } - } - } - for (auto& LeadingJet : myleadingJets) { - registry.fill(HIST("LeadingJetpx"), LeadingJet.leadingjetpx()); - registry.fill(HIST("LeadingJetpy"), LeadingJet.leadingjetpy()); - registry.fill(HIST("LeadingJetpz"), LeadingJet.leadingjetpz()); - registry.fill(HIST("LeadingJetpT"), LeadingJet.leadingjetpt()); - } - } - PROCESS_SWITCH(LfMyV0s, processLeadingJetV0Analysis, "processLeadingJetV0Analysis", true); - - void processLeadingJetAntiV0Analysis(aod::MyTableAnti const& myv0s, aod::MyTableLeadingJet const& myleadingJets) - { - for (auto& LeadingJet : myleadingJets) { - int V0Numbers = 0; - double protonsinPhiInJetV0frame = 0; - for (auto& candidate : myv0s) { - if (candidate.mycollisionv0() == LeadingJet.mycollisionleadingjet()) { - V0Numbers = V0Numbers + 1; - double PLambda = sqrt(candidate.v0px() * candidate.v0px() + candidate.v0py() * candidate.v0py() + candidate.v0pz() * candidate.v0pz()); - double ELambda = sqrt(candidate.v0Lambdamass() * candidate.v0Lambdamass() + PLambda * PLambda); - double protonE = sqrt(massPr * massPr + candidate.v0protonpx() * candidate.v0protonpx() + candidate.v0protonpy() * candidate.v0protonpy() + candidate.v0protonpz() * candidate.v0protonpz()); - - TMatrixD pLabV0(4, 1); - pLabV0(0, 0) = ELambda; - pLabV0(1, 0) = candidate.v0px(); - pLabV0(2, 0) = candidate.v0py(); - pLabV0(3, 0) = candidate.v0pz(); - - TMatrixD lambdaInJet(4, 1); - lambdaInJet = MyTMatrixTranslationToJet(LeadingJet.leadingjetpx(), LeadingJet.leadingjetpy(), LeadingJet.leadingjetpz(), candidate.v0px(), candidate.v0py(), candidate.v0pz()) * pLabV0; - - TMatrixD lambdaInJetV0(4, 1); - lambdaInJetV0 = LorentzTransInV0frame(ELambda, lambdaInJet(1, 0), lambdaInJet(2, 0), lambdaInJet(3, 0)) * MyTMatrixTranslationToJet(LeadingJet.leadingjetpx(), LeadingJet.leadingjetpy(), LeadingJet.leadingjetpz(), candidate.v0px(), candidate.v0py(), candidate.v0pz()) * pLabV0; - - TMatrixD pLabproton(4, 1); - pLabproton(0, 0) = protonE; - pLabproton(1, 0) = candidate.v0protonpx(); - pLabproton(2, 0) = candidate.v0protonpy(); - pLabproton(3, 0) = candidate.v0protonpz(); - TMatrixD protonInJetV0(4, 1); - protonInJetV0 = LorentzTransInV0frame(ELambda, lambdaInJet(1, 0), lambdaInJet(2, 0), lambdaInJet(3, 0)) * MyTMatrixTranslationToJet(LeadingJet.leadingjetpx(), LeadingJet.leadingjetpy(), LeadingJet.leadingjetpz(), candidate.v0px(), candidate.v0py(), candidate.v0pz()) * pLabproton; - protonsinPhiInJetV0frame = protonsinPhiInJetV0frame + protonInJetV0(2, 0) / sqrt(protonInJetV0(1, 0) * protonInJetV0(1, 0) + protonInJetV0(2, 0) * protonInJetV0(2, 0)); - } - } - for (auto& candidate : myv0s) { - if (candidate.mycollisionv0() == LeadingJet.mycollisionleadingjet()) { - registry.fill(HIST("V0antiprotonphiInJetV0frame"), protonsinPhiInJetV0frame / V0Numbers); - registry.fill(HIST("hAntiLambdamassandSinPhi"), candidate.v0Lambdamass(), protonsinPhiInJetV0frame / V0Numbers); - registry.fill(HIST("hAntiLambdaPhiandSinPhi"), TMath::ASin(protonsinPhiInJetV0frame / V0Numbers), protonsinPhiInJetV0frame / V0Numbers); - registry.fill(HIST("V0AntiLambdaprotonPhi"), TMath::ASin(protonsinPhiInJetV0frame / V0Numbers)); - registry.fill(HIST("profileAntiV0"), candidate.v0Lambdamass(), protonsinPhiInJetV0frame / V0Numbers); - } - } - } - for (auto& candidate : myv0s) { - registry.fill(HIST("hMassVsPtAntiLambda"), candidate.v0pt(), candidate.v0Lambdamass()); - } - } - PROCESS_SWITCH(LfMyV0s, processLeadingJetAntiV0Analysis, "processLeadingJetAntiV0Analysis", true); - // ITS hit template bool hasITSHit(const TrackIts& track, int layer) @@ -812,84 +479,65 @@ struct LfMyV0s { evFlag = 1; } - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 0.5); - if (evSel && evFlag < 1) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 1.5); - if (v0.v0radius() < minimumV0Radius || v0.v0radius() > maximumV0Radius) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 2.5); - if (TMath::Abs(ptrack.eta()) > V0tracketaMax || TMath::Abs(ntrack.eta()) > V0tracketaMax) { return false; } - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 3.5); if (std::fabs(v0.dcapostopv()) < dcapostoPVmin) return false; if (std::fabs(v0.dcanegtopv()) < dcanegtoPVmin) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 4.5); if (std::fabs(v0.dcaV0daughters()) > dcaV0DaughtersMax) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 5.5); if (requireITS && ptrack.itsNCls() < minITSnCls) return false; if (requireITS && ntrack.itsNCls() < minITSnCls) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 6.5); if (hasTOF1Leg && !ptrack.hasTOF() && !ntrack.hasTOF()) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 7.5); if (hasTOF2Leg && (!ptrack.hasTOF() || !ntrack.hasTOF())) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 8.5); if (ptrack.tpcNClsCrossedRows() < minNCrossedRowsTPC) return false; if (ntrack.tpcNClsCrossedRows() < minNCrossedRowsTPC) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 9.5); if (ptrack.tpcNClsShared() > max_tpcSharedCls) return false; if (ntrack.tpcNClsShared() > max_tpcSharedCls) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 10.5); if (ptrack.itsChi2NCl() > max_chi2_ITS) return false; if (ntrack.itsChi2NCl() > max_chi2_ITS) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 11.5); if (ptrack.tpcChi2NCl() > max_chi2_TPC) return false; if (ntrack.tpcChi2NCl() > max_chi2_TPC) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 12.5); if (v0.v0cosPA() < v0cospaMin) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 13.5); if (v0.yLambda() < yMin || v0.yLambda() > yMax) { return false; } - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 14.5); float ctauLambda = v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassLambda0; if (ctauLambda >= CtauLambda) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 15.5); if (TMath::Abs(v0.mK0Short() - o2::constants::physics::MassK0Short) < v0rejLambda) { return false; @@ -898,19 +546,14 @@ struct LfMyV0s { return false; } - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 16.5); - if (ntrack.tpcNSigmaPi() < nsigmaTPCmin || ntrack.tpcNSigmaPi() > nsigmaTPCmax) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 17.5); if (ptrack.tpcNSigmaPr() < nsigmaTPCmin || ptrack.tpcNSigmaPr() > nsigmaTPCmax) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 18.5); if (doArmenterosCut && v0.qtarm() > (paramArmenterosCut * std::abs(v0.alpha()))) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 19.5); return true; } @@ -1216,74 +859,58 @@ struct LfMyV0s { if (requirepassedSingleTrackSelection && !passedSingleTrackSelection(ntrack)) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 1.5); - if (v0.v0radius() < minimumV0Radius || v0.v0radius() > maximumV0Radius) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 2.5); - if (TMath::Abs(ptrack.eta()) > V0tracketaMax || TMath::Abs(ntrack.eta()) > V0tracketaMax) { return false; } - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 3.5); if (std::fabs(v0.dcapostopv()) < dcapostoPVmin) return false; if (std::fabs(v0.dcanegtopv()) < dcanegtoPVmin) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 4.5); if (std::fabs(v0.dcaV0daughters()) > dcaV0DaughtersMax) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 5.5); if (requireITS && ptrack.itsNCls() < minITSnCls) return false; if (requireITS && ntrack.itsNCls() < minITSnCls) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 6.5); if (hasTOF1Leg && !ptrack.hasTOF() && !ntrack.hasTOF()) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 7.5); if (hasTOF2Leg && (!ptrack.hasTOF() || !ntrack.hasTOF())) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 8.5); if (ptrack.tpcNClsCrossedRows() < minNCrossedRowsTPC) return false; if (ntrack.tpcNClsCrossedRows() < minNCrossedRowsTPC) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 9.5); if (ptrack.tpcNClsShared() > max_tpcSharedCls) return false; if (ntrack.tpcNClsShared() > max_tpcSharedCls) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 10.5); if (ptrack.itsChi2NCl() > max_chi2_ITS) return false; if (ntrack.itsChi2NCl() > max_chi2_ITS) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 11.5); if (ptrack.tpcChi2NCl() > max_chi2_TPC) return false; if (ntrack.tpcChi2NCl() > max_chi2_TPC) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 12.5); if (v0.v0cosPA() < v0cospaMin) return false; - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 13.5); if (v0.yLambda() < yMin || v0.yLambda() > yMax) { return false; } - registryLongitudinalPolarization.fill(HIST("QA/hv0sSelection"), 14.5); // PID Selections (TPC) if (requireTPC) { @@ -1456,35 +1083,34 @@ struct LfMyV0s { template bool AcceptEventForLongitudinalPolarization(TCollision const& collision) { - registryLongitudinalPolarization.fill(HIST("hNEvents"), 0.5); + if (sel8 && !collision.sel8()) { return false; } - registryLongitudinalPolarization.fill(HIST("hNEvents"), 1.5); + if (isTriggerTVX && !collision.selection_bit(aod::evsel::kIsTriggerTVX)) { return false; } - registryLongitudinalPolarization.fill(HIST("hNEvents"), 2.5); + if (std::abs(collision.posZ()) > cutzvertex) { return false; } - registryLongitudinalPolarization.fill(HIST("hNEvents"), 3.5); + if (isNoTimeFrameBorder && !collision.selection_bit(aod::evsel::kNoTimeFrameBorder)) { return false; } - registryLongitudinalPolarization.fill(HIST("hNEvents"), 4.5); + if (isNoITSROFrameBorder && !collision.selection_bit(aod::evsel::kNoITSROFrameBorder)) { return false; } - registryLongitudinalPolarization.fill(HIST("hNEvents"), 5.5); + if (isVertexTOFmatched && !collision.selection_bit(aod::evsel::kIsVertexTOFmatched)) { return false; } - registryLongitudinalPolarization.fill(HIST("hNEvents"), 6.5); + if (isNoSameBunchPileup && !collision.selection_bit(aod::evsel::kNoSameBunchPileup)) { return false; } - registryLongitudinalPolarization.fill(HIST("hNEvents"), 7.5); return true; } @@ -1671,11 +1297,13 @@ struct LfMyV0s { double protonMassInLab = sqrt(pLabproton(0, 0) * pLabproton(0, 0) - pLabproton(1, 0) * pLabproton(1, 0) - pLabproton(2, 0) * pLabproton(2, 0) - pLabproton(3, 0) * pLabproton(3, 0)); double jettheta = maxJetpz / sqrt(pLabJet(1, 0) * pLabJet(1, 0) + pLabJet(2, 0) * pLabJet(2, 0) + pLabJet(3, 0) * pLabJet(3, 0)); double jetphi = maxJetpy / sqrt(pLabJet(1, 0) * pLabJet(1, 0) + pLabJet(2, 0) * pLabJet(2, 0)); + double jetptInLab = sqrt(pLabJet(1, 0) * pLabJet(1, 0) + pLabJet(2, 0) * pLabJet(2, 0)); registryData.fill(HIST("JetQA/JetthetaInLab"), TMath::ASin(jettheta)); registryData.fill(HIST("JetQA/JetphiInLab"), TMath::ASin(jetphi)); registryData.fill(HIST("JetQA/JetpxInLab"), pLabJet(1, 0)); registryData.fill(HIST("JetQA/JetpyInLab"), pLabJet(2, 0)); registryData.fill(HIST("JetQA/JetpzInLab"), pLabJet(3, 0)); + registryData.fill(HIST("JetQA/JetptInLab"), jetptInLab); registryData.fill(HIST("protonQA/V0protonphiInLab"), TMath::ASin(protonsinPhiInLab)); registryData.fill(HIST("protonQA/V0protonthetaInLab"), TMath::ASin(protonsinThetaInLab)); @@ -1696,11 +1324,13 @@ struct LfMyV0s { JetInV0 = LorentzTransInV0frame(ELambda, candidate.px(), candidate.py(), candidate.pz()) * pLabJet; double jetthetaInV0 = JetInV0(3, 0) / sqrt(JetInV0(1, 0) * JetInV0(1, 0) + JetInV0(2, 0) * JetInV0(2, 0) + JetInV0(3, 0) * JetInV0(3, 0)); double jetphiInV0 = JetInV0(2, 0) / sqrt(JetInV0(1, 0) * JetInV0(1, 0) + JetInV0(2, 0) * JetInV0(2, 0)); + double jetptInV0 = sqrt(JetInV0(1, 0) * JetInV0(1, 0) + JetInV0(2, 0) * JetInV0(2, 0)); registryData.fill(HIST("JetQA/JetthetaInV0"), TMath::ASin(jetthetaInV0)); registryData.fill(HIST("JetQA/JetphiInV0"), TMath::ASin(jetphiInV0)); registryData.fill(HIST("JetQA/JetpxInV0"), JetInV0(1, 0)); registryData.fill(HIST("JetQA/JetpyInV0"), JetInV0(2, 0)); registryData.fill(HIST("JetQA/JetpzInV0"), JetInV0(3, 0)); + registryData.fill(HIST("JetQA/JetptInV0"), jetptInV0); registryData.fill(HIST("protonQA/V0protonMassInRest_frame"), protonMassInV0); registryData.fill(HIST("protonQA/V0protonpxInRest_frame"), protonInV0(1, 0)); @@ -1728,11 +1358,13 @@ struct LfMyV0s { pInJet = MyTMatrixTranslationToJet(maxJetpx, maxJetpy, maxJetpz, candidate.px(), candidate.py(), candidate.pz()) * pLabJet; double jetthetaInJet = pInJet(3, 0) / sqrt(pInJet(1, 0) * pInJet(1, 0) + pInJet(2, 0) * pInJet(2, 0) + pInJet(3, 0) * pInJet(3, 0)); double jetphiInJet = pInJet(2, 0) / sqrt(pInJet(1, 0) * pInJet(1, 0) + pInJet(2, 0) * pInJet(2, 0)); + double jetptInJet = sqrt(pInJet(1, 0) * pInJet(1, 0) + pInJet(2, 0) * pInJet(2, 0)); registryData.fill(HIST("JetQA/JetthetaInJetframe"), TMath::ASin(jetthetaInJet)); registryData.fill(HIST("JetQA/JetphiInJetframe"), TMath::ASin(jetphiInJet)); registryData.fill(HIST("JetQA/JetpxInJetframe"), pInJet(1, 0)); registryData.fill(HIST("JetQA/JetpyInJetframe"), pInJet(2, 0)); registryData.fill(HIST("JetQA/JetpzInJetframe"), pInJet(3, 0)); + registryData.fill(HIST("JetQA/JetptInJetframe"), jetptInJet); registryData.fill(HIST("protonQA/V0protonpxInJetframe"), protonInJet(1, 0)); registryData.fill(HIST("protonQA/V0protonpyInJetframe"), protonInJet(2, 0)); @@ -1758,11 +1390,13 @@ struct LfMyV0s { JetInJetV0 = LorentzTransInV0frame(ELambda, lambdaInJet(1, 0), lambdaInJet(2, 0), lambdaInJet(3, 0)) * MyTMatrixTranslationToJet(maxJetpx, maxJetpy, maxJetpz, candidate.px(), candidate.py(), candidate.pz()) * pLabJet; double jetthetaInJetV0 = JetInJetV0(3, 0) / sqrt(JetInJetV0(1, 0) * JetInJetV0(1, 0) + JetInJetV0(2, 0) * JetInJetV0(2, 0) + JetInJetV0(3, 0) * JetInJetV0(3, 0)); double jetphiInJetV0 = JetInJetV0(2, 0) / sqrt(JetInJetV0(1, 0) * JetInJetV0(1, 0) + JetInJetV0(2, 0) * JetInJetV0(2, 0)); + double jetptInJetV0 = sqrt(JetInJetV0(1, 0) * JetInJetV0(1, 0) + JetInJetV0(2, 0) * JetInJetV0(2, 0)); registryData.fill(HIST("JetQA/JetthetaInJetV0frame"), TMath::ASin(jetthetaInJetV0)); registryData.fill(HIST("JetQA/JetphiInJetV0frame"), TMath::ASin(jetphiInJetV0)); registryData.fill(HIST("JetQA/JetpxInJetV0frame"), JetInJetV0(1, 0)); registryData.fill(HIST("JetQA/JetpyInJetV0frame"), JetInJetV0(2, 0)); registryData.fill(HIST("JetQA/JetpzInJetV0frame"), JetInJetV0(3, 0)); + registryData.fill(HIST("JetQA/JetptInJetV0frame"), jetptInJetV0); registryData.fill(HIST("protonQA/V0protonpxInJetV0frame"), protonInJetV0(1, 0)); registryData.fill(HIST("protonQA/V0protonpyInJetV0frame"), protonInJetV0(2, 0)); @@ -1776,18 +1410,7 @@ struct LfMyV0s { registryData.fill(HIST("protonQA/profileprotoncosSquarethetaInJetV0frame"), candidate.mLambda(), protoncosthetaInJetV0 * protoncosthetaInJetV0); double protonCosThetainJetV0 = protonInJetV0(3, 0) / protonPinJetV0; - double protonthetainJetV0 = TMath::ASin(protonSinThetainJetV0); - registryV0Data.fill(HIST("hprotoncosthetainJetV0"), protonCosThetainJetV0); - registryV0Data.fill(HIST("hprotonsinthetainJetV0"), protonSinThetainJetV0); - registryV0Data.fill(HIST("hprotonthetainJetV0"), protonthetainJetV0); - registryV0Data.fill(HIST("hprotoncosSquarethetainJetV0"), protonCosThetainJetV0 * protonCosThetainJetV0); - - registryV0Data.fill(HIST("hLambdamassandSinthetainJetV0"), candidate.mLambda(), protonSinThetainJetV0); - registryV0Data.fill(HIST("hLambdamassandCosthetainJetV0"), candidate.mLambda(), protonCosThetainJetV0); - registryV0Data.fill(HIST("hLambdamassandCosSquarethetainJetV0"), candidate.mLambda(), protonCosThetainJetV0 * protonCosThetainJetV0); - - registryV0Data.fill(HIST("AverageSinthetainJetV0"), candidate.mLambda(), protonSinThetainJetV0); - registryV0Data.fill(HIST("AverageCosSquarethetainJetV0"), candidate.mLambda(), protonCosThetainJetV0 * protonCosThetainJetV0); + protonsinPhiInJetV0frame = protonsinPhiInJetV0frame + protonInJetV0(2, 0) / sqrt(protonInJetV0(1, 0) * protonInJetV0(1, 0) + protonInJetV0(2, 0) * protonInJetV0(2, 0)); registryData.fill(HIST("TProfile2DLambdaPtMassSinPhi"), candidate.mLambda(), candidate.pt(), protonInJetV0(2, 0) / sqrt(protonInJetV0(1, 0) * protonInJetV0(1, 0) + protonInJetV0(2, 0) * protonInJetV0(2, 0))); @@ -1856,80 +1479,6 @@ struct LfMyV0s { } PROCESS_SWITCH(LfMyV0s, processData, "processData", true); - void processDataV0(SelCollisions::iterator const& collision, aod::V0Datas const& fullV0s, StrHadronDaughterTracks const&) - { - registryData.fill(HIST("hNEvents"), 0.5); - if (!AcceptEvent(collision)) { - return; - } - registryData.fill(HIST("hNEvents"), 8.5); - int V0NumbersPerEvent = 0; - int V0NumbersPerEventsel = 0; - for (const auto& v0 : fullV0s) { - V0NumbersPerEvent++; - float ctauLambda = v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassLambda0; - float ctauAntiLambda = v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassLambda0Bar; - const auto& pos = v0.posTrack_as(); - const auto& neg = v0.negTrack_as(); - if (passedLambdaSelection(v0, pos, neg) && ctauLambda < CtauLambda && ifpasslambda) { - V0NumbersPerEventsel++; - registryV0Data.fill(HIST("hLambdaPt"), v0.pt()); - registryV0Data.fill(HIST("hMassVsPtLambda"), v0.pt(), v0.mLambda()); - registryV0Data.fill(HIST("hMassLambda"), v0.mLambda()); - } else if (passedInitLambdaSelection(v0, pos, neg) && ifinitpasslambda) { - registryV0Data.fill(HIST("hLambdaPt"), v0.pt()); - registryV0Data.fill(HIST("hMassVsPtLambda"), v0.pt(), v0.mLambda()); - registryV0Data.fill(HIST("hMassLambda"), v0.mLambda()); - double PLambda = sqrt(v0.px() * v0.px() + v0.py() * v0.py() + v0.pz() * v0.pz()); - double ELambda = sqrt(v0.mLambda() * v0.mLambda() + PLambda * PLambda); - double protonE = sqrt(massPr * massPr + pos.px() * pos.px() + pos.py() * pos.py() + pos.pz() * pos.pz()); - TMatrixD pLabproton(4, 1); - pLabproton(0, 0) = protonE; - pLabproton(1, 0) = pos.px(); - pLabproton(2, 0) = pos.py(); - pLabproton(3, 0) = pos.pz(); - double protonCosThetainLab = pLabproton(3, 0) / pos.p(); - double protonSinThetainLab = pos.pt() / pos.p(); - double protonthetainLab = TMath::ASin(protonSinThetainLab); - registryV0Data.fill(HIST("hprotoncosthetainLab"), protonCosThetainLab); - registryV0Data.fill(HIST("hprotonsinthetainLab"), protonSinThetainLab); - registryV0Data.fill(HIST("hprotonthetainLab"), protonthetainLab); - registryV0Data.fill(HIST("hprotoncosSquarethetainLab"), protonCosThetainLab * protonCosThetainLab); - - TMatrixD protonInV0(4, 1); - protonInV0 = LorentzTransInV0frame(ELambda, v0.px(), v0.py(), v0.pz()) * pLabproton; - double protonPinV0 = sqrt(protonInV0(1, 0) * protonInV0(1, 0) + protonInV0(2, 0) * protonInV0(2, 0) + protonInV0(3, 0) * protonInV0(3, 0)); - double protonPtinV0 = sqrt(protonInV0(1, 0) * protonInV0(1, 0) + protonInV0(2, 0) * protonInV0(2, 0)); - double protonCosThetainV0 = protonInV0(3, 0) / protonPinV0; - double protonSinThetainV0 = protonPtinV0 / protonPinV0; - double protonthetainV0 = TMath::ASin(protonSinThetainV0); - registryV0Data.fill(HIST("hprotoncosthetainV0"), protonCosThetainV0); - registryV0Data.fill(HIST("hprotonsinthetainV0"), protonSinThetainV0); - registryV0Data.fill(HIST("hprotonthetainV0"), protonthetainV0); - registryV0Data.fill(HIST("hprotoncosSquarethetainV0"), protonCosThetainV0 * protonCosThetainV0); - - registryV0Data.fill(HIST("hLambdamassandSinthetainV0"), v0.mLambda(), protonSinThetainV0); - registryV0Data.fill(HIST("hLambdamassandCosthetainV0"), v0.mLambda(), protonCosThetainV0); - registryV0Data.fill(HIST("hLambdamassandCosSquarethetainV0"), v0.mLambda(), protonCosThetainV0 * protonCosThetainV0); - - registryV0Data.fill(HIST("AverageSinthetainV0"), v0.mLambda(), protonSinThetainV0); - registryV0Data.fill(HIST("AverageCosSquarethetainV0"), v0.mLambda(), protonCosThetainV0 * protonCosThetainV0); - } - if (passedAntiLambdaSelection(v0, pos, neg) && ctauAntiLambda < CtauLambda && ifpasslambda) { - registryV0Data.fill(HIST("hAntiLambdaPt"), v0.pt()); - registryV0Data.fill(HIST("hMassVsPtAntiLambda"), v0.pt(), v0.mAntiLambda()); - registryV0Data.fill(HIST("hMassAntiLambda"), v0.mAntiLambda()); - } else if (passedInitLambdaSelection(v0, pos, neg) && ifinitpasslambda) { - registryV0Data.fill(HIST("hAntiLambdaPt"), v0.pt()); - registryV0Data.fill(HIST("hMassVsPtAntiLambda"), v0.pt(), v0.mAntiLambda()); - registryV0Data.fill(HIST("hMassAntiLambda"), v0.mAntiLambda()); - } - } - registryV0Data.fill(HIST("nV0sPerEvent"), V0NumbersPerEvent); - registryV0Data.fill(HIST("nV0sPerEventsel"), V0NumbersPerEventsel); - } - PROCESS_SWITCH(LfMyV0s, processDataV0, "processDataV0", true); - // V0Collisions // SelCollisions using V0Collisions = soa::Join; @@ -1939,33 +1488,21 @@ struct LfMyV0s { if (!AcceptEventForLongitudinalPolarization(collision)) { return; } - registryLongitudinalPolarization.fill(HIST("hNEvents"), 8.5); - int V0NumbersPerEvent = 0; - int V0NumbersPerEventsel = 0; for (const auto& v0 : fullV0s) { // loop over V0s if (v0.v0Type() != v0TypeSelection) { continue; } - V0NumbersPerEvent++; const auto& pos = v0.posTrack_as(); const auto& neg = v0.negTrack_as(); if (NotITSAfterburner && (v0.negTrack_as().isITSAfterburner() || v0.posTrack_as().isITSAfterburner())) { continue; } - if (passedInitLambdaSelection(v0, pos, neg) && ifinitpasslambda) { - registryLongitudinalPolarization.fill(HIST("hMassVsPtLambda"), v0.pt(), v0.mLambda()); - registryLongitudinalPolarization.fill(HIST("hMassVsPtAntiLambda"), v0.pt(), v0.mAntiLambda()); - registryLongitudinalPolarization.fill(HIST("hMassLambda"), v0.mLambda()); - } if (AcceptV0Lambda(v0, pos, neg, collision) && ifpasslambda) { - V0NumbersPerEventsel++; - registryLongitudinalPolarization.fill(HIST("hMassLambdasel"), v0.mLambda()); - registryLongitudinalPolarization.fill(HIST("hMassVsPtLambdasel"), v0.pt(), v0.mLambda()); ProtonVec = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPr); PionVec = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), massPi); @@ -1974,35 +1511,8 @@ struct LfMyV0s { ROOT::Math::Boost boost{LambdaVec.BoostToCM()}; ProtonBoostedVec = boost(ProtonVec); LambdaBoostedVec = boost(LambdaVec); - - registryLongitudinalPolarization.fill(HIST("V0pxInRest_frame"), LambdaBoostedVec.Px()); - registryLongitudinalPolarization.fill(HIST("V0pyInRest_frame"), LambdaBoostedVec.Py()); - registryLongitudinalPolarization.fill(HIST("V0pzInRest_frame"), LambdaBoostedVec.Pz()); - - double protonCosThetainV0 = ProtonBoostedVec.Pz() / ProtonBoostedVec.P(); - double protonCosThetainLab = ProtonVec.Pz() / ProtonVec.P(); - double protonSinPhiInLab = ProtonVec.Py() / sqrt(ProtonVec.Px() * ProtonVec.Px() + ProtonVec.Py() * ProtonVec.Py()); - double protonSinPhiInV0 = ProtonBoostedVec.Py() / sqrt(ProtonBoostedVec.Px() * ProtonBoostedVec.Px() + ProtonBoostedVec.Py() * ProtonBoostedVec.Py()); - - registryLongitudinalPolarization.fill(HIST("hprotoncosthetainV0"), protonCosThetainV0); - registryLongitudinalPolarization.fill(HIST("hprotoncosSquarethetainV0"), protonCosThetainV0 * protonCosThetainV0); - registryLongitudinalPolarization.fill(HIST("hLambdamassandCosthetaInV0"), v0.mLambda(), protonCosThetainV0); - - registryLongitudinalPolarization.fill(HIST("TProfile2DLambdaPtMassCostheta"), v0.mLambda(), v0.pt(), protonCosThetainV0); - registryLongitudinalPolarization.fill(HIST("TProfile2DLambdaPtMassCosSquareTheta"), v0.mLambda(), v0.pt(), protonCosThetainV0 * protonCosThetainV0); - - registryLongitudinalPolarization.fill(HIST("TProfile1DLambdaPtMassCostheta"), v0.mLambda(), protonCosThetainV0); - - registryLongitudinalPolarization.fill(HIST("TH2FLambdaPtCostheta"), protonCosThetainV0, v0.pt()); - registryLongitudinalPolarization.fill(HIST("hprotonThetaInLab"), TMath::ACos(protonCosThetainLab)); - registryLongitudinalPolarization.fill(HIST("hprotonPhiInLab"), TMath::ASin(protonSinPhiInLab)); - registryLongitudinalPolarization.fill(HIST("hprotonPhiInV0"), TMath::ASin(protonSinPhiInV0)); - - registryLongitudinalPolarization.fill(HIST("hprotonTheta"), TMath::ACos(protonCosThetainV0)); } if (AcceptV0AntiLambda(v0, pos, neg, collision) && ifpasslambda) { - registryLongitudinalPolarization.fill(HIST("hMassAntiLambdasel"), v0.mAntiLambda()); - registryLongitudinalPolarization.fill(HIST("hMassVsPtAntiLambdasel"), v0.pt(), v0.mAntiLambda()); ProtonVec = ROOT::Math::PxPyPzMVector(v0.pxneg(), v0.pyneg(), v0.pzneg(), massPr); PionVec = ROOT::Math::PxPyPzMVector(v0.pxpos(), v0.pypos(), v0.pzpos(), massPi); @@ -2011,24 +1521,8 @@ struct LfMyV0s { ROOT::Math::Boost boost{LambdaVec.BoostToCM()}; ProtonBoostedVec = boost(ProtonVec); LambdaBoostedVec = boost(LambdaVec); - - double protonCosThetainV0 = ProtonBoostedVec.Pz() / ProtonBoostedVec.P(); - double protonCosThetainLab = ProtonVec.Pz() / ProtonVec.P(); - - registryLongitudinalPolarization.fill(HIST("hantiprotoncosthetainV0"), protonCosThetainV0); - registryLongitudinalPolarization.fill(HIST("hantiprotoncosSquarethetainV0"), protonCosThetainV0 * protonCosThetainV0); - registryLongitudinalPolarization.fill(HIST("hAntiLambdamassandCosthetaInV0"), v0.mAntiLambda(), protonCosThetainV0); - - registryLongitudinalPolarization.fill(HIST("TProfile2DAntiLambdaPtMassCostheta"), v0.mAntiLambda(), v0.pt(), protonCosThetainV0); - registryLongitudinalPolarization.fill(HIST("TProfile2DAntiLambdaPtMassCosSquareTheta"), v0.mAntiLambda(), v0.pt(), protonCosThetainV0 * protonCosThetainV0); - registryLongitudinalPolarization.fill(HIST("TProfile1DAntiLambdaPtMassCostheta"), v0.mAntiLambda(), protonCosThetainV0); - registryLongitudinalPolarization.fill(HIST("TH2FAntiLambdaPtCostheta"), protonCosThetainV0, v0.pt()); - registryLongitudinalPolarization.fill(HIST("hAntiprotonThetaInLab"), TMath::ACos(protonCosThetainLab)); - registryLongitudinalPolarization.fill(HIST("hAntiprotonTheta"), TMath::ACos(protonCosThetainV0)); } } - registryLongitudinalPolarization.fill(HIST("nV0sPerEvent"), V0NumbersPerEvent); - registryLongitudinalPolarization.fill(HIST("nV0sPerEventsel"), V0NumbersPerEventsel); } PROCESS_SWITCH(LfMyV0s, processLongitudinalPolarization, "processLongitudinalPolarization", true); };