Skip to content

Commit 0210223

Browse files
MRazza879Marta Razza
andauthored
[PWGHF] Update task for deuteron from Lb analysis (#16519)
Co-authored-by: Marta Razza <marta.razza@cern.ch>
1 parent de54991 commit 0210223

1 file changed

Lines changed: 47 additions & 42 deletions

File tree

PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx

Lines changed: 47 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111
//
12+
/// \file taskDeuteronFromLb.cxx
1213
/// \brief A filter task for non prompt deuterons from beauty-hadron decays
13-
/// \author Marta Razza marta.razza@cern.ch
14-
/// \author Francesca Ercolessi francesca.ercolessi@cern.ch
14+
/// \author Marta Razza <marta.razza@cern.ch>
15+
/// \author Francesca Ercolessi <francesca.ercolessi@cern.ch>
1516
/// \since May 25, 2026
1617

1718
#include "Common/Core/Zorro.h"
@@ -69,7 +70,9 @@ struct HfTaskDeuteronFromLb {
6970
Configurable<float> cfgTPCNsigma{"cfgTPCNsigma", 4.0f, "TPC n sigma for deuteron PID"};
7071
Configurable<float> cfgTofNsigmaMin{"cfgTofNsigmaMin", 3.0f, "TOF n sigma min for deuteron PID"};
7172
Configurable<float> cfgTofNsigmaMax{"cfgTofNsigmaMax", 4.0f, "TOF n sigma max for deuteron PID"};
72-
Configurable<float> ptThresholdPid{"ptThresholdPid", 1.0f, "pT threshold to switch between 4 and 3 sigmas for TOF PID"};
73+
Configurable<float> ptThresholdPid{"ptThresholdPid", 0.5f, "pT threshold to switch between 4 and 3 sigmas for TOF PID"};
74+
Configurable<float> cfgDCAmin{"cfgDCAmin", 0.05f, "Minimum DCA for deuteron PID"};
75+
Configurable<float> cfgDCAmax{"cfgDCAmax", 1000.0f, "Maximum DCA for deuteron PID"};
7376
Configurable<float> rapidityCut{"rapidityCut", 0.5f, "Rapidity cut"};
7477
// PDG codes
7578
Configurable<int> pdgCodeMother{"pdgCodeMother", -5122, "PDG code of the mother particle (default: anti-Lambda_b)"};
@@ -88,6 +91,11 @@ struct HfTaskDeuteronFromLb {
8891

8992
Preslice<o2::aod::TrackAssoc> trackIndicesPerCollision = o2::aod::track_association::collisionId;
9093

94+
ConfigurableAxis ptAxis{"ptAxis", {100, 0., 10.f}, "p_{T} GeV/c"};
95+
ConfigurableAxis nSigmaAxis{"nSigmaAxis", {200, -10.f, 10.f}, "nSigma"};
96+
ConfigurableAxis dcaXyAxis{"dcaXyAxis", {1000, -0.2f, 0.2f}, "DCA xy (cm)"};
97+
ConfigurableAxis dcaZAxis{"dcaZAxis", {1000, -0.2f, 0.2f}, "DCA z (cm)"};
98+
9199
HistogramRegistry QAHistos{"QAHistos", {}, OutputObjHandlingPolicy::AnalysisObject, false, true};
92100
HistogramRegistry registry{"registry", {}, OutputObjHandlingPolicy::AnalysisObject};
93101

@@ -105,23 +113,18 @@ struct HfTaskDeuteronFromLb {
105113
zorroSummary.setObject(zorro.getZorroSummary());
106114
}
107115

108-
ConfigurableAxis ptAxis{"ptAxis", {100, 0., 10.f}, "p_{T} GeV/c"};
109-
ConfigurableAxis nSigmaAxis{"nSigmaAxis", {200, -10.f, 10.f}, "nSigma"};
110-
ConfigurableAxis dcaXyAxis{"dcaXyAxis", {1000, -0.2f, 0.2f}, "DCA xy (cm)"};
111-
ConfigurableAxis dcaZAxis{"dcaZAxis", {1000, -0.2f, 0.2f}, "DCA z (cm)"};
112-
113-
QAHistos.add("hVtxZ", "Z-Vertex distribution after selection;Z (cm)", HistType::kTH1F, {{100, -50, 50}});
114-
QAHistos.add("ptGeneratedLb", "ptGeneratedLb", HistType::kTH1F, {ptAxis});
115-
QAHistos.add("ptAntiDeuteronPrimary", "ptAntiDeuteronPrimaryReco", HistType::kTH1F, {ptAxis});
116-
QAHistos.add("ptAntiDeuteronFromLb", "ptAntiDeuteronFromLbReco", HistType::kTH1F, {ptAxis});
117-
QAHistos.add("hDCAxy-Primary", "DCAxy-Primary", {HistType::kTH1D, {{400, -0.2f, 0.2f, "DCA xy (cm)"}}});
118-
QAHistos.add("hDCAxy-FromLb", "DCAxy-FromLb", {HistType::kTH1D, {{400, -0.2f, 0.2f, "DCA xy (cm)"}}});
119-
QAHistos.add("hDCAxyVsPt", "DCAxy #bar{d} vs p_{T}", {HistType::kTH2D, {ptAxis, dcaXyAxis}});
120-
QAHistos.add("hDCAzVsPt", "DCAz #bar{d} vs p_{T}", {HistType::kTH2D, {ptAxis, dcaZAxis}});
121-
QAHistos.add("hnSigmaTPCVsPt", "n#sigma TPC vs p_{T} for #bar{d} hypothesis; p_{T} (GeV/c); n#sigma TPC", {HistType::kTH2D, {ptAxis, nSigmaAxis}});
122-
QAHistos.add("hnSigmaTOFVsPt", "n#sigma TOF vs p_{T} for #bar{d} hypothesis; p_{T} (GeV/c); n#sigma TOF", {HistType::kTH2D, {ptAxis, nSigmaAxis}});
123-
QAHistos.add("ptAntiDeuteron", "ptAntiDeuteron", {HistType::kTH1F, {ptAxis}});
124-
QAHistos.add("etaAntideuteron", "etaAntideuteron", {HistType::kTH1F, {{100, -1.0f, 1.0f, "eta #bar{d}"}}});
116+
QAHistos.add("MC/ptGeneratedLb", "ptGeneratedLb", HistType::kTH1F, {ptAxis});
117+
QAHistos.add("MC/ptAntiDeuteronPrimary", "ptAntiDeuteronPrimaryReco", HistType::kTH1F, {ptAxis});
118+
QAHistos.add("MC/ptAntiDeuteronFromLb", "ptAntiDeuteronFromLbReco", HistType::kTH1F, {ptAxis});
119+
QAHistos.add("MC/hDCAxy-Primary", "DCAxy-Primary", {HistType::kTH1D, {{400, -0.2f, 0.2f, "DCA xy (cm)"}}});
120+
QAHistos.add("MC/hDCAxy-FromLb", "DCAxy-FromLb", {HistType::kTH1D, {{400, -0.2f, 0.2f, "DCA xy (cm)"}}});
121+
QAHistos.add("Data/hDCAxyVsPt", "DCAxy #bar{d} vs p_{T}", {HistType::kTH2D, {ptAxis, dcaXyAxis}});
122+
QAHistos.add("Data/hDCAzVsPt", "DCAz #bar{d} vs p_{T}", {HistType::kTH2D, {ptAxis, dcaZAxis}});
123+
QAHistos.add("Data/hnSigmaTPCVsPt", "n#sigma TPC vs p_{T} for #bar{d} hypothesis; p_{T} (GeV/c); n#sigma TPC", {HistType::kTH2D, {ptAxis, nSigmaAxis}});
124+
QAHistos.add("Data/hnSigmaTOFVsPt", "n#sigma TOF vs p_{T} for #bar{d} hypothesis; p_{T} (GeV/c); n#sigma TOF", {HistType::kTH2D, {ptAxis, nSigmaAxis}});
125+
QAHistos.add("Data/ptAntiDeuteron", "ptAntiDeuteron", {HistType::kTH1F, {ptAxis}});
126+
QAHistos.add("Data/etaAntideuteron", "etaAntideuteron", {HistType::kTH1F, {{100, -1.0f, 1.0f, "eta #bar{d}"}}});
127+
QAHistos.add("Data/hVtxZ", "Z-Vertex distribution after selection;Z (cm)", HistType::kTH1F, {{100, -50, 50}});
125128

126129
hProcessedEvents->GetXaxis()->SetBinLabel(1, "Events processed");
127130
hProcessedEvents->GetXaxis()->SetBinLabel(2, "ZORRO");
@@ -147,6 +150,8 @@ struct HfTaskDeuteronFromLb {
147150
{
148151
if (std::abs(track.eta()) > cfgEta)
149152
return false;
153+
if (std::abs(track.dcaXY()) < cfgDCAmin || std::abs(track.dcaXY()) > cfgDCAmax)
154+
return false;
150155
if (!track.hasITS())
151156
return false;
152157
if (!track.hasTPC())
@@ -200,7 +205,7 @@ struct HfTaskDeuteronFromLb {
200205
continue;
201206
}
202207
hProcessedEvents->Fill(3.5);
203-
QAHistos.fill(HIST("hVtxZ"), collision.posZ());
208+
QAHistos.fill(HIST("Data/hVtxZ"), collision.posZ());
204209

205210
const auto& trackIdsThisCollision = trackIndices.sliceBy(trackIndicesPerCollision, collision.globalIndex());
206211

@@ -223,27 +228,27 @@ struct HfTaskDeuteronFromLb {
223228

224229
if (track.pt() < ptThresholdPid) {
225230
if (isTPCDe && isTOFDe_max) {
226-
QAHistos.fill(HIST("ptAntiDeuteron"), track.pt());
227-
QAHistos.fill(HIST("etaAntideuteron"), track.eta());
228-
QAHistos.fill(HIST("hDCAxyVsPt"), track.pt(), dca[0]);
229-
QAHistos.fill(HIST("hDCAzVsPt"), track.pt(), dca[1]);
230-
QAHistos.fill(HIST("hnSigmaTPCVsPt"), track.pt(), track.tpcNSigmaDe());
231-
QAHistos.fill(HIST("hnSigmaTOFVsPt"), track.pt(), track.tofNSigmaDe());
231+
QAHistos.fill(HIST("Data/ptAntiDeuteron"), track.pt());
232+
QAHistos.fill(HIST("Data/etaAntideuteron"), track.eta());
233+
QAHistos.fill(HIST("Data/hDCAxyVsPt"), track.pt(), dca[0]);
234+
QAHistos.fill(HIST("Data/hDCAzVsPt"), track.pt(), dca[1]);
235+
QAHistos.fill(HIST("Data/hnSigmaTPCVsPt"), track.pt(), track.tpcNSigmaDe());
236+
QAHistos.fill(HIST("Data/hnSigmaTOFVsPt"), track.pt(), track.tofNSigmaDe());
232237
}
233238
} else {
234239
if (isTPCDe && isTOFDe_min && isTOFDe_max) {
235-
QAHistos.fill(HIST("ptAntiDeuteron"), track.pt());
236-
QAHistos.fill(HIST("etaAntideuteron"), track.eta());
237-
QAHistos.fill(HIST("hDCAxyVsPt"), track.pt(), dca[0]);
238-
QAHistos.fill(HIST("hDCAzVsPt"), track.pt(), dca[1]);
239-
QAHistos.fill(HIST("hnSigmaTPCVsPt"), track.pt(), track.tpcNSigmaDe());
240-
QAHistos.fill(HIST("hnSigmaTOFVsPt"), track.pt(), track.tofNSigmaDe());
240+
QAHistos.fill(HIST("Data/ptAntiDeuteron"), track.pt());
241+
QAHistos.fill(HIST("Data/etaAntideuteron"), track.eta());
242+
QAHistos.fill(HIST("Data/hDCAxyVsPt"), track.pt(), dca[0]);
243+
QAHistos.fill(HIST("Data/hDCAzVsPt"), track.pt(), dca[1]);
244+
QAHistos.fill(HIST("Data/hnSigmaTPCVsPt"), track.pt(), track.tpcNSigmaDe());
245+
QAHistos.fill(HIST("Data/hnSigmaTOFVsPt"), track.pt(), track.tofNSigmaDe());
241246
}
242247
}
243248
}
244249
}
245250
}
246-
PROCESS_SWITCH(HfTaskDeuteronFromLb, processData, "processData", false);
251+
PROCESS_SWITCH(HfTaskDeuteronFromLb, processData, "processData", true);
247252

248253
void processMC(MCCollisionCandidates::iterator const&, MCTrackCandidates const& tracks, o2::aod::McParticles const&)
249254
{
@@ -272,25 +277,25 @@ struct HfTaskDeuteronFromLb {
272277
}
273278
}
274279
if (isFromLb) {
275-
QAHistos.fill(HIST("hDCAxy-FromLb"), track.dcaXY());
276-
QAHistos.fill(HIST("ptAntiDeuteronFromLb"), track.pt());
280+
QAHistos.fill(HIST("MC/hDCAxy-FromLb"), track.dcaXY());
281+
QAHistos.fill(HIST("MC/ptAntiDeuteronFromLb"), track.pt());
277282
} else {
278-
QAHistos.fill(HIST("hDCAxy-Primary"), track.dcaXY());
279-
QAHistos.fill(HIST("ptAntiDeuteronPrimary"), track.pt());
283+
QAHistos.fill(HIST("MC/hDCAxy-Primary"), track.dcaXY());
284+
QAHistos.fill(HIST("MC/ptAntiDeuteronPrimary"), track.pt());
280285
}
281286
}
282287
}
283288
}
284289
}
285-
PROCESS_SWITCH(HfTaskDeuteronFromLb, processMC, "processMC", true);
290+
PROCESS_SWITCH(HfTaskDeuteronFromLb, processMC, "processMC", false);
286291

