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
38 changes: 20 additions & 18 deletions PWGEM/Dilepton/DataModel/lmeeMLTables.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/DataModel/lmeeMLTables.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 @@ -8,52 +8,54 @@
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

Check failure on line 11 in PWGEM/Dilepton/DataModel/lmeeMLTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.

Check failure on line 11 in PWGEM/Dilepton/DataModel/lmeeMLTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check failure on line 11 in PWGEM/Dilepton/DataModel/lmeeMLTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.
#include <vector>
#include "Framework/AnalysisDataModel.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include "Framework/AnalysisDataModel.h"

#include <vector>

#ifndef PWGEM_DILEPTON_DATAMODEL_LMEEMLTABLES_H_
#define PWGEM_DILEPTON_DATAMODEL_LMEEMLTABLES_H_

namespace o2::aod
{

namespace pwgem::dilepton
namespace pwgem::dilepton::ml
{
enum class PID_Label : int {
kUnDef = -1,
enum class PID_Label : uint8_t {
kElectron = 0,
kMuon = 1,
kPion = 2,
kKaon = 3,
kProton = 4,
}; // this can be used for eID.

enum class Track_Type : int {
enum class Track_Type : uint8_t {
kPrimary = 0,
kSecondary = 1,
}; // this can be used for selecting electron from primary or photon conversion.

} // namespace pwgem::dilepton
} // namespace pwgem::dilepton::ml

namespace emprimarytrack
{
DECLARE_SOA_COLUMN(CollisionId, collisionId, int); //!
DECLARE_SOA_COLUMN(PIDLabel, pidlabel, int); //!
DECLARE_SOA_COLUMN(TrackType, tracktype, int); //!
DECLARE_SOA_COLUMN(TPCNClsFound, tpcNClsFound, int); //!
DECLARE_SOA_COLUMN(TPCNClsCrossedRows, tpcNClsCrossedRows, int); //!
DECLARE_SOA_COLUMN(IsForValidation, isForValidation, bool); //!
// DECLARE_SOA_COLUMN(CollisionId, collisionId, int); //!
DECLARE_SOA_COLUMN(PIDLabel, pidlabel, uint8_t); //!
DECLARE_SOA_COLUMN(TrackType, tracktype, uint8_t); //!
DECLARE_SOA_COLUMN(TPCNClsFound, tpcNClsFound, uint8_t); //!
DECLARE_SOA_COLUMN(TPCNClsCrossedRows, tpcNClsCrossedRows, uint8_t); //!
DECLARE_SOA_COLUMN(IsForValidation, isForValidation, bool); //!
DECLARE_SOA_COLUMN(Sign, sign, short); //!
DECLARE_SOA_DYNAMIC_COLUMN(P, p, [](float pt, float eta) -> float { return pt * std::cosh(eta); });
DECLARE_SOA_DYNAMIC_COLUMN(MeanClusterSizeITS, meanClusterSizeITS, [](uint32_t itsClusterSizes) -> float {
int total_cluster_size = 0, nl = 0;

Check failure on line 56 in PWGEM/Dilepton/DataModel/lmeeMLTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
for (unsigned int layer = 0; layer < 7; layer++) {

Check failure on line 57 in PWGEM/Dilepton/DataModel/lmeeMLTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
int cluster_size_per_layer = (itsClusterSizes >> (layer * 4)) & 0xf;

Check failure on line 58 in PWGEM/Dilepton/DataModel/lmeeMLTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
if (cluster_size_per_layer > 0) {
nl++;
}
Expand All @@ -66,9 +68,9 @@
}
});
DECLARE_SOA_DYNAMIC_COLUMN(MeanClusterSizeITSob, meanClusterSizeITSob, [](uint32_t itsClusterSizes) -> float {
int total_cluster_size = 0, nl = 0;

Check failure on line 71 in PWGEM/Dilepton/DataModel/lmeeMLTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
for (unsigned int layer = 3; layer < 7; layer++) {

Check failure on line 72 in PWGEM/Dilepton/DataModel/lmeeMLTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
int cluster_size_per_layer = (itsClusterSizes >> (layer * 4)) & 0xf;

Check failure on line 73 in PWGEM/Dilepton/DataModel/lmeeMLTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
if (cluster_size_per_layer > 0) {
nl++;
}
Expand All @@ -84,8 +86,8 @@

// reconstructed track information
DECLARE_SOA_TABLE(EMPrimaryTracks, "AOD", "EMPTRACK", //!
o2::soa::Index<>, emprimarytrack::CollisionId, collision::PosZ, collision::NumContrib, evsel::NumTracksInTimeRange, evsel::SumAmpFT0CInTimeRange,
track::Pt, track::Eta, track::Phi, track::Tgl, track::Signed1Pt,
o2::soa::Index<>, collision::PosZ, collision::NumContrib, evsel::NumTracksInTimeRange, evsel::SumAmpFT0CInTimeRange,
track::Pt, track::Eta, track::Phi, track::Tgl, emprimarytrack::Sign,
track::DcaXY, track::DcaZ, track::CYY, track::CZZ, track::CZY,
track::TPCNClsFindable, emprimarytrack::TPCNClsFound, emprimarytrack::TPCNClsCrossedRows,
track::TPCChi2NCl, track::TPCInnerParam,
Expand Down
Loading
Loading