Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWGHF: Adding flag selection in the hadron tasks #5218

Merged
merged 1 commit into from
Jan 20, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ DECLARE_SOA_COLUMN(FlagMCMatchRec, flagMCMatchRec, int8_t); // reconstruction le
DECLARE_SOA_COLUMN(FlagMCMatchGen, flagMCMatchGen, int8_t); // generator level

// mapping of decay types
enum DecayType { D0ToPiK = 1 };
enum DecayType { D0ToPiK = 0,
JpsiToEE,
N2ProngDecays }; //always keep N2ProngDecays at the end

// functions for specific particles

Expand Down Expand Up @@ -289,8 +291,10 @@ DECLARE_SOA_COLUMN(FlagMCMatchRec, flagMCMatchRec, int8_t); // reconstruction le
DECLARE_SOA_COLUMN(FlagMCMatchGen, flagMCMatchGen, int8_t); // generator level

// mapping of decay types
enum DecayType { DPlusToPiKPi = 1,
LcToPKPi };
enum DecayType { DPlusToPiKPi = 0,
LcToPKPi,
DsToPiKK,
N3ProngDecays }; //always keep N3ProngDecays at the end

// functions for specific particles

Expand Down
10 changes: 8 additions & 2 deletions Analysis/Tasks/PWGHF/HFD0CandidateSelector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,17 @@ struct HFD0CandidateSelector {

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

statusD0 = 0;
statusD0bar = 0;

if (!(hfCandProng2.hfflag() & 1 << D0ToPiK)) {
ginnocen marked this conversation as resolved.
Show resolved Hide resolved
hfSelD0Candidate(statusD0, statusD0bar);
continue;
}

auto trackPos = hfCandProng2.index0_as<aod::BigTracksPID>(); //positive daughter
auto trackNeg = hfCandProng2.index1_as<aod::BigTracksPID>(); //negative daughter

statusD0 = 0;
statusD0bar = 0;
topolD0 = true;
topolD0bar = true;
pidD0 = -1;
Expand Down
3 changes: 1 addition & 2 deletions Analysis/Tasks/PWGHF/HFLcCandidateSelector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,8 @@ struct HFLcCandidateSelector {

statusLcpKpi = 0;
statusLcpiKp = 0;
int LcFlag = hfCandProng3.hfflag();

if (!(LcFlag & 1 << 1)) {
if (!(hfCandProng3.hfflag() & 1 << LcToPKPi)) {
hfSelLcCandidate(statusLcpKpi, statusLcpiKp);
continue;
}
Expand Down
6 changes: 6 additions & 0 deletions Analysis/Tasks/PWGHF/taskD0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ struct TaskD0 {
{
//Printf("Candidates: %d", candidates.size());
for (auto& candidate : candidates) {
if (!(candidate.hfflag() & 1 << D0ToPiK)) {
continue;
}
if (cutEtaCandMax >= 0. && std::abs(candidate.eta()) > cutEtaCandMax) {
//Printf("Candidate: eta rejection: %g", candidate.eta());
continue;
Expand Down Expand Up @@ -120,6 +123,9 @@ struct TaskD0MC {
// MC rec.
//Printf("MC Candidates: %d", candidates.size());
for (auto& candidate : candidates) {
if (!(candidate.hfflag() & 1 << D0ToPiK)) {
continue;
}
if (cutEtaCandMax >= 0. && std::abs(candidate.eta()) > cutEtaCandMax) {
//Printf("MC Rec.: eta rejection: %g", candidate.eta());
continue;
Expand Down
6 changes: 6 additions & 0 deletions Analysis/Tasks/PWGHF/taskLc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ struct TaskLc {
void process(soa::Filtered<soa::Join<aod::HfCandProng3, aod::HFSelLcCandidate>> const& candidates)
{
for (auto& candidate : candidates) {
if (!(candidate.hfflag() & 1 << LcToPKPi)) {
continue;
}
if (cutEtaCandMax >= 0. && std::abs(candidate.eta()) > cutEtaCandMax) {
//Printf("Candidate: eta rejection: %g", candidate.eta());
continue;
Expand Down Expand Up @@ -120,6 +123,9 @@ struct TaskLcMC {
// MC rec.
//Printf("MC Candidates: %d", candidates.size());
for (auto& candidate : candidates) {
if (!(candidate.hfflag() & 1 << LcToPKPi)) {
continue;
}
if (cutEtaCandMax >= 0. && std::abs(candidate.eta()) > cutEtaCandMax) {
//Printf("MC Rec.: eta rejection: %g", candidate.eta());
continue;
Expand Down