From 4f395180726ce19737492b0e56888fbfd7fafb55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Fri, 22 Jan 2021 18:00:17 +0100 Subject: [PATCH] =?UTF-8?q?PWGHF:=20Little=20fix=20of=20the=20J/=CF=88=20?= =?UTF-8?q?=E2=86=92=20e+=20e-=20code.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix usage of `std::move`. - Use only positive match flag since, J/ψ is its own antiparticle. - Fix comments. --- .../Tasks/PWGHF/HFCandidateCreator2Prong.cxx | 20 ++++++++++--------- .../PWGHF/HFJpsiToEECandidateSelector.cxx | 6 +----- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Analysis/Tasks/PWGHF/HFCandidateCreator2Prong.cxx b/Analysis/Tasks/PWGHF/HFCandidateCreator2Prong.cxx index ddcfa3c509d46..3f5058f867e85 100644 --- a/Analysis/Tasks/PWGHF/HFCandidateCreator2Prong.cxx +++ b/Analysis/Tasks/PWGHF/HFCandidateCreator2Prong.cxx @@ -159,14 +159,15 @@ struct HFCandidateCreator2ProngMC { // D0(bar) → π± K∓ //Printf("Checking D0(bar) → π± K∓"); - if (RecoDecay::getMatchedMCRec(particlesMC, std::move(arrayDaughters), 421, array{+kPiPlus, -kKPlus}, true, &sign) > -1) { + if (RecoDecay::getMatchedMCRec(particlesMC, arrayDaughters, 421, array{+kPiPlus, -kKPlus}, true, &sign) > -1) { result = sign * D0ToPiK; } - // Jpsi → e+e- + + // J/ψ → e+ e- if (result == N2ProngDecays) { - //Printf("Checking Jpsi → e+e-"); - if (RecoDecay::getMatchedMCRec(particlesMC, std::move(arrayDaughters), 443, array{+kElectron, -kElectron}, true, &sign) > -1) { - result = sign * JpsiToEE; + //Printf("Checking J/ψ → e+ e-"); + if (RecoDecay::getMatchedMCRec(particlesMC, std::move(arrayDaughters), 443, array{+kElectron, -kElectron}, true) > -1) { + result = JpsiToEE; } } @@ -183,11 +184,12 @@ struct HFCandidateCreator2ProngMC { if (RecoDecay::isMatchedMCGen(particlesMC, particle, 421, array{+kPiPlus, -kKPlus}, true, &sign)) { result = sign * D0ToPiK; } - // Jpsi → e+e- + + // J/ψ → e+ e- if (result == N2ProngDecays) { - //Printf("Checking Jpsi → e+e-"); - if (RecoDecay::isMatchedMCGen(particlesMC, particle, 443, array{+kElectron, -kElectron}, true, &sign)) { - result = sign * JpsiToEE; + //Printf("Checking J/ψ → e+ e-"); + if (RecoDecay::isMatchedMCGen(particlesMC, particle, 443, array{+kElectron, -kElectron}, true)) { + result = JpsiToEE; } } diff --git a/Analysis/Tasks/PWGHF/HFJpsiToEECandidateSelector.cxx b/Analysis/Tasks/PWGHF/HFJpsiToEECandidateSelector.cxx index 4d04d60e99364..ff59e8d5072f5 100644 --- a/Analysis/Tasks/PWGHF/HFJpsiToEECandidateSelector.cxx +++ b/Analysis/Tasks/PWGHF/HFJpsiToEECandidateSelector.cxx @@ -134,11 +134,9 @@ struct HFJpsiToEECandidateSelector { return true; } - /// Check if track is compatible with given TPC Nsigma cut for a given flavour hypothesis + /// Check if track is compatible with given TPC Nsigma cut for the electron hypothesis /// \param track is the track - /// \param nPDG is the flavour hypothesis PDG number /// \param nSigmaCut is the nsigma threshold to test against - /// \note nPDG=11 electron /// \return true if track satisfies TPC PID hypothesis for given Nsigma cut template bool selectionPIDTPC(const T& track, int nSigmaCut) @@ -148,8 +146,6 @@ struct HFJpsiToEECandidateSelector { /// PID selection on daughter track /// \param track is the daughter track - /// \param nPDG is the PDG code of the flavour hypothesis - /// \note nPDG=11 electron /// \return 1 if successful PID match, 0 if successful PID rejection, -1 if no PID info template int selectionPID(const T& track)