Skip to content
Merged
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
18 changes: 14 additions & 4 deletions PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <string>
#include <vector>

#include "Framework/DataSpecUtils.h"
#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Framework/AnalysisDataModel.h"
Expand Down Expand Up @@ -486,6 +487,7 @@
LOGF(info, "Configuring tables to generate");
auto& workflows = context.services().get<RunningWorkflowInfo const>();

TString listOfRequestors[nTables];
for (int i = 0; i < nTables; i++) {
// adjust bookkeeping histogram
h->GetXaxis()->SetBinLabel(i + 1, tableNames[i].c_str());
Expand All @@ -503,9 +505,17 @@
for (auto const& input : device.inputs) {
if (device.name.compare("strangenessbuilder-initializer") == 0)
continue; // don't listen to the initializer
if (input.matcher.binding == tableNames[i]) {
LOGF(info, "Device %s has subscribed to %s", device.name, tableNames[i]);
mEnabledTables[i] = 1;
if (DataSpecUtils::partialMatch(input.matcher, o2::header::DataOrigin("AOD"))) {
auto&& [origin, description, version] = DataSpecUtils::asConcreteDataMatcher(input.matcher);
std::string tableNameWithVersion = tableNames[i];
if (version > 0) {
tableNameWithVersion += Form("_%03d", version);
}
if (input.matcher.binding == tableNameWithVersion) {
LOGF(info, "Device %s has subscribed to %s (version %i)", device.name, tableNames[i], version);
listOfRequestors[i].Append(Form("%s ", device.name.c_str()));
mEnabledTables[i] = 1;
}
}
}
}
Expand Down Expand Up @@ -540,7 +550,7 @@
for (int i = 0; i < nTables; i++) {
// printout to be improved in the future
if (mEnabledTables[i]) {
LOGF(info, " -~> Table enabled: %s", tableNames[i]);
LOGF(info, " -~> Table enabled: %s, requested by %s", tableNames[i], listOfRequestors[i].Data());
h->SetBinContent(i + 1, 0); // mark enabled
}
}
Expand Down Expand Up @@ -888,10 +898,10 @@

bool trackIsInteresting = false;
if (
(originParticle.pdgCode() == 310 && v0BuilderOpts.mc_addGeneratedK0Short.value > 0) ||

Check warning on line 901 in PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
(originParticle.pdgCode() == 3122 && v0BuilderOpts.mc_addGeneratedLambda.value > 0) ||

Check warning on line 902 in PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
(originParticle.pdgCode() == -3122 && v0BuilderOpts.mc_addGeneratedAntiLambda.value > 0) ||

Check warning on line 903 in PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
(originParticle.pdgCode() == 22 && v0BuilderOpts.mc_addGeneratedGamma.value > 0)) {

Check warning on line 904 in PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
trackIsInteresting = true;
}
if (!trackIsInteresting) {
Expand Down Expand Up @@ -941,7 +951,7 @@
currentV0Entry.pdgCode = positiveTrackIndex.pdgCode;
currentV0Entry.particleId = positiveTrackIndex.originId;
currentV0Entry.isCollinearV0 = false;
if (v0BuilderOpts.mc_addGeneratedGammaMakeCollinear.value && currentV0Entry.pdgCode == 22) {

Check warning on line 954 in PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
currentV0Entry.isCollinearV0 = true;
}
currentV0Entry.found = false;
Expand All @@ -963,7 +973,7 @@
currentV0Entry.pdgCode = positiveTrackIndex.pdgCode;
currentV0Entry.particleId = positiveTrackIndex.originId;
currentV0Entry.isCollinearV0 = false;
if (v0BuilderOpts.mc_addGeneratedGammaMakeCollinear.value && currentV0Entry.pdgCode == 22) {

Check warning on line 976 in PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
currentV0Entry.isCollinearV0 = true;
}
currentV0Entry.found = false;
Expand Down Expand Up @@ -1042,9 +1052,9 @@

bool trackIsInteresting = false;
if (
(originParticle.pdgCode() == 3312 && cascadeBuilderOpts.mc_addGeneratedXiMinus.value > 0) ||

Check warning on line 1055 in PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
(originParticle.pdgCode() == -3312 && cascadeBuilderOpts.mc_addGeneratedXiPlus.value > 0) ||

Check warning on line 1056 in PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
(originParticle.pdgCode() == 3334 && cascadeBuilderOpts.mc_addGeneratedOmegaMinus.value > 0) ||

Check warning on line 1057 in PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
(originParticle.pdgCode() == -3334 && cascadeBuilderOpts.mc_addGeneratedOmegaPlus.value > 0)) {
trackIsInteresting = true;
}
Expand Down Expand Up @@ -1324,7 +1334,7 @@
straHelper.v0.daughterDCA,
straHelper.v0.positiveDCAxy,
straHelper.v0.negativeDCAxy,
TMath::Cos(straHelper.v0.pointingAngle),

Check warning on line 1337 in PWGLF/TableProducer/Strangeness/strangenessbuilder.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
straHelper.v0.dcaToPV,
v0.v0Type);
products.v0dataLink(products.v0cores.lastIndex(), -1);
Expand Down
Loading