287292
void processGen(o2::aod::McCollision const&, o2::aod::McParticles const& mcParticles)
288293
{
289294
hProcessedEvents->Fill(0.5);
290295
for (const auto& mcParticle : mcParticles) {
291296
if (mcParticle.pdgCode() == pdgCodeMother) {
292297
if (std::abs(mcParticle.y()) <= rapidityCut) {
293-
QAHistos.fill(HIST("ptGeneratedLb"), mcParticle.pt());
298+
QAHistos.fill(HIST("MC/ptGeneratedLb"), mcParticle.pt());
294299
}
295300
}
296301

@@ -309,9 +314,9 @@ struct HfTaskDeuteronFromLb {
309314
}
310315

311316
if (isFromLb) {
312-
QAHistos.fill(HIST("ptAntiDeuteronFromLb"), mcParticle.pt());
317+
QAHistos.fill(HIST("MC/ptAntiDeuteronFromLb"), mcParticle.pt());
313318
} else if (mcParticle.isPhysicalPrimary()) {
314-
QAHistos.fill(HIST("ptAntiDeuteronPrimary"), mcParticle.pt());
319+
QAHistos.fill(HIST("MC/ptAntiDeuteronPrimary"), mcParticle.pt());
315320
}
316321
}
317322
}

0 commit comments

Comments
 (0)