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
2 changes: 1 addition & 1 deletion PWGHF/TableProducer/candidateCreator3Prong.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 warning on line 1 in PWGHF/TableProducer/candidateCreator3Prong.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.

Check warning on line 1 in PWGHF/TableProducer/candidateCreator3Prong.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pwghf/struct-member-order]

Declare struct members in the conventional order. See the PWGHF coding guidelines.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -16,7 +16,7 @@
/// \author Vít Kučera <[email protected]>, CERN

#ifndef HomogeneousField
#define HomogeneousField

Check warning on line 19 in PWGHF/TableProducer/candidateCreator3Prong.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/macro]

Use SCREAMING_SNAKE_CASE for names of macros. Leading and double underscores are not allowed.
#endif

#include <memory>
Expand Down Expand Up @@ -405,7 +405,7 @@
kfpVertex.SetCovarianceMatrix(rowTrackIndexProng3.pvRefitSigmaX2(), rowTrackIndexProng3.pvRefitSigmaXY(), rowTrackIndexProng3.pvRefitSigmaY2(), rowTrackIndexProng3.pvRefitSigmaXZ(), rowTrackIndexProng3.pvRefitSigmaYZ(), rowTrackIndexProng3.pvRefitSigmaZ2());
}
kfpVertex.GetCovarianceMatrix(covMatrixPV);
KFParticle KFPV(kfpVertex);

Check warning on line 408 in PWGHF/TableProducer/candidateCreator3Prong.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
registry.fill(HIST("hCovPVXX"), covMatrixPV[0]);
registry.fill(HIST("hCovPVYY"), covMatrixPV[2]);
registry.fill(HIST("hCovPVXZ"), covMatrixPV[3]);
Expand Down Expand Up @@ -796,13 +796,13 @@

HfEventSelectionMc hfEvSelMc; // mc event selection and monitoring
using BCsInfo = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels>;
HistogramRegistry registry{"registry"};

Check warning on line 799 in PWGHF/TableProducer/candidateCreator3Prong.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pwghf/struct-member-order]

HfCandidateCreator3ProngExpressions: HistogramRegistry appears too early (before end of PresliceUnsorted<).

using McCollisionsNoCents = soa::Join<aod::Collisions, aod::EvSels, aod::McCollisionLabels>;
using McCollisionsFT0Cs = soa::Join<aod::Collisions, aod::EvSels, aod::McCollisionLabels, aod::CentFT0Cs>;
using McCollisionsFT0Ms = soa::Join<aod::Collisions, aod::EvSels, aod::McCollisionLabels, aod::CentFT0Ms>;
using McCollisionsCentFT0Ms = soa::Join<aod::McCollisions, aod::McCentFT0Ms>;
PresliceUnsorted<McCollisionsNoCents> colPerMcCollision = aod::mccollisionlabel::mcCollisionId;

Check warning on line 805 in PWGHF/TableProducer/candidateCreator3Prong.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pwghf/struct-member-order]

HfCandidateCreator3ProngExpressions: PresliceUnsorted< appears too early (before end of Preslice<).
PresliceUnsorted<McCollisionsFT0Cs> colPerMcCollisionFT0C = aod::mccollisionlabel::mcCollisionId;
PresliceUnsorted<McCollisionsFT0Ms> colPerMcCollisionFT0M = aod::mccollisionlabel::mcCollisionId;
Preslice<aod::McParticles> mcParticlesPerMcCollision = aod::mcparticle::mcCollisionId;
Expand Down Expand Up @@ -830,7 +830,7 @@
createXic = option.defaultValue.get<bool>();
} else if (option.name.compare("createDstarToPiKPiBkg") == 0) {
createDstarToPiKPiBkg = option.defaultValue.get<bool>();
}
}
}
break;
}
Expand Down Expand Up @@ -1105,6 +1105,6 @@
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<HfCandidateCreator3Prong>(cfgc, TaskName{"hf-candidate-creator-3prong"}),

Check warning on line 1108 in PWGHF/TableProducer/candidateCreator3Prong.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Device names hf-candidate-creator-3prong and hf-candidate-creator3-prong generated from the specified task name hf-candidate-creator-3prong and from the struct name HfCandidateCreator3Prong, respectively, differ in hyphenation. Consider fixing capitalisation of the struct name to HfCandidateCreator3Prong and removing TaskName.
adaptAnalysisTask<HfCandidateCreator3ProngExpressions>(cfgc, TaskName{"hf-candidate-creator-3prong-expressions"})};

