Skip to content

Commit d5f8673

Browse files
DelloStrittoLuigi
andauthored
Adding flag selection in the hadron tasks (#5218)
Co-authored-by: Luigi <ldellost@aliceml.cern.ch>
1 parent 40bd7f9 commit d5f8673

4 files changed

Lines changed: 21 additions & 4 deletions

File tree

Analysis/Tasks/PWGHF/HFD0CandidateSelector.cxx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,11 +324,17 @@ struct HFD0CandidateSelector {
324324

325325
for (auto& hfCandProng2 : hfCandProng2s) { //looping over 2 prong candidates
326326

327+
statusD0 = 0;
328+
statusD0bar = 0;
329+
330+
if (!(hfCandProng2.hfflag() & 1 << D0ToPiK)) {
331+
hfSelD0Candidate(statusD0, statusD0bar);
332+
continue;
333+
}
334+
327335
auto trackPos = hfCandProng2.index0_as<aod::BigTracksPID>(); //positive daughter
328336
auto trackNeg = hfCandProng2.index1_as<aod::BigTracksPID>(); //negative daughter
329337

330-
statusD0 = 0;
331-
statusD0bar = 0;
332338
topolD0 = true;
333339
topolD0bar = true;
334340
pidD0 = -1;

Analysis/Tasks/PWGHF/HFLcCandidateSelector.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,8 @@ struct HFLcCandidateSelector {
287287

288288
statusLcpKpi = 0;
289289
statusLcpiKp = 0;
290-
int LcFlag = hfCandProng3.hfflag();
291290

292-
if (!(LcFlag & 1 << 1)) {
291+
if (!(hfCandProng3.hfflag() & 1 << LcToPKPi)) {
293292
hfSelLcCandidate(statusLcpKpi, statusLcpiKp);
294293
continue;
295294
}

Analysis/Tasks/PWGHF/taskD0.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ struct TaskD0 {
6464
{
6565
//Printf("Candidates: %d", candidates.size());
6666
for (auto& candidate : candidates) {
67+
if (!(candidate.hfflag() & 1 << D0ToPiK)) {
68+
continue;
69+
}
6770
if (cutEtaCandMax >= 0. && std::abs(candidate.eta()) > cutEtaCandMax) {
6871
//Printf("Candidate: eta rejection: %g", candidate.eta());
6972
continue;
@@ -120,6 +123,9 @@ struct TaskD0MC {
120123
// MC rec.
121124
//Printf("MC Candidates: %d", candidates.size());
122125
for (auto& candidate : candidates) {
126+
if (!(candidate.hfflag() & 1 << D0ToPiK)) {
127+
continue;
128+
}
123129
if (cutEtaCandMax >= 0. && std::abs(candidate.eta()) > cutEtaCandMax) {
124130
//Printf("MC Rec.: eta rejection: %g", candidate.eta());
125131
continue;

Analysis/Tasks/PWGHF/taskLc.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ struct TaskLc {
6363
void process(soa::Filtered<soa::Join<aod::HfCandProng3, aod::HFSelLcCandidate>> const& candidates)
6464
{
6565
for (auto& candidate : candidates) {
66+
if (!(candidate.hfflag() & 1 << LcToPKPi)) {
67+
continue;
68+
}
6669
if (cutEtaCandMax >= 0. && std::abs(candidate.eta()) > cutEtaCandMax) {
6770
//Printf("Candidate: eta rejection: %g", candidate.eta());
6871
continue;
@@ -120,6 +123,9 @@ struct TaskLcMC {
120123
// MC rec.
121124
//Printf("MC Candidates: %d", candidates.size());
122125
for (auto& candidate : candidates) {
126+
if (!(candidate.hfflag() & 1 << LcToPKPi)) {
127+
continue;
128+
}
123129
if (cutEtaCandMax >= 0. && std::abs(candidate.eta()) > cutEtaCandMax) {
124130
//Printf("MC Rec.: eta rejection: %g", candidate.eta());
125131
continue;

0 commit comments

Comments
 (0)