Skip to content

Commit 61354cb

Browse files
author
Luigi Dello Stritto
committed
PWGHF: Add prompt and feeddown histos to the Lc->pKpi task
1 parent b3920fd commit 61354cb

2 files changed

Lines changed: 25 additions & 8 deletions

File tree

Analysis/Tasks/PWGHF/HFLcCandidateSelector.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ struct HFLcCandidateSelector {
8686
return false; //cosine of pointing angle
8787
}
8888

89-
/* if (hfCandProng3.chi2PCA() > cuts[pTBin][5]) { //candidate DCA
89+
if (hfCandProng3.chi2PCA() > cuts->get(pTBin, "DCA")) { //candidate DCA
9090
return false;
91-
}*/
91+
}
9292

9393
if (hfCandProng3.decayLength() <= cuts->get(pTBin, "decay length")) {
9494
return false;

Analysis/Tasks/PWGHF/taskLc.cxx

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@
1717

1818
#include "Framework/AnalysisTask.h"
1919
#include "Framework/HistogramRegistry.h"
20+
#include "AnalysisCore/HFSelectorCuts.h"
2021
#include "AnalysisDataModel/HFSecondaryVertex.h"
2122
#include "AnalysisDataModel/HFCandidateSelectionTables.h"
22-
#include "AnalysisCore/HFSelectorCuts.h"
2323

2424
using namespace o2;
2525
using namespace o2::framework;
26+
using namespace o2::analysis;
27+
using namespace o2::analysis::hf_cuts_lc_topkpi;
28+
using namespace o2::aod::hf_cand;
2629
using namespace o2::aod::hf_cand_prong3;
2730
using namespace o2::framework::expressions;
28-
using namespace o2::analysis;
2931

3032
void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
3133
{
@@ -65,7 +67,7 @@ struct TaskLc {
6567
registry.add("hselectionstatus", "3-prong candidates;selection status;entries", {HistType::kTH2F, {{5, -0.5, 4.5}, {vbins, "#it{p}_{T} (GeV/#it{c})"}}});
6668
registry.add("hImpParErr", "3-prong candidates;impact parameter error (cm);entries", {HistType::kTH2F, {{100, -1., 1.}, {vbins, "#it{p}_{T} (GeV/#it{c})"}}});
6769
registry.add("hDecLenErr", "3-prong candidates;decay length error (cm);entries", {HistType::kTH2F, {{100, 0., 1.}, {vbins, "#it{p}_{T} (GeV/#it{c})"}}});
68-
registry.add("hdca2", "3-prong candidates;prong DCA to sec. vertex (cm);entries", {HistType::kTH2F, {{100, 0., 1.}, {vbins, "#it{p}_{T} (GeV/#it{c})"}}});
70+
registry.add("hdca2", "3-prong candidates;prong DCA to sec. vertex (cm);entries", {HistType::kTH2F, {{100, 0., 0.5}, {vbins, "#it{p}_{T} (GeV/#it{c})"}}});
6971
}
7072

7173
//void process(aod::HfCandProng3 const& candidates)
@@ -112,8 +114,12 @@ struct TaskLcMC {
112114
HistogramRegistry registry{
113115
"registry",
114116
{{"hPtRecSig", "3-prong candidates (rec. matched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
117+
{"hPtRecSigPrompt", "3-prong candidates (matched, prompt);#it{p}_{T}^{rec.} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
118+
{"hPtRecSigNonPrompt", "3-prong candidates (matched, non-prompt);#it{p}_{T}^{rec.} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
115119
{"hPtRecBg", "3-prong candidates (rec. unmatched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
116120
{"hPtGen", "3-prong candidates (gen. matched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
121+
{"hPtGenPrompt", "MC particles (matched, prompt);#it{p}_{T}^{gen.} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
122+
{"hPtGenNonPrompt", "MC particles (matched, non-prompt);#it{p}_{T}^{gen.} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
117123
{"hPtGenSig", "3-prong candidates (rec. matched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
118124
{"hCPARecSig", "3-prong candidates (rec. matched);cosine of pointing angle;entries", {HistType::kTH1F, {{110, -1.1, 1.1}}}},
119125
{"hCPARecBg", "3-prong candidates (rec. unmatched);cosine of pointing angle;entries", {HistType::kTH1F, {{110, -1.1, 1.1}}}},
@@ -122,7 +128,6 @@ struct TaskLcMC {
122128
{"hEtaGen", "3-prong candidates (gen. matched);#it{#eta};entries", {HistType::kTH1F, {{100, -2., 2.}}}}}};
123129

124130
Configurable<int> d_selectionFlagLc{"d_selectionFlagLc", 1, "Selection Flag for Lc"};
125-
Configurable<int> d_selectionFlagLcbar{"d_selectionFlagLcbar", 1, "Selection Flag for Lcbar"};
126131
Configurable<double> cutYCandMax{"cutYCandMax", -1., "max. cand. rapidity"};
127132

128133
Filter filterSelectCandidates = (aod::hf_selcandidate_lc::isSelLcpKpi >= d_selectionFlagLc || aod::hf_selcandidate_lc::isSelLcpiKp >= d_selectionFlagLc);
@@ -147,7 +152,13 @@ struct TaskLcMC {
147152
auto indexMother = RecoDecay::getMother(particlesMC, candidate.index0_as<aod::BigTracksMC>().mcParticle_as<soa::Join<aod::McParticles, aod::HfCandProng3MCGen>>(), pdg::code::kLambdaCPlus, true);
148153
auto particleMother = particlesMC.iteratorAt(indexMother);
149154
registry.fill(HIST("hPtGenSig"), particleMother.pt()); //gen. level pT
150-
registry.fill(HIST("hPtRecSig"), candidate.pt()); //rec. level pT
155+
auto ptRec = candidate.pt();
156+
registry.fill(HIST("hPtRecSig"), ptRec); //rec. level pT
157+
if (candidate.originMCRec() == Prompt) {
158+
registry.fill(HIST("hPtRecSigPrompt"), ptRec); // rec. level pT, prompt
159+
} else {
160+
registry.fill(HIST("hPtRecSigNonPrompt"), ptRec); // rec. level pT, non-prompt
161+
}
151162
registry.fill(HIST("hCPARecSig"), candidate.cpa());
152163
registry.fill(HIST("hEtaRecSig"), candidate.eta());
153164
} else {
@@ -164,7 +175,13 @@ struct TaskLcMC {
164175
//Printf("MC Gen.: Y rejection: %g", RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())));
165176
continue;
166177
}
167-
registry.fill(HIST("hPtGen"), particle.pt());
178+
auto ptGen = particle.pt();
179+
registry.fill(HIST("hPtGen"), ptGen);
180+
if (particle.originMCGen() == Prompt) {
181+
registry.fill(HIST("hPtGenPrompt"), ptGen);
182+
} else {
183+
registry.fill(HIST("hPtGenNonPrompt"), ptGen);
184+
}
168185
registry.fill(HIST("hEtaGen"), particle.eta());
169186
}
170187
}

0 commit comments

Comments
 (0)