Skip to content

Commit

Permalink
Add trigger mass cut to Ds selector
Browse files Browse the repository at this point in the history
  • Loading branch information
fcatalan92 committed Oct 10, 2024
1 parent 17b99b1 commit e0e5202
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions PWGHF/TableProducer/candidateSelectorDsToKKPi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "PWGHF/Core/HfMlResponseDsToKKPi.h"
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
#include "PWGHF/DataModel/CandidateSelectionTables.h"
#include "PWGHF/Utils/utilsAnalysis.h"

using namespace o2;
using namespace o2::analysis;
Expand Down Expand Up @@ -73,6 +74,8 @@ struct HfCandidateSelectorDsToKKPi {
Configurable<std::vector<std::string>> onnxFileNames{"onnxFileNames", std::vector<std::string>{"ModelHandler_onnx_DsToKKPi.onnx"}, "ONNX file names for each pT bin (if not from CCDB full path)"};
Configurable<int64_t> timestampCCDB{"timestampCCDB", -1, "timestamp of the ONNX file for ML model used to query in CCDB"};
Configurable<bool> loadModelsFromCCDB{"loadModelsFromCCDB", false, "Flag to enable or disable the loading of models from CCDB"};
// Mass cut for trigger analysis
Configurable<bool> useTriggerMassCut{"useTriggerMassCut", false, "Flag to enable parametrized pT differential mass cut for triggered data"};

HfHelper hfHelper;
o2::analysis::HfMlResponseDsToKKPi<float> hfMlResponse;
Expand All @@ -81,6 +84,7 @@ struct HfCandidateSelectorDsToKKPi {
o2::ccdb::CcdbApi ccdbApi;
TrackSelectorPi selectorPion;
TrackSelectorKa selectorKaon;
HfTrigger3ProngCuts hfTriggerCuts;

using TracksSel = soa::Join<aod::TracksWExtra, aod::TracksPidPi, aod::PidTpcTofFullPi, aod::TracksPidKa, aod::PidTpcTofFullKa>;

Expand Down Expand Up @@ -200,6 +204,9 @@ struct HfCandidateSelectorDsToKKPi {
if (std::abs(hfHelper.invMassDsToKKPi(candidate) - o2::constants::physics::MassDS) > cuts->get(pTBin, "deltaM")) {
return false;
}
if (useTriggerMassCut && !isCandidateInMassRange(hfHelper.invMassDsToKKPi(candidate), o2::constants::physics::MassDS, candidate.pt(), hfTriggerCuts)) {
return false;
}
if (hfHelper.deltaMassPhiDsToKKPi(candidate) > cuts->get(pTBin, "deltaM Phi")) {
return false;
}
Expand Down Expand Up @@ -229,6 +236,9 @@ struct HfCandidateSelectorDsToKKPi {
if (std::abs(hfHelper.invMassDsToPiKK(candidate) - o2::constants::physics::MassDS) > cuts->get(pTBin, "deltaM")) {
return false;
}
if (useTriggerMassCut && !isCandidateInMassRange(hfHelper.invMassDsToPiKK(candidate), o2::constants::physics::MassDS, candidate.pt(), hfTriggerCuts)) {
return false;
}
if (hfHelper.deltaMassPhiDsToPiKK(candidate) > cuts->get(pTBin, "deltaM Phi")) {
return false;
}
Expand Down

0 comments on commit e0e5202

Please sign in to comment.