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
135 changes: 104 additions & 31 deletions PWGHF/Core/HfMlResponseXic0ToXiPiKf.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "PWGHF/Core/HfMlResponse.h"

#include "Common/Core/RecoDecay.h"
#include "Tools/ML/MlResponse.h"

#include <cstdint>
Expand All @@ -26,18 +27,17 @@
// Fill the map of available input features
// the key is the feature's name (std::string)
// the value is the corresponding value in EnumInputFeatures
#define FILL_MAP_XIC0TOXIPIKF(FEATURE) \
{ \
#FEATURE, static_cast<uint8_t>(InputFeaturesXic0ToXiPiKf::FEATURE) \
}
#define FILL_MAP_XIC0TOXIPIKF(FEATURE) \
{ \
#FEATURE, static_cast<uint8_t>(InputFeaturesXic0ToXiPiKf::FEATURE)}

// Check if the index of mCachedIndices (index associated to a FEATURE)
// matches the entry in EnumInputFeatures associated to this FEATURE
// if so, the inputFeatures vector is filled with the FEATURE's value
// by calling the corresponding GETTER from OBJECT
#define CHECK_AND_FILL_VEC_XIC0TOXIPIKF_FULL(OBJECT, FEATURE, GETTER) \
case static_cast<uint8_t>(InputFeaturesXic0ToXiPiKf::FEATURE): { \
inputFeatures.emplace_back(OBJECT.GETTER()); \
inputFeatures.emplace_back((OBJECT).GETTER()); \
break; \
}

Expand All @@ -48,10 +48,20 @@
break; \
}

#define CHECK_AND_FILL_VEC_XIC0TOXIPIKF_VALUE(FEATURE, VALUE) \
case static_cast<uint8_t>(InputFeaturesXic0ToXiPiKf::FEATURE): { \
inputFeatures.emplace_back(VALUE); \
break; \
}

#define FILL_MAP_XIC0TOXIPIKF_AS(NAME, FEATURE) \
{NAME, static_cast<uint8_t>(InputFeaturesXic0ToXiPiKf::FEATURE)}

