From 8b16cd60e614573ce51beab91a5e8843d3c44624 Mon Sep 17 00:00:00 2001 From: ddobrigk Date: Sat, 13 Jan 2024 10:49:16 +0100 Subject: [PATCH] PWGLF: Move V0 analysis to derived data format, add etas for cascs (#4278) * Move V0 analysis to derived data format, add etas for cascs * Please consider the following formatting changes (#214) * Add sel8 criteria --------- Co-authored-by: ALICE Builder --- PWGLF/DataModel/LFStrangenessTables.h | 58 ++++- PWGLF/TableProducer/strangederivedbuilder.cxx | 7 +- PWGLF/Tasks/lambdakzeroanalysis.cxx | 222 +++--------------- 3 files changed, 90 insertions(+), 197 deletions(-) diff --git a/PWGLF/DataModel/LFStrangenessTables.h b/PWGLF/DataModel/LFStrangenessTables.h index 2be338700ad..fdd0e6e993c 100644 --- a/PWGLF/DataModel/LFStrangenessTables.h +++ b/PWGLF/DataModel/LFStrangenessTables.h @@ -15,6 +15,7 @@ #include "Framework/AnalysisDataModel.h" #include "Common/Core/RecoDecay.h" #include "CommonConstants/PhysicsConstants.h" +#include "Common/DataModel/EventSelection.h" #include "Common/DataModel/Centrality.h" #include "Common/DataModel/Qvectors.h" @@ -29,6 +30,8 @@ DECLARE_SOA_TABLE(StraCollisions, "AOD", "STRACOLLISION", //! basic collision pr DECLARE_SOA_TABLE(StraCents, "AOD", "STRACENTS", //! centrality percentiles cent::CentFT0M, cent::CentFT0A, cent::CentFT0C, cent::CentFV0A); +DECLARE_SOA_TABLE(StraEvSels, "AOD", "STRAEVSELS", //! event selection: sel8 + evsel::Sel8); DECLARE_SOA_TABLE(StraEPs, "AOD", "STRAEPS", //! centrality percentiles qvec::QvecFT0ARe, qvec::QvecFT0AIm, qvec::SumAmplFT0A, qvec::QvecFT0CRe, qvec::QvecFT0CIm, qvec::SumAmplFT0C, @@ -698,6 +701,25 @@ DECLARE_SOA_DYNAMIC_COLUMN(Rapidity, rapidity, //! rapidity (0, 1: Xi; 2, 3: Ome return RecoDecay::y(std::array{Px, Py, Pz}, o2::constants::physics::MassOmegaMinus); return 0.0f; }); + +DECLARE_SOA_DYNAMIC_COLUMN(NegativePt, negativept, //! negative daughter pT + [](float pxneg, float pyneg) -> float { return RecoDecay::sqrtSumOfSquares(pxneg, pyneg); }); +DECLARE_SOA_DYNAMIC_COLUMN(PositivePt, positivept, //! positive daughter pT + [](float pxpos, float pypos) -> float { return RecoDecay::sqrtSumOfSquares(pxpos, pypos); }); +DECLARE_SOA_DYNAMIC_COLUMN(BachelorPt, bachelorpt, //! bachelor daughter pT + [](float pxpos, float pypos) -> float { return RecoDecay::sqrtSumOfSquares(pxpos, pypos); }); +DECLARE_SOA_DYNAMIC_COLUMN(NegativeEta, negativeeta, //! negative daughter eta + [](float PxNeg, float PyNeg, float PzNeg) -> float { return RecoDecay::eta(std::array{PxNeg, PyNeg, PzNeg}); }); +DECLARE_SOA_DYNAMIC_COLUMN(NegativePhi, negativephi, //! negative daughter phi + [](float PxNeg, float PyNeg) -> float { return RecoDecay::phi(PxNeg, PyNeg); }); +DECLARE_SOA_DYNAMIC_COLUMN(PositiveEta, positiveeta, //! positive daughter eta + [](float PxPos, float PyPos, float PzPos) -> float { return RecoDecay::eta(std::array{PxPos, PyPos, PzPos}); }); +DECLARE_SOA_DYNAMIC_COLUMN(PositivePhi, positivephi, //! positive daughter phi + [](float PxPos, float PyPos) -> float { return RecoDecay::phi(PxPos, PyPos); }); +DECLARE_SOA_DYNAMIC_COLUMN(BachelorEta, bacheloreta, //! bachelor daughter eta + [](float PxPos, float PyPos, float PzPos) -> float { return RecoDecay::eta(std::array{PxPos, PyPos, PzPos}); }); +DECLARE_SOA_DYNAMIC_COLUMN(BachelorPhi, bachelorphi, //! bachelor daughter phi + [](float PxPos, float PyPos) -> float { return RecoDecay::phi(PxPos, PyPos); }); } // namespace cascdata //______________________________________________________ @@ -792,7 +814,17 @@ DECLARE_SOA_TABLE(StoredCascCores, "AOD", "CASCCORE", //! core information about // Longitudinal cascdata::YXi, cascdata::YOmega, - cascdata::Rapidity); + cascdata::Rapidity, + + cascdata::NegativePt, + cascdata::PositivePt, + cascdata::BachelorPt, + cascdata::NegativeEta, + cascdata::NegativePhi, + cascdata::PositiveEta, + cascdata::PositivePhi, + cascdata::BachelorEta, + cascdata::BachelorPhi); DECLARE_SOA_TABLE(StoredKFCascCores, "AOD", "KFCASCCORE", //! cascdata::Sign, cascdata::MXi, cascdata::MOmega, @@ -820,7 +852,17 @@ DECLARE_SOA_TABLE(StoredKFCascCores, "AOD", "KFCASCCORE", //! // Longitudinal cascdata::YXi, - cascdata::YOmega); + cascdata::YOmega, + + cascdata::NegativePt, + cascdata::PositivePt, + cascdata::BachelorPt, + cascdata::NegativeEta, + cascdata::NegativePhi, + cascdata::PositiveEta, + cascdata::PositivePhi, + cascdata::BachelorEta, + cascdata::BachelorPhi); DECLARE_SOA_TABLE(StoredTraCascCores, "AOD", "TRACASCCORE", //! cascdata::Sign, cascdata::MXi, cascdata::MOmega, @@ -848,7 +890,17 @@ DECLARE_SOA_TABLE(StoredTraCascCores, "AOD", "TRACASCCORE", //! // Longitudinal cascdata::YXi, - cascdata::YOmega); + cascdata::YOmega, + + cascdata::NegativePt, + cascdata::PositivePt, + cascdata::BachelorPt, + cascdata::NegativeEta, + cascdata::NegativePhi, + cascdata::PositiveEta, + cascdata::PositivePhi, + cascdata::BachelorEta, + cascdata::BachelorPhi); DECLARE_SOA_TABLE(CascMCCores, "AOD", "CASCMCCORE", //! bachelor-baryon correlation variables cascdata::PDGCode, cascdata::PDGCodeMother, cascdata::PDGCodeV0, cascdata::IsPhysicalPrimary, diff --git a/PWGLF/TableProducer/strangederivedbuilder.cxx b/PWGLF/TableProducer/strangederivedbuilder.cxx index 2617150e8ea..b6445933c7f 100644 --- a/PWGLF/TableProducer/strangederivedbuilder.cxx +++ b/PWGLF/TableProducer/strangederivedbuilder.cxx @@ -64,6 +64,7 @@ struct strangederivedbuilder { // fundamental building blocks of derived data Produces strangeColl; // characterises collisions Produces strangeCents; // characterises collisions / centrality + Produces strangeEvSels; // characterises collisions / sel8 selection Produces strangeStamps; // provides timestamps, run numbers Produces v0collref; // references collisions from V0s Produces casccollref; // references collisions from cascades @@ -152,7 +153,7 @@ struct strangederivedbuilder { histos.add("h2dNVerticesVsCentrality", "h2dNVerticesVsCentrality", kTH2D, {axisCentrality, axisNVertices}); } - void processCollisionsV0sOnly(soa::Join const& collisions, aod::V0Datas const& V0s, aod::BCsWithTimestamps const&) + void processCollisionsV0sOnly(soa::Join const& collisions, aod::V0Datas const& V0s, aod::BCsWithTimestamps const&) { for (const auto& collision : collisions) { const uint64_t collIdx = collision.globalIndex(); @@ -163,6 +164,7 @@ struct strangederivedbuilder { strangeColl(collision.posX(), collision.posY(), collision.posZ()); strangeCents(collision.centFT0M(), collision.centFT0A(), collision.centFT0C(), collision.centFV0A()); + strangeEvSels(collision.sel8()); auto bc = collision.bc_as(); strangeStamps(bc.runNumber(), bc.timestamp()); } @@ -171,7 +173,7 @@ struct strangederivedbuilder { } } - void processCollisions(soa::Join const& collisions, aod::V0Datas const& V0s, aod::CascDatas const& Cascades, aod::KFCascDatas const& KFCascades, aod::TraCascDatas const& TraCascades, aod::BCsWithTimestamps const&) + void processCollisions(soa::Join const& collisions, aod::V0Datas const& V0s, aod::CascDatas const& Cascades, aod::KFCascDatas const& KFCascades, aod::TraCascDatas const& TraCascades, aod::BCsWithTimestamps const&) { for (const auto& collision : collisions) { const uint64_t collIdx = collision.globalIndex(); @@ -188,6 +190,7 @@ struct strangederivedbuilder { strangeColl(collision.posX(), collision.posY(), collision.posZ()); strangeCents(collision.centFT0M(), collision.centFT0A(), collision.centFT0C(), collision.centFV0A()); + strangeEvSels(collision.sel8()); auto bc = collision.bc_as(); strangeStamps(bc.runNumber(), bc.timestamp()); } diff --git a/PWGLF/Tasks/lambdakzeroanalysis.cxx b/PWGLF/Tasks/lambdakzeroanalysis.cxx index c009dab1235..c427b051579 100644 --- a/PWGLF/Tasks/lambdakzeroanalysis.cxx +++ b/PWGLF/Tasks/lambdakzeroanalysis.cxx @@ -13,9 +13,8 @@ // ======================== // // This code loops over a V0Data table and produces some -// standard analysis output. It requires either -// the lambdakzerofinder or the lambdakzeroproducer tasks -// to have been executed in the workflow (before). +// standard analysis output. It is meant to be run over +// derived data. // // Comments, questions, complaints, suggestions? // Please write to: @@ -29,6 +28,7 @@ #include "CommonConstants/PhysicsConstants.h" #include "Common/Core/trackUtilities.h" #include "PWGLF/DataModel/LFStrangenessTables.h" +#include "PWGLF/DataModel/LFStrangenessPIDTables.h" #include "Common/Core/TrackSelection.h" #include "Common/DataModel/TrackSelectionTables.h" #include "Common/DataModel/EventSelection.h" @@ -52,95 +52,31 @@ using namespace o2::framework; using namespace o2::framework::expressions; using std::array; -using MyTracks = soa::Join; - -struct lambdakzeroQa { - // Basic checks - HistogramRegistry registry{ - "registry", - { - {"hV0Radius", "hV0Radius", {HistType::kTH1F, {{1000, 0.0f, 100.0f, "cm"}}}}, - {"hV0CosPA", "hV0CosPA", {HistType::kTH1F, {{1000, 0.95f, 1.0f}}}}, - {"hDCAPosToPV", "hDCAPosToPV", {HistType::kTH1F, {{1000, -10.0f, 10.0f, "cm"}}}}, - {"hDCANegToPV", "hDCANegToPV", {HistType::kTH1F, {{1000, -10.0f, 10.0f, "cm"}}}}, - {"hDCAV0Dau", "hDCAV0Dau", {HistType::kTH1F, {{1000, 0.0f, 10.0f, "cm^{2}"}}}}, - {"hArmenterosPreAnalyserCuts", "hArmenterosPreAnalyserCuts", {HistType::kTH2F, {{1000, -1.0f, 1.0f, "#alpha"}, {1000, 0.0f, 0.30f, "#it{Q}_{T}"}}}}, - }, - }; - void init(InitContext const&) - { - AxisSpec massAxisK0Short = {600, 0.0f, 3.0f, "Inv. Mass (GeV/c^{2})"}; - AxisSpec massAxisLambda = {600, 0.0f, 3.0f, "Inv. Mass (GeV/c^{2})"}; - - registry.add("hMassK0Short", "hMassK0Short", {HistType::kTH1F, {massAxisK0Short}}); - registry.add("hMassLambda", "hMassLambda", {HistType::kTH1F, {massAxisLambda}}); - registry.add("hMassAntiLambda", "hMassAntiLambda", {HistType::kTH1F, {massAxisLambda}}); - } - void process(aod::Collision const& collision, aod::V0Datas const& fullV0s) - { - - for (auto& v0 : fullV0s) { - registry.fill(HIST("hMassK0Short"), v0.mK0Short()); - registry.fill(HIST("hMassLambda"), v0.mLambda()); - registry.fill(HIST("hMassAntiLambda"), v0.mAntiLambda()); - - registry.fill(HIST("hV0Radius"), v0.v0radius()); - registry.fill(HIST("hV0CosPA"), v0.v0cosPA()); - registry.fill(HIST("hDCAPosToPV"), v0.dcapostopv()); - registry.fill(HIST("hDCANegToPV"), v0.dcanegtopv()); - registry.fill(HIST("hDCAV0Dau"), v0.dcaV0daughters()); - registry.fill(HIST("hArmenterosPreAnalyserCuts"), v0.alpha(), v0.qtarm()); - } - } -}; +using dauTracks = soa::Join; struct lambdakzeroAnalysis { - HistogramRegistry registry{ - "registry", - { - {"h3dMassK0Short", "h3dMassK0Short", {HistType::kTH3F, {{20, 0.0f, 100.0f, "Cent (%)"}, {200, 0.0f, 10.0f, "#it{p}_{T} (GeV/c)"}, {400, 0.400f, 0.600f, "Inv. Mass (GeV/c^{2})"}}}}, - {"h3dMassLambda", "h3dMassLambda", {HistType::kTH3F, {{20, 0.0f, 100.0f, "Cent (%)"}, {200, 0.0f, 10.0f, "#it{p}_{T} (GeV/c)"}, {200, 1.015f, 1.215f, "Inv. Mass (GeV/c^{2})"}}}}, - {"h3dMassAntiLambda", "h3dMassAntiLambda", {HistType::kTH3F, {{20, 0.0f, 100.0f, "Cent (%)"}, {200, 0.0f, 10.0f, "#it{p}_{T} (GeV/c)"}, {200, 1.015f, 1.215f, "Inv. Mass (GeV/c^{2})"}}}}, - {"hArmenterosPostAnalyserCuts", "hArmenterosPostAnalyserCuts", {HistType::kTH2F, {{1000, -1.0f, 1.0f, "#alpha"}, {1000, 0.0f, 0.30f, "#it{Q}_{T}"}}}}, - {"hEventSelection", "hEventSelection", {HistType::kTH1F, {{3, 0.0f, 3.0f}}}}, - {"V0loopFiltersCounts", "V0loopFiltersCounts", {HistType::kTH1F, {{11, 0.0f, 11.0f}}}}, - }, - }; + HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; - ConfigurableAxis dcaBinning{"dca-binning", {200, 0.0f, 1.0f}, ""}; - ConfigurableAxis ptBinning{"pt-binning", {200, 0.0f, 10.0f}, ""}; + ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f, 2.2f, 2.4f, 2.6f, 2.8f, 3.0f, 3.2f, 3.4f, 3.6f, 3.8f, 4.0f, 4.4f, 4.8f, 5.2f, 5.6f, 6.0f, 6.5f, 7.0f, 7.5f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 17.0f, 19.0f, 21.0f, 23.0f, 25.0f, 30.0f, 35.0f, 40.0f, 50.0f}, "pt axis for QA histograms"}; + ConfigurableAxis axisK0Mass{"axisK0Mass", {200, 0.4f, 0.6f}, ""}; + ConfigurableAxis axisLambdaMass{"axisLambdaMass", {200, 1.101f, 1.131f}, ""}; + ConfigurableAxis axisCentrality{"axisCentrality", {100, 0.0f, 100.0f}, ""}; void init(InitContext const&) { - AxisSpec dcaAxis = {dcaBinning, "DCA (cm)"}; - AxisSpec ptAxis = {ptBinning, "#it{p}_{T} (GeV/c)"}; - AxisSpec massAxisK0Short = {400, 0.400f, 0.60f, "Inv. Mass (GeV/c^{2})"}; - AxisSpec massAxisLambda = {200, 1.015f, 1.215f, "Inv. Mass (GeV/c^{2})"}; - - registry.add("h3dMassK0ShortDca", "h3dMassK0ShortDca", {HistType::kTH3F, {dcaAxis, ptAxis, massAxisK0Short}}); - registry.add("h3dMassLambdaDca", "h3dMassLambdaDca", {HistType::kTH3F, {dcaAxis, ptAxis, massAxisLambda}}); - registry.add("h3dMassAntiLambdaDca", "h3dMassAntiLambdaDca", {HistType::kTH3F, {dcaAxis, ptAxis, massAxisLambda}}); + // Event Counters + histos.add("hEventSelection", "hEventSelection", kTH1F, {{2, -0.5f, +1.5f}}); + histos.get(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(1, "All collisions"); + histos.get(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(2, "posZ cut"); - registry.get(HIST("V0loopFiltersCounts"))->GetXaxis()->SetBinLabel(1, "V0 Candidates"); - registry.get(HIST("V0loopFiltersCounts"))->GetXaxis()->SetBinLabel(2, "V0Radius and CosPA"); - registry.get(HIST("V0loopFiltersCounts"))->GetXaxis()->SetBinLabel(4, "Lambda Rapidity"); - registry.get(HIST("V0loopFiltersCounts"))->GetXaxis()->SetBinLabel(5, "Lambda lifetime cut"); - registry.get(HIST("V0loopFiltersCounts"))->GetXaxis()->SetBinLabel(6, "Lambda TPC PID cut"); - registry.get(HIST("V0loopFiltersCounts"))->GetXaxis()->SetBinLabel(8, "K0S Rapidity"); - registry.get(HIST("V0loopFiltersCounts"))->GetXaxis()->SetBinLabel(9, "K0S lifetime cut"); - registry.get(HIST("V0loopFiltersCounts"))->GetXaxis()->SetBinLabel(10, "K0S Armenteros cut"); + histos.add("hEventCentrality", "hEventCentrality", kTH1F, {{100, 0.0f, +100.0f}}); - registry.get(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(1, "All collisions"); - registry.get(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(2, "Sel8 cut"); - registry.get(HIST("hEventSelection"))->GetXaxis()->SetBinLabel(3, "posZ cut"); + histos.add("h3dMassK0Short", "h3dMassK0Short", kTH3F, {axisCentrality, axisPt, axisK0Mass}); + histos.add("h3dMassLambda", "h3dMassLambda", kTH3F, {axisCentrality, axisPt, axisLambdaMass}); + histos.add("h3dMassAntiLambda", "h3dMassAntiLambda", kTH3F, {axisCentrality, axisPt, axisLambdaMass}); - if (doprocessRun3 && doprocessRun2) { - LOGF(fatal, "processRun3 and processRun2 are both set to true; try again with only one of them set to true"); - } - if (!doprocessRun3 && !doprocessRun2) { - LOGF(fatal, "processRun3 nor processRun2 are both set to false; try again with only one of them set to false"); - } + // Extra QA histograms to be added } // Selection criteria @@ -154,150 +90,52 @@ struct lambdakzeroAnalysis { Configurable TpcPidNsigmaCut{"TpcPidNsigmaCut", 5, "TpcPidNsigmaCut"}; Configurable boolArmenterosCut{"boolArmenterosCut", true, "cut on Armenteros-Podolanski graph"}; Configurable paramArmenterosCut{"paramArmenterosCut", 0.2, "parameter Armenteros Cut"}; - Configurable event_sel8_selection{"event_sel8_selection", true, "event selection count post sel8 cut"}; - Configurable event_posZ_selection{"event_posZ_selection", true, "event selection count post poZ cut"}; static constexpr float defaultLifetimeCuts[1][2] = {{25., 20.}}; Configurable> lifetimecut{"lifetimecut", {defaultLifetimeCuts[0], 2, {"lifetimecutLambda", "lifetimecutK0S"}}, "lifetimecut"}; Filter preFilterV0 = nabs(aod::v0data::dcapostopv) > dcapostopv&& nabs(aod::v0data::dcanegtopv) > dcanegtopv&& aod::v0data::dcaV0daughters < dcav0dau; - // void process(soa::Join::iterator const& collision, soa::Filtered const& fullV0s) //for now CentV0M info is not available for run 3 pp - void processRun3(soa::Join::iterator const& collision, soa::Filtered const& fullV0s, MyTracks const& tracks) + void process(soa::Join::iterator const& collision, soa::Filtered> const& fullV0s, dauTracks const&) { - registry.fill(HIST("hEventSelection"), 0.5); - if (event_sel8_selection && !collision.sel8()) { - return; - } - registry.fill(HIST("hEventSelection"), 1.5); - if (event_posZ_selection && abs(collision.posZ()) > 10.f) { // 10cm + histos.fill(HIST("hEventSelection"), 0.5); + if (abs(collision.posZ()) > 10.f) { // 10cm return; } - registry.fill(HIST("hEventSelection"), 2.5); + histos.fill(HIST("hEventSelection"), 1.5); + histos.fill(HIST("hEventCentrality"), collision.centFT0C()); for (auto& v0 : fullV0s) { // FIXME: could not find out how to filter cosPA and radius variables (dynamic columns) - registry.fill(HIST("V0loopFiltersCounts"), 0.5); if (v0.v0radius() > v0radius && v0.v0cosPA() > v0cospa) { - registry.fill(HIST("V0loopFiltersCounts"), 1.5); if (TMath::Abs(v0.yLambda()) < rapidity) { - registry.fill(HIST("V0loopFiltersCounts"), 3.5); if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassLambda0 < lifetimecut->get("lifetimecutLambda")) { - registry.fill(HIST("V0loopFiltersCounts"), 4.5); - // Lambda - if (TMath::Abs(v0.posTrack_as().tpcNSigmaPr()) < TpcPidNsigmaCut) { // previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S - registry.fill(HIST("V0loopFiltersCounts"), 5.5); - registry.fill(HIST("h3dMassLambda"), 0., v0.pt(), v0.mLambda()); // collision.centV0M() instead of 0. once available - registry.fill(HIST("hArmenterosPostAnalyserCuts"), v0.alpha(), v0.qtarm()); - if (saveDcaHist == 1) { - registry.fill(HIST("h3dMassLambdaDca"), v0.dcaV0daughters(), v0.pt(), v0.mLambda()); - } + if (TMath::Abs(v0.posTrackExtra_as().tpcNSigmaPr()) < TpcPidNsigmaCut && TMath::Abs(v0.negTrackExtra_as().tpcNSigmaPi()) < TpcPidNsigmaCut) { + histos.fill(HIST("h3dMassLambda"), collision.centFT0C(), v0.pt(), v0.mLambda()); } - - // AntiLambda - if (TMath::Abs(v0.negTrack_as().tpcNSigmaPr()) < TpcPidNsigmaCut) { // previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S - registry.fill(HIST("V0loopFiltersCounts"), 5.5); - registry.fill(HIST("h3dMassAntiLambda"), 0., v0.pt(), v0.mAntiLambda()); - registry.fill(HIST("hArmenterosPostAnalyserCuts"), v0.alpha(), v0.qtarm()); - if (saveDcaHist == 1) { - registry.fill(HIST("h3dMassAntiLambdaDca"), v0.dcaV0daughters(), v0.pt(), v0.mAntiLambda()); - } - } - } - } - - // K0Short - if (TMath::Abs(v0.yK0Short()) < rapidity) { - registry.fill(HIST("V0loopFiltersCounts"), 7.5); - if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassK0Short < lifetimecut->get("lifetimecutK0S")) { - registry.fill(HIST("V0loopFiltersCounts"), 8.5); - if ((v0.qtarm() > paramArmenterosCut * TMath::Abs(v0.alpha())) || !boolArmenterosCut) { - registry.fill(HIST("V0loopFiltersCounts"), 9.5); - registry.fill(HIST("h3dMassK0Short"), 0., v0.pt(), v0.mK0Short()); - registry.fill(HIST("hArmenterosPostAnalyserCuts"), v0.alpha(), v0.qtarm()); - if (saveDcaHist == 1) { - registry.fill(HIST("h3dMassK0ShortDca"), v0.dcaV0daughters(), v0.pt(), v0.mK0Short()); - } - } - } - } - } - } - } - PROCESS_SWITCH(lambdakzeroAnalysis, processRun3, "Process Run 3 data", true); - - void processRun2(soa::Join::iterator const& collision, soa::Filtered const& fullV0s, MyTracks const& tracks) - { - registry.fill(HIST("hEventSelection"), 0.5); - if (!collision.alias_bit(kINT7)) { - return; - } - if (event_sel8_selection && !collision.sel7()) { - return; - } - registry.fill(HIST("hEventSelection"), 1.5); - if (event_posZ_selection && abs(collision.posZ()) > 10.f) { // 10cm - return; - } - registry.fill(HIST("hEventSelection"), 2.5); - - for (auto& v0 : fullV0s) { - // FIXME: could not find out how to filter cosPA and radius variables (dynamic columns) - registry.fill(HIST("V0loopFiltersCounts"), 0.5); - if (v0.v0radius() > v0radius && v0.v0cosPA() > v0cospa) { - registry.fill(HIST("V0loopFiltersCounts"), 1.5); - if (TMath::Abs(v0.yLambda()) < rapidity) { - registry.fill(HIST("V0loopFiltersCounts"), 3.5); - if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassLambda0 < lifetimecut->get("lifetimecutLambda")) { - registry.fill(HIST("V0loopFiltersCounts"), 4.5); - - // Lambda - if (TMath::Abs(v0.posTrack_as().tpcNSigmaPr()) < TpcPidNsigmaCut) { // previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S - registry.fill(HIST("V0loopFiltersCounts"), 5.5); - registry.fill(HIST("h3dMassLambda"), collision.centRun2V0M(), v0.pt(), v0.mLambda()); - registry.fill(HIST("hArmenterosPostAnalyserCuts"), v0.alpha(), v0.qtarm()); - if (saveDcaHist == 1) { - registry.fill(HIST("h3dMassLambdaDca"), v0.dcaV0daughters(), v0.pt(), v0.mLambda()); - } - } - // AntiLambda - if (TMath::Abs(v0.negTrack_as().tpcNSigmaPr()) < TpcPidNsigmaCut) { // previous 900Gev pp analysis had nSigma< 5 for pt<0.7Gev and tpcNSigmaStorePi<3 for pt>0.7GeV; and no cut on K0S - registry.fill(HIST("V0loopFiltersCounts"), 5.5); - registry.fill(HIST("h3dMassAntiLambda"), collision.centRun2V0M(), v0.pt(), v0.mAntiLambda()); - registry.fill(HIST("hArmenterosPostAnalyserCuts"), v0.alpha(), v0.qtarm()); - if (saveDcaHist == 1) { - registry.fill(HIST("h3dMassAntiLambdaDca"), v0.dcaV0daughters(), v0.pt(), v0.mAntiLambda()); - } + if (TMath::Abs(v0.negTrackExtra_as().tpcNSigmaPr()) < TpcPidNsigmaCut && TMath::Abs(v0.posTrackExtra_as().tpcNSigmaPi()) < TpcPidNsigmaCut) { + histos.fill(HIST("h3dMassAntiLambda"), collision.centFT0C(), v0.pt(), v0.mAntiLambda()); } } } // K0Short if (TMath::Abs(v0.yK0Short()) < rapidity) { - registry.fill(HIST("V0loopFiltersCounts"), 7.5); if (v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * o2::constants::physics::MassK0Short < lifetimecut->get("lifetimecutK0S")) { - registry.fill(HIST("V0loopFiltersCounts"), 8.5); - if ((v0.qtarm() > paramArmenterosCut * v0.alpha()) || !boolArmenterosCut) { - registry.fill(HIST("V0loopFiltersCounts"), 9.5); - registry.fill(HIST("h3dMassK0Short"), collision.centRun2V0M(), v0.pt(), v0.mK0Short()); - registry.fill(HIST("hArmenterosPostAnalyserCuts"), v0.alpha(), v0.qtarm()); - if (saveDcaHist == 1) { - registry.fill(HIST("h3dMassK0ShortDca"), v0.dcaV0daughters(), v0.pt(), v0.mK0Short()); - } + if (TMath::Abs(v0.negTrackExtra_as().tpcNSigmaPi()) < TpcPidNsigmaCut && TMath::Abs(v0.posTrackExtra_as().tpcNSigmaPi()) < TpcPidNsigmaCut) { + histos.fill(HIST("h3dMassK0Short"), collision.centFT0C(), v0.pt(), v0.mK0Short()); } } } } } } - PROCESS_SWITCH(lambdakzeroAnalysis, processRun2, "Process Run 2 data", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{ - adaptAnalysisTask(cfgc), - adaptAnalysisTask(cfgc)}; + adaptAnalysisTask(cfgc)}; }