Skip to content

Commit 6500e2c

Browse files
committed
[PWGEM/Dilepton] fix calculation of ITSob cluster size in ML
1 parent bbf97ee commit 6500e2c

2 files changed

Lines changed: 16 additions & 18 deletions

File tree

PWGEM/Dilepton/TableProducer/prefilterDielectron.cxx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include "Common/DataModel/EventSelection.h"
2424

2525
#include <CCDB/BasicCCDBManager.h>
26-
#include <CCDB/CcdbApi.h>
2726
#include <CommonConstants/PhysicsConstants.h>
2827
#include <DataFormatsParameters/GRPMagField.h>
2928
#include <DataFormatsParameters/GRPObject.h>
@@ -175,10 +174,9 @@ struct prefilterDielectron {
175174
// Configurable<bool> enableOptimizations{"enableOptimizations", false, "Enables the ONNX extended model-optimization: sessionOptions.SetGraphOptimizationLevel(GraphOptimizationLevel::ORT_ENABLE_EXTENDED)"};
176175
} dielectroncuts;
177176

178-
o2::ccdb::CcdbApi ccdbApi;
179177
Service<o2::ccdb::BasicCCDBManager> ccdb;
180-
int mRunNumber;
181-
float d_bz;
178+
int mRunNumber{0};
179+
float d_bz{0};
182180
o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE;
183181

184182
HistogramRegistry fRegistry{"output", {}, OutputObjHandlingPolicy::AnalysisObject, false, false};

PWGEM/Dilepton/Utils/MlResponseO2Track.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@
5858
int nsize = 0; \
5959
int ncls = 0; \
6060
for (int il = v1; il < v2; il++) { \
61-
nsize += track.itsClsSizeInLayer(il); \
62-
if (nsize > 0) { \
61+
if (track.itsClsSizeInLayer(il) > 0) { \
6362
ncls++; \
6463
} \
64+
nsize += track.itsClsSizeInLayer(il); \
6565
} \
6666
inputFeature = static_cast<float>(nsize) / static_cast<float>(ncls); \
6767
break; \
@@ -73,10 +73,10 @@
7373
int nsize = 0; \
7474
int ncls = 0; \
7575
for (int il = v1; il < v2; il++) { \
76-
nsize += track.itsClsSizeInLayer(il); \
77-
if (nsize > 0) { \
76+
if (track.itsClsSizeInLayer(il) > 0) { \
7877
ncls++; \
7978
} \
79+
nsize += track.itsClsSizeInLayer(il); \
8080
} \
8181
inputFeature = static_cast<float>(nsize) / static_cast<float>(ncls) * std::cos(std::atan(trackParCov.getTgl())); \
8282
break; \
@@ -107,15 +107,15 @@
107107
break; \
108108
}
109109

110-
// Check if the index of mCachedIndices (index associated to a FEATURE)
111-
// matches the entry in EnumInputFeatures associated to this FEATURE
112-
// if so, the inputFeatures vector is filled with the FEATURE's value
113-
// by calling the corresponding GETTER1 from track and multiplying with cos(atan(GETTER2))
114-
#define CHECK_AND_FILL_O2_TRACK_COS(FEATURE, GETTER1, GETTER2) \
115-
case static_cast<uint8_t>(InputFeaturesO2Track::FEATURE): { \
116-
inputFeature = track.GETTER1() * std::cos(std::atan(track.GETTER2())); \
117-
break; \
118-
}
110+
// // Check if the index of mCachedIndices (index associated to a FEATURE)
111+
// // matches the entry in EnumInputFeatures associated to this FEATURE
112+
// // if so, the inputFeatures vector is filled with the FEATURE's value
113+
// // by calling the corresponding GETTER1 from track and multiplying with cos(atan(GETTER2))
114+
// #define CHECK_AND_FILL_O2_TRACK_COS(FEATURE, GETTER1, GETTER2) \
115+
// case static_cast<uint8_t>(InputFeaturesO2Track::FEATURE): { \
116+
// inputFeature = track.GETTER1() * std::cos(std::atan(track.GETTER2())); \
117+
// break; \
118+
// }
119119

120120
// Check if the index of mCachedIndices (index associated to a FEATURE)
121121
// matches the entry in EnumInputFeatures associated to this FEATURE
@@ -343,7 +343,7 @@ class MlResponseO2Track : public MlResponse<TypeOutputScore>
343343
#undef CHECK_AND_FILL_O2_TRACK_MEAN_ITSCLUSTER_SIZE
344344
#undef CHECK_AND_FILL_O2_TRACK_MEAN_ITSCLUSTER_SIZE_COS
345345
#undef CHECK_AND_FILL_O2_TRACK_SQRT
346-
#undef CHECK_AND_FILL_O2_TRACK_COS
346+
// #undef CHECK_AND_FILL_O2_TRACK_COS
347347
#undef CHECK_AND_FILL_O2_TRACK_TPCTOF
348348
#undef CHECK_AND_FILL_O2_TRACK_RELDIFF
349349
#undef CHECK_AND_FILL_DIELECTRON_COLLISION

0 commit comments

Comments
 (0)