From 2d4c6f88e0d22a59cde46998ccbc9345eba5a7ce Mon Sep 17 00:00:00 2001 From: Giovanni Malfattore Date: Thu, 8 Dec 2022 17:04:18 +0100 Subject: [PATCH 1/3] PWGLF: NucleiTask - Add cluster cut --- PWGLF/DataModel/LFNucleiTables.h | 2 ++ PWGLF/TableProducer/LFTreeCreatorNuclei.cxx | 1 + PWGLF/Tasks/LFNucleiBATask.cxx | 19 +++++++++++-------- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/PWGLF/DataModel/LFNucleiTables.h b/PWGLF/DataModel/LFNucleiTables.h index 32f87eb4761..72f9211a766 100644 --- a/PWGLF/DataModel/LFNucleiTables.h +++ b/PWGLF/DataModel/LFNucleiTables.h @@ -84,6 +84,7 @@ DECLARE_SOA_COLUMN(Beta, beta, float); // TPC and ITS QA DECLARE_SOA_COLUMN(TPCNClsCrossedRows, tpcNClsCrossedRows, int16_t); DECLARE_SOA_COLUMN(TPCCrossedRowsOverFindableCls, tpcCrossedRowsOverFindableCls, float); +DECLARE_SOA_COLUMN(TPCNClsFound, tpcNClsFound, int16_t); DECLARE_SOA_COLUMN(TPCChi2Ncl, tpcChi2NCl, float); DECLARE_SOA_COLUMN(ITSChi2NCl, itsChi2NCl, float); // For MC @@ -126,6 +127,7 @@ DECLARE_SOA_TABLE(LfCandNucleusFull, "AOD", "LFNUCL", full::Sign, full::TPCNClsCrossedRows, full::TPCCrossedRowsOverFindableCls, + full::TPCNClsFound, full::TPCChi2Ncl, full::ITSChi2NCl); DECLARE_SOA_TABLE(LfCandNucleusMC, "AOD", "LFNUCLMC", diff --git a/PWGLF/TableProducer/LFTreeCreatorNuclei.cxx b/PWGLF/TableProducer/LFTreeCreatorNuclei.cxx index f85f8e42a17..8a944d2364f 100644 --- a/PWGLF/TableProducer/LFTreeCreatorNuclei.cxx +++ b/PWGLF/TableProducer/LFTreeCreatorNuclei.cxx @@ -133,6 +133,7 @@ struct LfTreeCreatorNuclei { track.sign(), track.tpcNClsCrossedRows(), track.tpcCrossedRowsOverFindableCls(), + track.tpcNClsFound(), track.tpcChi2NCl(), track.itsChi2NCl()); diff --git a/PWGLF/Tasks/LFNucleiBATask.cxx b/PWGLF/Tasks/LFNucleiBATask.cxx index 375cb461f01..03eba16907a 100644 --- a/PWGLF/Tasks/LFNucleiBATask.cxx +++ b/PWGLF/Tasks/LFNucleiBATask.cxx @@ -46,6 +46,8 @@ struct LFNucleiBATask { Configurable etaCut{"etaCut", 0.8f, "Value of the eta selection for spectra (default 0.8)"}; Configurable yCut{"yCut", 0.5f, "Value of the rapidity selection for spectra (default 0.5)"}; Configurable cfgCutVertex{"cfgCutVSertex", 10.0f, "Accepted z-vertex range"}; + Configurable cfgCutTPCXRows{"cfgCutTPCXRows", -1.f, "Minimum number of crossed TPC rows"}; + Configurable cfgCutTPCClusters{"cfgCutTPCClusters", -1.f, "Minimum number of found TPC clusters"}; ConfigurableAxis binsPt{"binsPt", {VARIABLE_WIDTH, 0.0, 0.1, 0.12, 0.14, 0.16, 0.18, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2, 4.4, 4.6, 4.8, 5.0}, ""}; ConfigurableAxis binsdEdx{"binsdEdx", {1000, 0.f, 1000.f}, ""}; Configurable enableEvTimeSplitting{"enableEvTimeSplitting", true, "Flag to enable histograms splitting depending on the Event Time used"}; @@ -649,12 +651,16 @@ struct LFNucleiBATask { for (auto& track : tracks) { + if constexpr (!IsFilteredData) { if (!track.isGlobalTrackWoDCA()) { continue; } } - // QUI DCA + + if (track.tpcNClsCrossedRows() < cfgCutTPCXRows) continue; + if (track.tpcNClsFound() < cfgCutTPCClusters) continue; + // Tracks DCA histos fill histos.fill(HIST("tracks/hDCAxy"), track.dcaXY()); @@ -714,15 +720,18 @@ struct LFNucleiBATask { continue; } } - // QUI TUTTO IL RESTO + // LOG(info)<<"\n collisionId ============>"< 0) { histos.fill(HIST("debug/qa/h2TPCncrVsPtPos"), track.tpcInnerParam(), track.tpcNClsCrossedRows()); @@ -753,12 +762,6 @@ struct LFNucleiBATask { } } - // Calculate on fly NSigmaTPC* calibrated from BB parameters for light antinuclei - /* - To be included - - return NSigmaTPC[De,Tr,He,Al]Cal - */ // Tracks histos fill histos.fill(HIST("tracks/h1Eta"), track.eta()); From f8f06140362579808960b9e6e3399e9330bef33b Mon Sep 17 00:00:00 2001 From: Giovanni Malfattore Date: Thu, 8 Dec 2022 17:08:29 +0100 Subject: [PATCH 2/3] Minor format fix --- PWGLF/Tasks/LFNucleiBATask.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/PWGLF/Tasks/LFNucleiBATask.cxx b/PWGLF/Tasks/LFNucleiBATask.cxx index 03eba16907a..52a21855b5f 100644 --- a/PWGLF/Tasks/LFNucleiBATask.cxx +++ b/PWGLF/Tasks/LFNucleiBATask.cxx @@ -651,16 +651,16 @@ struct LFNucleiBATask { for (auto& track : tracks) { - if constexpr (!IsFilteredData) { if (!track.isGlobalTrackWoDCA()) { continue; } } - if (track.tpcNClsCrossedRows() < cfgCutTPCXRows) continue; - if (track.tpcNClsFound() < cfgCutTPCClusters) continue; - + if (track.tpcNClsCrossedRows() < cfgCutTPCXRows) + continue; + if (track.tpcNClsFound() < cfgCutTPCClusters) + continue; // Tracks DCA histos fill histos.fill(HIST("tracks/hDCAxy"), track.dcaXY()); @@ -723,15 +723,12 @@ struct LFNucleiBATask { // LOG(info)<<"\n collisionId ============>"< 0) { histos.fill(HIST("debug/qa/h2TPCncrVsPtPos"), track.tpcInnerParam(), track.tpcNClsCrossedRows()); @@ -762,7 +759,6 @@ struct LFNucleiBATask { } } - // Tracks histos fill histos.fill(HIST("tracks/h1Eta"), track.eta()); histos.fill(HIST("tracks/h1VarPhi"), track.phi()); From 391c6df62682bcd5b86177ac14a503ee7c647c1d Mon Sep 17 00:00:00 2001 From: Giovanni Malfattore Date: Thu, 8 Dec 2022 18:17:36 +0100 Subject: [PATCH 3/3] Fix MegaLinter issue --- PWGLF/TableProducer/LFTreeCreatorNuclei.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/PWGLF/TableProducer/LFTreeCreatorNuclei.cxx b/PWGLF/TableProducer/LFTreeCreatorNuclei.cxx index 8a944d2364f..dcb0bba3b62 100644 --- a/PWGLF/TableProducer/LFTreeCreatorNuclei.cxx +++ b/PWGLF/TableProducer/LFTreeCreatorNuclei.cxx @@ -20,6 +20,12 @@ #include "PWGLF/DataModel/LFNucleiTables.h" +#include + +#include +#include +#include + #include "ReconstructionDataFormats/Track.h" #include "Framework/runDataProcessing.h" #include "Framework/AnalysisTask.h" @@ -35,11 +41,6 @@ #include "Common/DataModel/TrackSelectionTables.h" #include "Common/Core/trackUtilities.h" -#include -#include -#include -#include - using namespace o2; using namespace o2::framework; using namespace o2::framework::expressions;