Skip to content

Commit ea89115

Browse files
authored
[Tutorial] Remove HfHelper instances (#18438)
1 parent eb0871d commit ea89115

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

‎Tutorials/ML/applyMlSelection.cxx‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ struct applyMlSelection {
6666

6767
Filter filterDsFlag = (o2::aod::hf_track_index::hfflag & static_cast<uint8_t>(BIT(aod::hf_cand_3prong::DecayType::DsToKKPi))) != static_cast<uint8_t>(0);
6868

69-
HfHelper hfHelper;
7069
o2::ccdb::CcdbApi ccdbApi;
7170
int nCandidates = 0;
7271

@@ -108,22 +107,22 @@ struct applyMlSelection {
108107
continue;
109108
}
110109
// Check that the candidate rapidity is within the analysis range
111-
if (yCandRecoMax >= 0. && std::abs(hfHelper.yDs(candidate)) > yCandRecoMax) {
110+
if (yCandRecoMax >= 0. && std::abs(HfHelper::yDs(candidate)) > yCandRecoMax) {
112111
continue;
113112
}
114113

115114
// Fill mass histogram before ML selections
116-
registry.fill(HIST("hMassBeforeSel"), hfHelper.invMassDsToPiKK(candidate));
117-
registry.fill(HIST("hMassBeforeSel"), hfHelper.invMassDsToKKPi(candidate));
115+
registry.fill(HIST("hMassBeforeSel"), HfHelper::invMassDsToPiKK(candidate));
116+
registry.fill(HIST("hMassBeforeSel"), HfHelper::invMassDsToKKPi(candidate));
118117

119118
// Perform ML selections for one mass hypothesis (Ds -> PhiPi -> PiKK)
120119
std::vector<float> inputFeaturesPiKK{candidate.cpa(),
121120
candidate.cpaXY(),
122121
candidate.decayLength(),
123122
candidate.decayLengthXY(),
124-
static_cast<float>(hfHelper.deltaMassPhiDsToPiKK(candidate)),
123+
static_cast<float>(HfHelper::deltaMassPhiDsToPiKK(candidate)),
125124
candidate.impactParameterXY(),
126-
static_cast<float>(hfHelper.cos3PiKDsToPiKK(candidate)),
125+
static_cast<float>(HfHelper::cos3PiKDsToPiKK(candidate)),
127126
candidate.maxNormalisedDeltaIP()};
128127

129128
// Retrieve model output and selection outcome

0 commit comments

Comments
 (0)