diff --git a/PWGHF/Core/HfMlResponseBplusToD0Pi.h b/PWGHF/Core/HfMlResponseBplusToD0Pi.h index 2dd11ea2286..a3452949bad 100644 --- a/PWGHF/Core/HfMlResponseBplusToD0Pi.h +++ b/PWGHF/Core/HfMlResponseBplusToD0Pi.h @@ -28,8 +28,7 @@ // the value is the corresponding value in EnumInputFeatures #define FILL_MAP_BPLUS(FEATURE) \ { \ - #FEATURE, static_cast(InputFeaturesBplusToD0Pi::FEATURE) \ - } + #FEATURE, static_cast(InputFeaturesBplusToD0Pi::FEATURE)} // Check if the index of mCachedIndices (index associated to a FEATURE) // matches the entry in EnumInputFeatures associated to this FEATURE diff --git a/PWGHF/Core/HfMlResponseBplusToD0PiReduced.h b/PWGHF/Core/HfMlResponseBplusToD0PiReduced.h index 7a051a3a5dc..7c4854308c6 100644 --- a/PWGHF/Core/HfMlResponseBplusToD0PiReduced.h +++ b/PWGHF/Core/HfMlResponseBplusToD0PiReduced.h @@ -28,8 +28,7 @@ // the value is the corresponding value in EnumInputFeatures #define FILL_MAP_BPLUS(FEATURE) \ { \ - #FEATURE, static_cast(InputFeaturesBplusToD0PiReduced::FEATURE) \ - } + #FEATURE, static_cast(InputFeaturesBplusToD0PiReduced::FEATURE)} // Check if the index of mCachedIndices (index associated to a FEATURE) // matches the entry in EnumInputFeatures associated to this FEATURE diff --git a/PWGHF/TableProducer/candidateSelectorBplusToD0Pi.cxx b/PWGHF/TableProducer/candidateSelectorBplusToD0Pi.cxx index ffb845ef4dd..ccf00912697 100644 --- a/PWGHF/TableProducer/candidateSelectorBplusToD0Pi.cxx +++ b/PWGHF/TableProducer/candidateSelectorBplusToD0Pi.cxx @@ -13,6 +13,7 @@ /// \brief B+ → D0bar π+ candidate selector /// /// \author Antonio Palasciano , Università degli Studi di Bari +/// \author Deepa Thomas , UT Austin /// \author Nima Zardoshti , CERN #include @@ -20,16 +21,15 @@ #include "Framework/AnalysisTask.h" #include "Framework/runDataProcessing.h" +#include "Framework/RunningWorkflowInfo.h" #include "Common/Core/TrackSelectorPID.h" #include "PWGHF/Core/HfHelper.h" -#include "PWGHF/Core/HfMlResponse.h" #include "PWGHF/Core/HfMlResponseBplusToD0Pi.h" #include "PWGHF/Core/SelectorCuts.h" #include "PWGHF/DataModel/CandidateReconstructionTables.h" #include "PWGHF/DataModel/CandidateSelectionTables.h" -#include "PWGHF/D2H/DataModel/ReducedDataModel.h" using namespace o2; using namespace o2::aod; @@ -76,9 +76,6 @@ struct HfCandidateSelectorBplusToD0Pi { Configurable> onnxFileNames{"onnxFileNames", std::vector{"ModelHandler_onnx_BPLUSToD0Pi.onnx"}, "ONNX file names for each pT bin (if not from CCDB full path)"}; Configurable timestampCCDB{"timestampCCDB", -1, "timestamp of the ONNX file for ML model used to query in CCDB"}; Configurable loadModelsFromCCDB{"loadModelsFromCCDB", false, "Flag to enable or disable the loading of models from CCDB"}; - // variable that will store the value of selectionFlagD (defined in dataCreatorD0PiReduced.cxx) - int mySelectionFlagD0 = -1; - int mySelectionFlagD0bar = -1; o2::analysis::HfMlResponseBplusToD0Pi hfMlResponse; float outputMlNotPreselected = -1.; @@ -103,7 +100,7 @@ struct HfCandidateSelectorBplusToD0Pi { LOGP(fatal, "Invalid PID option in configurable, please set 0 (no PID), 1 (TPC or TOF), or 2 (TPC and TOF)"); } - if (pionPidMethod) { + if (pionPidMethod != 0) { selectorPion.setRangePtTpc(ptPidTpcMin, ptPidTpcMax); selectorPion.setRangeNSigmaTpc(-nSigmaTpcMax, nSigmaTpcMax); selectorPion.setRangeNSigmaTpcCondTof(-nSigmaTpcCombinedMax, nSigmaTpcCombinedMax); @@ -144,18 +141,11 @@ struct HfCandidateSelectorBplusToD0Pi { /// \param withDmesMl is the flag to use the table with ML scores for the D- daughter (only possible if present in the derived data) /// \param hfCandsBp B+ candidates /// \param pionTracks pion tracks - /// \param configs config inherited from the D0pi data creator template void runSelection(Cands const& hfCandsBp, CandsDmes const& /*hfCandsD0*/, - TracksPion const& /*pionTracks*/, - HfCandBpConfigs const& configs) + TracksPion const& /*pionTracks*/) { - // get D0Pi creator configurable - for (const auto& config : configs) { - mySelectionFlagD0 = config.mySelectionFlagD0(); - mySelectionFlagD0bar = config.mySelectionFlagD0bar(); - } for (const auto& hfCandBp : hfCandsBp) { int statusBplus = 0; @@ -250,20 +240,18 @@ struct HfCandidateSelectorBplusToD0Pi { void processSelection(HfCandBplus const& hfCandsBp, aod::HfCand2ProngWPid const& hfCandsD0, - TracksPion const& pionTracks, - HfCandBpConfigs const& configs) + TracksPion const& pionTracks) { - runSelection(hfCandsBp, hfCandsD0, pionTracks, configs); + runSelection(hfCandsBp, hfCandsD0, pionTracks); } // processSelection PROCESS_SWITCH(HfCandidateSelectorBplusToD0Pi, processSelection, "Process selection without ML scores of D mesons", true); void processSelectionWithDmesMl(HfCandBplus const& hfCandsBp, soa::Join const& hfCandsD0, - TracksPion const& pionTracks, - HfCandBpConfigs const& configs) + TracksPion const& pionTracks) { - runSelection(hfCandsBp, hfCandsD0, pionTracks, configs); + runSelection(hfCandsBp, hfCandsD0, pionTracks); } // processSelectionWithDmesMl PROCESS_SWITCH(HfCandidateSelectorBplusToD0Pi, processSelectionWithDmesMl, "Process selection with ML scores of D mesons", false);