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
6 changes: 2 additions & 4 deletions PWGEM/Dilepton/TableProducer/prefilterDielectron.cxx
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/TableProducer/prefilterDielectron.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)

Check failure on line 1 in PWGEM/Dilepton/TableProducer/prefilterDielectron.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specify task name only when it cannot be derived from the struct name. Only append to the default name.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -23,7 +23,6 @@
#include "Common/DataModel/EventSelection.h"

#include <CCDB/BasicCCDBManager.h>
#include <CCDB/CcdbApi.h>
#include <CommonConstants/PhysicsConstants.h>
#include <DataFormatsParameters/GRPMagField.h>
#include <DataFormatsParameters/GRPObject.h>
Expand Down Expand Up @@ -73,7 +72,7 @@
Produces<aod::EMPrimaryElectronsPrefilterBitDerived> pfb_derived;

// Configurables
Configurable<std::string> ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};

Check failure on line 75 in PWGEM/Dilepton/TableProducer/prefilterDielectron.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<std::string> grpPath{"grpPath", "GLO/GRP/GRP", "Path of the grp file"};
Configurable<std::string> grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};

Expand Down Expand Up @@ -103,14 +102,14 @@
std::string prefix = "dielectroncut_group";

// for mee prefilter
Configurable<float> cfg_min_mass{"cfg_min_mass", 0.0, "min mass for prefilter ULS"}; // region to be rejected

Check failure on line 105 in PWGEM/Dilepton/TableProducer/prefilterDielectron.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<float> cfg_max_mass{"cfg_max_mass", 0.0, "max mass for prefilter ULS"}; // region to be rejected

Check failure on line 106 in PWGEM/Dilepton/TableProducer/prefilterDielectron.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)

// for phiv prefilter
Configurable<bool> cfg_apply_phiv{"cfg_apply_phiv", false, "flag to apply phiv cut for ULS"}; // region to be rejected

Check failure on line 109 in PWGEM/Dilepton/TableProducer/prefilterDielectron.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<float> cfg_phiv_slope{"cfg_phiv_slope", 0.0185, "slope for m vs. phiv"}; // region to be rejected

Check failure on line 110 in PWGEM/Dilepton/TableProducer/prefilterDielectron.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<float> cfg_phiv_intercept{"cfg_phiv_intercept", -0.0280, "intercept for m vs. phiv"}; // region to be rejected

Check failure on line 111 in PWGEM/Dilepton/TableProducer/prefilterDielectron.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<float> cfg_min_phiv{"cfg_min_phiv", -1.f, "min phiv"}; // region to be rejected

Check failure on line 112 in PWGEM/Dilepton/TableProducer/prefilterDielectron.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<float> cfg_max_phiv{"cfg_max_phiv", 3.2, "max phiv"}; // region to be rejected

// for deta-dphi prefilter
Expand Down Expand Up @@ -175,10 +174,9 @@
// Configurable<bool> enableOptimizations{"enableOptimizations", false, "Enables the ONNX extended model-optimization: sessionOptions.SetGraphOptimizationLevel(GraphOptimizationLevel::ORT_ENABLE_EXTENDED)"};
} dielectroncuts;

o2::ccdb::CcdbApi ccdbApi;
Service<o2::ccdb::BasicCCDBManager> 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};
Expand Down Expand Up @@ -539,5 +537,5 @@

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{adaptAnalysisTask<prefilterDielectron>(cfgc, TaskName{"prefilter-dielectron"})};

Check failure on line 540 in PWGEM/Dilepton/TableProducer/prefilterDielectron.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specified task name prefilter-dielectron and the struct name prefilterDielectron produce the same device name prefilter-dielectron. TaskName is redundant.
}
19 changes: 4 additions & 15 deletions PWGEM/Dilepton/Utils/MlResponseO2Track.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<float>(nsize) / static_cast<float>(ncls); \
break; \
Expand All @@ -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<float>(nsize) / static_cast<float>(ncls) * std::cos(std::atan(trackParCov.getTgl())); \
break; \
Expand Down Expand Up @@ -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<uint8_t>(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
Expand Down Expand Up @@ -343,7 +333,6 @@ class MlResponseO2Track : public MlResponse<TypeOutputScore>
#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
Expand Down
Loading