From 7a8d9eb8dc23fc342e2e12e467a291917593902d Mon Sep 17 00:00:00 2001 From: Luigi Date: Fri, 30 Oct 2020 23:05:53 +0100 Subject: [PATCH] PWGHF: Adressing comments to the pull request #4727 --- .../Analysis/HFCandidateSelectionTables.h | 8 +-- .../Tasks/PWGHF/HFLcCandidateSelector.cxx | 56 +++++++++---------- Analysis/Tasks/PWGHF/taskD0.cxx | 2 +- Analysis/Tasks/PWGJE/jetfinderhf.cxx | 2 +- 4 files changed, 31 insertions(+), 37 deletions(-) diff --git a/Analysis/DataModel/include/Analysis/HFCandidateSelectionTables.h b/Analysis/DataModel/include/Analysis/HFCandidateSelectionTables.h index fa5ffde065dc4..c8d231a401fae 100644 --- a/Analysis/DataModel/include/Analysis/HFCandidateSelectionTables.h +++ b/Analysis/DataModel/include/Analysis/HFCandidateSelectionTables.h @@ -13,12 +13,12 @@ namespace o2::aod { -namespace hf_selcandidate +namespace hf_selcandidate_d0 { DECLARE_SOA_COLUMN(IsSelD0, isSelD0, int); DECLARE_SOA_COLUMN(IsSelD0bar, isSelD0bar, int); -} // namespace hf_selcandidate -DECLARE_SOA_TABLE(HFSelD0Candidate, "AOD", "HFSELD0CAND", hf_selcandidate::IsSelD0, hf_selcandidate::IsSelD0bar); +} // namespace hf_selcandidate_d0 +DECLARE_SOA_TABLE(HFSelD0Candidate, "AOD", "HFSELD0CAND", hf_selcandidate_d0::IsSelD0, hf_selcandidate_d0::IsSelD0bar); } // namespace o2::aod namespace o2::aod @@ -27,7 +27,7 @@ namespace hf_selcandidate_lc { DECLARE_SOA_COLUMN(IsSelLc, isSelLc, int); } // namespace hf_selcandidate_lc -DECLARE_SOA_TABLE(HFSelLcCandidate, "AOD", "HFSELLcCAND", hf_selcandidate_lc::IsSelLc); +DECLARE_SOA_TABLE(HFSelLcCandidate, "AOD", "HFSELLCCAND", hf_selcandidate_lc::IsSelLc); } // namespace o2::aod #endif // O2_ANALYSIS_HFCANDIDATESELECTIONTABLES_H_ diff --git a/Analysis/Tasks/PWGHF/HFLcCandidateSelector.cxx b/Analysis/Tasks/PWGHF/HFLcCandidateSelector.cxx index c4865dd141d19..fbdb2edb72c57 100644 --- a/Analysis/Tasks/PWGHF/HFLcCandidateSelector.cxx +++ b/Analysis/Tasks/PWGHF/HFLcCandidateSelector.cxx @@ -27,16 +27,16 @@ static const int npTBins = 10; static const int nCutVars = 8; //temporary until 2D array in configurable is solved - then move to json //m ptp ptk ptpi DCA sigmavtx dlenght cosp -constexpr double cuts[npTBins][nCutVars] = {{0.5, 0.1, 0.1, 0.1, 0.05, 0.09, 0.005, 0.}, /* pt<1 */ - {0.5, 0.1, 0.1, 0.1, 0.05, 0.09, 0.005, 0.}, /* 1= pTBins[npTBins]) { + return -1; + } for (int i = 0; i < npTBins; i++) { - if (candpT >= pTBins[i] && candpT < pTBins[i + 1]) { + if (candpT < pTBins[i + 1]) { return i; } } @@ -187,7 +190,7 @@ struct HFLcCandidateSelector { template bool selectionPIDTPC(const T& track, int nPDG, int nSigmaCut) { - double nSigma = 0.0; + double nSigma = 100.0; //arbitarily large value nPDG = TMath::Abs(nPDG); if (nPDG == 2212) { nSigma = track.tpcNSigmaPr(); @@ -195,15 +198,10 @@ struct HFLcCandidateSelector { nSigma = track.tpcNSigmaKa(); } else if (nPDG == 111) { nSigma = track.tpcNSigmaPi(); - - } else { - return nSigma = 100; //arbitarily large value - } - if (nSigma < nSigmaCut) { - return true; } else { return false; } + return nSigma < nSigmaCut; } /// Check if track is compatible with given TOF NSigma cut for a given flavour hypothesis @@ -215,7 +213,7 @@ struct HFLcCandidateSelector { template bool selectionPIDTOF(const T& track, int nPDG, int nSigmaCut) { - double nSigma = 0.0; + double nSigma = 100.0; //arbitarily large value nPDG = TMath::Abs(nPDG); if (nPDG == 2212) { nSigma = track.tofNSigmaPr(); @@ -223,14 +221,10 @@ struct HFLcCandidateSelector { nSigma = track.tofNSigmaKa(); } else if (nPDG == 321) { nSigma = track.tofNSigmaPi(); - } else { - return nSigma = 100; //arbitarily large value - } - if (nSigma < nSigmaCut) { - return true; } else { return false; } + return nSigma < nSigmaCut; } /// PID selection on daughter track @@ -287,7 +281,7 @@ struct HFLcCandidateSelector { { int statusLc; // final selection flag : 0-rejected 1-accepted bool topolLc; - int pidLc, proton, kMinus, piPlus; + int pidLc, proton, kaonMinus, pionPlus; for (auto& hfCandProng3 : hfCandProng3s) { //looping over 3 prong candidates @@ -299,8 +293,8 @@ struct HFLcCandidateSelector { topolLc = true; pidLc = -1; proton = -1; - kMinus = -1; - piPlus = -1; + kaonMinus = -1; + pionPlus = -1; // daughter track validity selection if (!daughterSelection(trackPos1) || !daughterSelection(trackNeg1) || !daughterSelection(trackPos2)) { @@ -325,13 +319,13 @@ struct HFLcCandidateSelector { } proton = selectionPID(trackPos1, 2212); - kMinus = selectionPID(trackNeg1, 321); - piPlus = selectionPID(trackPos2, 211); + kaonMinus = selectionPID(trackNeg1, 321); + pionPlus = selectionPID(trackPos2, 211); - if (proton == 0 || kMinus == 0 || piPlus == 0) { + if (proton == 0 || kaonMinus == 0 || pionPlus == 0) { pidLc = 0; //exclude Lc } - if (proton == 1 && kMinus == 1 && piPlus == 1) { + if (proton == 1 && kaonMinus == 1 && pionPlus == 1) { pidLc = 1; //accept Lc } diff --git a/Analysis/Tasks/PWGHF/taskD0.cxx b/Analysis/Tasks/PWGHF/taskD0.cxx index dc913c950ae90..13ad591b7f557 100644 --- a/Analysis/Tasks/PWGHF/taskD0.cxx +++ b/Analysis/Tasks/PWGHF/taskD0.cxx @@ -47,7 +47,7 @@ struct TaskD0 { Configurable d_selectionFlagD0{"d_selectionFlagD0", 1, "Selection Flag for D0"}; Configurable d_selectionFlagD0bar{"d_selectionFlagD0bar", 1, "Selection Flag for D0bar"}; - Filter filterSelectCandidates = (aod::hf_selcandidate::isSelD0 >= d_selectionFlagD0 || aod::hf_selcandidate::isSelD0bar >= d_selectionFlagD0bar); + Filter filterSelectCandidates = (aod::hf_selcandidate_d0::isSelD0 >= d_selectionFlagD0 || aod::hf_selcandidate_d0::isSelD0bar >= d_selectionFlagD0bar); void process(soa::Filtered> const& candidates) { diff --git a/Analysis/Tasks/PWGJE/jetfinderhf.cxx b/Analysis/Tasks/PWGJE/jetfinderhf.cxx index d32a7018e94b4..5f6bc347f7528 100644 --- a/Analysis/Tasks/PWGJE/jetfinderhf.cxx +++ b/Analysis/Tasks/PWGJE/jetfinderhf.cxx @@ -55,7 +55,7 @@ struct JetFinderHFTask { enum pdgCode { pdgD0 = 421 }; Filter trackCuts = (aod::track::pt > 0.15f && aod::track::eta > -0.9f && aod::track::eta < 0.9f); - Filter seltrack = (aod::hf_selcandidate::isSelD0 >= d_selectionFlagD0 || aod::hf_selcandidate::isSelD0bar >= d_selectionFlagD0bar); + Filter seltrack = (aod::hf_selcandidate_d0::isSelD0 >= d_selectionFlagD0 || aod::hf_selcandidate_d0::isSelD0bar >= d_selectionFlagD0bar); void process(aod::Collision const& collision, soa::Filtered const& tracks,