Skip to content

Commit ee42a33

Browse files
committed
Add single-track selection on D0 for D*
1 parent 7e877ef commit ee42a33

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

PWGHF/TableProducer/candidateSelectorDstarToD0Pi.cxx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ struct HfCandidateSelectorDstarToD0Pi {
6969
Configurable<std::vector<double>> binsPtDstar{"binsPtDstar", std::vector<double>{hf_cuts_dstar_to_d0_pi::vecBinsPt}, "pT bin limits for Dstar"};
7070
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"};
7171

72+
// Single-track DCA selections
73+
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"};
74+
Configurable<std::vector<double>> binsPtTrack{"binsPtTrack", std::vector<double>{hf_cuts_single_track::vecBinsPtTrack}, "track pT bin limits for DCA pT-dependent cut"};
75+
7276
// common Configurable
7377
// TPC PID
7478
Configurable<double> ptPidTpcMin{"ptPidTpcMin", 0.15, "Minimum track pT for TPC PID"};
@@ -168,6 +172,17 @@ struct HfCandidateSelectorDstarToD0Pi {
168172
}
169173
}
170174

175+
/// Single-track cuts
176+
/// \param candidate is the Dstar candidate
177+
/// \return true if all the prongs pass the selections
178+
template <typename T1>
179+
bool isSelectedCandidateProngDca(const T1& candidate)
180+
{
181+
// Applied only on D0 tracks, to mimic the skimming selections
182+
return (isSelectedTrackDca(binsPtTrack, cutsSingleTrack, candidate.ptProng0(), candidate.impactParameter0(), candidate.impactParameterZ0()) &&
183+
isSelectedTrackDca(binsPtTrack, cutsSingleTrack, candidate.ptProng1(), candidate.impactParameter1(), candidate.impactParameterZ1()));
184+
}
185+
171186
/// Conjugate-independent topological cuts on D0
172187
/// @brief Topological selection on D0 candidate from Dstar
173188
/// @tparam T table iterator type of the candidate
@@ -182,6 +197,10 @@ struct HfCandidateSelectorDstarToD0Pi {
182197
return false;
183198
}
184199

200+
if (!isSelectedCandidateProngDca(candidate)) {
201+
return false;
202+
}
203+
185204
// check that the candidate pT is within the analysis range
186205
if (candpT < ptD0CandMin || candpT >= ptD0CandMax) {
187206
return false;
@@ -357,7 +376,6 @@ struct HfCandidateSelectorDstarToD0Pi {
357376
void process(TracksSel const&,
358377
HfFullDstarCandidate const& rowsDstarCand)
359378
{
360-
// LOG(info) << "selector called";
361379
for (const auto& candDstar : rowsDstarCand) {
362380
// final selection flag: false - rejected, true - accepted
363381
bool statusDstar = false, statusD0Flag = false, statusTopol = false, statusCand = false, statusPID = false;

0 commit comments

Comments
 (0)