Check warning on line 1109 in PWGHF/TableProducer/candidateCreator3Prong.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Device names hf-candidate-creator-3prong-expressions and hf-candidate-creator3-prong-expressions generated from the specified task name hf-candidate-creator-3prong-expressions and from the struct name HfCandidateCreator3ProngExpressions, respectively, differ in hyphenation. Consider fixing capitalisation of the struct name to HfCandidateCreator3ProngExpressions and removing TaskName.
}
23 changes: 11 additions & 12 deletions PWGHF/TableProducer/treeCreatorDplusToPiKPi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@
DECLARE_SOA_COLUMN(IsEventReject, isEventReject, int); //! Event rejection flag
DECLARE_SOA_COLUMN(RunNumber, runNumber, int); //! Run number
// ML scores
DECLARE_SOA_COLUMN(MlScore0, mlScore0, float); //! ML score of the first configured index
DECLARE_SOA_COLUMN(MlScore1, mlScore1, float); //! ML score of the second configured index
DECLARE_SOA_COLUMN(MlScore0, mlScore0, float); //! ML score of the first configured index
DECLARE_SOA_COLUMN(MlScore1, mlScore1, float); //! ML score of the second configured index
} // namespace full
DECLARE_SOA_TABLE(HfCandDpMls, "AOD", "HFCANDDPML",
full::MlScore0,
full::MlScore1)
full::MlScore0,
full::MlScore1)

DECLARE_SOA_TABLE(HfCandDpLites, "AOD", "HFCANDDPLITE",
hf_cand::Chi2PCA,
Expand Down Expand Up @@ -249,7 +249,7 @@
Configurable<bool> fillOnlyBackground{"fillOnlyBackground", false, "Flag to fill derived tables with background for ML trainings"};
Configurable<float> downSampleBkgFactor{"downSampleBkgFactor", 1., "Fraction of background candidates to keep for ML trainings"};
Configurable<float> ptMaxForDownSample{"ptMaxForDownSample", 10., "Maximum pt for the application of the downsampling factor"};
Configurable<std::vector<int>> classMl{"classMlindexes", {0, 2}, "Indexes of ML bkg and non-prompt scores."};

Check warning on line 252 in PWGHF/TableProducer/treeCreatorDplusToPiKPi.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.)

HfHelper hfHelper;

Expand Down Expand Up @@ -293,18 +293,17 @@
originMc = candidate.originMcRec();
channelMc = candidate.flagMcDecayChanRec();
}

std::vector<float> outputMl = {-999., -999.};
if constexpr (doMl) {
for (unsigned int iclass = 0; iclass < classMl->size(); iclass++) {
outputMl[iclass] = candidate.mlProbDplusToPiKPi()[classMl->at(iclass)];
}
rowCandidateMl(
outputMl[0],
outputMl[1]
);
outputMl[1]);
}

auto prong0 = candidate.template prong0_as<TracksWPid>();
auto prong1 = candidate.template prong1_as<TracksWPid>();
auto prong2 = candidate.template prong2_as<TracksWPid>();
Expand Down Expand Up @@ -355,7 +354,7 @@
flagMc,
originMc,
channelMc);
} else {
} else {
rowCandidateFull(
candidate.collision().bcId(),
candidate.collision().numContrib(),
Expand Down Expand Up @@ -436,8 +435,8 @@
flagMc,
originMc,
channelMc);
}
}
}

void processData(aod::Collisions const& collisions,
soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelDplusToPiKPi>> const& candidates,
Expand Down Expand Up @@ -467,7 +466,7 @@
}

PROCESS_SWITCH(HfTreeCreatorDplusToPiKPi, processData, "Process data", true);

void processMc(aod::Collisions const& collisions,
aod::McCollisions const&,
SelectedCandidatesMc const& candidates,
Expand All @@ -480,7 +479,7 @@
for (const auto& collision : collisions) {
fillEvent(collision, 0, 1);
}

// Filling candidate properties
if (fillOnlySignal) {
if (fillCandidateLiteTable) {
Expand Down
Loading