Skip to content
Merged
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
20 changes: 19 additions & 1 deletion PWGHF/TableProducer/candidateSelectorDstarToD0Pi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ struct HfCandidateSelectorDstarToD0Pi {
Configurable<std::vector<double>> binsPtDstar{"binsPtDstar", std::vector<double>{hf_cuts_dstar_to_d0_pi::vecBinsPt}, "pT bin limits for Dstar"};
Configurable<LabeledArray<double>> cutsDstar{"cutsDstar", {hf_cuts_dstar_to_d0_pi::Cuts[0], hf_cuts_dstar_to_d0_pi::NBinsPt, hf_cuts_dstar_to_d0_pi::NCutVars, hf_cuts_dstar_to_d0_pi::labelsPt, hf_cuts_dstar_to_d0_pi::labelsCutVar}, "Dstar candidate selection per pT bin"};

// Single-track DCA selections
Configurable<LabeledArray<double>> cutsSingleTrack{"cutsSingleTrack", {hf_cuts_single_track::CutsTrack[0], hf_cuts_single_track::NBinsPtTrack, hf_cuts_single_track::NCutVarsTrack, hf_cuts_single_track::labelsPtTrack, hf_cuts_single_track::labelsCutVarTrack}, "Single-track selections"};
Configurable<std::vector<double>> binsPtTrack{"binsPtTrack", std::vector<double>{hf_cuts_single_track::vecBinsPtTrack}, "track pT bin limits for DCA pT-dependent cut"};

// common Configurable
// TPC PID
Configurable<double> ptPidTpcMin{"ptPidTpcMin", 0.15, "Minimum track pT for TPC PID"};
Expand Down Expand Up @@ -168,6 +172,17 @@ struct HfCandidateSelectorDstarToD0Pi {
}
}

/// Single-track cuts
/// \param candidate is the Dstar candidate
/// \return true if all the prongs pass the selections
template <typename T1>
bool isSelectedCandidateProngDca(const T1& candidate)
{
// Applied only on D0 tracks, to mimic the skimming selections
return (isSelectedTrackDca(binsPtTrack, cutsSingleTrack, candidate.ptProng0(), candidate.impactParameter0(), candidate.impactParameterZ0()) &&
isSelectedTrackDca(binsPtTrack, cutsSingleTrack, candidate.ptProng1(), candidate.impactParameter1(), candidate.impactParameterZ1()));
}

/// Conjugate-independent topological cuts on D0
/// @brief Topological selection on D0 candidate from Dstar
/// @tparam T table iterator type of the candidate
Expand All @@ -182,6 +197,10 @@ struct HfCandidateSelectorDstarToD0Pi {
return false;
}

if (!isSelectedCandidateProngDca(candidate)) {
return false;
}

// check that the candidate pT is within the analysis range
if (candpT < ptD0CandMin || candpT >= ptD0CandMax) {
return false;
Expand Down Expand Up @@ -357,7 +376,6 @@ struct HfCandidateSelectorDstarToD0Pi {
void process(TracksSel const&,
HfFullDstarCandidate const& rowsDstarCand)
{
// LOG(info) << "selector called";
for (const auto& candDstar : rowsDstarCand) {
// final selection flag: false - rejected, true - accepted
bool statusDstar = false, statusD0Flag = false, statusTopol = false, statusCand = false, statusPID = false;
Expand Down
Loading