Skip to content

Commit ea45fc6

Browse files
author
Marta Razza
committed
[PWGHF] Add task for deuteron from Lb analysis
1 parent ab09940 commit ea45fc6

1 file changed

Lines changed: 43 additions & 40 deletions

File tree

PWGHF/D2H/Tasks/taskDeuteronFromLb.cxx

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,14 @@ struct HfTaskDeuteronFromLb {
6969
Configurable<float> cfgTPCNsigma{"cfgTPCNsigma", 4.0f, "TPC n sigma for deuteron PID"};
7070
Configurable<float> cfgTofNsigmaMin{"cfgTofNsigmaMin", 3.0f, "TOF n sigma min for deuteron PID"};
7171
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"};
72+
Configurable<float> ptThresholdPid{"ptThresholdPid", 0.5f, "pT threshold to switch between 4 and 3 sigmas for TOF PID"};
73+
Configurable<float> cfgDCAmin{"cfgDCAmin", 0.05f, "Minimum DCA for deuteron PID"};
74+
Configurable<float> cfgDCAmax{"cfgDCAmax", 1000.0f, "Maximum DCA for deuteron PID"};
7375
Configurable<float> rapidityCut{"rapidityCut", 0.5f, "Rapidity cut"};
76+
ConfigurableAxis ptAxis{"ptAxis", {100, 0., 10.f}, "p_{T} GeV/c"};
77+
ConfigurableAxis nSigmaAxis{"nSigmaAxis", {200, -10.f, 10.f}, "nSigma"};
78+
ConfigurableAxis dcaXyAxis{"dcaXyAxis", {1000, -0.2f, 0.2f}, "DCA xy (cm)"};
79+
ConfigurableAxis dcaZAxis{"dcaZAxis", {1000, -0.2f, 0.2f}, "DCA z (cm)"};
7480
// PDG codes
7581
Configurable<int> pdgCodeMother{"pdgCodeMother", -5122, "PDG code of the mother particle (default: anti-Lambda_b)"};
7682
Configurable<int> pdgCodeDaughter{"pdgCodeDaughter", -1000010020, "PDG code of the daughter particle (default: anti-deuteron)"};
@@ -105,23 +111,18 @@ struct HfTaskDeuteronFromLb {
105111
zorroSummary.setObject(zorro.getZorroSummary());
106112
}
107113

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}"}}});
114+
QAHistos.add("MC/ptGeneratedLb", "ptGeneratedLb", HistType::kTH1F, {ptAxis});
115+
QAHistos.add("MC/ptAntiDeuteronPrimary", "ptAntiDeuteronPrimaryReco", HistType::kTH1F, {ptAxis});
116+
QAHistos.add("MC/ptAntiDeuteronFromLb", "ptAntiDeuteronFromLbReco", HistType::kTH1F, {ptAxis});
117+
QAHistos.add("MC/hDCAxy-Primary", "DCAxy-Primary", {HistType::kTH1D, {{400, -0.2f, 0.2f, "DCA xy (cm)"}}});
118+
QAHistos.add("MC/hDCAxy-FromLb", "DCAxy-FromLb", {HistType::kTH1D, {{400, -0.2f, 0.2f, "DCA xy (cm)"}}});
119+
QAHistos.add("Data/hDCAxyVsPt", "DCAxy #bar{d} vs p_{T}", {HistType::kTH2D, {ptAxis, dcaXyAxis}});
120+
QAHistos.add("Data/hDCAzVsPt", "DCAz #bar{d} vs p_{T}", {HistType::kTH2D, {ptAxis, dcaZAxis}});
121+
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}});
122+
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}});
123+
QAHistos.add("Data/ptAntiDeuteron", "ptAntiDeuteron", {HistType::kTH1F, {ptAxis}});
124+
QAHistos.add("Data/etaAntideuteron", "etaAntideuteron", {HistType::kTH1F, {{100, -1.0f, 1.0f, "eta #bar{d}"}}});
125+
QAHistos.add("Data/hVtxZ", "Z-Vertex distribution after selection;Z (cm)", HistType::kTH1F, {{100, -50, 50}});
125126

