Skip to content

Commit c8545c0

Browse files
committed
Fix optional argument
1 parent b2fb0d7 commit c8545c0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

PWGHF/Core/HfMlResponseB0ToDPi.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class HfMlResponseB0ToDPi : public HfMlResponse<TypeOutputScore>
109109
template <bool withDmesMl, typename T1, typename T2>
110110
std::vector<float> getInputFeatures(T1 const& candidate,
111111
T2 const& prong1,
112-
std::optional<std::vector<float>> const& mlScoresD)
112+
const std::vector<float>* mlScoresD = nullptr)
113113
{
114114
std::vector<float> inputFeatures;
115115

@@ -145,9 +145,9 @@ class HfMlResponseB0ToDPi : public HfMlResponse<TypeOutputScore>
145145
} else {
146146
if (mlScoresD) {
147147
switch (idx) {
148-
CHECK_AND_FILL_VEC_B0_INDEX(prong0MlScoreBkg, mlScoresD.value(), 0);
149-
CHECK_AND_FILL_VEC_B0_INDEX(prong0MlScorePrompt, mlScoresD.value(), 1);
150-
CHECK_AND_FILL_VEC_B0_INDEX(prong0MlScoreNonprompt, mlScoresD.value(), 2);
148+
CHECK_AND_FILL_VEC_B0_INDEX(prong0MlScoreBkg, *mlScoresD, 0);
149+
CHECK_AND_FILL_VEC_B0_INDEX(prong0MlScorePrompt, *mlScoresD, 1);
150+
CHECK_AND_FILL_VEC_B0_INDEX(prong0MlScoreNonprompt, *mlScoresD, 2);
151151
}
152152
} else {
153153
LOG(fatal) << "ML scores of D not provided";

PWGHF/TableProducer/candidateSelectorB0ToDPi.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ struct HfCandidateSelectorB0ToDPi {
210210
}
211211
if (applyB0Ml) {
212212
// B0 ML selections
213-
std::vector<float> inputFeatures = hfMlResponse.getInputFeatures<withDmesMl>(hfCandB0, trackPi, mlScoresD);
213+
std::vector<float> inputFeatures = hfMlResponse.getInputFeatures<withDmesMl>(hfCandB0, trackPi, &mlScoresD);
214214
bool isSelectedMl = hfMlResponse.isSelectedMl(inputFeatures, ptCandB0, outputMl);
215215
hfMlB0ToDPiCandidate(outputMl[1]); // storing ML score for signal class
216216

0 commit comments

Comments
 (0)