From f9c413241db0af65021b4bab3c5bc538174e0843 Mon Sep 17 00:00:00 2001 From: cterrevo Date: Wed, 25 Oct 2023 15:34:41 +0200 Subject: [PATCH] PWGHF: D0 selector: Improve cut on normalised daughter imp. par. and decay length (#3678) * hard-coded cuts removed * hardcut removed. impPard0 added to matrix * PWGHF: fix d0norm name and removed DL2 * PWGHF: fit name dauImpPar * PWGHF: D0 selector: fix nomenclature DLXY * PWGHF: D0 selector: add max to DL xy * Please consider the following formatting changes --------- Co-authored-by: ALICE Action Bot --- PWGHF/Core/SelectorCuts.h | 54 ++++++++++----------- PWGHF/TableProducer/candidateSelectorD0.cxx | 18 +++---- 2 files changed, 33 insertions(+), 39 deletions(-) diff --git a/PWGHF/Core/SelectorCuts.h b/PWGHF/Core/SelectorCuts.h index bccf1c72fcd..71fc2808c97 100644 --- a/PWGHF/Core/SelectorCuts.h +++ b/PWGHF/Core/SelectorCuts.h @@ -212,7 +212,7 @@ static const std::vector labelsCutVar = {"deltaMassMax", "deltaMass namespace hf_cuts_d0_to_pi_k { static constexpr int nBinsPt = 25; -static constexpr int nCutVars = 14; +static constexpr int nCutVars = 15; // 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] = { @@ -245,31 +245,31 @@ constexpr double binsPt[nBinsPt + 1] = { auto vecBinsPt = std::vector{binsPt, binsPt + nBinsPt + 1}; // default values for the cuts -constexpr double cuts[nBinsPt][nCutVars] = {{0.400, 350. * 1E-4, 0.8, 0.5, 0.5, 1000. * 1E-4, 1000. * 1E-4, -5000. * 1E-8, 0.80, 0., 0., 10., 10., 0.06}, /* 0 < pT < 0.5 */ - {0.400, 350. * 1E-4, 0.8, 0.5, 0.5, 1000. * 1E-4, 1000. * 1E-4, -5000. * 1E-8, 0.80, 0., 0., 10., 10., 0.06}, /* 0.5 < pT < 1 */ - {0.400, 300. * 1E-4, 0.8, 0.4, 0.4, 1000. * 1E-4, 1000. * 1E-4, -25000. * 1E-8, 0.80, 0., 0., 10., 10., 0.06}, /* 1 < pT < 1.5 */ - {0.400, 300. * 1E-4, 0.8, 0.4, 0.4, 1000. * 1E-4, 1000. * 1E-4, -25000. * 1E-8, 0.80, 0., 0., 10., 10., 0.06}, /* 1.5 < pT < 2 */ - {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -20000. * 1E-8, 0.90, 0., 0., 10., 10., 0.06}, /* 2 < pT < 2.5 */ - {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -20000. * 1E-8, 0.90, 0., 0., 10., 10., 0.06}, /* 2.5 < pT < 3 */ - {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -12000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 3 < pT < 3.5 */ - {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -12000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 3.5 < pT < 4 */ - {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -8000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 4 < pT < 4.5 */ - {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -8000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 4.5 < pT < 5 */ - {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -8000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 5 < pT < 5.5 */ - {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -8000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 5.5 < pT < 6 */ - {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -8000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 6 < pT < 6.5 */ - {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -8000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 6.5 < pT < 7 */ - {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -7000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 7 < pT < 7.5 */ - {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -7000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 7.5 < pT < 8 */ - {0.400, 300. * 1E-4, 0.9, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -5000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 8 < pT < 9 */ - {0.400, 300. * 1E-4, 0.9, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -5000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 9 < pT < 10 */ - {0.400, 300. * 1E-4, 0.9, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -5000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 10 < pT < 12 */ - {0.400, 300. * 1E-4, 1.0, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, 10000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 12 < pT < 16 */ - {0.400, 300. * 1E-4, 1.0, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, 999999. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 16 < pT < 20 */ - {0.400, 300. * 1E-4, 1.0, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, 999999. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 20 < pT < 24 */ - {0.400, 300. * 1E-4, 1.0, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, 999999. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 24 < pT < 36 */ - {0.400, 300. * 1E-4, 1.0, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, 999999. * 1E-8, 0.85, 0., 0., 10., 10., 0.06}, /* 36 < pT < 50 */ - {0.400, 300. * 1E-4, 1.0, 0.6, 0.6, 1000. * 1E-4, 1000. * 1E-4, 999999. * 1E-8, 0.80, 0., 0., 10., 10., 0.06}}; /* 50 < pT < 100 */ +constexpr double cuts[nBinsPt][nCutVars] = {{0.400, 350. * 1E-4, 0.8, 0.5, 0.5, 1000. * 1E-4, 1000. * 1E-4, -5000. * 1E-8, 0.80, 0., 0., 10., 10., 0.06, 0.5}, /* 0 < pT < 0.5 */ + {0.400, 350. * 1E-4, 0.8, 0.5, 0.5, 1000. * 1E-4, 1000. * 1E-4, -5000. * 1E-8, 0.80, 0., 0., 10., 10., 0.06, 0.5}, /* 0.5 < pT < 1 */ + {0.400, 300. * 1E-4, 0.8, 0.4, 0.4, 1000. * 1E-4, 1000. * 1E-4, -25000. * 1E-8, 0.80, 0., 0., 10., 10., 0.06, 0.5}, /* 1 < pT < 1.5 */ + {0.400, 300. * 1E-4, 0.8, 0.4, 0.4, 1000. * 1E-4, 1000. * 1E-4, -25000. * 1E-8, 0.80, 0., 0., 10., 10., 0.06, 0.5}, /* 1.5 < pT < 2 */ + {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -20000. * 1E-8, 0.90, 0., 0., 10., 10., 0.06, 0.5}, /* 2 < pT < 2.5 */ + {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -20000. * 1E-8, 0.90, 0., 0., 10., 10., 0.06, 0.5}, /* 2.5 < pT < 3 */ + {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -12000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 3 < pT < 3.5 */ + {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -12000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 3.5 < pT < 4 */ + {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -8000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 4 < pT < 4.5 */ + {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -8000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 4.5 < pT < 5 */ + {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -8000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 5 < pT < 5.5 */ + {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -8000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 5.5 < pT < 6 */ + {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -8000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 6 < pT < 6.5 */ + {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -8000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 6.5 < pT < 7 */ + {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -7000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 7 < pT < 7.5 */ + {0.400, 300. * 1E-4, 0.8, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -7000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 7.5 < pT < 8 */ + {0.400, 300. * 1E-4, 0.9, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -5000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 8 < pT < 9 */ + {0.400, 300. * 1E-4, 0.9, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -5000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 9 < pT < 10 */ + {0.400, 300. * 1E-4, 0.9, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, -5000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 10 < pT < 12 */ + {0.400, 300. * 1E-4, 1.0, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, 10000. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 12 < pT < 16 */ + {0.400, 300. * 1E-4, 1.0, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, 999999. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 16 < pT < 20 */ + {0.400, 300. * 1E-4, 1.0, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, 999999. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 20 < pT < 24 */ + {0.400, 300. * 1E-4, 1.0, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, 999999. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 24 < pT < 36 */ + {0.400, 300. * 1E-4, 1.0, 0.7, 0.7, 1000. * 1E-4, 1000. * 1E-4, 999999. * 1E-8, 0.85, 0., 0., 10., 10., 0.06, 0.5}, /* 36 < pT < 50 */ + {0.400, 300. * 1E-4, 1.0, 0.6, 0.6, 1000. * 1E-4, 1000. * 1E-4, 999999. * 1E-8, 0.80, 0., 0., 10., 10., 0.06, 0.5}}; /* 50 < pT < 100 */ // row labels static const std::vector labelsPt = { @@ -300,7 +300,7 @@ static const std::vector labelsPt = { "pT bin 24"}; // column labels -static const std::vector labelsCutVar = {"m", "DCA", "cos theta*", "pT K", "pT Pi", "d0K", "d0pi", "d0d0", "cos pointing angle", "cos pointing angle xy", "normalized decay length XY", "decay length", "decay length XY", "minimum decay length"}; +static const std::vector labelsCutVar = {"m", "DCA", "cos theta*", "pT K", "pT Pi", "d0K", "d0pi", "d0d0", "cos pointing angle", "cos pointing angle xy", "min norm decay length XY", "max decay length", "max decay length XY", "min decay length", "norm dauImpPar XY"}; } // namespace hf_cuts_d0_to_pi_k namespace hf_cuts_lc_to_p_k_pi diff --git a/PWGHF/TableProducer/candidateSelectorD0.cxx b/PWGHF/TableProducer/candidateSelectorD0.cxx index 4c0d035597f..497704bc7e5 100644 --- a/PWGHF/TableProducer/candidateSelectorD0.cxx +++ b/PWGHF/TableProducer/candidateSelectorD0.cxx @@ -148,7 +148,7 @@ struct HfCandidateSelectorD0 { return false; } // normalised decay length in XY plane - if (candidate.decayLengthXYNormalised() < cuts->get(pTBin, "normalized decay length XY")) { + if (candidate.decayLengthXYNormalised() < cuts->get(pTBin, "min norm decay length XY")) { return false; } // candidate DCA @@ -158,25 +158,19 @@ struct HfCandidateSelectorD0 { // if constexpr (reconstructionType == aod::hf_cand::VertexerType::KfParticle) { // if (candidate.kfTopolChi2OverNdf() > cuts->get(pTBin, "topological chi2overndf as D0")) return false; // } - - // decay exponentail law, with tau = beta*gamma*ctau - // decay length > ctau retains (1-1/e) - if (std::abs(candidate.impactParameterNormalised0()) < 0.5 || std::abs(candidate.impactParameterNormalised1()) < 0.5) { + if (std::abs(candidate.impactParameterNormalised0()) < cuts->get(pTBin, "norm dauImpPar XY") || std::abs(candidate.impactParameterNormalised1()) < cuts->get(pTBin, "norm dauImpPar XY")) { return false; } - double decayLengthCut = std::min((candidate.p() * 0.0066) + 0.01, cuts->get(pTBin, "minimum decay length")); - if (candidate.decayLength() * candidate.decayLength() < decayLengthCut * decayLengthCut) { + if (candidate.decayLength() < cuts->get(pTBin, "min decay length")) { return false; } - if (candidate.decayLength() > cuts->get(pTBin, "decay length")) { + if (candidate.decayLength() > cuts->get(pTBin, "max decay length")) { return false; } - if (candidate.decayLengthXY() > cuts->get(pTBin, "decay length XY")) { + if (candidate.decayLengthXY() > cuts->get(pTBin, "max decay length XY")) { return false; } - if (candidate.decayLengthNormalised() * candidate.decayLengthNormalised() < 1.0) { - // return false; // add back when getter fixed - } + return true; }