Skip to content

Commit

Permalink
PWGHF: Add more p t bin in selector cut (AliceO2Group#4540)
Browse files Browse the repository at this point in the history
* Adding more pT bins for Dstar candidates and rebinning Decaylength and Impactparameter Hists

* correction to binning option

* Correcting default value of impact parameter cut of soft pi

* Please consider the following formatting changes

* correcting spelling mistake

* fix spelling

* MegaLinter fixes

---------

Co-authored-by: ALICE Action Bot <[email protected]>
  • Loading branch information
deependra170598 and alibuild authored Feb 1, 2024
1 parent 0accdd3 commit 375831a
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 41 deletions.
56 changes: 31 additions & 25 deletions PWGHF/Core/SelectorCuts.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,13 @@ static const std::vector<std::string> labelsCutVar = {"m", "DCA", "cos theta*",

namespace hf_cuts_dstar_to_d0_pi
{
static constexpr int nBinsPt = 23;
static constexpr int nBinsPt = 25;
static constexpr int nCutVars = 8;
// default values for the pT bin edges (can be used to configure histogram axis)
// offset by 1 from the bin numbers in cuts array
constexpr double binsPt[nBinsPt + 1] = {
0.,
0.5,
1.0,
1.5,
2.0,
Expand Down Expand Up @@ -411,35 +413,39 @@ static const std::vector<std::string> labelsPt = {
"pT bin 19",
"pT bin 20",
"pT bin 21",
"pT bin 22"};
"pT bin 22",
"pT bin 23",
"pT bin 24"};

// column label
static const std::vector<std::string> labelsCutVar = {"ptSoftPiMin", "ptSoftPiMax", "d0SoftPi", "d0SoftPiNormalised", "deltaMInvDstar", "chi2PCA", "d0Prong0Normalised", "d0Prong1Normalised"};

// default values for the cuts
constexpr double cuts[nBinsPt][nCutVars] = {{0.05, 0.3, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 0.3, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 0.4, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 0.4, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 0.6, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 0.6, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 0.6, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 0.0, 0.2, 300.0, 0.0, 0.0}};
constexpr double cuts[nBinsPt][nCutVars] = {{0.05, 0.2, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 0.2, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 0.3, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 0.3, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 0.4, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 0.4, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 0.6, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 0.6, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 0.6, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0},
{0.05, 100, 0.1, 1000.0, 0.2, 300.0, 0.0, 0.0}};
} // namespace hf_cuts_dstar_to_d0_pi

namespace hf_cuts_lc_to_p_k_pi
Expand Down
38 changes: 23 additions & 15 deletions PWGHF/D2H/Tasks/taskDstarToD0Pi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ struct HfTaskDstarToD0Pi {
Partition<CandDstarWSelFlag> rowsSelectedCandDstar = aod::hf_sel_candidate_dstar::isSelDstarToD0Pi == selectionFlagDstarToD0Pi;
Partition<CandDstarWSelFlagMcRec> rowsSelectedCandDstarMcRec = aod::hf_sel_candidate_dstar::isRecoD0Flag == selectionFlagHfD0ToPiK;

ConfigurableAxis binningImpactParam{"binningImpactParam", {1000, 0.1, -0.1}, " Bins of Impact Parameter"};
ConfigurableAxis binningDecayLength{"binningDecayLength", {1000, 0.0, 0.7}, "Bins of Decay Length"};
ConfigurableAxis binningNormDecayLength{"binningNormDecayLength", {1000, 0.0, 40.0}, "Bins of Normalised Decay Length"};

HistogramRegistry registry{
"registry",
{{"QA/hPtDstar", "Dstar Candidates; Dstar candidate #it{p}_{T} (GeV/#it{c}); entries", {HistType::kTH1F, {{360, 0., 36.}}}},
Expand All @@ -59,28 +63,32 @@ struct HfTaskDstarToD0Pi {
{
auto vecPtBins = (std::vector<double>)ptBins;

AxisSpec axisImpactParam = {binningImpactParam, "impact parameter (cm)"};
AxisSpec axisDecayLength = {binningDecayLength, " decay length (cm)"};
AxisSpec axisNormDecayLength = {binningNormDecayLength, "normalised decay length (cm)"};

registry.add("Yield/hDeltaInvMassDstar2D", "#Delta #it{M}_{inv} D* Candidate; inv. mass ((#pi #pi k) - (#pi k)) (GeV/#it{c}^{2});#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {{100, 0.13, 0.16}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}}, true);
registry.add("Yield/hDeltaInvMassDstar1D", "#Delta #it{M}_{inv} D* Candidate; inv. mass ((#pi #pi k) - (#pi k)) (GeV/#it{c}^{2}); entries", {HistType::kTH1F, {{100, 0.13, 0.16}}}, true);
registry.add("Yield/hInvMassDstar", "#Delta #it{M}_{inv} D* Candidate; inv. mass (#pi #pi k) (GeV/#it{c}^{2}); entries", {HistType::kTH1F, {{500, 0., 5.0}}}, true);
registry.add("Yield/hInvMassD0", "#it{M}_{inv}D^{0} candidate;#it{M}_{inv} D^{0} (GeV/#it{c});#it{p}_{T} (GeV/#it{c})", {HistType::kTH2F, {{500, 0., 5.0}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}}, true);
// only QA
registry.add("QA/hEtaDstar", "D* Candidate; D* Candidate #it{#eta};entries", {HistType::kTH2F, {{100, -2., 2.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hCtD0", "D0 Candidate; D0 Candidate's proper life time #it{c}#tau (cm) ; entries ", {HistType::kTH2F, {{120, -20., 100.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hDecayLengthD0", "D0 Candidate; D0 Candidate's decay length (cm); entries", {HistType::kTH2F, {{800, 0., 4.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hDecayLengthXYD0", "D0 Candidate; D0 Candidate's decay length xy (cm); entries", {HistType::kTH2F, {{800, 0., 4.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hDecayLengthNormalisedD0", "D0 Candidates;Do Candidate's normalised decay length (cm); entries", {HistType::kTH2F, {{800, 0., 40.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hDecayLengthXYNormalisedD0", "D0 candidate; D0 Candidate's normalised decay length xy (cm); entries", {HistType::kTH2F, {{800, 0., 40.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hCtD0", "D0 Candidate; D0 Candidate's proper life time #it{c}#tau (cm) ; entries ", {HistType::kTH2F, {{1000, -0.1, 14.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hDecayLengthD0", "D0 Candidate; D0 Candidate's decay length (cm); entries", {HistType::kTH2F, {axisDecayLength, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hDecayLengthXYD0", "D0 Candidate; D0 Candidate's decay length xy (cm); entries", {HistType::kTH2F, {axisDecayLength, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hDecayLengthNormalisedD0", "D0 Candidates;Do Candidate's normalised decay length (cm); entries", {HistType::kTH2F, {axisNormDecayLength, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hDecayLengthXYNormalisedD0", "D0 candidate; D0 Candidate's normalised decay length xy (cm); entries", {HistType::kTH2F, {axisNormDecayLength, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hCPAD0", "D0 Candidates; D0 Candidate's cosine pointing angle; entries", {HistType::kTH2F, {{110, -1., 1.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hCPAxyD0", "D0 candidates; D0 Candidate's cosine of pointing angle xy; entries", {HistType::kTH2F, {{110, -1., 1.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hImpactParameterXYD0", "D0 Candidates; D0 Candidate's reconstructed impact parameter xy (cm); entries", {HistType::kTH2F, {{200, -1., 1.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hDeltaIPMaxNormalisedD0", "D0 Candidate; D0 Candidate's Norm. Delta IP; entries", {HistType::kTH2F, {{200, -20., 20.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hSqSumProngesImpactParameterD0", "D0 Candidates; Sqr Sum of Impact params of D0 Pronges; enteries ", {HistType::kTH2F, {{100, 0., 1.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hDecayLengthErrorD0", "D0 Candidates; D0 Candidate's Decay Lenth Error (cm); entries", {HistType::kTH2F, {{100, 0., 1.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hDecayLengthXYErrorD0", "D0 Candidates; D0 Candidate's Decay Length Error XY (cm); entries", {HistType::kTH2F, {{100, 0., 1.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hImpactParameterError", "D0 Pronges; Impactparam error of different D0 Pronges (cm); entries", {HistType::kTH2F, {{100, 0., 1.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hd0Prong0", "Prong0; DCAxy of Prong0 (cm); entries", {HistType::kTH2F, {{100, -1., 1.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hd0Prong1", "Prong1; DCAxy of Prong1 (cm); entries", {HistType::kTH2F, {{100, -1., 1.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hd0ProngSoftPi", "ProngSoftPi; DCAxy of Prong Soft Pi (cm); entries", {HistType::kTH2F, {{100, -1., 1.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hImpactParameterXYD0", "D0 Candidates; D0 Candidate's reconstructed impact parameter xy (cm); entries", {HistType::kTH2F, {axisImpactParam, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hDeltaIPMaxNormalisedD0", "D0 Candidate; D0 Candidate's Norm. Delta IP; entries", {HistType::kTH2F, {{1000, -20., 20.}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hSqSumProngsImpactParameterD0", "D0 Candidates; Sqr Sum of Impact params of D0 Prongs; entries ", {HistType::kTH2F, {{1000, 0., 0.25}, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hDecayLengthErrorD0", "D0 Candidates; D0 Candidate's Decay Length Error (cm); entries", {HistType::kTH2F, {axisDecayLength, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hDecayLengthXYErrorD0", "D0 Candidates; D0 Candidate's Decay Length Error XY (cm); entries", {HistType::kTH2F, {axisDecayLength, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hImpactParameterError", "D0 Prongs; Impact param error of different D0 Prongs (cm); entries", {HistType::kTH2F, {axisImpactParam, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hd0Prong0", "Prong0; DCAxy of Prong0 (cm); entries", {HistType::kTH2F, {axisImpactParam, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hd0Prong1", "Prong1; DCAxy of Prong1 (cm); entries", {HistType::kTH2F, {axisImpactParam, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
registry.add("QA/hd0ProngSoftPi", "ProngSoftPi; DCAxy of Prong Soft Pi (cm); entries", {HistType::kTH2F, {axisImpactParam, {vecPtBins, "#it{p}_{T} (GeV/#it{c})"}}});
// MC Matching at Reconstruction Level Successful
registry.add("QA/hCPASkimD0RecSig", "MC Matched Skimed D* Candidates at Reconstruction Level; cosine of pointing angle", {HistType::kTH1F, {{110, -1.1, 1.1}}});
registry.add("QA/hEtaSkimD0RecSig", "MC Matched Skimed D* Candidates at Reconstruction Level; #it{#eta} of D0 Prong", {HistType::kTH1F, {{100, -2., 2.}}});
Expand Down Expand Up @@ -139,7 +147,7 @@ struct HfTaskDstarToD0Pi {
registry.fill(HIST("QA/hCPAxyD0"), candDstar.cpaXYD0(), candDstar.pt());
registry.fill(HIST("QA/hImpactParameterXYD0"), candDstar.impactParameterXYD0(), candDstar.pt());
registry.fill(HIST("QA/hDeltaIPMaxNormalisedD0"), candDstar.deltaIPNormalisedMaxD0(), candDstar.pt());
registry.fill(HIST("QA/hSqSumProngesImpactParameterD0"), candDstar.impactParameterProngSqSumD0(), candDstar.pt());
registry.fill(HIST("QA/hSqSumProngsImpactParameterD0"), candDstar.impactParameterProngSqSumD0(), candDstar.pt());
registry.fill(HIST("QA/hDecayLengthErrorD0"), candDstar.errorDecayLengthD0(), candDstar.pt());
registry.fill(HIST("QA/hDecayLengthXYErrorD0"), candDstar.errorDecayLengthXYD0(), candDstar.pt());
registry.fill(HIST("QA/hImpactParameterError"), candDstar.errorImpactParameter0(), candDstar.pt());
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/TableProducer/candidateSelectorDstarToD0Pi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ struct HfCandidateSelectorDstarToD0Pi {
if (candidate.chi2PCAD0() > cutsDstar->get(binPt, "chi2PCA")) {
return false;
}
if (candidate.impactParameterXYD0() > cutsD0->get(binPt, "DCA")) {
if (std::abs(candidate.impactParameterXYD0()) > cutsD0->get(binPt, "DCA")) {
return false;
}
// d0Prong0Normalised,1
Expand Down

0 comments on commit 375831a

Please sign in to comment.