Skip to content
Open
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
4 changes: 3 additions & 1 deletion PWGEM/Dilepton/TableProducer/filterEoI.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/filterEoI.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/filterEoI.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 Down Expand Up @@ -50,6 +50,7 @@
Configurable<bool> inheritFromOtherTask{"inheritFromOtherTask", true, "Flag to iherit all common configurables from skimmerPrimaryElectron or skimmerPrimaryMuon"};
Configurable<int> minNelectron{"minNelectron", -1, "min number of electron candidates per collision"};
Configurable<int> minNmuon{"minNmuon", -1, "min number of muon candidates per collision"};
Configurable<int> minNphotons{"minNphotons", 1, "min number of photon candidates per collision"};
Configurable<std::string> taskNameForNelectron{"taskNameForNelectron", "skimmer-primary-electron", "task name where minNelectron is defined."};
Configurable<std::string> varNameForNelectron{"varNameForNelectron", "minNelectron", "variable name for minNelectron"};

Expand All @@ -63,6 +64,7 @@

LOGF(info, "minNelectron = %d", minNelectron.value);
LOGF(info, "minNmuon = %d", minNmuon.value);
LOGF(info, "minNphotons = %d", minNphotons.value);

auto hEventCounter = fRegistry.add<TH1>("hEventCounter", "hEventCounter", kTH1D, {{8, 0.5f, 8.5f}});
hEventCounter->GetXaxis()->SetBinLabel(1, "all");
Expand Down Expand Up @@ -107,14 +109,14 @@
}
if constexpr (static_cast<bool>(system & kPCM)) {
auto v0s_coll = v0s.sliceBy(perCollision_v0, collision.globalIndex());
if (v0s_coll.size() >= 1) {
if (v0s_coll.size() >= minNphotons) {
does_pcm_exist = true;
fRegistry.fill(HIST("hEventCounter"), 4);
}
}
if constexpr (static_cast<bool>(system & kElectronFromDalitz)) {
auto electronsda_coll = electronsda.sliceBy(perCollision_elda, collision.globalIndex());
if (electronsda_coll.size() >= 2) {

Check failure on line 119 in PWGEM/Dilepton/TableProducer/filterEoI.cxx

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.
does_electronda_exist = true;
}
}
Expand Down Expand Up @@ -191,5 +193,5 @@
};
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{adaptAnalysisTask<filterEoI>(cfgc, TaskName{"filter-eoi"})};

Check failure on line 196 in PWGEM/Dilepton/TableProducer/filterEoI.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Device names filter-eoi and filter-eo-i generated from the specified task name filter-eoi and from the struct name filterEoI, respectively, differ in hyphenation. Consider fixing capitalisation of the struct name to FilterEoi and removing TaskName.
}
Loading