From c9725ed9db75011f2c7df1e7e99f9664d7fec02c Mon Sep 17 00:00:00 2001 From: Daiki Sekihata Date: Wed, 24 Jun 2026 10:09:27 +0200 Subject: [PATCH] [PWGEM/Dilepton] fix calculation of ITSob cluster size in ML --- .../TableProducer/prefilterDielectron.cxx | 6 ++---- PWGEM/Dilepton/Utils/MlResponseO2Track.h | 19 ++++--------------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/PWGEM/Dilepton/TableProducer/prefilterDielectron.cxx b/PWGEM/Dilepton/TableProducer/prefilterDielectron.cxx index ebc8782b1eb..55dd034c4f9 100644 --- a/PWGEM/Dilepton/TableProducer/prefilterDielectron.cxx +++ b/PWGEM/Dilepton/TableProducer/prefilterDielectron.cxx @@ -23,7 +23,6 @@ #include "Common/DataModel/EventSelection.h" #include -#include #include #include #include @@ -175,10 +174,9 @@ struct prefilterDielectron { // Configurable enableOptimizations{"enableOptimizations", false, "Enables the ONNX extended model-optimization: sessionOptions.SetGraphOptimizationLevel(GraphOptimizationLevel::ORT_ENABLE_EXTENDED)"}; } dielectroncuts; - o2::ccdb::CcdbApi ccdbApi; Service ccdb; - int mRunNumber; - float d_bz; + int mRunNumber{0}; + float d_bz{0}; o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE; HistogramRegistry fRegistry{"output", {}, OutputObjHandlingPolicy::AnalysisObject, false, false}; diff --git a/PWGEM/Dilepton/Utils/MlResponseO2Track.h b/PWGEM/Dilepton/Utils/MlResponseO2Track.h index 0b1bdbbe2be..80824c3ff87 100644 --- a/PWGEM/Dilepton/Utils/MlResponseO2Track.h +++ b/PWGEM/Dilepton/Utils/MlResponseO2Track.h @@ -58,10 +58,10 @@ int nsize = 0; \ int ncls = 0; \ for (int il = v1; il < v2; il++) { \ - nsize += track.itsClsSizeInLayer(il); \ - if (nsize > 0) { \ + if (track.itsClsSizeInLayer(il) > 0) { \ ncls++; \ } \ + nsize += track.itsClsSizeInLayer(il); \ } \ inputFeature = static_cast(nsize) / static_cast(ncls); \ break; \ @@ -73,10 +73,10 @@ int nsize = 0; \ int ncls = 0; \ for (int il = v1; il < v2; il++) { \ - nsize += track.itsClsSizeInLayer(il); \ - if (nsize > 0) { \ + if (track.itsClsSizeInLayer(il) > 0) { \ ncls++; \ } \ + nsize += track.itsClsSizeInLayer(il); \ } \ inputFeature = static_cast(nsize) / static_cast(ncls) * std::cos(std::atan(trackParCov.getTgl())); \ break; \ @@ -107,16 +107,6 @@ break; \ } -// Check if the index of mCachedIndices (index associated to a FEATURE) -// matches the entry in EnumInputFeatures associated to this FEATURE -// if so, the inputFeatures vector is filled with the FEATURE's value -// by calling the corresponding GETTER1 from track and multiplying with cos(atan(GETTER2)) -#define CHECK_AND_FILL_O2_TRACK_COS(FEATURE, GETTER1, GETTER2) \ - case static_cast(InputFeaturesO2Track::FEATURE): { \ - inputFeature = track.GETTER1() * std::cos(std::atan(track.GETTER2())); \ - break; \ - } - // Check if the index of mCachedIndices (index associated to a FEATURE) // matches the entry in EnumInputFeatures associated to this FEATURE // if so, the inputFeatures vector is filled with the FEATURE's value @@ -343,7 +333,6 @@ class MlResponseO2Track : public MlResponse #undef CHECK_AND_FILL_O2_TRACK_MEAN_ITSCLUSTER_SIZE #undef CHECK_AND_FILL_O2_TRACK_MEAN_ITSCLUSTER_SIZE_COS #undef CHECK_AND_FILL_O2_TRACK_SQRT -#undef CHECK_AND_FILL_O2_TRACK_COS #undef CHECK_AND_FILL_O2_TRACK_TPCTOF #undef CHECK_AND_FILL_O2_TRACK_RELDIFF #undef CHECK_AND_FILL_DIELECTRON_COLLISION