From 6191707c76a749437ce8c8b81d76003b58740ee0 Mon Sep 17 00:00:00 2001 From: Panos Christakoglou Date: Sun, 31 Oct 2021 14:45:33 +0100 Subject: [PATCH 1/2] Adding chi2pca --- PWGHF/Core/HFSelectorCuts.h | 30 ++++++++--------- .../HFLbToLcPiCandidateSelector.cxx | 12 +++++-- PWGHF/Tasks/taskLb.cxx | 33 ++++++++++++------- 3 files changed, 45 insertions(+), 30 deletions(-) diff --git a/PWGHF/Core/HFSelectorCuts.h b/PWGHF/Core/HFSelectorCuts.h index 7252b9aeb3f..5f18d65cfcc 100644 --- a/PWGHF/Core/HFSelectorCuts.h +++ b/PWGHF/Core/HFSelectorCuts.h @@ -540,7 +540,7 @@ static const std::vector cutVarLabels = {"m", "CPA", "d0 D0", "d0 P namespace hf_cuts_lb_tolcpi { static constexpr int npTBins = 12; -static constexpr int nCutVars = 11; +static constexpr int nCutVars = 12; // 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 pTBins[npTBins + 1] = { @@ -561,19 +561,19 @@ constexpr double pTBins[npTBins + 1] = { auto pTBins_v = std::vector{pTBins, pTBins + npTBins + 1}; // default values for the cuts -// DeltaM CPA d0Lc d0Pi pTLc pTPi LbDecayLength LbDecayLengthXY IPProd DeltaMLc CthetaStr -constexpr double cuts[npTBins][nCutVars] = {{1., 0.8, 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 0 < pt < 0.5 */ - {1., 0.8, 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 0.5 < pt < 1 */ - {1., 0.8, 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 1 < pt < 2 */ - {1., 0.8, 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 2 < pt < 3 */ - {1., 0.8, 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 3 < pt < 4 */ - {1., 0.8, 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 4 < pt < 5 */ - {1., 0.8, 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 5 < pt < 7 */ - {1., 0.8, 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 7 < pt < 10 */ - {1., 0.8, 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 10 < pt < 13 */ - {1., 0.8, 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 13 < pt < 16 */ - {1., 0.8, 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 16 < pt < 20 */ - {1., 0.8, 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}}; /* 20 < pt < 24 */ +// DeltaM CPA chi2PCA d0Lc d0Pi pTLc pTPi LbDecayLength LbDecayLengthXY IPProd DeltaMLc CthetaStr +constexpr double cuts[npTBins][nCutVars] = {{1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 0 < pt < 0.5 */ + {1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 0.5 < pt < 1 */ + {1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 1 < pt < 2 */ + {1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 2 < pt < 3 */ + {1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 3 < pt < 4 */ + {1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 4 < pt < 5 */ + {1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 5 < pt < 7 */ + {1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 7 < pt < 10 */ + {1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 10 < pt < 13 */ + {1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 13 < pt < 16 */ + {1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}, /* 16 < pt < 20 */ + {1., 0.8, 1., 0.01, 0.01, 1.0, 0.15, 0.05, 0.05, 0., 0.1, 0.8}}; /* 20 < pt < 24 */ // row labels static const std::vector pTBinLabels = { "pT bin 0", @@ -590,7 +590,7 @@ static const std::vector pTBinLabels = { "pT bin 11"}; // column labels -static const std::vector cutVarLabels = {"m", "CPA", "d0 Lc+", "d0 Pi", "pT Lc+", "pT Pi", "Lb decLen", "Lb decLenXY", "Imp. Par. Product", "DeltaMLc", "Cos ThetaStar"}; +static const std::vector cutVarLabels = {"m", "CPA", "Chi2PCA", "d0 Lc+", "d0 Pi", "pT Lc+", "pT Pi", "Lb decLen", "Lb decLenXY", "Imp. Par. Product", "DeltaMLc", "Cos ThetaStar"}; } // namespace hf_cuts_lb_tolcpi namespace hf_cuts_x_tojpsipipi diff --git a/PWGHF/TableProducer/HFLbToLcPiCandidateSelector.cxx b/PWGHF/TableProducer/HFLbToLcPiCandidateSelector.cxx index 718e3e51ab8..73caa8fafd3 100644 --- a/PWGHF/TableProducer/HFLbToLcPiCandidateSelector.cxx +++ b/PWGHF/TableProducer/HFLbToLcPiCandidateSelector.cxx @@ -102,6 +102,12 @@ struct HfLbToLcPiCandidateSelector { return false; } + //Lb chi2PCA cut + if (hfCandLb.chi2PCA() > cuts->get(pTBin, "Chi2PCA")) { + //Printf("Lb selection failed at chi2PCA"); + return false; + } + //Lb CPA cut if (hfCandLb.cpa() < cuts->get(pTBin, "CPA")) { return false; @@ -113,9 +119,9 @@ struct HfLbToLcPiCandidateSelector { } //d0 of Lc+ - //if(std::abs(hfCandLb.impactParameter0()) > cuts->get(pTBin, "d0 Lc+")){ - //return false; - //} + if(std::abs(hfCandLb.impactParameter0()) < cuts->get(pTBin, "d0 Lc+")){ + return false; + } return true; } diff --git a/PWGHF/Tasks/taskLb.cxx b/PWGHF/Tasks/taskLb.cxx index 0ec364e765f..9afc129f70a 100644 --- a/PWGHF/Tasks/taskLb.cxx +++ b/PWGHF/Tasks/taskLb.cxx @@ -133,12 +133,12 @@ struct HfTaskLbMc { registry.add("hYProng1Gen", "MC particles (matched);prong 1 (#pi^{-}) #it{y}^{gen};entries", {HistType::kTH2F, {{100, -2, 2}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); registry.add("hEtaProng0Gen", "MC particles (matched);prong 0 (#Lambda_{b}^{0}) #it{#eta}^{gen};entries", {HistType::kTH2F, {{100, -2, 2}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); registry.add("hEtaProng1Gen", "MC particles (matched);prong 1 (#pi^{-}) #it{#eta}^{gen};entries", {HistType::kTH2F, {{100, -2, 2}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); - registry.add("hCPARecSig", "#Lambda_{b}^{0} candidates (matched);#Lambda_{b}^{0} candidate cosine of pointing angle;entries", {HistType::kTH2F, {{110, -1.1, 1.1}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); - registry.add("hCPARecBg", "#Lambda_{b}^{0} candidates (unmatched);#Lambda_{b}^{0} candidate cosine of pointing angle;entries", {HistType::kTH2F, {{110, -1.1, 1.1}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); - registry.add("hCPAxyRecSig", "#Lambda_{b}^{0} candidates (matched);#Lambda_{b}^{0} candidate CPAxy;entries", {HistType::kTH2F, {{110, -1.1, 1.1}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); - registry.add("hCPAxyRecBg", "#Lambda_{b}^{0} candidates (unmatched);#Lambda_{b}^{0} candidate CPAxy;entries", {HistType::kTH2F, {{110, -1.1, 1.1}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); - registry.add("hCPARecSigD0", "#Lambda_{b}^{0} candidates (matched);prong 0 (#Lambda_{c}^{+}) cosine of pointing angle;entries", {HistType::kTH2F, {{110, -1.1, 1.1}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); - registry.add("hCPARecBgD0", "#Lambda_{b}^{0} candidates (unmatched);prong 0 (#Lambda_{c}^{+}) cosine of pointing angle;entries", {HistType::kTH2F, {{110, -1.1, 1.1}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); + registry.add("hCPARecSig", "#Lambda_{b}^{0} candidates (matched);#Lambda_{b}^{0} candidate cosine of pointing angle;entries", {HistType::kTH2F, {{220, 0., 1.1}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); + registry.add("hCPARecBg", "#Lambda_{b}^{0} candidates (unmatched);#Lambda_{b}^{0} candidate cosine of pointing angle;entries", {HistType::kTH2F, {{220, 0., 1.1}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); + registry.add("hCPAxyRecSig", "#Lambda_{b}^{0} candidates (matched);#Lambda_{b}^{0} candidate CPAxy;entries", {HistType::kTH2F, {{220, 0., 1.1}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); + registry.add("hCPAxyRecBg", "#Lambda_{b}^{0} candidates (unmatched);#Lambda_{b}^{0} candidate CPAxy;entries", {HistType::kTH2F, {{220, 0., 1.1}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); + registry.add("hCPALcRecSig", "#Lambda_{b}^{0} candidates (matched);prong 0 (#Lambda_{c}^{+}) cosine of pointing angle;entries", {HistType::kTH2F, {{220, 0., 1.1}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); + registry.add("hCPALcRecBg", "#Lambda_{b}^{0} candidates (unmatched);prong 0 (#Lambda_{c}^{+}) cosine of pointing angle;entries", {HistType::kTH2F, {{220, 0., 1.1}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); registry.add("hEtaRecSig", "#Lambda_{b}^{0} candidates (matched);#Lambda_{b}^{0} candidate #it{#eta};entries", {HistType::kTH2F, {{100, -2., 2.}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); registry.add("hEtaRecBg", "#Lambda_{b}^{0} candidates (unmatched);#Lambda_{b}^{0} candidate #it{#eta};entries", {HistType::kTH2F, {{100, -2., 2.}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); registry.add("hRapidityRecSig", "#Lambda_{b}^{0} candidates (matched);#Lambda_{b}^{0} candidate #it{y};entries", {HistType::kTH2F, {{100, -2., 2.}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); @@ -158,12 +158,17 @@ struct HfTaskLbMc { registry.add("hDecLengthXYRecSig", "#Lambda_{b}^{0} candidates (matched);#Lambda_{b}^{0} candidate decay length xy (cm);entries", {HistType::kTH2F, {{100, 0., 0.5}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); registry.add("hDecLengthRecBg", "#Lambda_{b}^{0} candidates (unmatched);#Lambda_{b}^{0} candidate decay length (cm);entries", {HistType::kTH2F, {{100, 0., 0.5}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); registry.add("hDecLengthXYRecBg", "#Lambda_{b}^{0} candidates (unmatched);#Lambda_{b}^{0} candidate decay length xy(cm);entries", {HistType::kTH2F, {{100, 0., 0.5}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); - registry.add("hDecLengthD0RecSig", "#Lambda_{b}^{0} candidates (matched);#Lambda_{b}^{0} candidate decay length (cm);entries", {HistType::kTH2F, {{100, 0., 0.5}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); - registry.add("hDecLengthD0RecBg", "#Lambda_{b}^{0} candidates (unmatched);#Lambda_{b}^{0} candidate decay length (cm);entries", {HistType::kTH2F, {{100, 0., 0.5}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); + registry.add("hDecLengthLcRecSig", "#Lambda_{b}^{0} candidates (matched);#Lambda_{b}^{0} candidate decay length (cm);entries", {HistType::kTH2F, {{100, 0., 0.5}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); + registry.add("hDecLengthLcRecBg", "#Lambda_{b}^{0} candidates (unmatched);#Lambda_{b}^{0} candidate decay length (cm);entries", {HistType::kTH2F, {{100, 0., 0.5}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); registry.add("hDecLengthNormRecSig", "#Lambda_{b}^{0} candidates (matched);#Lambda_{b}^{0} candidate decay length (cm);entries", {HistType::kTH2F, {{100, 0., 0.5}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); registry.add("hDecLengthNormRecBg", "#Lambda_{b}^{0} candidates (unmatched);#Lambda_{b}^{0} candidate decay length (cm);entries", {HistType::kTH2F, {{100, 0., 0.5}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); registry.add("hImpParProdLbRecSig", "#Lambda_{b}^{0} candidates (matched);#Lambda_{b}^{0} candidate impact parameter product ;entries", {HistType::kTH2F, {{100, -0.5, 0.5}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); registry.add("hImpParProdLbRecBg", "#Lambda_{b}^{0} candidates (unmatched);#Lambda_{b}^{0} candidate impact parameter product ;entries", {HistType::kTH2F, {{100, -0.5, 0.5}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); + + registry.add("hChi2PCARecSig", "#Lambda_{b}^{0} candidates (matched);sum of distances of the secondary vertex to its prongs;entries", {HistType::kTH2F, {{240, -0.01, 0.1}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); + registry.add("hChi2PCARecBg", "#Lambda_{b}^{0} candidates (unmatched);sum of distances of the secondary vertex to its prongs;entries", {HistType::kTH2F, {{240, -0.01, 0.1}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); + registry.add("hThetaStarRecSig", "#Lambda_{b}^{0} candidates (matched);#Lambda_{b}^{0} #cos(#theta^{*});entries", {HistType::kTH2F, {{110, -1.1, 1.1}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); + registry.add("hThetaStarRecBg", "#Lambda_{b}^{0} candidates (unmatched);#Lambda_{b}^{0} #cos(#theta^{*});entries", {HistType::kTH2F, {{110, -1.1, 1.1}, {(std::vector)bins, "#it{p}_{T} (GeV/#it{c})"}}}); } Filter filterSelectCandidates = (aod::hf_selcandidate_lb::isSelLbToLcPi >= selectionFlagLb); @@ -200,8 +205,10 @@ struct HfTaskLbMc { registry.fill(HIST("hPtProng1RecSig"), candidate.ptProng1(), candidate.pt()); registry.fill(HIST("hImpParProdLbRecSig"), candidate.impactParameterProduct(), candidate.pt()); registry.fill(HIST("hDecLengthNormRecSig"), candidate.decayLengthXYNormalised(), candidate.pt()); - registry.fill(HIST("hCPARecSigD0"), candLc.cpa(), candidate.pt()); - registry.fill(HIST("hDecLengthD0RecSig"), candLc.decayLength(), candidate.pt()); + registry.fill(HIST("hCPALcRecSig"), candLc.cpa(), candidate.pt()); + registry.fill(HIST("hDecLengthLcRecSig"), candLc.decayLength(), candidate.pt()); + registry.fill(HIST("hChi2PCARecSig"), candidate.chi2PCA(), candidate.pt()); + //registry.fill(HIST("hThetaStarRecSig"), candidate.cosThetaStar(), candidate.pt()); } else { registry.fill(HIST("hPtRecBg"), candidate.pt()); registry.fill(HIST("hCPARecBg"), candidate.cpa(), candidate.pt()); @@ -217,8 +224,10 @@ struct HfTaskLbMc { registry.fill(HIST("hPtProng1RecBg"), candidate.ptProng1(), candidate.pt()); registry.fill(HIST("hImpParProdLbRecBg"), candidate.impactParameterProduct(), candidate.pt()); registry.fill(HIST("hDecLengthNormRecBg"), candidate.decayLengthXYNormalised(), candidate.pt()); - registry.fill(HIST("hCPARecBgD0"), candLc.cpa(), candidate.pt()); - registry.fill(HIST("hDecLengthD0RecBg"), candLc.decayLength(), candidate.pt()); + registry.fill(HIST("hCPALcRecBg"), candLc.cpa(), candidate.pt()); + registry.fill(HIST("hDecLengthLcRecBg"), candLc.decayLength(), candidate.pt()); + registry.fill(HIST("hChi2PCARecBg"), candidate.chi2PCA(), candidate.pt()); + //registry.fill(HIST("hThetaStarRecBg"), candidate.cosThetaStar(), candidate.pt()); } } // rec From 3e9fad51ebeb6647c9b0d220036b6bfa56351fc5 Mon Sep 17 00:00:00 2001 From: Panos Christakoglou Date: Sun, 31 Oct 2021 14:47:35 +0100 Subject: [PATCH 2/2] Format changes --- PWGHF/TableProducer/HFLbToLcPiCandidateSelector.cxx | 4 ++-- PWGHF/Tasks/taskLb.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGHF/TableProducer/HFLbToLcPiCandidateSelector.cxx b/PWGHF/TableProducer/HFLbToLcPiCandidateSelector.cxx index 73caa8fafd3..0565b1b85a2 100644 --- a/PWGHF/TableProducer/HFLbToLcPiCandidateSelector.cxx +++ b/PWGHF/TableProducer/HFLbToLcPiCandidateSelector.cxx @@ -104,7 +104,7 @@ struct HfLbToLcPiCandidateSelector { //Lb chi2PCA cut if (hfCandLb.chi2PCA() > cuts->get(pTBin, "Chi2PCA")) { - //Printf("Lb selection failed at chi2PCA"); + //Printf("Lb selection failed at chi2PCA"); return false; } @@ -119,7 +119,7 @@ struct HfLbToLcPiCandidateSelector { } //d0 of Lc+ - if(std::abs(hfCandLb.impactParameter0()) < cuts->get(pTBin, "d0 Lc+")){ + if (std::abs(hfCandLb.impactParameter0()) < cuts->get(pTBin, "d0 Lc+")) { return false; } diff --git a/PWGHF/Tasks/taskLb.cxx b/PWGHF/Tasks/taskLb.cxx index 9afc129f70a..74d8f616378 100644 --- a/PWGHF/Tasks/taskLb.cxx +++ b/PWGHF/Tasks/taskLb.cxx @@ -208,7 +208,7 @@ struct HfTaskLbMc { registry.fill(HIST("hCPALcRecSig"), candLc.cpa(), candidate.pt()); registry.fill(HIST("hDecLengthLcRecSig"), candLc.decayLength(), candidate.pt()); registry.fill(HIST("hChi2PCARecSig"), candidate.chi2PCA(), candidate.pt()); - //registry.fill(HIST("hThetaStarRecSig"), candidate.cosThetaStar(), candidate.pt()); + //registry.fill(HIST("hThetaStarRecSig"), candidate.cosThetaStar(), candidate.pt()); } else { registry.fill(HIST("hPtRecBg"), candidate.pt()); registry.fill(HIST("hCPARecBg"), candidate.cpa(), candidate.pt());