From 7c6e5d283f4f9c3106c097fedbf9318ea8ea7641 Mon Sep 17 00:00:00 2001 From: spolitan Date: Sun, 5 Apr 2026 18:04:09 +0200 Subject: [PATCH] [PWGHF] Add single-track cuts to Hc creator --- .../dataCreatorHiddenCharmReduced.cxx | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/PWGHF/D2H/TableProducer/dataCreatorHiddenCharmReduced.cxx b/PWGHF/D2H/TableProducer/dataCreatorHiddenCharmReduced.cxx index 2e9a00bd6b5..c205258b3c6 100644 --- a/PWGHF/D2H/TableProducer/dataCreatorHiddenCharmReduced.cxx +++ b/PWGHF/D2H/TableProducer/dataCreatorHiddenCharmReduced.cxx @@ -83,11 +83,19 @@ struct HfDataCreatorHiddenCharmReduced { Configurable tpcNClsCrossedRowsMin{"tpcNClsCrossedRowsMin", 80, "Minimum number of crossed TPC rows"}; Configurable ptMinTrack{"ptMinTrack", 0.5, "Minimum proton-track pT"}; Configurable etaMaxTrack{"etaMaxTrack", 0.8, "Maximum proton-track |eta|"}; - Configurable momForCombinedPid{"momForCombinedPid", 0.75f, "Momentum threshold above which combined TPC+TOF proton PID is used"}; + Configurable trackChi2Cut{"trackChi2Cut", 4.f, "Maximum chi2/ncls in TPC"}; + Configurable trackMinChi2Cut{"trackMinChi2Cut", 0.f, "Minimum chi2/ncls in TPC"}; + Configurable trackMaxChi2ITS{"trackMaxChi2ITS", 36.f, "Maximum chi2/ncls in ITS"}; Configurable> binsPtTrack{"binsPtTrack", std::vector{hf_cuts_single_track::vecBinsPtTrack}, "Track pT bin limits for DCA cuts"}; Configurable> cutsTrack{"cutsTrack", {hf_cuts_single_track::CutsTrack[0], hf_cuts_single_track::NBinsPtTrack, hf_cuts_single_track::NCutVarsTrack, hf_cuts_single_track::labelsPtTrack, hf_cuts_single_track::labelsCutVarTrack}, "Single-track DCA selections per pT bin"}; + // DCA + Configurable> paramsDCAxyPtDep{"paramsDCAxyPtDep", std::vector{0.0010, 0.0080, 0.73}, "Parameters for pT-dependent DCAxy cut: p0, p1, p2 for cut = p0 + p1/pt^p2"}; + Configurable> paramsDCAzPtDep{"paramsDCAzPtDep", std::vector{-0.0044, 0.0152, 0.47}, "Parameters for pT-dependent DCAz cut: p0, p1, p2 for cut = p0 + p1/pt^p2"}; + // PID + Configurable momForCombinedPid{"momForCombinedPid", 0.75f, "Momentum threshold above which combined TPC+TOF proton PID is used"}; Configurable maxNsigmaTofPi{"maxNsigmaTofPi", 2.f, "Maximum pion n-sigma in TOF for proton rejection"}; Configurable maxNsigmaTofKa{"maxNsigmaTofKa", 2.f, "Maximum kaon n-sigma in TOF for proton rejection"}; + Configurable maxNsigmaTofPr{"maxNsigmaTofPr", 3.f, "Maximum proton n-sigma in TOF"}; Configurable maxNsigmaCombinedPr{"maxNsigmaCombinedPr", 3.f, "Maximum combined proton n-sigma from TPC and TOF"}; Configurable maxNsigmaTpcPi{"maxNsigmaTpcPi", 2.f, "Maximum pion n-sigma in TPC for proton rejection"}; Configurable maxNsigmaTpcKa{"maxNsigmaTpcKa", 2.f, "Maximum kaon n-sigma in TPC for proton rejection"}; @@ -148,6 +156,7 @@ struct HfDataCreatorHiddenCharmReduced { registry.add("hNSigmaTPCProton", "Selected proton tracks;#it{p}_{T}^{track} (GeV/#it{c});n#sigma_{TPC}", {HistType::kTH2D, {axisPt, axisNSigma}}); registry.add("hNSigmaTOFProton", "Selected proton tracks;#it{p}_{T}^{track} (GeV/#it{c});n#sigma_{TOF}", {HistType::kTH2D, {axisPt, axisNSigma}}); registry.add("hInvMass", "Invariant mass of selected proton with all other tracks in the event;#it{p}_{T}^{proton} (GeV/#it{c});invariant mass with other tracks (GeV/#it{c}^{2})", {HistType::kTH2D, {axisPt, AxisSpec{100, 2.85, 3.25, "invariant mass with other tracks (GeV/#it{c}^{2})"}}}); + registry.add("hDeDxTPCProton", "Selected proton tracks;#it{p}_{T}^{track} (GeV/#it{c});TPC dE/dx (a.u.)", {HistType::kTH2D, {axisPt, AxisSpec{100, 0., 200., "TPC dE/dx (a.u.)"}}}); } // init HF event selection helper @@ -163,6 +172,11 @@ struct HfDataCreatorHiddenCharmReduced { } } + static float dcaSigma(float const& pt, float const& p0, float const& p1, float const& p2) + { + return p0 + p1 / std::pow(std::abs(pt), p2); + } + template bool isSelectedPid(TTrack const& track) const { @@ -188,10 +202,17 @@ struct HfDataCreatorHiddenCharmReduced { bool rejectAsPion = false; bool rejectAsKaon = false; - if (mom < momForCombinedPid || !hasTOF) { + if (mom < momForCombinedPid) { isProton = std::abs(nSigmaTPCPr) < maxNsigmaTpcPr; rejectAsPion = std::abs(nSigmaTPCPi) < maxNsigmaTpcPi; rejectAsKaon = std::abs(nSigmaTPCKa) < maxNsigmaTpcKa; + + if (hasTOF) { + rejectAsPion = rejectAsPion || std::abs(track.tofNSigmaPi()) < maxNsigmaTofPi; + rejectAsKaon = rejectAsKaon || std::abs(track.tofNSigmaKa()) < maxNsigmaTofKa; + isProton = isProton || std::abs(track.tofNSigmaPr()) < maxNsigmaCombinedPr; + } + } else { const float nSigmaTOFPr = track.tofNSigmaPr(); const float nSigmaTOFPi = track.tofNSigmaPi(); @@ -211,6 +232,11 @@ struct HfDataCreatorHiddenCharmReduced { const int itsNClsMin = config.itsNClsMin.value; const double etaMaxTrack = config.etaMaxTrack.value; const double ptMinTrack = config.ptMinTrack.value; + const float trackChi2Cut = config.trackChi2Cut.value; + const float trackMinChi2Cut = config.trackMinChi2Cut.value; + const float trackMaxChi2ITS = config.trackMaxChi2ITS.value; + const float dcaXY = track.dcaXY(); + const float dcaZ = track.dcaZ(); if (!track.isGlobalTrackWoDCA()) { return false; @@ -224,6 +250,12 @@ struct HfDataCreatorHiddenCharmReduced { if (track.itsNCls() < itsNClsMin) { return false; } + if (track.tpcChi2NCl() > trackChi2Cut || track.tpcChi2NCl() < trackMinChi2Cut) { + return false; + } + if (track.itsChi2NCl() > trackMaxChi2ITS) { + return false; + } if (std::abs(track.eta()) > etaMaxTrack) { return false; } @@ -233,6 +265,9 @@ struct HfDataCreatorHiddenCharmReduced { if (!isSelectedTrackDca(config.binsPtTrack, config.cutsTrack, track.pt(), track.dcaXY(), track.dcaZ())) { return false; } + if (dcaSigma(track.pt(), config.paramsDCAxyPtDep.value[0], config.paramsDCAxyPtDep.value[1], config.paramsDCAxyPtDep.value[2]) > std::abs(dcaXY) || dcaSigma(track.pt(), config.paramsDCAzPtDep.value[0], config.paramsDCAzPtDep.value[1], config.paramsDCAzPtDep.value[2]) > std::abs(dcaZ)) { + return false; + } return isSelectedPid(track); } @@ -276,6 +311,7 @@ struct HfDataCreatorHiddenCharmReduced { registry.fill(HIST("hEtaCutsProton"), trk.eta()); registry.fill(HIST("hDCAToPrimXYVsPtCutsProton"), trk.pt(), trk.dcaXY()); registry.fill(HIST("hNSigmaTPCProton"), trk.pt(), trk.tpcNSigmaPr()); + registry.fill(HIST("hDeDxTPCProton"), trk.pt(), trk.tpcSignal()); if (trk.hasTOF()) { registry.fill(HIST("hNSigmaTOFProton"), trk.pt(), trk.tofNSigmaPr()); }