namespace o2::analysis
{

enum class InputFeaturesXic0ToXiPiKf : uint8_t {
// Existing feature keys retained for backwards compatibility.
tpcNSigmaPiFromLambda,
tpcNSigmaPiFromCasc,
tpcNSigmaPiFromCharmBaryon,
Expand All @@ -65,7 +75,24 @@ enum class InputFeaturesXic0ToXiPiKf : uint8_t {
chi2TopoCascToPv,
chi2TopoCascToXic,
cosPaCascToXic,
decayLenXYCasc
decayLenXYCasc,
// Remaining features used by the local PbPb Transformer.
decayLenXYXic,
chi2TopoXicToPv,
chi2TopoPiFromXicToPv,
kfptPiFromXic,
cosPaCascToPv,
dcaXYToPvCascDau,
decayLenXYLambda,
v0Chi2OverNdf,
chi2TopoV0ToPv,
chi2TopoV0ToCasc,
cosPaV0ToPv,
cosPaV0ToCasc,
dcaV0Dau,
dcaXYToPvV0Dau0,
dcaXYToPvV0Dau1,
tpcNSigmaPrFromLambda
};

template <typename TypeOutputScore = float>
Expand All @@ -81,34 +108,50 @@ class HfMlResponseXic0ToXiPiKf : public HfMlResponse<TypeOutputScore>
/// \param candidate is the Xic0 candidate
/// \return inputFeatures vector
template <typename T1, typename T2, typename T3>
// std::vector<float> getInputFeatures(T1 const& candidate)
std::vector<float> getInputFeatures(T1 const& candidate, T2 const& lamProngPi, T2 const& cascProngPi, T3 const& charmBaryonProngPi)
std::vector<float> getInputFeatures(T1 const& candidate, T2 const& lamProngPi, T2 const& lamProngPr,
T2 const& cascProngPi, T3 const& charmBaryonProngPi)
{
std::vector<float> inputFeatures;
inputFeatures.reserve(MlResponse<TypeOutputScore>::mCachedIndices.size());

for (const auto& idx : MlResponse<TypeOutputScore>::mCachedIndices) {
switch (idx) {
// PID variables
CHECK_AND_FILL_VEC_XIC0TOXIPIKF_FULL(lamProngPi, tpcNSigmaPiFromLambda, tpcNSigmaPi);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF_FULL(cascProngPi, tpcNSigmaPiFromCasc, tpcNSigmaPi);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF_FULL(charmBaryonProngPi, tpcNSigmaPiFromCharmBaryon, tpcNSigmaPi);
// DCA
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(dcaCascDau);
// Xic candidate topology.
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(decayLenXYXic);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(xicChi2OverNdf);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(chi2TopoXicToPv);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(dcaCharmBaryonDau);
// Bachelor pion from Xic.
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(kfDcaXYPiFromXic);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(kfDcaXYCascToPv);
// Chi2Geo
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(chi2TopoPiFromXicToPv);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF_VALUE(kfptPiFromXic, RecoDecay::sqrtSumOfSquares(candidate.pxBachFromCharmBaryon(), candidate.pyBachFromCharmBaryon()));
// Cascade.
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(decayLenXYCasc);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(cascChi2OverNdf);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(xicChi2OverNdf);
// ldl
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(cascldl);
// Chi2Topo
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(chi2TopoCascToPv);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(chi2TopoCascToXic);
// CosPa
CHECK_AND_FILL_VEC_XIC0TOXIPIKF_FULL(candidate, cosPaCascToPv, cosPACasc);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(cosPaCascToXic);
// Decay length
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(decayLenXYCasc);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(dcaCascDau);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(kfDcaXYCascToPv);
// Pion from cascade.
CHECK_AND_FILL_VEC_XIC0TOXIPIKF_FULL(cascProngPi, tpcNSigmaPiFromCasc, tpcNSigmaPi);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(dcaXYToPvCascDau);
// Lambda and its charged daughters. The selector passes sign-corrected prongs.
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(decayLenXYLambda);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(v0Chi2OverNdf);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(chi2TopoV0ToPv);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(chi2TopoV0ToCasc);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF_FULL(candidate, cosPaV0ToPv, cosPAV0);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(cosPaV0ToCasc);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(dcaV0Dau);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(dcaXYToPvV0Dau0);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(dcaXYToPvV0Dau1);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF_FULL(lamProngPr, tpcNSigmaPrFromLambda, tpcNSigmaPr);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF_FULL(lamProngPi, tpcNSigmaPiFromLambda, tpcNSigmaPi);
// Legacy features that are not part of the local 28-feature model.
CHECK_AND_FILL_VEC_XIC0TOXIPIKF_FULL(charmBaryonProngPi, tpcNSigmaPiFromCharmBaryon, tpcNSigmaPi);
CHECK_AND_FILL_VEC_XIC0TOXIPIKF(cascldl);
}
}

Expand All @@ -120,28 +163,58 @@ class HfMlResponseXic0ToXiPiKf : public HfMlResponse<TypeOutputScore>
void setAvailableInputFeatures()
{
MlResponse<TypeOutputScore>::mAvailableInputFeatures = {
FILL_MAP_XIC0TOXIPIKF(tpcNSigmaPiFromLambda),
FILL_MAP_XIC0TOXIPIKF(tpcNSigmaPiFromCasc),
FILL_MAP_XIC0TOXIPIKF(tpcNSigmaPiFromCharmBaryon),
FILL_MAP_XIC0TOXIPIKF(dcaCascDau),
FILL_MAP_XIC0TOXIPIKF_AS("fDecayLenXYXic", decayLenXYXic),
FILL_MAP_XIC0TOXIPIKF(xicChi2OverNdf),
FILL_MAP_XIC0TOXIPIKF_AS("fXicChi2OverNdf", xicChi2OverNdf),
FILL_MAP_XIC0TOXIPIKF_AS("fChi2TopoXicToPv", chi2TopoXicToPv),
FILL_MAP_XIC0TOXIPIKF(dcaCharmBaryonDau),
FILL_MAP_XIC0TOXIPIKF_AS("fDcaCharmBaryonDau", dcaCharmBaryonDau),
FILL_MAP_XIC0TOXIPIKF(kfDcaXYPiFromXic),
FILL_MAP_XIC0TOXIPIKF(kfDcaXYCascToPv),
FILL_MAP_XIC0TOXIPIKF_AS("fKfDcaXYPiFromXic", kfDcaXYPiFromXic),
FILL_MAP_XIC0TOXIPIKF_AS("fChi2TopoPiFromXicToPv", chi2TopoPiFromXicToPv),
FILL_MAP_XIC0TOXIPIKF_AS("fKfptPiFromXic", kfptPiFromXic),
FILL_MAP_XIC0TOXIPIKF(decayLenXYCasc),
FILL_MAP_XIC0TOXIPIKF_AS("fDecayLenXYCasc", decayLenXYCasc),
FILL_MAP_XIC0TOXIPIKF(cascChi2OverNdf),
FILL_MAP_XIC0TOXIPIKF(xicChi2OverNdf),
FILL_MAP_XIC0TOXIPIKF(cascldl),
FILL_MAP_XIC0TOXIPIKF_AS("fCascChi2OverNdf", cascChi2OverNdf),
FILL_MAP_XIC0TOXIPIKF(chi2TopoCascToPv),
FILL_MAP_XIC0TOXIPIKF_AS("fChi2TopoCascToPv", chi2TopoCascToPv),
FILL_MAP_XIC0TOXIPIKF(chi2TopoCascToXic),
FILL_MAP_XIC0TOXIPIKF_AS("fChi2TopoCascToXic", chi2TopoCascToXic),
FILL_MAP_XIC0TOXIPIKF_AS("fCosPaCascToPv", cosPaCascToPv),
FILL_MAP_XIC0TOXIPIKF(cosPaCascToXic),
FILL_MAP_XIC0TOXIPIKF(decayLenXYCasc),
FILL_MAP_XIC0TOXIPIKF_AS("fCosPaCascToXic", cosPaCascToXic),
FILL_MAP_XIC0TOXIPIKF(dcaCascDau),
FILL_MAP_XIC0TOXIPIKF_AS("fDcaCascDau", dcaCascDau),
FILL_MAP_XIC0TOXIPIKF(kfDcaXYCascToPv),
FILL_MAP_XIC0TOXIPIKF_AS("fKfDcaXYCascToPv", kfDcaXYCascToPv),
FILL_MAP_XIC0TOXIPIKF(tpcNSigmaPiFromCasc),
FILL_MAP_XIC0TOXIPIKF_AS("fTpcNSigmaPiFromCasc", tpcNSigmaPiFromCasc),
FILL_MAP_XIC0TOXIPIKF_AS("fDcaXYToPvCascDau", dcaXYToPvCascDau),
FILL_MAP_XIC0TOXIPIKF_AS("fDecayLenXYLambda", decayLenXYLambda),
FILL_MAP_XIC0TOXIPIKF_AS("fV0Chi2OverNdf", v0Chi2OverNdf),
FILL_MAP_XIC0TOXIPIKF_AS("fChi2TopoV0ToPv", chi2TopoV0ToPv),
FILL_MAP_XIC0TOXIPIKF_AS("fChi2TopoV0ToCasc", chi2TopoV0ToCasc),
FILL_MAP_XIC0TOXIPIKF_AS("fCosPaV0ToPv", cosPaV0ToPv),
FILL_MAP_XIC0TOXIPIKF_AS("fCosPaV0ToCasc", cosPaV0ToCasc),
FILL_MAP_XIC0TOXIPIKF_AS("fDcaV0Dau", dcaV0Dau),
FILL_MAP_XIC0TOXIPIKF_AS("fDcaXYToPvV0Dau0", dcaXYToPvV0Dau0),
FILL_MAP_XIC0TOXIPIKF_AS("fDcaXYToPvV0Dau1", dcaXYToPvV0Dau1),
FILL_MAP_XIC0TOXIPIKF_AS("fTpcNSigmaPrFromLambda", tpcNSigmaPrFromLambda),
FILL_MAP_XIC0TOXIPIKF(tpcNSigmaPiFromLambda),
FILL_MAP_XIC0TOXIPIKF_AS("fTpcNSigmaPiFromLambda", tpcNSigmaPiFromLambda),
FILL_MAP_XIC0TOXIPIKF(tpcNSigmaPiFromCharmBaryon),
FILL_MAP_XIC0TOXIPIKF(cascldl),
};
}
};

} // namespace o2::analysis

#undef FILL_MAP_XIC0TOXIPIKF
#undef FILL_MAP_XIC0TOXIPIKF_AS
#undef CHECK_AND_FILL_VEC_XIC0TOXIPIKF_FULL
#undef CHECK_AND_FILL_VEC_XIC0TOXIPIKF
#undef CHECK_AND_FILL_VEC_XIC0TOXIPIKF_VALUE

#endif // PWGHF_CORE_HFMLRESPONSEXIC0TOXIPIKF_H_
15 changes: 7 additions & 8 deletions PWGHF/TableProducer/candidateSelectorToXiPiQa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ struct HfCandidateSelectorToXiPiQa {

// cuts from SelectorCuts.h - pT dependent cuts
Configurable<std::vector<double>> binsPt{"binsPt", std::vector<double>{hf_cuts_xic_to_xi_pi::vecBinsPt}, "pT bin limits"};
Configurable<LabeledArray<double>> cuts{"cuts", {hf_cuts_xic_to_xi_pi::Cuts[0], hf_cuts_xic_to_xi_pi::NBinsPt, hf_cuts_xic_to_xi_pi::NCutVars, hf_cuts_xic_to_xi_pi::labelsPt, hf_cuts_xic_to_xi_pi::labelsCutVar}, "Xic0 candidate selection per Pt Bin"};
Configurable<LabeledArray<double>> cuts{"cuts", {&hf_cuts_xic_to_xi_pi::Cuts[0][0], hf_cuts_xic_to_xi_pi::NBinsPt, hf_cuts_xic_to_xi_pi::NCutVars, hf_cuts_xic_to_xi_pi::labelsPt, hf_cuts_xic_to_xi_pi::labelsCutVar}, "Xic0 candidate selection per Pt Bin"};
// ML inference
Configurable<bool> applyMl{"applyMl", false, "Flag to apply ML selections"};
Configurable<std::vector<double>> binsPtMl{"binsPtMl", std::vector<double>{hf_cuts_ml::vecBinsPt}, "pT bin limits for ML application"};
Configurable<std::vector<int>> cutDirMl{"cutDirMl", std::vector<int>{hf_cuts_ml::vecCutDir}, "Whether to reject score values greater or smaller than the threshold"};
Configurable<LabeledArray<double>> cutsMl{"cutsMl", {hf_cuts_ml::Cuts[0], hf_cuts_ml::NBinsPt, hf_cuts_ml::NCutScores, hf_cuts_ml::labelsPt, hf_cuts_ml::labelsCutScore}, "ML selections per pT bin"};
Configurable<LabeledArray<double>> cutsMl{"cutsMl", {&hf_cuts_ml::Cuts[0][0], hf_cuts_ml::NBinsPt, hf_cuts_ml::NCutScores, hf_cuts_ml::labelsPt, hf_cuts_ml::labelsCutScore}, "ML selections per pT bin"};
Configurable<int> nClassesMl{"nClassesMl", static_cast<int>(hf_cuts_ml::NCutScores), "Number of classes in ML model"};
Configurable<std::vector<std::string>> namesInputFeatures{"namesInputFeatures", std::vector<std::string>{"feature1", "feature2"}, "Names of ML model input features"};
// CCDB configuration
Expand Down Expand Up @@ -144,7 +144,7 @@ struct HfCandidateSelectorToXiPiQa {

o2::analysis::HfMlResponseXic0ToXiPi<float> hfMlResponseDca;
o2::analysis::HfMlResponseXic0ToXiPiKf<float> hfMlResponseKf;
std::vector<float> outputMlXic0ToXiPi = {};
std::vector<float> outputMlXic0ToXiPi;
o2::ccdb::CcdbApi ccdbApi;

TrackSelectorPi selectorPion;
Expand Down Expand Up @@ -718,12 +718,11 @@ struct HfCandidateSelectorToXiPiQa {
// ML BDT selection if required
if (applyMl) {
bool isSelectedMlXic0 = false;
std::vector<float> inputFeaturesXic0 = {};
if constexpr (svReco == doDcaFitter) {
inputFeaturesXic0 = hfMlResponseDca.getInputFeatures(candidate, trackPiFromLam, trackPiFromCasc, trackPiFromCharm);
auto inputFeaturesXic0 = hfMlResponseDca.getInputFeatures(candidate, trackPiFromLam, trackPiFromCasc, trackPiFromCharm);
isSelectedMlXic0 = hfMlResponseDca.isSelectedMl(inputFeaturesXic0, ptCandXic0, outputMlXic0ToXiPi);
} else {
inputFeaturesXic0 = hfMlResponseKf.getInputFeatures(candidate, trackPiFromLam, trackPiFromCasc, trackPiFromCharm);
auto inputFeaturesXic0 = hfMlResponseKf.getInputFeatures(candidate, trackPiFromLam, trackPrFromLam, trackPiFromCasc, trackPiFromCharm);
isSelectedMlXic0 = hfMlResponseKf.isSelectedMl(inputFeaturesXic0, ptCandXic0, outputMlXic0ToXiPi);
}

Expand Down Expand Up @@ -767,8 +766,8 @@ struct HfCandidateSelectorToXiPiQa {

}; // end struct

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
WorkflowSpec defineDataProcessing(ConfigContext const& context)
{
return WorkflowSpec{
adaptAnalysisTask<HfCandidateSelectorToXiPiQa>(cfgc)};
adaptAnalysisTask<HfCandidateSelectorToXiPiQa>(context)};
}
29 changes: 17 additions & 12 deletions PWGHF/TableProducer/candidateSelectorXic0ToXiPiKf.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,23 @@ struct HfCandidateSelectorXic0ToXiPiKf {

// topological cuts
Configurable<std::vector<double>> binsPt{"binsPt", std::vector<double>{hf_cuts_xic_to_xi_pi::vecBinsPt}, "pT bin limits"};
Configurable<LabeledArray<double>> cuts{"cuts", {hf_cuts_xic_to_xi_pi::Cuts[0], hf_cuts_xic_to_xi_pi::NBinsPt, hf_cuts_xic_to_xi_pi::NCutVars, hf_cuts_xic_to_xi_pi::labelsPt, hf_cuts_xic_to_xi_pi::labelsCutVar}, "Xic0 candidate selection per pT bin"};
Configurable<LabeledArray<double>> cuts{"cuts", {&hf_cuts_xic_to_xi_pi::Cuts[0][0], hf_cuts_xic_to_xi_pi::NBinsPt, hf_cuts_xic_to_xi_pi::NCutVars, hf_cuts_xic_to_xi_pi::labelsPt, hf_cuts_xic_to_xi_pi::labelsCutVar}, "Xic0 candidate selection per pT bin"};

// ML inference
Configurable<bool> applyMl{"applyMl", true, "Flag to apply ML selections"};
Configurable<std::vector<double>> binsPtMl{"binsPtMl", std::vector<double>{hf_cuts_ml::vecBinsPt}, "pT bin limits for ML application"};
Configurable<std::vector<int>> cutDirMl{"cutDirMl", std::vector<int>{hf_cuts_ml::vecCutDir}, "Whether to reject score values greater or smaller than the threshold"};
Configurable<LabeledArray<double>> cutsMl{"cutsMl", {hf_cuts_ml::Cuts[0], hf_cuts_ml::NBinsPt, hf_cuts_ml::NCutScores, hf_cuts_ml::labelsPt, hf_cuts_ml::labelsCutScore}, "ML selections per pT bin"};
Configurable<LabeledArray<double>> cutsMl{"cutsMl", {&hf_cuts_ml::Cuts[0][0], hf_cuts_ml::NBinsPt, hf_cuts_ml::NCutScores, hf_cuts_ml::labelsPt, hf_cuts_ml::labelsCutScore}, "ML selections per pT bin"};
Configurable<int> nClassesMl{"nClassesMl", static_cast<int>(hf_cuts_ml::NCutScores), "Number of classes in ML model"};
Configurable<std::vector<std::string>> namesInputFeatures{"namesInputFeatures", std::vector<std::string>{"feature1", "feature2"}, "Names of ML model input features"};
Configurable<std::vector<std::string>> namesInputFeatures{"namesInputFeatures",
std::vector<std::string>{"fDecayLenXYXic", "fXicChi2OverNdf", "fChi2TopoXicToPv", "fDcaCharmBaryonDau",
"fKfDcaXYPiFromXic", "fChi2TopoPiFromXicToPv", "fKfptPiFromXic", "fDecayLenXYCasc",
"fCascChi2OverNdf", "fChi2TopoCascToPv", "fChi2TopoCascToXic", "fCosPaCascToPv",
"fCosPaCascToXic", "fDcaCascDau", "fKfDcaXYCascToPv", "fTpcNSigmaPiFromCasc",
"fDcaXYToPvCascDau", "fDecayLenXYLambda", "fV0Chi2OverNdf", "fChi2TopoV0ToPv",
"fChi2TopoV0ToCasc", "fCosPaV0ToPv", "fCosPaV0ToCasc", "fDcaV0Dau",
"fDcaXYToPvV0Dau0", "fDcaXYToPvV0Dau1", "fTpcNSigmaPrFromLambda", "fTpcNSigmaPiFromLambda"},
"Names of ML model input features"};

// CCDB configuration
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
Expand Down Expand Up @@ -224,14 +232,11 @@ struct HfCandidateSelectorXic0ToXiPiKf {
auto trackPiFromCasc = lfTracks.rawIteratorAt(trackPiFromCascId);
auto trackPiFromCharm = tracks.rawIteratorAt(trackPiFromCharmId);

auto trackPiFromLam = trackV0NegDau;
auto trackPrFromLam = trackV0PosDau;

int8_t const signDecay = candidate.signDecay(); // sign of pi <- cascade
auto const trackPiFromLam = signDecay > 0 ? trackV0PosDau : trackV0NegDau;
auto const trackPrFromLam = signDecay > 0 ? trackV0NegDau : trackV0PosDau;

if (signDecay > 0) {
trackPiFromLam = trackV0PosDau;
trackPrFromLam = trackV0NegDau;
registry.fill(HIST("hSelSignDec"), 1); // anti-particle decay
} else if (signDecay < 0) {
registry.fill(HIST("hSelSignDec"), 0); // particle decay
Expand Down Expand Up @@ -418,7 +423,7 @@ struct HfCandidateSelectorXic0ToXiPiKf {
// ML selections
if (applyMl) {
bool isSelectedMlXic0 = false;
std::vector<float> inputFeaturesXic0 = hfMlResponse.getInputFeatures(candidate, trackPiFromLam, trackPiFromCasc, trackPiFromCharm);
std::vector<float> inputFeaturesXic0 = hfMlResponse.getInputFeatures(candidate, trackPiFromLam, trackPrFromLam, trackPiFromCasc, trackPiFromCharm);
if (!resultSelections) {
hfMlToXiPi(outputMlXic0ToXiPiKf);
} else {
Expand Down Expand Up @@ -526,7 +531,7 @@ struct HfCandidateSelectorXic0ToXiPiKf {
}

// dcaXY v0 daughters to PV cut
if (std::abs(candidate.dcaXYToPvV0Dau0()) < cuts->get(pTBin, "dcaXYToPvV0Dau0") || std::abs(candidate.dcaXYToPvV0Dau1()) < cuts->get(pTBin, "dcaXYToPvV0Dau0")) {
if (std::abs(candidate.dcaXYToPvV0Dau0()) < cuts->get(pTBin, "dcaXYToPvV0Dau0") || std::abs(candidate.dcaXYToPvV0Dau1()) < cuts->get(pTBin, "dcaXYToPvV0Dau1")) {
return false;
}

Expand Down Expand Up @@ -597,8 +602,8 @@ struct HfCandidateSelectorXic0ToXiPiKf {

}; // end struct

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
WorkflowSpec defineDataProcessing(ConfigContext const& context)
{
return WorkflowSpec{
adaptAnalysisTask<HfCandidateSelectorXic0ToXiPiKf>(cfgc)};
adaptAnalysisTask<HfCandidateSelectorXic0ToXiPiKf>(context)};
}
Loading