126127
hProcessedEvents->GetXaxis()->SetBinLabel(1, "Events processed");
127128
hProcessedEvents->GetXaxis()->SetBinLabel(2, "ZORRO");
@@ -147,6 +148,8 @@ struct HfTaskDeuteronFromLb {
147148
{
148149
if (std::abs(track.eta()) > cfgEta)
149150
return false;
151+
if (std::abs(track.dcaXY()) < cfgDCAmin || std::abs(track.dcaXY()) > cfgDCAmax)
152+
return false;
150153
if (!track.hasITS())
151154
return false;
152155
if (!track.hasTPC())
@@ -200,7 +203,7 @@ struct HfTaskDeuteronFromLb {
200203
continue;
201204
}
202205
hProcessedEvents->Fill(3.5);
203-
QAHistos.fill(HIST("hVtxZ"), collision.posZ());
206+
QAHistos.fill(HIST("Data/hVtxZ"), collision.posZ());
204207

205208
const auto& trackIdsThisCollision = trackIndices.sliceBy(trackIndicesPerCollision, collision.globalIndex());
206209

@@ -223,27 +226,27 @@ struct HfTaskDeuteronFromLb {
223226

224227
if (track.pt() < ptThresholdPid) {
225228
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());
229+
QAHistos.fill(HIST("Data/ptAntiDeuteron"), track.pt());
230+
QAHistos.fill(HIST("Data/etaAntideuteron"), track.eta());
231+
QAHistos.fill(HIST("Data/hDCAxyVsPt"), track.pt(), dca[0]);
232+
QAHistos.fill(HIST("Data/hDCAzVsPt"), track.pt(), dca[1]);
233+
QAHistos.fill(HIST("Data/hnSigmaTPCVsPt"), track.pt(), track.tpcNSigmaDe());
234+
QAHistos.fill(HIST("Data/hnSigmaTOFVsPt"), track.pt(), track.tofNSigmaDe());
232235
}
233236
} else {
234237
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());
238+
QAHistos.fill(HIST("Data/ptAntiDeuteron"), track.pt());
239+
QAHistos.fill(HIST("Data/etaAntideuteron"), track.eta());
240+
QAHistos.fill(HIST("Data/hDCAxyVsPt"), track.pt(), dca[0]);
241+
QAHistos.fill(HIST("Data/hDCAzVsPt"), track.pt(), dca[1]);
242+
QAHistos.fill(HIST("Data/hnSigmaTPCVsPt"), track.pt(), track.tpcNSigmaDe());
243+
QAHistos.fill(HIST("Data/hnSigmaTOFVsPt"), track.pt(), track.tofNSigmaDe());
241244
}
242245
}
243246
}
244247
}
245248
}
246-
PROCESS_SWITCH(HfTaskDeuteronFromLb, processData, "processData", false);
249+
PROCESS_SWITCH(HfTaskDeuteronFromLb, processData, "processData", true);
247250

248251
void processMC(MCCollisionCandidates::iterator const&, MCTrackCandidates const& tracks, o2::aod::McParticles const&)
249252
{
@@ -272,25 +275,25 @@ struct HfTaskDeuteronFromLb {
272275
}
273276
}
274277
if (isFromLb) {
275-
QAHistos.fill(HIST("hDCAxy-FromLb"), track.dcaXY());
276-
QAHistos.fill(HIST("ptAntiDeuteronFromLb"), track.pt());
278+
QAHistos.fill(HIST("MC/hDCAxy-FromLb"), track.dcaXY());
279+
QAHistos.fill(HIST("MC/ptAntiDeuteronFromLb"), track.pt());
277280
} else {
278-
QAHistos.fill(HIST("hDCAxy-Primary"), track.dcaXY());
279-
QAHistos.fill(HIST("ptAntiDeuteronPrimary"), track.pt());
281+
QAHistos.fill(HIST("MC/hDCAxy-Primary"), track.dcaXY());
282+
QAHistos.fill(HIST("MC/ptAntiDeuteronPrimary"), track.pt());
280283
}
281284
}
282285
}
283286
}
284287
}
285-
PROCESS_SWITCH(HfTaskDeuteronFromLb, processMC, "processMC", true);
288+
PROCESS_SWITCH(HfTaskDeuteronFromLb, processMC, "processMC", false);
286289

287290
void processGen(o2::aod::McCollision const&, o2::aod::McParticles const& mcParticles)
288291
{
289292
hProcessedEvents->Fill(0.5);
290293
for (const auto& mcParticle : mcParticles) {
291294
if (mcParticle.pdgCode() == pdgCodeMother) {
292295
if (std::abs(mcParticle.y()) <= rapidityCut) {
293-
QAHistos.fill(HIST("ptGeneratedLb"), mcParticle.pt());
296+
QAHistos.fill(HIST("MC/ptGeneratedLb"), mcParticle.pt());
294297
}
295298
}
296299

@@ -309,9 +312,9 @@ struct HfTaskDeuteronFromLb {
309312
}
310313

311314
if (isFromLb) {
312-
QAHistos.fill(HIST("ptAntiDeuteronFromLb"), mcParticle.pt());
315+
QAHistos.fill(HIST("MC/ptAntiDeuteronFromLb"), mcParticle.pt());
313316
} else if (mcParticle.isPhysicalPrimary()) {
314-
QAHistos.fill(HIST("ptAntiDeuteronPrimary"), mcParticle.pt());
317+
QAHistos.fill(HIST("MC/ptAntiDeuteronPrimary"), mcParticle.pt());
315318
}
316319
}
317320
}

0 commit comments

Comments
 (0)