From 633d2bddc40e0296fdd21fc23560199c895ce39f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Mon, 27 Jan 2025 20:08:56 +0100 Subject: [PATCH 1/4] Fix qa ITS --- DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx b/DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx index 8c890067ae3..18057c99375 100644 --- a/DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx +++ b/DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx @@ -239,7 +239,7 @@ struct itsPidQa { aod::pidTOFKa, aod::pidTOFPr, aod::pidTOFDe, aod::pidTOFTr, aod::pidTOFHe, aod::pidTOFAl>; void process(CollisionCandidate const& collision, - soa::Filtered const& tracks) + TrackCandidates const& tracks) { auto tracksWithPid = soa::Attach 0) { - hNsigmaPos[id]->Fill(track.p(), nsigma); + const auto& t = tracks.iteratorAt(nTracks); + if (t.sign() > 0) { + hNsigmaPos[id]->Fill(t.p(), nsigma); } else { - hNsigmaNeg[id]->Fill(track.p(), nsigma); + hNsigmaNeg[id]->Fill(t.p(), nsigma); } } } From df5c1eedde1c08ddb14df69c7f810c15bb32ea20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Mon, 27 Jan 2025 20:09:54 +0100 Subject: [PATCH 2/4] Update qaPIDITS.cxx --- DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx b/DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx index 18057c99375..23adb064508 100644 --- a/DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx +++ b/DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx @@ -239,7 +239,7 @@ struct itsPidQa { aod::pidTOFKa, aod::pidTOFPr, aod::pidTOFDe, aod::pidTOFTr, aod::pidTOFHe, aod::pidTOFAl>; void process(CollisionCandidate const& collision, - TrackCandidates const& tracks) + soa::Filtered const& tracks) { auto tracksWithPid = soa::Attach Date: Mon, 27 Jan 2025 20:16:55 +0100 Subject: [PATCH 3/4] Update qaPIDITS.cxx --- DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx b/DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx index 23adb064508..916dca2dae5 100644 --- a/DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx +++ b/DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx @@ -43,6 +43,9 @@ static const std::vector parameterNames{"enable"}; static const int defaultParameters[9][nParameters]{{0}, {0}, {1}, {1}, {1}, {0}, {0}, {0}, {0}}; static const float defaultPIDSelection[9][nParameters]{{-1.f}, {-1.f}, {-1.f}, {-1.f}, {-1.f}, {-1.f}, {-1.f}, {-1.f}, {-1.f}}; static constexpr int Np = 9; +bool enableParticle[Np] = {false, false, false, + false, false, false, + false, false, false}; std::array, Np> hNsigmaPos; std::array, Np> hNsigmaNeg; @@ -137,7 +140,7 @@ struct itsPidQa { static constexpr const char* pN[Np] = {"El", "Mu", "Pi", "Ka", "Pr", "De", "Tr", "He", "Al"}; HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; - Configurable> enabledTables{"enabledTables", + Configurable> enabledParticle{"enabledParticle", {defaultParameters[0], 9, nParameters, tableNames, parameterNames}, "Produce QA for this species: 0 - no, 1 - yes"}; Configurable> tofSelection{"tofSelection", @@ -214,13 +217,14 @@ struct itsPidQa { histos.add("event/p", "", kTH1D, {pAxis}); for (int id = 0; id < 9; id++) { - const int f = enabledTables->get(tableNames[id].c_str(), "enable"); + const int f = enabledParticle->get(tableNames[id].c_str(), "enable"); if (f != 1) { continue; } // NSigma const char* axisTitle = Form("N_{#sigma}^{ITS}(%s)", pT[id]); const AxisSpec nSigmaAxis{nSigmaBins, axisTitle}; + enableParticle[id] = true; hNsigmaPos[id] = histos.add(Form("nsigmaPos/%s", pN[id]), axisTitle, kTH2F, {pAxis, nSigmaAxis}); hNsigmaNeg[id] = histos.add(Form("nsigmaNeg/%s", pN[id]), axisTitle, kTH2F, {pAxis, nSigmaAxis}); } @@ -301,6 +305,9 @@ struct itsPidQa { continue; } for (o2::track::PID::ID id = 0; id <= o2::track::PID::Last; id++) { + if (!enableParticle[id]) { + continue; + } if (applyRapidityCut) { if (std::abs(track.rapidity(PID::getMass(id))) > 0.5) { continue; From 544b494e521ee7b8170c0b235940651a9807b21a Mon Sep 17 00:00:00 2001 From: ALICE Builder Date: Mon, 27 Jan 2025 20:18:01 +0100 Subject: [PATCH 4/4] Please consider the following formatting changes to #9558 (#9559) --- DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx b/DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx index 916dca2dae5..c575e02c4fc 100644 --- a/DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx +++ b/DPG/Tasks/AOTTrack/PID/ITS/qaPIDITS.cxx @@ -141,8 +141,8 @@ struct itsPidQa { HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; Configurable> enabledParticle{"enabledParticle", - {defaultParameters[0], 9, nParameters, tableNames, parameterNames}, - "Produce QA for this species: 0 - no, 1 - yes"}; + {defaultParameters[0], 9, nParameters, tableNames, parameterNames}, + "Produce QA for this species: 0 - no, 1 - yes"}; Configurable> tofSelection{"tofSelection", {defaultPIDSelection[0], 9, nParameters, tableNames, parameterNames}, "Selection on the TOF nsigma"};