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
51 changes: 25 additions & 26 deletions PWGLF/Tasks/Strangeness/v0postprocessing.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
/// \author Francesca Ercolessi (francesca.ercolessi@cern.ch)
/// \since

#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "PWGLF/DataModel/LFStrangenessTables.h"
#include "PWGLF/DataModel/v0qaanalysis.h"

#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include "CommonConstants/PhysicsConstants.h"
#include "Framework/AnalysisTask.h"
#include "Framework/runDataProcessing.h"

using namespace o2;
using namespace o2::framework;
Expand Down Expand Up @@ -122,11 +124,11 @@
registry.add("hMassLambda_MC", "hMassLambda", {HistType::kTH1F, {{200, 1.016f, 1.216f}}});
registry.add("hMassVsPtLambdaVsCentFT0M_MC", ";p_{T} [GeV/c];M_{p^{+}#pi^{-}} [GeV/c^{2}]", {HistType::kTH3F, {{250, 0.0f, 25.0f}, {100, 0.f, 100.f}, {200, 1.016f, 1.216f}}});
registry.add("hMassAntiLambda_MC", "hMassAntiLambda", {HistType::kTH1F, {{200, 1.016f, 1.216f}}});
registry.add("hMassVsPtLambdaVsMotherPt_DoubleCharged_MC", ";p_{T} [GeV/c] (V0);p_{T}^{gen} [GeV/c] (Xi);M_{p^{-}#pi^{+}} [GeV/c^{2}]", {HistType::kTH3F, {{250, 0.0f, 25.0f}, {250, 0.0f, 25.0f}, {200, 1.016f, 1.216f}}});
registry.add("hMassVsPtLambdaVsMotherPt_MCRatio_MC", ";p_{T} [GeV/c] (V0);p_{T}^{gen} [GeV/c] (Xi);M_{p^{-}#pi^{+}} [GeV/c^{2}]", {HistType::kTH3F, {{250, 0.0f, 25.0f}, {250, 0.0f, 25.0f}, {200, 1.016f, 1.216f}}});
registry.add("hFDVsPtLambdaVsMotherPt_DoubleCharged_MC", ";p_{T} [GeV/c] (V0);p_{T}^{gen} [GeV/c] (#Xi^{-}); percentile", {HistType::kTH3F, {{250, 0.0f, 25.0f}, {250, 0.0f, 25.0f}, {100, 0.f, 100.f}}});
registry.add("hFDVsPtLambdaVsMotherPt_MCRatio_MC", ";p_{T} [GeV/c] (V0);p_{T}^{gen} [GeV/c] (#Xi^{-/0}); percentile", {HistType::kTH3F, {{250, 0.0f, 25.0f}, {250, 0.0f, 25.0f}, {100, 0.f, 100.f}}});
registry.add("hMassVsPtAntiLambdaVsCentFT0M_MC", ";p_{T} [GeV/c];M_{p^{-}#pi^{+}} [GeV/c^{2}]", {HistType::kTH3F, {{250, 0.0f, 25.0f}, {100, 0.f, 100.f}, {200, 1.016f, 1.216f}}});
registry.add("hMassVsPtAntiLambdaVsMotherPt_DoubleCharged_MC", ";p_{T} [GeV/c] (V0);p_{T}^{gen} [GeV/c] (Xi);M_{p^{-}#pi^{+}} [GeV/c^{2}]", {HistType::kTH3F, {{250, 0.0f, 25.0f}, {250, 0.0f, 25.0f}, {200, 1.016f, 1.216f}}});
registry.add("hMassVsPtAntiLambdaVsMotherPt_MCRatio_MC", ";p_{T} [GeV/c] (V0);p_{T}^{gen} [GeV/c] (Xi);M_{p^{-}#pi^{+}} [GeV/c^{2}]", {HistType::kTH3F, {{250, 0.0f, 25.0f}, {250, 0.0f, 25.0f}, {200, 1.016f, 1.216f}}});
registry.add("hFDVsPtAntiLambdaVsMotherPt_DoubleCharged_MC", ";p_{T} [GeV/c] (V0);p_{T}^{gen} [GeV/c] (#bar{#Xi}^{+});percentile", {HistType::kTH3F, {{250, 0.0f, 25.0f}, {250, 0.0f, 25.0f}, {100, 0.f, 100.f}}});
registry.add("hFDVsPtAntiLambdaVsMotherPt_MCRatio_MC", ";p_{T} [GeV/c] (V0);p_{T}^{gen} [GeV/c] (#bar{#Xi}^{+/0});percentile", {HistType::kTH3F, {{250, 0.0f, 25.0f}, {250, 0.0f, 25.0f}, {100, 0.f, 100.f}}});
}

