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
4 changes: 2 additions & 2 deletions PWGHF/TableProducer/candidateCreator3Prong.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1126,8 +1126,8 @@ struct HfCandidateCreator3ProngExpressions {
if (indexRec > -1) {
flagChannelMain = sign * channelMain;

/// swapping for D+, Ds->Kpipi and Lc->pKpi
if (std::abs(flagChannelMain) == DecayChannelMain::DplusToPiKK || std::abs(flagChannelMain) == DecayChannelMain::DsToPiKK || std::abs(flagChannelMain) == DecayChannelMain::LcToPKPi) {
/// swapping for D+, Ds->Kpipi; Lc, Xic->pKpi
if (std::abs(flagChannelMain) == DecayChannelMain::DplusToPiKK || std::abs(flagChannelMain) == DecayChannelMain::DsToPiKK || std::abs(flagChannelMain) == DecayChannelMain::LcToPKPi || std::abs(flagChannelMain) == DecayChannelMain::XicToPKPi) {
if (arrayDaughters[0].has_mcParticle()) {
swapping = static_cast<int8_t>(std::abs(arrayDaughters[0].mcParticle().pdgCode()) == kPiPlus);
}
Expand Down
10 changes: 5 additions & 5 deletions PWGHF/TableProducer/treeCreatorLcToPKPi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ struct HfTreeCreatorLcToPKPi {
Configurable<bool> fillCollIdTable{"fillCollIdTable", false, "Fill a single-column table with collision index"};
Configurable<bool> fillCandidateMcTable{"fillCandidateMcTable", false, "Switch to fill a table with MC particles matched to candidates"};
Configurable<bool> applyMl{"applyMl", false, "Whether ML was used in candidateSelectorLc"};
Configurable<bool> keepOnlySignalMc{"keepOnlySignalMc", false, "Fill MC tree only with signal candidates"};
Configurable<bool> keepOnlyBkg{"keepOnlyBkg", false, "Fill MC tree only with background candidates"};
Configurable<bool> keepSignalMc{"keepSignalMc", false, "Fill MC tree with signal candidates"};
Configurable<bool> keepBkgMc{"keepBkgMc", false, "Fill MC tree with background candidates"};
Configurable<bool> keepCorrBkgMC{"keepCorrBkgMC", false, "Flag to keep correlated background sources (Λc+ -> p K− π+ π0, p π− π+, p K− K+ and other charm hadrons)"};
Configurable<double> downSampleBkgFactor{"downSampleBkgFactor", 1., "Fraction of candidates to store in the tree"};
Configurable<float> downSampleBkgPtMax{"downSampleBkgPtMax", 100.f, "Max. pt for background downsampling"};
Expand Down Expand Up @@ -940,11 +940,11 @@ struct HfTreeCreatorLcToPKPi {
const int sigbgstatus = determineSignalBgStatus(candidate, candFlag);
const bool isMcCandidateSignal = (sigbgstatus == Prompt) || (sigbgstatus == NonPrompt);
const bool passSelection = functionSelection >= selectionFlagLc;
const bool keepAll = !keepOnlySignalMc && !keepOnlyBkg && !keepCorrBkgMC;
const bool keepAll = !keepSignalMc && !keepBkgMc && !keepCorrBkgMC;
const int flag = candidate.flagMcMatchRec();
const bool isCorrBkg = (std::abs(flag) != 0 && std::abs(flag) != o2::hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi);
const bool isCorrBkg = (std::abs(flag) != 0 && std::abs(flag) != o2::hf_decay::hf_cand_3prong::DecayChannelMain::LcToPKPi) || sigbgstatus == WrongOrder;
const bool notSkippedBkg = isMcCandidateSignal || candidate.pt() > downSampleBkgPtMax || pseudoRndm < downSampleBkgFactor;
if (passSelection && notSkippedBkg && (keepAll || (keepOnlySignalMc && isMcCandidateSignal) || (keepOnlyBkg && !isMcCandidateSignal) || (keepCorrBkgMC && isCorrBkg))) {
if (passSelection && notSkippedBkg && (keepAll || (keepSignalMc && isMcCandidateSignal) || (keepBkgMc && !isMcCandidateSignal) || (keepCorrBkgMC && isCorrBkg))) {
if (fillCandidateLiteTable) {
fillLiteTable<IsMc>(candidate, candidateMlScore, candFlag);
} else {
Expand Down
Loading