Skip to content

Commit 8d289de

Browse files
authored
Add prompt-feeddown histo and fix LcpKpi selector (#5889)
1 parent 8299bd4 commit 8d289de

3 files changed

Lines changed: 46 additions & 29 deletions

File tree

Analysis/Core/include/AnalysisCore/HFSelectorCuts.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static const std::vector<std::string> cutVarLabels = {"m", "DCA", "cos theta*",
180180
namespace hf_cuts_lc_topkpi
181181
{
182182
static constexpr int npTBins = 10;
183-
static constexpr int nCutVars = 8;
183+
static constexpr int nCutVars = 7;
184184
// default values for the pT bin edges (can be used to configure histogram axis)
185185
// offset by 1 from the bin numbers in cuts array
186186
constexpr double pTBins[npTBins + 1] = {
@@ -198,16 +198,16 @@ constexpr double pTBins[npTBins + 1] = {
198198
auto pTBins_v = std::vector<double>{pTBins, pTBins + npTBins + 1};
199199

200200
// default values for the cuts
201-
constexpr double cuts[npTBins][nCutVars] = {{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* 0 < pT < 1 */
202-
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* 1 < pT < 2 */
203-
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* 2 < pT < 3 */
204-
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* 3 < pT < 4 */
205-
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* 4 < pT < 5 */
206-
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* 5 < pT < 6 */
207-
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* 6 < pT < 8 */
208-
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* 8 < pT < 12 */
209-
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}, /* 12 < pT < 24 */
210-
{0.400, 0.4, 0.4, 0.4, 0.05, 0.09, 0.005, 0.}}; /* 24 < pT < 36 */
201+
constexpr double cuts[npTBins][nCutVars] = {{0.400, 0.4, 0.4, 0.4, 0., 0.005, 0.}, /* 0 < pT < 1 */
202+
{0.400, 0.4, 0.4, 0.4, 0., 0.005, 0.}, /* 1 < pT < 2 */
203+
{0.400, 0.4, 0.4, 0.4, 0., 0.005, 0.}, /* 2 < pT < 3 */
204+
{0.400, 0.4, 0.4, 0.4, 0., 0.005, 0.}, /* 3 < pT < 4 */
205+
{0.400, 0.4, 0.4, 0.4, 0., 0.005, 0.}, /* 4 < pT < 5 */
206+
{0.400, 0.4, 0.4, 0.4, 0., 0.005, 0.}, /* 5 < pT < 6 */
207+
{0.400, 0.4, 0.4, 0.4, 0., 0.005, 0.}, /* 6 < pT < 8 */
208+
{0.400, 0.4, 0.4, 0.4, 0., 0.005, 0.}, /* 8 < pT < 12 */
209+
{0.400, 0.4, 0.4, 0.4, 0., 0.005, 0.}, /* 12 < pT < 24 */
210+
{0.400, 0.4, 0.4, 0.4, 0., 0.005, 0.}}; /* 24 < pT < 36 */
211211

212212
// row labels
213213
static const std::vector<std::string> pTBinLabels = {
@@ -223,7 +223,7 @@ static const std::vector<std::string> pTBinLabels = {
223223
"pT bin 9"};
224224

225225
// column labels
226-
static const std::vector<std::string> cutVarLabels = {"m", "pT p", "pT K", "pT Pi", "DCA", "vertex sigma", "decay length", "cos pointing angle"};
226+
static const std::vector<std::string> cutVarLabels = {"m", "pT p", "pT K", "pT Pi", "Chi2PCA", "decay length", "cos pointing angle"};
227227
} // namespace hf_cuts_lc_topkpi
228228

229229
namespace hf_cuts_dplus_topikpi

Analysis/Tasks/PWGHF/HFLcCandidateSelector.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ struct HFLcCandidateSelector {
8686
return false;
8787
}
8888

89-
//candidate DCA
90-
/* if (candidate.chi2PCA() > cuts[pTBin][5]) {
89+
//candidate chi2PCA
90+
if (candidate.chi2PCA() > cuts->get(pTBin, "Chi2PCA")) {
9191
return false;
92-
}*/
92+
}
9393

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

Analysis/Tasks/PWGHF/taskLc.cxx

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@
2323
using namespace o2;
2424
using namespace o2::framework;
2525
using namespace o2::framework::expressions;
26+
using namespace o2::aod::hf_cand;
2627
using namespace o2::aod::hf_cand_prong3;
28+
using namespace o2::analysis::hf_cuts_lc_topkpi;
2729

2830
void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
2931
{
30-
ConfigParamSpec optionDoMC{"doMC", VariantType::Bool, true, {"Fill MC histograms."}};
32+
ConfigParamSpec optionDoMC{"doMC", VariantType::Bool, false, {"Fill MC histograms."}};
3133
workflowOptions.push_back(optionDoMC);
3234
}
3335

@@ -62,7 +64,7 @@ struct TaskLc {
6264
registry.add("hselectionstatus", "3-prong candidates;selection status;entries", {HistType::kTH2F, {{5, -0.5, 4.5}, {vbins, "#it{p}_{T} (GeV/#it{c})"}}});
6365
registry.add("hImpParErr", "3-prong candidates;impact parameter error (cm);entries", {HistType::kTH2F, {{100, -1., 1.}, {vbins, "#it{p}_{T} (GeV/#it{c})"}}});
6466
registry.add("hDecLenErr", "3-prong candidates;decay length error (cm);entries", {HistType::kTH2F, {{100, 0., 1.}, {vbins, "#it{p}_{T} (GeV/#it{c})"}}});
65-
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})"}}});
67+
registry.add("hdca2", "3-prong candidates;prong Chi2PCA to sec. vertex (cm);entries", {HistType::kTH2F, {{100, 0., 0.5}, {vbins, "#it{p}_{T} (GeV/#it{c})"}}});
6668
}
6769

6870
//void process(aod::HfCandProng3 const& candidates)
@@ -107,18 +109,21 @@ struct TaskLc {
107109
struct TaskLcMC {
108110
HistogramRegistry registry{
109111
"registry",
110-
{{"hPtRecSig", "3-prong candidates (rec. matched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
111-
{"hPtRecBg", "3-prong candidates (rec. unmatched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
112-
{"hPtGen", "3-prong candidates (gen. matched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
113-
{"hPtGenSig", "3-prong candidates (rec. matched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
114-
{"hCPARecSig", "3-prong candidates (rec. matched);cosine of pointing angle;entries", {HistType::kTH1F, {{110, -1.1, 1.1}}}},
115-
{"hCPARecBg", "3-prong candidates (rec. unmatched);cosine of pointing angle;entries", {HistType::kTH1F, {{110, -1.1, 1.1}}}},
116-
{"hEtaRecSig", "3-prong candidates (rec. matched);#it{#eta};entries", {HistType::kTH1F, {{100, -2., 2.}}}},
117-
{"hEtaRecBg", "3-prong candidates (rec. unmatched);#it{#eta};entries", {HistType::kTH1F, {{100, -2., 2.}}}},
118-
{"hEtaGen", "3-prong candidates (gen. matched);#it{#eta};entries", {HistType::kTH1F, {{100, -2., 2.}}}}}};
112+
{{"hPtRecSig", "3-prong candidates (matched);#it{p}_{T}^{rec.} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
113+
{"hPtRecSigPrompt", "3-prong candidates (matched, prompt);#it{p}_{T}^{rec.} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
114+
{"hPtRecSigNonPrompt", "3-prong candidates (matched, non-prompt);#it{p}_{T}^{rec.} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
115+
{"hPtRecBg", "3-prong candidates (unmatched);#it{p}_{T}^{rec.} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
116+
{"hPtGen", "MC particles (matched);#it{p}_{T}^{gen.} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
117+
{"hPtGenPrompt", "MC particles (matched, prompt);#it{p}_{T}^{gen.} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
118+
{"hPtGenNonPrompt", "MC particles (matched, non-prompt);#it{p}_{T}^{gen.} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
119+
{"hPtGenSig", "3-prong candidates (matched);#it{p}_{T}^{gen.} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
120+
{"hCPARecSig", "3-prong candidates (matched);cosine of pointing angle;entries", {HistType::kTH1F, {{110, -1.1, 1.1}}}},
121+
{"hCPARecBg", "3-prong candidates (unmatched);cosine of pointing angle;entries", {HistType::kTH1F, {{110, -1.1, 1.1}}}},
122+
{"hEtaRecSig", "3-prong candidates (matched);#it{#eta};entries", {HistType::kTH1F, {{100, -2., 2.}}}},
123+
{"hEtaRecBg", "3-prong candidates (unmatched);#it{#eta};entries", {HistType::kTH1F, {{100, -2., 2.}}}},
124+
{"hEtaGen", "MC particles (matched);#it{#eta};entries", {HistType::kTH1F, {{100, -2., 2.}}}}}};
119125

120126
Configurable<int> d_selectionFlagLc{"d_selectionFlagLc", 1, "Selection Flag for Lc"};
121-
Configurable<int> d_selectionFlagLcbar{"d_selectionFlagLcbar", 1, "Selection Flag for Lcbar"};
122127
Configurable<double> cutYCandMax{"cutYCandMax", -1., "max. cand. rapidity"};
123128

124129
Filter filterSelectCandidates = (aod::hf_selcandidate_lc::isSelLcpKpi >= d_selectionFlagLc || aod::hf_selcandidate_lc::isSelLcpiKp >= d_selectionFlagLc);
@@ -140,7 +145,13 @@ struct TaskLcMC {
140145
auto indexMother = RecoDecay::getMother(particlesMC, candidate.index0_as<aod::BigTracksMC>().mcParticle_as<soa::Join<aod::McParticles, aod::HfCandProng3MCGen>>(), pdg::Code::kLambdaCPlus, true);
141146
auto particleMother = particlesMC.iteratorAt(indexMother);
142147
registry.fill(HIST("hPtGenSig"), particleMother.pt()); // gen. level pT
143-
registry.fill(HIST("hPtRecSig"), candidate.pt()); // rec. level pT
148+
auto ptRec = candidate.pt();
149+
registry.fill(HIST("hPtRecSig"), ptRec); // rec. level pT
150+
if (candidate.originMCRec() == OriginType::Prompt) {
151+
registry.fill(HIST("hPtRecSigPrompt"), ptRec); // rec. level pT, prompt
152+
} else {
153+
registry.fill(HIST("hPtRecSigNonPrompt"), ptRec); // rec. level pT, non-prompt
154+
}
144155
registry.fill(HIST("hCPARecSig"), candidate.cpa());
145156
registry.fill(HIST("hEtaRecSig"), candidate.eta());
146157
} else {
@@ -156,7 +167,13 @@ struct TaskLcMC {
156167
if (cutYCandMax >= 0. && std::abs(RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > cutYCandMax) {
157168
continue;
158169
}
159-
registry.fill(HIST("hPtGen"), particle.pt());
170+
auto ptGen = particle.pt();
171+
registry.fill(HIST("hPtGen"), ptGen);
172+
if (particle.originMCGen() == OriginType::Prompt) {
173+
registry.fill(HIST("hPtGenPrompt"), ptGen);
174+
} else {
175+
registry.fill(HIST("hPtGenNonPrompt"), ptGen);
176+
}
160177
registry.fill(HIST("hEtaGen"), particle.eta());
161178
}
162179
}

0 commit comments

Comments
 (0)