Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions PWGEM/Dilepton/Utils/MlResponseDielectronSingleTrack.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGEM/Dilepton/Utils/MlResponseDielectronSingleTrack.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -12,7 +12,7 @@
/// \file MlResponseDiletponSingleTrack.h
/// \brief Class to compute the ML response for dielectron analyses at the single track level
/// \author Daniel Samitz <daniel.samitz@cern.ch>, SMI Vienna
/// Elisa Meninno, <elisa.meninno@cern.ch>, SMI Vienna

Check failure on line 15 in PWGEM/Dilepton/Utils/MlResponseDielectronSingleTrack.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

#ifndef PWGEM_DILEPTON_UTILS_MLRESPONSEDIELECTRONSINGLETRACK_H_
#define PWGEM_DILEPTON_UTILS_MLRESPONSEDIELECTRONSINGLETRACK_H_
Expand Down Expand Up @@ -48,9 +48,9 @@
inputFeature = track.GETTER1(); \
} else { \
if (track.GETTER1() > 0) { \
inputFeature = sqrt((pow(track.GETTER1(), 2) + pow(track.GETTER2(), 2)) / 2.); \

Check failure on line 51 in PWGEM/Dilepton/Utils/MlResponseDielectronSingleTrack.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
} else { \
inputFeature = (-1) * sqrt((pow(track.GETTER1(), 2) + pow(track.GETTER2(), 2)) / 2.); \

Check failure on line 53 in PWGEM/Dilepton/Utils/MlResponseDielectronSingleTrack.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
} \
} \
break; \
Expand All @@ -62,7 +62,7 @@
// by calling the corresponding GETTER from track and applying a sqrt
#define CHECK_AND_FILL_DIELECTRON_SINGLE_TRACK_SQRT(FEATURE, GETTER) \
case static_cast<uint8_t>(InputFeaturesDielectronSingleTrack::FEATURE): { \
inputFeature = sqrt(track.GETTER()); \

Check failure on line 65 in PWGEM/Dilepton/Utils/MlResponseDielectronSingleTrack.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
break; \
}

Expand Down Expand Up @@ -144,6 +144,7 @@
tgl,
isAssociatedToMPC,
tpcNClsFound,
tpcNClsPID,
tpcNClsCrossedRows,
tpcCrossedRowsOverFindableCls,
tpcFoundOverFindableCls,
Expand Down Expand Up @@ -218,7 +219,7 @@
virtual ~MlResponseDielectronSingleTrack() = default;

template <typename T, typename U>
float return_feature(uint8_t idx, T const& track, U const& collision)

Check failure on line 222 in PWGEM/Dilepton/Utils/MlResponseDielectronSingleTrack.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
{
float inputFeature = 0.;
switch (idx) {
Expand Down Expand Up @@ -266,6 +267,7 @@
CHECK_AND_FILL_DIELECTRON_SINGLE_TRACK(tgl);
CHECK_AND_FILL_DIELECTRON_SINGLE_TRACK(isAssociatedToMPC);
CHECK_AND_FILL_DIELECTRON_SINGLE_TRACK(tpcNClsFound);
CHECK_AND_FILL_DIELECTRON_SINGLE_TRACK(tpcNClsPID);
CHECK_AND_FILL_DIELECTRON_SINGLE_TRACK(tpcNClsCrossedRows);
CHECK_AND_FILL_DIELECTRON_SINGLE_TRACK(tpcCrossedRowsOverFindableCls);
CHECK_AND_FILL_DIELECTRON_SINGLE_TRACK(tpcFoundOverFindableCls);
Expand Down Expand Up @@ -414,6 +416,7 @@
FILL_MAP_DIELECTRON_SINGLE_TRACK(tgl),
FILL_MAP_DIELECTRON_SINGLE_TRACK(isAssociatedToMPC),
FILL_MAP_DIELECTRON_SINGLE_TRACK(tpcNClsFound),
FILL_MAP_DIELECTRON_SINGLE_TRACK(tpcNClsPID),
FILL_MAP_DIELECTRON_SINGLE_TRACK(tpcNClsCrossedRows),
FILL_MAP_DIELECTRON_SINGLE_TRACK(tpcCrossedRowsOverFindableCls),
FILL_MAP_DIELECTRON_SINGLE_TRACK(tpcFoundOverFindableCls),
Expand Down
3 changes: 3 additions & 0 deletions PWGEM/Dilepton/Utils/MlResponseO2Track.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@
inputFeature = track.GETTER1(); \
} else { \
if (track.GETTER1() > 0) { \
inputFeature = sqrt((pow(track.GETTER1(), 2) + pow(track.GETTER2(), 2)) / 2.); \

Check failure on line 91 in PWGEM/Dilepton/Utils/MlResponseO2Track.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
} else { \
inputFeature = (-1) * sqrt((pow(track.GETTER1(), 2) + pow(track.GETTER2(), 2)) / 2.); \

Check failure on line 93 in PWGEM/Dilepton/Utils/MlResponseO2Track.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
} \
} \
break; \
Expand All @@ -102,7 +102,7 @@
// by calling the corresponding GETTER from track and applying a sqrt
#define CHECK_AND_FILL_O2_TRACK_SQRT(FEATURE, GETTER) \
case static_cast<uint8_t>(InputFeaturesO2Track::FEATURE): { \
inputFeature = sqrt(track.GETTER()); \

Check failure on line 105 in PWGEM/Dilepton/Utils/MlResponseO2Track.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
break; \
}

Expand Down Expand Up @@ -160,6 +160,7 @@
tpctofNSigmaKa,
tpctofNSigmaPr,
tpcNClsFound,
tpcNClsPID,
tpcNClsCrossedRows,
tpcChi2NCl,
hasITS,
Expand Down Expand Up @@ -191,7 +192,7 @@
virtual ~MlResponseO2Track() = default;

template <typename T, typename U, typename V>
float return_feature(uint8_t idx, T const& track, U const& trackParCov, V const& collision)

Check failure on line 195 in PWGEM/Dilepton/Utils/MlResponseO2Track.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
{
float inputFeature = 0.;
switch (idx) {
Expand All @@ -215,6 +216,7 @@
CHECK_AND_FILL_O2_TRACK_TPCTOF(tpctofNSigmaKa, tpcNSigmaKa, tofNSigmaKa, hasTOF);
CHECK_AND_FILL_O2_TRACK_TPCTOF(tpctofNSigmaPr, tpcNSigmaPr, tofNSigmaPr, hasTOF);
CHECK_AND_FILL_O2_TRACK(tpcNClsFound);
CHECK_AND_FILL_O2_TRACK(tpcNClsPID);
CHECK_AND_FILL_O2_TRACK(tpcNClsCrossedRows);
CHECK_AND_FILL_O2_TRACK(tpcChi2NCl);
CHECK_AND_FILL_O2_TRACK(hasITS);
Expand Down Expand Up @@ -296,6 +298,7 @@
FILL_MAP_O2_TRACK(tpctofNSigmaKa),
FILL_MAP_O2_TRACK(tpctofNSigmaPr),
FILL_MAP_O2_TRACK(tpcNClsFound),
FILL_MAP_O2_TRACK(tpcNClsPID),
FILL_MAP_O2_TRACK(tpcNClsCrossedRows),
FILL_MAP_O2_TRACK(tpcChi2NCl),
FILL_MAP_O2_TRACK(hasITS),
Expand Down
Loading