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: Change the eta cut with the Y cut in the tasks #5393

Merged
merged 1 commit into from Feb 10, 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
20 changes: 10 additions & 10 deletions Analysis/Tasks/PWGHF/taskD0.cxx
Expand Up @@ -56,7 +56,7 @@ struct TaskD0 {

Configurable<int> d_selectionFlagD0{"d_selectionFlagD0", 1, "Selection Flag for D0"};
Configurable<int> d_selectionFlagD0bar{"d_selectionFlagD0bar", 1, "Selection Flag for D0bar"};
Configurable<double> cutEtaCandMax{"cutEtaCandMax", -1., "max. cand. pseudorapidity"};
Configurable<double> cutYCandMax{"cutYCandMax", -1., "max. cand. rapidity"};

Filter filterSelectCandidates = (aod::hf_selcandidate_d0::isSelD0 >= d_selectionFlagD0 || aod::hf_selcandidate_d0::isSelD0bar >= d_selectionFlagD0bar);

Expand All @@ -67,8 +67,8 @@ struct TaskD0 {
if (!(candidate.hfflag() & 1 << D0ToPiK)) {
continue;
}
if (cutEtaCandMax >= 0. && std::abs(candidate.eta()) > cutEtaCandMax) {
//Printf("Candidate: eta rejection: %g", candidate.eta());
if (cutYCandMax >= 0. && std::abs(YD0(candidate)) > cutYCandMax) {
//Printf("Candidate: Y rejection: %g", YD0(candidate));
continue;
}
if (candidate.isSelD0() >= d_selectionFlagD0) {
Expand Down Expand Up @@ -114,7 +114,7 @@ struct TaskD0MC {

Configurable<int> d_selectionFlagD0{"d_selectionFlagD0", 1, "Selection Flag for D0"};
Configurable<int> d_selectionFlagD0bar{"d_selectionFlagD0bar", 1, "Selection Flag for D0bar"};
Configurable<double> cutEtaCandMax{"cutEtaCandMax", -1., "max. cand. pseudorapidity"};
Configurable<double> cutYCandMax{"cutYCandMax", -1., "max. cand. rapidity"};

Filter filterSelectCandidates = (aod::hf_selcandidate_d0::isSelD0 >= d_selectionFlagD0 || aod::hf_selcandidate_d0::isSelD0bar >= d_selectionFlagD0bar);

Expand All @@ -127,8 +127,8 @@ struct TaskD0MC {
if (!(candidate.hfflag() & 1 << D0ToPiK)) {
continue;
}
if (cutEtaCandMax >= 0. && std::abs(candidate.eta()) > cutEtaCandMax) {
//Printf("MC Rec.: eta rejection: %g", candidate.eta());
if (cutYCandMax >= 0. && std::abs(YD0(candidate)) > cutYCandMax) {
//Printf("MC Rec.: Y rejection: %g", YD0(candidate));
continue;
}
if (std::abs(candidate.flagMCMatchRec()) == 1 << D0ToPiK) {
Expand All @@ -148,11 +148,11 @@ struct TaskD0MC {
// MC gen.
//Printf("MC Particles: %d", particlesMC.size());
for (auto& particle : particlesMC) {
if (cutEtaCandMax >= 0. && std::abs(particle.eta()) > cutEtaCandMax) {
//Printf("MC Gen.: eta rejection: %g", particle.eta());
continue;
}
if (std::abs(particle.flagMCMatchGen()) == 1 << D0ToPiK) {
if (cutYCandMax >= 0. && std::abs(RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > cutYCandMax) {
//Printf("MC Gen.: Y rejection: %g", RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())));
continue;
}
registry.fill(HIST("hPtGen"), particle.pt());
registry.fill(HIST("hEtaGen"), particle.eta());
}
Expand Down
31 changes: 19 additions & 12 deletions Analysis/Tasks/PWGHF/taskLc.cxx
Expand Up @@ -55,7 +55,7 @@ struct TaskLc {
{"hdca2", "3-prong candidates;prong DCA to sec. vertex (cm);entries", {HistType::kTH1F, {{100, 0., 1.}}}}}};

Configurable<int> d_selectionFlagLc{"d_selectionFlagLc", 1, "Selection Flag for Lc"};
Configurable<double> cutEtaCandMax{"cutEtaCandMax", -1., "max. cand. pseudorapidity"};
Configurable<double> cutYCandMax{"cutYCandMax", -1., "max. cand. rapidity"};

Filter filterSelectCandidates = (aod::hf_selcandidate_lc::isSelLcpKpi >= d_selectionFlagLc || aod::hf_selcandidate_lc::isSelLcpiKp >= d_selectionFlagLc);

Expand All @@ -66,8 +66,8 @@ struct TaskLc {
if (!(candidate.hfflag() & 1 << LcToPKPi)) {
continue;
}
if (cutEtaCandMax >= 0. && std::abs(candidate.eta()) > cutEtaCandMax) {
//Printf("Candidate: eta rejection: %g", candidate.eta());
if (cutYCandMax >= 0. && std::abs(YLc(candidate)) > cutYCandMax) {
//Printf("Candidate: Y rejection: %g", YLc(candidate));
continue;
}
if (candidate.isSelLcpKpi() >= d_selectionFlagLc) {
Expand Down Expand Up @@ -105,6 +105,7 @@ struct TaskLcMC {
{{"hPtRecSig", "3-prong candidates (rec. matched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
{"hPtRecBg", "3-prong candidates (rec. unmatched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
{"hPtGen", "3-prong candidates (gen. matched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
{"hPtGenSig", "3-prong candidates (rec. matched);#it{p}_{T} (GeV/#it{c});entries", {HistType::kTH1F, {{100, 0., 10.}}}},
{"hCPARecSig", "3-prong candidates (rec. matched);cosine of pointing angle;entries", {HistType::kTH1F, {{110, -1.1, 1.1}}}},
{"hCPARecBg", "3-prong candidates (rec. unmatched);cosine of pointing angle;entries", {HistType::kTH1F, {{110, -1.1, 1.1}}}},
{"hEtaRecSig", "3-prong candidates (rec. matched);#it{#eta};entries", {HistType::kTH1F, {{100, -2., 2.}}}},
Expand All @@ -113,25 +114,31 @@ struct TaskLcMC {

Configurable<int> d_selectionFlagLc{"d_selectionFlagLc", 1, "Selection Flag for Lc"};
Configurable<int> d_selectionFlagLcbar{"d_selectionFlagLcbar", 1, "Selection Flag for Lcbar"};
Configurable<double> cutEtaCandMax{"cutEtaCandMax", -1., "max. cand. pseudorapidity"};
Configurable<double> cutYCandMax{"cutYCandMax", -1., "max. cand. rapidity"};

Filter filterSelectCandidates = (aod::hf_selcandidate_lc::isSelLcpKpi >= d_selectionFlagLc || aod::hf_selcandidate_lc::isSelLcpiKp >= d_selectionFlagLc);

void process(soa::Filtered<soa::Join<aod::HfCandProng3, aod::HFSelLcCandidate, aod::HfCandProng3MCRec>> const& candidates,
soa::Join<aod::McParticles, aod::HfCandProng3MCGen> const& particlesMC)
soa::Join<aod::McParticles, aod::HfCandProng3MCGen> const& particlesMC, aod::BigTracksMC const& tracks)
{
// 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());
if (cutYCandMax >= 0. && std::abs(YLc(candidate)) > cutYCandMax) {
//Printf("MC Rec.: Y rejection: %g", YLc(candidate));
continue;
}

if (std::abs(candidate.flagMCMatchRec()) == 1 << LcToPKPi) {
registry.fill(HIST("hPtRecSig"), candidate.pt());
// Get the corresponding MC particle.
auto indexMother = RecoDecay::getMother(particlesMC, candidate.index0_as<aod::BigTracksMC>().label_as<soa::Join<aod::McParticles, aod::HfCandProng3MCGen>>(), 4122, true);
auto particleMother = particlesMC.iteratorAt(indexMother);
registry.fill(HIST("hPtGenSig"), particleMother.pt()); //gen. level pT
registry.fill(HIST("hPtRecSig"), candidate.pt()); //rec. level pT
registry.fill(HIST("hCPARecSig"), candidate.cpa());
registry.fill(HIST("hEtaRecSig"), candidate.eta());
} else {
Expand All @@ -143,11 +150,11 @@ struct TaskLcMC {
// MC gen.
//Printf("MC Particles: %d", particlesMC.size());
for (auto& particle : particlesMC) {
if (cutEtaCandMax >= 0. && std::abs(particle.eta()) > cutEtaCandMax) {
//Printf("MC Gen.: eta rejection: %g", particle.eta());
continue;
}
if (std::abs(particle.flagMCMatchGen()) == 1 << LcToPKPi) {
if (cutYCandMax >= 0. && std::abs(RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode()))) > cutYCandMax) {
//Printf("MC Gen.: Y rejection: %g", RecoDecay::Y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())));
continue;
}
registry.fill(HIST("hPtGen"), particle.pt());
registry.fill(HIST("hEtaGen"), particle.eta());
}
Expand Down