if (doQA) {
Expand Down Expand Up @@ -326,7 +328,7 @@

void process(aod::MyV0Candidates const& myv0s)
{
for (auto& candidate : myv0s) {

Check failure on line 331 in PWGLF/Tasks/Strangeness/v0postprocessing.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.

if (doQA) {
registry.fill(HIST("QA/hK0sSelection"), 0.5);
Expand Down Expand Up @@ -398,7 +400,7 @@
if (candidate.v0cospa() > cospaK0s &&
std::abs(candidate.rapk0short()) < rap &&
candidate.ctauk0short() < ctauK0s &&
std::abs(candidate.massk0short() - o2::constants::physics::MassK0Short) < 0.075 &&
std::abs(candidate.massk0short() - o2::constants::physics::MassK0Short) < 0.1 &&

Check failure on line 403 in PWGLF/Tasks/Strangeness/v0postprocessing.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
std::abs(candidate.masslambda() - o2::constants::physics::MassLambda0) > v0rejK0s &&
std::abs(candidate.ntpcsigmanegpi()) <= ntpcsigma &&
std::abs(candidate.ntpcsigmapospi()) <= ntpcsigma &&
Expand All @@ -409,7 +411,7 @@
registry.fill(HIST("hMassVsPtK0ShortVsCentFT0M"), candidate.v0pt(), candidate.multft0m(), candidate.massk0short());

if (isMC &&
candidate.pdgcode() == 310 &&

Check failure on line 414 in PWGLF/Tasks/Strangeness/v0postprocessing.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.

Check failure on line 414 in PWGLF/Tasks/Strangeness/v0postprocessing.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
candidate.isdauk0short() &&
candidate.isphysprimary() == 1) {

Expand Down Expand Up @@ -448,20 +450,17 @@
registry.fill(HIST("hMassVsPtLambda"), candidate.v0pt(), candidate.masslambda());
registry.fill(HIST("hMassVsPtLambdaVsCentFT0M"), candidate.v0pt(), candidate.multft0m(), candidate.masslambda());

if (isMC) {

if (candidate.pdgcode() == 3122 && candidate.isdaulambda()) {

if (candidate.isphysprimary() == 1) {
registry.fill(HIST("hMassLambda_MC"), candidate.masslambda());
registry.fill(HIST("hMassVsPtLambdaVsCentFT0M_MC"), candidate.v0pt(), candidate.multft0m(), candidate.masslambda());
}
if (isMC && candidate.pdgcode() == 3122 && candidate.isdaulambda()) {

Check failure on line 453 in PWGLF/Tasks/Strangeness/v0postprocessing.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.

if (candidate.isphysprimary() == 1) {
registry.fill(HIST("hMassLambda_MC"), candidate.masslambda());
registry.fill(HIST("hMassVsPtLambdaVsCentFT0M_MC"), candidate.v0pt(), candidate.multft0m(), candidate.masslambda());
} else if (std::abs(candidate.masslambda() - o2::constants::physics::MassLambda0) < 0.01) {
if (candidate.pdgcodemother() == 3312) {

Check failure on line 459 in PWGLF/Tasks/Strangeness/v0postprocessing.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registry.fill(HIST("hMassVsPtLambdaVsMotherPt_DoubleCharged_MC"), candidate.v0pt(), candidate.v0motherpt(), candidate.masslambda());
registry.fill(HIST("hFDVsPtLambdaVsMotherPt_DoubleCharged_MC"), candidate.v0pt(), candidate.v0motherpt(), candidate.multft0m());
}
if (candidate.pdgcodemother() == 3312 || candidate.pdgcodemother() == 3322) {

Check failure on line 462 in PWGLF/Tasks/Strangeness/v0postprocessing.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registry.fill(HIST("hMassVsPtLambdaVsMotherPt_MCRatio_MC"), candidate.v0pt(), candidate.v0motherpt(), candidate.masslambda());
registry.fill(HIST("hFDVsPtLambdaVsMotherPt_MCRatio_MC"), candidate.v0pt(), candidate.v0motherpt(), candidate.multft0m());
}
}
}
Expand Down Expand Up @@ -489,18 +488,18 @@
registry.fill(HIST("hMassVsPtAntiLambda"), candidate.v0pt(), candidate.massantilambda());
registry.fill(HIST("hMassVsPtAntiLambdaVsCentFT0M"), candidate.v0pt(), candidate.multft0m(), candidate.massantilambda());

if (candidate.pdgcode() == -3122 && candidate.isdauantilambda()) {
if (isMC && candidate.pdgcode() == -3122 && candidate.isdauantilambda()) {

Check failure on line 491 in PWGLF/Tasks/Strangeness/v0postprocessing.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.

if (candidate.isphysprimary() == 1) {
registry.fill(HIST("hMassAntiLambda_MC"), candidate.massantilambda());
registry.fill(HIST("hMassVsPtAntiLambdaVsCentFT0M_MC"), candidate.v0pt(), candidate.v0motherpt(), candidate.massantilambda());
}

if (candidate.pdgcodemother() == -3312) {
registry.fill(HIST("hMassVsPtAntiLambdaVsMotherPt_DoubleCharged_MC"), candidate.v0pt(), candidate.v0motherpt(), candidate.massantilambda());
}
if (candidate.pdgcodemother() == -3312 || candidate.pdgcodemother() == -3322) {
registry.fill(HIST("hMassVsPtAntiLambdaVsMotherPt_MCRatio_MC"), candidate.v0pt(), candidate.v0motherpt(), candidate.massantilambda());
} else if (std::abs(candidate.massantilambda() - o2::constants::physics::MassLambda0) < 0.01) {
if (candidate.pdgcodemother() == -3312) {

Check failure on line 497 in PWGLF/Tasks/Strangeness/v0postprocessing.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registry.fill(HIST("hFDVsPtAntiLambdaVsMotherPt_DoubleCharged_MC"), candidate.v0pt(), candidate.v0motherpt(), candidate.multft0m());
}
if (candidate.pdgcodemother() == -3312 || candidate.pdgcodemother() == -3322) {

Check failure on line 500 in PWGLF/Tasks/Strangeness/v0postprocessing.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
registry.fill(HIST("hFDVsPtAntiLambdaVsMotherPt_MCRatio_MC"), candidate.v0pt(), candidate.v0motherpt(), candidate.multft0m());
}
}
}

Expand Down
Loading