From 09fe720a3e0d976d55c635b136dff393bf36b533 Mon Sep 17 00:00:00 2001 From: Marta Razza Date: Wed, 3 Jun 2026 12:00:16 +0200 Subject: [PATCH 1/5] [PWGHF] Add task for deuteron from Lb analysis --- PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx b/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx index 1dc6f54dbe4..42ff5e0397d 100644 --- a/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx +++ b/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx @@ -74,6 +74,10 @@ struct HfTaskDeuteronFromLb { Configurable cfgDCAmin{"cfgDCAmin", 0.05f, "Minimum DCA for deuteron PID"}; Configurable cfgDCAmax{"cfgDCAmax", 1000.0f, "Maximum DCA for deuteron PID"}; Configurable rapidityCut{"rapidityCut", 0.5f, "Rapidity cut"}; + ConfigurableAxis ptAxis{"ptAxis", {100, 0., 10.f}, "p_{T} GeV/c"}; + ConfigurableAxis nSigmaAxis{"nSigmaAxis", {200, -10.f, 10.f}, "nSigma"}; + ConfigurableAxis dcaXyAxis{"dcaXyAxis", {1000, -0.2f, 0.2f}, "DCA xy (cm)"}; + ConfigurableAxis dcaZAxis{"dcaZAxis", {1000, -0.2f, 0.2f}, "DCA z (cm)"}; // PDG codes Configurable pdgCodeMother{"pdgCodeMother", -5122, "PDG code of the mother particle (default: anti-Lambda_b)"}; Configurable pdgCodeDaughter{"pdgCodeDaughter", -1000010020, "PDG code of the daughter particle (default: anti-deuteron)"}; From 3496faa85307c483570f64f863b07c99493f27a2 Mon Sep 17 00:00:00 2001 From: Marta Razza Date: Wed, 3 Jun 2026 12:12:06 +0200 Subject: [PATCH 2/5] [PWGHF] Fix linter: struct member order and file documentation --- PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx b/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx index 42ff5e0397d..1dc6f54dbe4 100644 --- a/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx +++ b/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx @@ -74,10 +74,6 @@ struct HfTaskDeuteronFromLb { Configurable cfgDCAmin{"cfgDCAmin", 0.05f, "Minimum DCA for deuteron PID"}; Configurable cfgDCAmax{"cfgDCAmax", 1000.0f, "Maximum DCA for deuteron PID"}; Configurable rapidityCut{"rapidityCut", 0.5f, "Rapidity cut"}; - ConfigurableAxis ptAxis{"ptAxis", {100, 0., 10.f}, "p_{T} GeV/c"}; - ConfigurableAxis nSigmaAxis{"nSigmaAxis", {200, -10.f, 10.f}, "nSigma"}; - ConfigurableAxis dcaXyAxis{"dcaXyAxis", {1000, -0.2f, 0.2f}, "DCA xy (cm)"}; - ConfigurableAxis dcaZAxis{"dcaZAxis", {1000, -0.2f, 0.2f}, "DCA z (cm)"}; // PDG codes Configurable pdgCodeMother{"pdgCodeMother", -5122, "PDG code of the mother particle (default: anti-Lambda_b)"}; Configurable pdgCodeDaughter{"pdgCodeDaughter", -1000010020, "PDG code of the daughter particle (default: anti-deuteron)"}; From 383365aa677349b48dba8f7e613d14d684a90675 Mon Sep 17 00:00:00 2001 From: Marta Razza Date: Wed, 3 Jun 2026 17:36:23 +0200 Subject: [PATCH 3/5] fixing warnings in taskDeuteronFromLb --- PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx b/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx index 1dc6f54dbe4..5055a02b250 100644 --- a/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx +++ b/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx @@ -55,6 +55,8 @@ struct HfTaskDeuteronFromLb { Zorro zorro; o2::base::Propagator::MatCorrType noMatCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE; + Preslice trackIndicesPerCollision = o2::aod::track_association::collisionId; + Configurable cutzvertex{"cutzvertex", 10.0f, "Accepted z-vertex range (cm)"}; Configurable applySkimming{"applySkimming", false, "Skimmed dataset processing"}; Configurable cfgSkimming{"cfgSkimming", "fH2fromLb", "Configurable for skimming"}; @@ -89,8 +91,6 @@ struct HfTaskDeuteronFromLb { using MCCollisionCandidates = o2::soa::Join; using TrackCandidates = o2::soa::Join; - Preslice trackIndicesPerCollision = o2::aod::track_association::collisionId; - ConfigurableAxis ptAxis{"ptAxis", {100, 0., 10.f}, "p_{T} GeV/c"}; ConfigurableAxis nSigmaAxis{"nSigmaAxis", {200, -10.f, 10.f}, "nSigma"}; ConfigurableAxis dcaXyAxis{"dcaXyAxis", {1000, -0.2f, 0.2f}, "DCA xy (cm)"}; @@ -223,11 +223,11 @@ struct HfTaskDeuteronFromLb { } const bool isTPCDe = std::abs(track.tpcNSigmaDe()) < cfgTPCNsigma; - const bool isTOFDe_min = std::abs(track.tofNSigmaDe()) > cfgTofNsigmaMin; - const bool isTOFDe_max = std::abs(track.tofNSigmaDe()) < cfgTofNsigmaMax; + const bool isTofDeMin = std::abs(track.tofNSigmaDe()) > cfgTofNsigmaMin; + const bool isTofDeMax = std::abs(track.tofNSigmaDe()) < cfgTofNsigmaMax; if (track.pt() < ptThresholdPid) { - if (isTPCDe && isTOFDe_max) { + if (isTPCDe && isTofDeMax) { QAHistos.fill(HIST("Data/ptAntiDeuteron"), track.pt()); QAHistos.fill(HIST("Data/etaAntideuteron"), track.eta()); QAHistos.fill(HIST("Data/hDCAxyVsPt"), track.pt(), dca[0]); @@ -236,7 +236,7 @@ struct HfTaskDeuteronFromLb { QAHistos.fill(HIST("Data/hnSigmaTOFVsPt"), track.pt(), track.tofNSigmaDe()); } } else { - if (isTPCDe && isTOFDe_min && isTOFDe_max) { + if (isTPCDe && isTofDeMin && isTofDeMax) { QAHistos.fill(HIST("Data/ptAntiDeuteron"), track.pt()); QAHistos.fill(HIST("Data/etaAntideuteron"), track.eta()); QAHistos.fill(HIST("Data/hDCAxyVsPt"), track.pt(), dca[0]); @@ -328,4 +328,4 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{ adaptAnalysisTask(cfgc)}; -} +} \ No newline at end of file From 6dec3e0077f00811e93ed590b883b50097b26066 Mon Sep 17 00:00:00 2001 From: Marta Razza Date: Wed, 3 Jun 2026 17:50:37 +0200 Subject: [PATCH 4/5] fix: add missing newline at end of file --- PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx b/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx index 5055a02b250..5899a25b049 100644 --- a/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx +++ b/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx @@ -328,4 +328,4 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { return WorkflowSpec{ adaptAnalysisTask(cfgc)}; -} \ No newline at end of file +} From 882246fea4ecf4b6ed016b65c83d4818a5d07401 Mon Sep 17 00:00:00 2001 From: Marta Razza Date: Wed, 3 Jun 2026 18:13:53 +0200 Subject: [PATCH 5/5] fix: correct struct member order --- PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx b/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx index 5899a25b049..10cb6e58742 100644 --- a/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx +++ b/PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx @@ -55,6 +55,11 @@ struct HfTaskDeuteronFromLb { Zorro zorro; o2::base::Propagator::MatCorrType noMatCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE; + using CollisionCandidates = o2::soa::Join; + using MCTrackCandidates = o2::soa::Join; + using MCCollisionCandidates = o2::soa::Join; + using TrackCandidates = o2::soa::Join; + Preslice trackIndicesPerCollision = o2::aod::track_association::collisionId; Configurable cutzvertex{"cutzvertex", 10.0f, "Accepted z-vertex range (cm)"}; @@ -80,17 +85,6 @@ struct HfTaskDeuteronFromLb { Configurable pdgCodeMother{"pdgCodeMother", -5122, "PDG code of the mother particle (default: anti-Lambda_b)"}; Configurable pdgCodeDaughter{"pdgCodeDaughter", -1000010020, "PDG code of the daughter particle (default: anti-deuteron)"}; - int mRunNumber = 0; - float d_bz = 0.f; - int mCurrentRun = -1; - - framework::Service ccdb; - - using CollisionCandidates = o2::soa::Join; - using MCTrackCandidates = o2::soa::Join; - using MCCollisionCandidates = o2::soa::Join; - using TrackCandidates = o2::soa::Join; - ConfigurableAxis ptAxis{"ptAxis", {100, 0., 10.f}, "p_{T} GeV/c"}; ConfigurableAxis nSigmaAxis{"nSigmaAxis", {200, -10.f, 10.f}, "nSigma"}; ConfigurableAxis dcaXyAxis{"dcaXyAxis", {1000, -0.2f, 0.2f}, "DCA xy (cm)"}; @@ -102,6 +96,12 @@ struct HfTaskDeuteronFromLb { OutputObj zorroSummary{"zorroSummary"}; OutputObj hProcessedEvents{TH1D("hProcessedEvents", "Event filtered;; Number of events", 4, 0., 4.)}; + int mRunNumber = 0; + float d_bz = 0.f; + int mCurrentRun = -1; + + framework::Service ccdb; + void init(framework::InitContext&) { ccdb->setURL("http://alice-ccdb.cern.ch");