From 8ce2d308bb0aeb36cc1e69988be65d0c3eb10395 Mon Sep 17 00:00:00 2001 From: Giovanni Malfattore Date: Tue, 12 Jul 2022 18:08:28 +0200 Subject: [PATCH 1/8] Fix y cut. Add antiproton histograms. --- PWGLF/Tasks/LFNucleiBATask.cxx | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/PWGLF/Tasks/LFNucleiBATask.cxx b/PWGLF/Tasks/LFNucleiBATask.cxx index cb892ec008e..69ee184fc34 100644 --- a/PWGLF/Tasks/LFNucleiBATask.cxx +++ b/PWGLF/Tasks/LFNucleiBATask.cxx @@ -42,6 +42,7 @@ struct LFNucleiBATask { Configurable nsigmaTPCcut{"nsigmaTPCcut", 5.f, "Value of the Nsigma TPC cut"}; Configurable nsigmaTOFcut{"nsigmaTOFcut", 5.f, "Value of the Nsigma TOF cut"}; Configurable etaCut{"etaCut", 0.8f, "Value of the eta selection for spectra (default 0.8)"}; + Configurable yCut{"yCut", 0.5f, "Value of the rapidity selection for spectra (default 0.5)"}; Configurable cfgCutVertex{"cfgCutVSertex", 10.0f, "Accepted z-vertex range"}; ConfigurableAxis binsPt{"binsPt", {VARIABLE_WIDTH, 0.0, 0.1, 0.12, 0.14, 0.16, 0.18, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.4, 3.6, 3.8, 4.0, 4.2, 4.4, 4.6, 4.8, 5.0}, ""}; static constexpr int PDGPion = 211; @@ -89,8 +90,11 @@ struct LFNucleiBATask { if (doprocessMCReco) { histos.add("tracks/proton/h1ProtonSpectraTrue", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/proton/h1antiProtonSpectraTrue", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); histos.add("tracks/deuteron/h1DeuteronSpectraTrue", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/deuteron/h1antiDeuteronSpectraTrue", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); histos.add("tracks/helium/h1HeliumSpectraTrue", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/helium/h1antiHeliumSpectraTrue", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); } histos.add("tracks/h2TPCsignVsTPCmomentum", "-dE/dX vs p; p (GeV/c); -dE/dx (a.u.)", HistType::kTH2F, {{500, 0.0, 5.0}, {81000, 0.0, 1E3}}); @@ -133,6 +137,11 @@ struct LFNucleiBATask { histos.add("spectraGen/histGenPtProtonSec", "generated particles", HistType::kTH1F, {ptAxis}); histos.add("spectraGen/histSecTransportPtProton", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtantiProton", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtantiProtonPrim", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtantiProtonSec", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histSecTransportPtantiProton", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtD", "generated particles", HistType::kTH1F, {ptAxis}); histos.add("spectraGen/histGenPtDPrim", "generated particles", HistType::kTH1F, {ptAxis}); histos.add("spectraGen/histGenPtDSec", "generated particles", HistType::kTH1F, {ptAxis}); @@ -239,8 +248,14 @@ struct LFNucleiBATask { if (std::abs(track.pdgCode()) == PDGProton) histos.fill(HIST("tracks/proton/h1ProtonSpectraTrue"), track.pt()); + if (std::abs(track.pdgCode()) == -PDGProton) + histos.fill(HIST("tracks/proton/h1antiProtonSpectraTrue"), track.pt()); + if (std::abs(track.pdgCode()) == PDGDeuteron) histos.fill(HIST("tracks/deuteron/h1DeuteronSpectraTrue"), track.pt()); + + if (std::abs(track.pdgCode()) == -PDGDeuteron) + histos.fill(HIST("tracks/deuteron/h1antiDeuteronSpectraTrue"), track.pt()); if (std::abs(track.pdgCode()) == PDGHelium) histos.fill(HIST("tracks/helium/h1HeliumSpectraTrue"), track.pt()); @@ -268,7 +283,7 @@ struct LFNucleiBATask { nCount++; histos.fill(HIST("spectraGen/histGenVetxZ"), mcCollision.posZ()); for (auto& mcParticleGen : mcParticles) { - if (abs(mcParticleGen.y()) > std::abs(etaCut)) { + if (abs(mcParticleGen.y()) > std::abs(yCut)) { continue; } @@ -301,6 +316,15 @@ struct LFNucleiBATask { if (!isPhysPrim && !isProdByGen) histos.fill(HIST("spectraGen/histSecTransportPtProton"), mcParticleGen.pt()); } + if (std::abs(mcParticleGen.pdgCode()) == -PDGProton) { + histos.fill(HIST("spectraGen/histGenPtantiProton"), mcParticleGen.pt()); + if (isPhysPrim) + histos.fill(HIST("spectraGen/histGenPtantiProtonPrim"), mcParticleGen.pt()); + if (!isPhysPrim && isProdByGen) + histos.fill(HIST("spectraGen/histGenPtantiProtonSec"), mcParticleGen.pt()); + if (!isPhysPrim && !isProdByGen) + histos.fill(HIST("spectraGen/histSecTransportPtantiProton"), mcParticleGen.pt()); + } if (mcParticleGen.pdgCode() == PDGDeuteron) { histos.fill(HIST("spectraGen/histGenPtD"), mcParticleGen.pt()); if (isPhysPrim) From 487e34571ae7711ca5150be6ef6e81e2142a9da0 Mon Sep 17 00:00:00 2001 From: Giovanni Malfattore Date: Tue, 12 Jul 2022 18:13:25 +0200 Subject: [PATCH 2/8] Fix format issues. --- PWGLF/Tasks/LFNucleiBATask.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGLF/Tasks/LFNucleiBATask.cxx b/PWGLF/Tasks/LFNucleiBATask.cxx index 69ee184fc34..d4ac8d44b06 100644 --- a/PWGLF/Tasks/LFNucleiBATask.cxx +++ b/PWGLF/Tasks/LFNucleiBATask.cxx @@ -253,7 +253,7 @@ struct LFNucleiBATask { if (std::abs(track.pdgCode()) == PDGDeuteron) histos.fill(HIST("tracks/deuteron/h1DeuteronSpectraTrue"), track.pt()); - + if (std::abs(track.pdgCode()) == -PDGDeuteron) histos.fill(HIST("tracks/deuteron/h1antiDeuteronSpectraTrue"), track.pt()); @@ -283,7 +283,7 @@ struct LFNucleiBATask { nCount++; histos.fill(HIST("spectraGen/histGenVetxZ"), mcCollision.posZ()); for (auto& mcParticleGen : mcParticles) { - if (abs(mcParticleGen.y()) > std::abs(yCut)) { + if (abs(mcParticleGen.y()) > std::abs(yCut)) { continue; } From 9c6686b2a009c58764d95aeaf174ee113d8b163d Mon Sep 17 00:00:00 2001 From: Giovanni Malfattore Date: Mon, 18 Jul 2022 20:07:47 +0200 Subject: [PATCH 3/8] Small histogram fixes --- PWGLF/Tasks/LFNucleiBATask.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGLF/Tasks/LFNucleiBATask.cxx b/PWGLF/Tasks/LFNucleiBATask.cxx index bccec3ec7d9..3efa9e94cb8 100644 --- a/PWGLF/Tasks/LFNucleiBATask.cxx +++ b/PWGLF/Tasks/LFNucleiBATask.cxx @@ -74,8 +74,8 @@ struct LFNucleiBATask { // trackQA histos.add("tracks/h1Eta", "pseudoRapidity; #eta; counts", HistType::kTH1F, {{200, -1.0, 1.0}}); - histos.add("tracks/h1VarPhi", "#phi; #phi; counts", HistType::kTH1F, {{80, -0.5, 7.5}}); - histos.add("tracks/h2EtaVsPhi", "#eta (TOF) vs #phi; #eta; #phi", HistType::kTH2F, {{200, -1.0, 1.0}, {80, -0.5, 7.5}}); + histos.add("tracks/h1VarPhi", "#phi; #phi; counts", HistType::kTH1F, {{63, 0.0, 6.3}}); + histos.add("tracks/h2EtaVsPhi", "#eta vs #phi; #eta; #phi", HistType::kTH2F, {{200, -1.0, 1.0}, 63, 0.0, 6.3}}); histos.add("tracks/h1pT", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{1000, 0., 10}}); histos.add("tracks/h1p", "Track momentum; p (GeV/#it{c}); counts", HistType::kTH1F, {{1000, 0., 10.}}); From 4a0acf13d6058ebc0b402de542772fadd199ba93 Mon Sep 17 00:00:00 2001 From: Giovanni Malfattore Date: Mon, 18 Jul 2022 20:12:42 +0200 Subject: [PATCH 4/8] Fix format issue --- PWGLF/Tasks/LFNucleiBATask.cxx | 627 +++++++++++++++++---------------- 1 file changed, 315 insertions(+), 312 deletions(-) diff --git a/PWGLF/Tasks/LFNucleiBATask.cxx b/PWGLF/Tasks/LFNucleiBATask.cxx index 3efa9e94cb8..9784e10f121 100644 --- a/PWGLF/Tasks/LFNucleiBATask.cxx +++ b/PWGLF/Tasks/LFNucleiBATask.cxx @@ -75,350 +75,353 @@ struct LFNucleiBATask { // trackQA histos.add("tracks/h1Eta", "pseudoRapidity; #eta; counts", HistType::kTH1F, {{200, -1.0, 1.0}}); histos.add("tracks/h1VarPhi", "#phi; #phi; counts", HistType::kTH1F, {{63, 0.0, 6.3}}); - histos.add("tracks/h2EtaVsPhi", "#eta vs #phi; #eta; #phi", HistType::kTH2F, {{200, -1.0, 1.0}, 63, 0.0, 6.3}}); - histos.add("tracks/h1pT", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{1000, 0., 10}}); - histos.add("tracks/h1p", "Track momentum; p (GeV/#it{c}); counts", HistType::kTH1F, {{1000, 0., 10.}}); - - // tracks - histos.add("tracks/hDCAxy", "DCAxy; #DCAxy; counts", HistType::kTH1F, {{200, -2.0, 2.0}}); - histos.add("tracks/hDCAz", "DCAz; #DCAz; counts", HistType::kTH1F, {{200, -2.0, 2.0}}); - histos.add("tracks/hDCAxyVsDCAz", "DCAxy vs DCAz; DCAxy (cm); DCAz (cm)", HistType::kTH2F, {{200, -2.0, 2.0}, {200, -2.0, 2.0}}); - - histos.add("tracks/proton/h1ProtonSpectra", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/deuteron/h1DeuteronSpectra", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/helium/h1HeliumSpectra", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); - - if (doprocessMCReco) { - histos.add("tracks/proton/h1ProtonSpectraTrue", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/proton/h1ProtonSpectraTruePrim", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/proton/h1ProtonSpectraTrueSec", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/proton/h1ProtonSpectraTrueTransport", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - - histos.add("tracks/proton/h1antiProtonSpectraTrue", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/proton/h1antiProtonSpectraTruePrim", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/proton/h1antiProtonSpectraTrueSec", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/proton/h1antiProtonSpectraTrueTransport", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - - histos.add("tracks/deuteron/h1DeuteronSpectraTrue", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/deuteron/h1DeuteronSpectraTruePrim", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/deuteron/h1DeuteronSpectraTrueSec", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/deuteron/h1DeuteronSpectraTrueTransport", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - - histos.add("tracks/deuteron/h1antiDeuteronSpectraTrue", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/deuteron/h1antiDeuteronSpectraTruePrim", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/deuteron/h1antiDeuteronSpectraTrueSec", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/deuteron/h1antiDeuteronSpectraTrueTransport", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - - histos.add("tracks/helium/h1HeliumSpectraTrue", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/helium/h1HeliumSpectraTruePrim", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/helium/h1HeliumSpectraTrueSec", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/helium/h1HeliumSpectraTrueTransport", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); - - histos.add("tracks/helium/h1antiHeliumSpectraTrue", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); - } - - histos.add("tracks/h2TPCsignVsTPCmomentum", "-dE/dX vs p; p (GeV/c); -dE/dx (a.u.)", HistType::kTH2F, {{500, 0.0, 5.0}, {81000, 0.0, 1E3}}); - histos.add("tracks/h2TOFbetaVsP", "#beta (TOF) vs p; p (GeV/c); #beta", HistType::kTH2F, {{500, 0.0, 5.0}, {1200, 0.0, 1.2}}); - - histos.add("tracks/pion/h2PionVspTNSigmaTPC", "NSigmaTPC(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/kaon/h2KaonVspTNSigmaTPC", "NSigmaTPC(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/proton/h2ProtonVspTNSigmaTPC", "NSigmaTPC(proton) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTPC", "NSigmaTPC(D) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/helium/h2HeliumVspTNSigmaTPC", "NSigmaTPC(He) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/pion/h2PionVspTNSigmaTOF", "NSigmaTOF(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/kaon/h2KaonVspTNSigmaTOF", "NSigmaTOF(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(proton) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(D) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/helium/h2HeliumVspTNSigmaTOF", "NSigmaTOF(He) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - - // TOF mass histograms - histos.add("tracks/h2TOFmassVsPt", "h2TOFmassVsPt; TOFmass; #it{p}_{T} (GeV)", HistType::kTH2F, {{600, 0., 3.}, {500, 0., 5.}}); - - // TOF mass squared histograms - histos.add("tracks/proton/h2TOFmass2ProtonVsPt", "#Delta M^{2} (p) vs #it{p}_{T}; #Delta M^{2} (p); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{600, -3., 3.}, {800, 0., 8.}}); - histos.add("tracks/deuteron/h2TOFmass2DeuteronVsPt", "#Delta M^{2} (d) vs #it{p}_{T}; #Delta M^{2} (d); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{1000, -5., 5.}, {800, 0., 8.}}); - histos.add("tracks/helium/h2TOFmass2HeliumVsPt", "#Delta M^{2} (He) vs #it{p}_{T}; #Delta M^{2} (He); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{1800, -9., 9.}, {800, 0., 8.}}); - - // MC histograms - // AxisSpec ptAxis = {2000, 0.f, 20.f, "#it{p}_{T} (GeV/#it{c})"}; - histos.add("spectraGen/histGenVetxZ", "PosZ generated events", HistType::kTH1F, {{2000, -20.f, 20.f, "Vertex Z (cm)"}}); - histos.add("spectraGen/histGenPtPion", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtPionPrim", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtPionSec", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histSecTransportPtPion", "generated particles", HistType::kTH1F, {ptAxis}); - - histos.add("spectraGen/histGenPtKaon", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtKaonPrim", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtKaonSec", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histSecTransportPtKaon", "generated particles", HistType::kTH1F, {ptAxis}); - - histos.add("spectraGen/histGenPtProton", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtProtonPrim", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtProtonSec", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histSecTransportPtProton", "generated particles", HistType::kTH1F, {ptAxis}); - - histos.add("spectraGen/histGenPtantiProton", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtantiProtonPrim", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtantiProtonSec", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histSecTransportPtantiProton", "generated particles", HistType::kTH1F, {ptAxis}); - - histos.add("spectraGen/histGenPtD", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtDPrim", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtDSec", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histSecTransportPtD", "generated particles", HistType::kTH1F, {ptAxis}); - - histos.add("spectraGen/histGenPtantiD", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtantiDPrim", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtantiDSec", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histSecTransportPtantiD", "generated particles", HistType::kTH1F, {ptAxis}); - - histos.add("spectraGen/histGenPtHe", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtHePrim", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtHeSec", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histSecTransportPtHe", "generated particles", HistType::kTH1F, {ptAxis}); - - histos.add("spectraGen/histGenPtantiHe", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtantiHePrim", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtantiHeSec", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histSecTransportPtantiHe", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("tracks/h2EtaVsPhi", "#eta vs #phi; #eta; #phi", HistType::kTH2F, { + {200, -1.0, 1.0}, 63, 0.0, 6.3} + }); + histos.add("tracks/h1pT", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{1000, 0., 10}}); + histos.add("tracks/h1p", "Track momentum; p (GeV/#it{c}); counts", HistType::kTH1F, {{1000, 0., 10.}}); + + // tracks + histos.add("tracks/hDCAxy", "DCAxy; #DCAxy; counts", HistType::kTH1F, {{200, -2.0, 2.0}}); + histos.add("tracks/hDCAz", "DCAz; #DCAz; counts", HistType::kTH1F, {{200, -2.0, 2.0}}); + histos.add("tracks/hDCAxyVsDCAz", "DCAxy vs DCAz; DCAxy (cm); DCAz (cm)", HistType::kTH2F, {{200, -2.0, 2.0}, {200, -2.0, 2.0}}); + + histos.add("tracks/proton/h1ProtonSpectra", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/deuteron/h1DeuteronSpectra", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/helium/h1HeliumSpectra", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); + + if (doprocessMCReco) { + histos.add("tracks/proton/h1ProtonSpectraTrue", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/proton/h1ProtonSpectraTruePrim", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/proton/h1ProtonSpectraTrueSec", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/proton/h1ProtonSpectraTrueTransport", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + + histos.add("tracks/proton/h1antiProtonSpectraTrue", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/proton/h1antiProtonSpectraTruePrim", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/proton/h1antiProtonSpectraTrueSec", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/proton/h1antiProtonSpectraTrueTransport", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + + histos.add("tracks/deuteron/h1DeuteronSpectraTrue", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/deuteron/h1DeuteronSpectraTruePrim", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/deuteron/h1DeuteronSpectraTrueSec", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/deuteron/h1DeuteronSpectraTrueTransport", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + + histos.add("tracks/deuteron/h1antiDeuteronSpectraTrue", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/deuteron/h1antiDeuteronSpectraTruePrim", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/deuteron/h1antiDeuteronSpectraTrueSec", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/deuteron/h1antiDeuteronSpectraTrueTransport", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + + histos.add("tracks/helium/h1HeliumSpectraTrue", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/helium/h1HeliumSpectraTruePrim", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/helium/h1HeliumSpectraTrueSec", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/helium/h1HeliumSpectraTrueTransport", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); + + histos.add("tracks/helium/h1antiHeliumSpectraTrue", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); } - template - void fillHistograms(const CollisionType& event, const TracksType& tracks) - { + histos.add("tracks/h2TPCsignVsTPCmomentum", "-dE/dX vs p; p (GeV/c); -dE/dx (a.u.)", HistType::kTH2F, {{500, 0.0, 5.0}, {81000, 0.0, 1E3}}); + histos.add("tracks/h2TOFbetaVsP", "#beta (TOF) vs p; p (GeV/c); #beta", HistType::kTH2F, {{500, 0.0, 5.0}, {1200, 0.0, 1.2}}); + + histos.add("tracks/pion/h2PionVspTNSigmaTPC", "NSigmaTPC(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/kaon/h2KaonVspTNSigmaTPC", "NSigmaTPC(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/proton/h2ProtonVspTNSigmaTPC", "NSigmaTPC(proton) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTPC", "NSigmaTPC(D) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/helium/h2HeliumVspTNSigmaTPC", "NSigmaTPC(He) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/pion/h2PionVspTNSigmaTOF", "NSigmaTOF(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/kaon/h2KaonVspTNSigmaTOF", "NSigmaTOF(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(proton) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(D) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/helium/h2HeliumVspTNSigmaTOF", "NSigmaTOF(He) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + + // TOF mass histograms + histos.add("tracks/h2TOFmassVsPt", "h2TOFmassVsPt; TOFmass; #it{p}_{T} (GeV)", HistType::kTH2F, {{600, 0., 3.}, {500, 0., 5.}}); + + // TOF mass squared histograms + histos.add("tracks/proton/h2TOFmass2ProtonVsPt", "#Delta M^{2} (p) vs #it{p}_{T}; #Delta M^{2} (p); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{600, -3., 3.}, {800, 0., 8.}}); + histos.add("tracks/deuteron/h2TOFmass2DeuteronVsPt", "#Delta M^{2} (d) vs #it{p}_{T}; #Delta M^{2} (d); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{1000, -5., 5.}, {800, 0., 8.}}); + histos.add("tracks/helium/h2TOFmass2HeliumVsPt", "#Delta M^{2} (He) vs #it{p}_{T}; #Delta M^{2} (He); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{1800, -9., 9.}, {800, 0., 8.}}); + + // MC histograms + // AxisSpec ptAxis = {2000, 0.f, 20.f, "#it{p}_{T} (GeV/#it{c})"}; + histos.add("spectraGen/histGenVetxZ", "PosZ generated events", HistType::kTH1F, {{2000, -20.f, 20.f, "Vertex Z (cm)"}}); + histos.add("spectraGen/histGenPtPion", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtPionPrim", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtPionSec", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histSecTransportPtPion", "generated particles", HistType::kTH1F, {ptAxis}); + + histos.add("spectraGen/histGenPtKaon", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtKaonPrim", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtKaonSec", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histSecTransportPtKaon", "generated particles", HistType::kTH1F, {ptAxis}); + + histos.add("spectraGen/histGenPtProton", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtProtonPrim", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtProtonSec", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histSecTransportPtProton", "generated particles", HistType::kTH1F, {ptAxis}); + + histos.add("spectraGen/histGenPtantiProton", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtantiProtonPrim", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtantiProtonSec", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histSecTransportPtantiProton", "generated particles", HistType::kTH1F, {ptAxis}); + + histos.add("spectraGen/histGenPtD", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtDPrim", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtDSec", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histSecTransportPtD", "generated particles", HistType::kTH1F, {ptAxis}); + + histos.add("spectraGen/histGenPtantiD", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtantiDPrim", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtantiDSec", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histSecTransportPtantiD", "generated particles", HistType::kTH1F, {ptAxis}); + + histos.add("spectraGen/histGenPtHe", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtHePrim", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtHeSec", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histSecTransportPtHe", "generated particles", HistType::kTH1F, {ptAxis}); + + histos.add("spectraGen/histGenPtantiHe", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtantiHePrim", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtantiHeSec", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histSecTransportPtantiHe", "generated particles", HistType::kTH1F, {ptAxis}); +} - float gamma = 0., massTOF = 0.; - - // Event histos fill - histos.fill(HIST("event/h1VtxZ"), event.posZ()); - histos.fill(HIST("event/h1CentV0M"), event.v0m()); - - for (auto& track : tracks) { - // LOG(info)<<"\n collisionId ============>"< +void fillHistograms(const CollisionType& event, const TracksType& tracks) +{ + + float gamma = 0., massTOF = 0.; + + // Event histos fill + histos.fill(HIST("event/h1VtxZ"), event.posZ()); + histos.fill(HIST("event/h1CentV0M"), event.v0m()); + + for (auto& track : tracks) { + // LOG(info)<<"\n collisionId ============>"<(event, tracks); - } // CLOSING PROCESS DATA - PROCESS_SWITCH(LFNucleiBATask, processData, "process data", true); - - void processMCReco(o2::aod::LfCandNucleusFullEvents::iterator const& event, - soa::Join const& tracks) - { - fillHistograms(event, tracks); - } // CLOSING PROCESS MC RECO - PROCESS_SWITCH(LFNucleiBATask, processMCReco, "process mc reco", false); - Int_t nCount = 0; - - void processMCGen(aod::McCollision const& mcCollision, aod::McParticles_001& mcParticles) - { - nCount++; - histos.fill(HIST("spectraGen/histGenVetxZ"), mcCollision.posZ()); - for (auto& mcParticleGen : mcParticles) { - if (abs(mcParticleGen.y()) > std::abs(yCut)) { - continue; - } - - bool isPhysPrim = mcParticleGen.isPhysicalPrimary(); - bool isProdByGen = mcParticleGen.producedByGenerator(); - if (std::abs(mcParticleGen.pdgCode()) == PDGPion) { - histos.fill(HIST("spectraGen/histGenPtPion"), mcParticleGen.pt()); - if (isPhysPrim) - histos.fill(HIST("spectraGen/histGenPtPionPrim"), mcParticleGen.pt()); - if (!isPhysPrim && isProdByGen) - histos.fill(HIST("spectraGen/histGenPtPionSec"), mcParticleGen.pt()); - if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("spectraGen/histSecTransportPtPion"), mcParticleGen.pt()); - } - if (std::abs(mcParticleGen.pdgCode()) == PDGKaon) { - histos.fill(HIST("spectraGen/histGenPtKaon"), mcParticleGen.pt()); - if (isPhysPrim) - histos.fill(HIST("spectraGen/histGenPtKaonPrim"), mcParticleGen.pt()); - if (!isPhysPrim && isProdByGen) - histos.fill(HIST("spectraGen/histGenPtKaonSec"), mcParticleGen.pt()); - if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("spectraGen/histSecTransportPtKaon"), mcParticleGen.pt()); - } - if (mcParticleGen.pdgCode() == PDGProton) { - histos.fill(HIST("spectraGen/histGenPtProton"), mcParticleGen.pt()); - if (isPhysPrim) - histos.fill(HIST("spectraGen/histGenPtProtonPrim"), mcParticleGen.pt()); - if (!isPhysPrim && isProdByGen) - histos.fill(HIST("spectraGen/histGenPtProtonSec"), mcParticleGen.pt()); - if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("spectraGen/histSecTransportPtProton"), mcParticleGen.pt()); - } - if (mcParticleGen.pdgCode() == -PDGProton) { - histos.fill(HIST("spectraGen/histGenPtantiProton"), mcParticleGen.pt()); + // PID + if (track.pdgCode() == PDGProton) { + histos.fill(HIST("tracks/proton/h1ProtonSpectraTrue"), track.pt()); if (isPhysPrim) - histos.fill(HIST("spectraGen/histGenPtantiProtonPrim"), mcParticleGen.pt()); + histos.fill(HIST("tracks/proton/h1ProtonSpectraTruePrim"), track.pt()); if (!isPhysPrim && isProdByGen) - histos.fill(HIST("spectraGen/histGenPtantiProtonSec"), mcParticleGen.pt()); + histos.fill(HIST("tracks/proton/h1ProtonSpectraTrueSec"), track.pt()); if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("spectraGen/histSecTransportPtantiProton"), mcParticleGen.pt()); + histos.fill(HIST("tracks/proton/h1ProtonSpectraTrueTransport"), track.pt()); } - if (mcParticleGen.pdgCode() == PDGDeuteron) { - histos.fill(HIST("spectraGen/histGenPtD"), mcParticleGen.pt()); + + if (track.pdgCode() == -PDGProton) { + histos.fill(HIST("tracks/proton/h1antiProtonSpectraTrue"), track.pt()); if (isPhysPrim) - histos.fill(HIST("spectraGen/histGenPtDPrim"), mcParticleGen.pt()); + histos.fill(HIST("tracks/proton/h1antiProtonSpectraTruePrim"), track.pt()); if (!isPhysPrim && isProdByGen) - histos.fill(HIST("spectraGen/histGenPtDSec"), mcParticleGen.pt()); + histos.fill(HIST("tracks/proton/h1antiProtonSpectraTrueSec"), track.pt()); if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("spectraGen/histSecTransportPtD"), mcParticleGen.pt()); + histos.fill(HIST("tracks/proton/h1antiProtonSpectraTrueTransport"), track.pt()); } - if (mcParticleGen.pdgCode() == -PDGDeuteron) { - histos.fill(HIST("spectraGen/histGenPtantiD"), mcParticleGen.pt()); + if (track.pdgCode() == PDGDeuteron) { + histos.fill(HIST("tracks/deuteron/h1DeuteronSpectraTrue"), track.pt()); if (isPhysPrim) - histos.fill(HIST("spectraGen/histGenPtantiDPrim"), mcParticleGen.pt()); + histos.fill(HIST("tracks/deuteron/h1DeuteronSpectraTruePrim"), track.pt()); if (!isPhysPrim && isProdByGen) - histos.fill(HIST("spectraGen/histGenPtantiDSec"), mcParticleGen.pt()); + histos.fill(HIST("tracks/deuteron/h1DeuteronSpectraTrueSec"), track.pt()); if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("spectraGen/histSecTransportPtantiD"), mcParticleGen.pt()); + histos.fill(HIST("tracks/deuteron/h1DeuteronSpectraTrueTransport"), track.pt()); } - if (mcParticleGen.pdgCode() == PDGHelium) { - histos.fill(HIST("spectraGen/histGenPtHe"), mcParticleGen.pt()); + + if (track.pdgCode() == -PDGDeuteron) { + histos.fill(HIST("tracks/deuteron/h1antiDeuteronSpectraTrue"), track.pt()); if (isPhysPrim) - histos.fill(HIST("spectraGen/histGenPtHePrim"), mcParticleGen.pt()); + histos.fill(HIST("tracks/deuteron/h1antiDeuteronSpectraTruePrim"), track.pt()); if (!isPhysPrim && isProdByGen) - histos.fill(HIST("spectraGen/histGenPtHeSec"), mcParticleGen.pt()); + histos.fill(HIST("tracks/deuteron/h1antiDeuteronSpectraTrueSec"), track.pt()); if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("spectraGen/histSecTransportPtHe"), mcParticleGen.pt()); + histos.fill(HIST("tracks/deuteron/h1antiDeuteronSpectraTrueTransport"), track.pt()); } - if (mcParticleGen.pdgCode() == -PDGHelium) { - histos.fill(HIST("spectraGen/histGenPtantiHe"), mcParticleGen.pt()); + + if (track.pdgCode() == PDGHelium) { + histos.fill(HIST("tracks/helium/h1HeliumSpectraTrue"), track.pt()); if (isPhysPrim) - histos.fill(HIST("spectraGen/histGenPtantiHePrim"), mcParticleGen.pt()); + histos.fill(HIST("tracks/helium/h1HeliumSpectraTruePrim"), track.pt()); if (!isPhysPrim && isProdByGen) - histos.fill(HIST("spectraGen/histGenPtantiHeSec"), mcParticleGen.pt()); + histos.fill(HIST("tracks/helium/h1HeliumSpectraTrueSec"), track.pt()); if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("spectraGen/histSecTransportPtantiHe"), mcParticleGen.pt()); + histos.fill(HIST("tracks/helium/h1HeliumSpectraTrueTransport"), track.pt()); } } - } // Close processMCGen - PROCESS_SWITCH(LFNucleiBATask, processMCGen, "process MC Generated", true); -}; + } +} + +void processData(o2::aod::LfCandNucleusFullEvents::iterator const& event, + o2::aod::LfCandNucleusFull const& tracks) +{ + fillHistograms(event, tracks); +} // CLOSING PROCESS DATA +PROCESS_SWITCH(LFNucleiBATask, processData, "process data", true); + +void processMCReco(o2::aod::LfCandNucleusFullEvents::iterator const& event, + soa::Join const& tracks) +{ + fillHistograms(event, tracks); +} // CLOSING PROCESS MC RECO +PROCESS_SWITCH(LFNucleiBATask, processMCReco, "process mc reco", false); +Int_t nCount = 0; + +void processMCGen(aod::McCollision const& mcCollision, aod::McParticles_001& mcParticles) +{ + nCount++; + histos.fill(HIST("spectraGen/histGenVetxZ"), mcCollision.posZ()); + for (auto& mcParticleGen : mcParticles) { + if (abs(mcParticleGen.y()) > std::abs(yCut)) { + continue; + } + + bool isPhysPrim = mcParticleGen.isPhysicalPrimary(); + bool isProdByGen = mcParticleGen.producedByGenerator(); + if (std::abs(mcParticleGen.pdgCode()) == PDGPion) { + histos.fill(HIST("spectraGen/histGenPtPion"), mcParticleGen.pt()); + if (isPhysPrim) + histos.fill(HIST("spectraGen/histGenPtPionPrim"), mcParticleGen.pt()); + if (!isPhysPrim && isProdByGen) + histos.fill(HIST("spectraGen/histGenPtPionSec"), mcParticleGen.pt()); + if (!isPhysPrim && !isProdByGen) + histos.fill(HIST("spectraGen/histSecTransportPtPion"), mcParticleGen.pt()); + } + if (std::abs(mcParticleGen.pdgCode()) == PDGKaon) { + histos.fill(HIST("spectraGen/histGenPtKaon"), mcParticleGen.pt()); + if (isPhysPrim) + histos.fill(HIST("spectraGen/histGenPtKaonPrim"), mcParticleGen.pt()); + if (!isPhysPrim && isProdByGen) + histos.fill(HIST("spectraGen/histGenPtKaonSec"), mcParticleGen.pt()); + if (!isPhysPrim && !isProdByGen) + histos.fill(HIST("spectraGen/histSecTransportPtKaon"), mcParticleGen.pt()); + } + if (mcParticleGen.pdgCode() == PDGProton) { + histos.fill(HIST("spectraGen/histGenPtProton"), mcParticleGen.pt()); + if (isPhysPrim) + histos.fill(HIST("spectraGen/histGenPtProtonPrim"), mcParticleGen.pt()); + if (!isPhysPrim && isProdByGen) + histos.fill(HIST("spectraGen/histGenPtProtonSec"), mcParticleGen.pt()); + if (!isPhysPrim && !isProdByGen) + histos.fill(HIST("spectraGen/histSecTransportPtProton"), mcParticleGen.pt()); + } + if (mcParticleGen.pdgCode() == -PDGProton) { + histos.fill(HIST("spectraGen/histGenPtantiProton"), mcParticleGen.pt()); + if (isPhysPrim) + histos.fill(HIST("spectraGen/histGenPtantiProtonPrim"), mcParticleGen.pt()); + if (!isPhysPrim && isProdByGen) + histos.fill(HIST("spectraGen/histGenPtantiProtonSec"), mcParticleGen.pt()); + if (!isPhysPrim && !isProdByGen) + histos.fill(HIST("spectraGen/histSecTransportPtantiProton"), mcParticleGen.pt()); + } + if (mcParticleGen.pdgCode() == PDGDeuteron) { + histos.fill(HIST("spectraGen/histGenPtD"), mcParticleGen.pt()); + if (isPhysPrim) + histos.fill(HIST("spectraGen/histGenPtDPrim"), mcParticleGen.pt()); + if (!isPhysPrim && isProdByGen) + histos.fill(HIST("spectraGen/histGenPtDSec"), mcParticleGen.pt()); + if (!isPhysPrim && !isProdByGen) + histos.fill(HIST("spectraGen/histSecTransportPtD"), mcParticleGen.pt()); + } + if (mcParticleGen.pdgCode() == -PDGDeuteron) { + histos.fill(HIST("spectraGen/histGenPtantiD"), mcParticleGen.pt()); + if (isPhysPrim) + histos.fill(HIST("spectraGen/histGenPtantiDPrim"), mcParticleGen.pt()); + if (!isPhysPrim && isProdByGen) + histos.fill(HIST("spectraGen/histGenPtantiDSec"), mcParticleGen.pt()); + if (!isPhysPrim && !isProdByGen) + histos.fill(HIST("spectraGen/histSecTransportPtantiD"), mcParticleGen.pt()); + } + if (mcParticleGen.pdgCode() == PDGHelium) { + histos.fill(HIST("spectraGen/histGenPtHe"), mcParticleGen.pt()); + if (isPhysPrim) + histos.fill(HIST("spectraGen/histGenPtHePrim"), mcParticleGen.pt()); + if (!isPhysPrim && isProdByGen) + histos.fill(HIST("spectraGen/histGenPtHeSec"), mcParticleGen.pt()); + if (!isPhysPrim && !isProdByGen) + histos.fill(HIST("spectraGen/histSecTransportPtHe"), mcParticleGen.pt()); + } + if (mcParticleGen.pdgCode() == -PDGHelium) { + histos.fill(HIST("spectraGen/histGenPtantiHe"), mcParticleGen.pt()); + if (isPhysPrim) + histos.fill(HIST("spectraGen/histGenPtantiHePrim"), mcParticleGen.pt()); + if (!isPhysPrim && isProdByGen) + histos.fill(HIST("spectraGen/histGenPtantiHeSec"), mcParticleGen.pt()); + if (!isPhysPrim && !isProdByGen) + histos.fill(HIST("spectraGen/histSecTransportPtantiHe"), mcParticleGen.pt()); + } + } +} // Close processMCGen +PROCESS_SWITCH(LFNucleiBATask, processMCGen, "process MC Generated", true); +} +; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { From 82c3a21da57315a05e1a2a8b1e92f899b39551c4 Mon Sep 17 00:00:00 2001 From: Giovanni Malfattore Date: Thu, 21 Jul 2022 10:28:38 +0200 Subject: [PATCH 5/8] Fix building problem --- PWGLF/Tasks/LFNucleiBATask.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/PWGLF/Tasks/LFNucleiBATask.cxx b/PWGLF/Tasks/LFNucleiBATask.cxx index 9784e10f121..c067dbba1b3 100644 --- a/PWGLF/Tasks/LFNucleiBATask.cxx +++ b/PWGLF/Tasks/LFNucleiBATask.cxx @@ -75,9 +75,7 @@ struct LFNucleiBATask { // trackQA histos.add("tracks/h1Eta", "pseudoRapidity; #eta; counts", HistType::kTH1F, {{200, -1.0, 1.0}}); histos.add("tracks/h1VarPhi", "#phi; #phi; counts", HistType::kTH1F, {{63, 0.0, 6.3}}); - histos.add("tracks/h2EtaVsPhi", "#eta vs #phi; #eta; #phi", HistType::kTH2F, { - {200, -1.0, 1.0}, 63, 0.0, 6.3} - }); + histos.add("tracks/h2EtaVsPhi", "#eta vs #phi; #eta; #phi", HistType::kTH2F, {{200, -1.0, 1.0}, {63, 0.0, 6.3}}); histos.add("tracks/h1pT", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{1000, 0., 10}}); histos.add("tracks/h1p", "Track momentum; p (GeV/#it{c}); counts", HistType::kTH1F, {{1000, 0., 10.}}); From 932b293f71e9742d88eebdac6f566db1b93452df Mon Sep 17 00:00:00 2001 From: Giovanni Malfattore Date: Thu, 21 Jul 2022 11:13:42 +0200 Subject: [PATCH 6/8] Fix format (again) --- PWGLF/Tasks/LFNucleiBATask.cxx | 623 ++++++++++++++++----------------- 1 file changed, 311 insertions(+), 312 deletions(-) diff --git a/PWGLF/Tasks/LFNucleiBATask.cxx b/PWGLF/Tasks/LFNucleiBATask.cxx index c067dbba1b3..1acb0c92527 100644 --- a/PWGLF/Tasks/LFNucleiBATask.cxx +++ b/PWGLF/Tasks/LFNucleiBATask.cxx @@ -76,350 +76,349 @@ struct LFNucleiBATask { histos.add("tracks/h1Eta", "pseudoRapidity; #eta; counts", HistType::kTH1F, {{200, -1.0, 1.0}}); histos.add("tracks/h1VarPhi", "#phi; #phi; counts", HistType::kTH1F, {{63, 0.0, 6.3}}); histos.add("tracks/h2EtaVsPhi", "#eta vs #phi; #eta; #phi", HistType::kTH2F, {{200, -1.0, 1.0}, {63, 0.0, 6.3}}); - histos.add("tracks/h1pT", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{1000, 0., 10}}); - histos.add("tracks/h1p", "Track momentum; p (GeV/#it{c}); counts", HistType::kTH1F, {{1000, 0., 10.}}); - - // tracks - histos.add("tracks/hDCAxy", "DCAxy; #DCAxy; counts", HistType::kTH1F, {{200, -2.0, 2.0}}); - histos.add("tracks/hDCAz", "DCAz; #DCAz; counts", HistType::kTH1F, {{200, -2.0, 2.0}}); - histos.add("tracks/hDCAxyVsDCAz", "DCAxy vs DCAz; DCAxy (cm); DCAz (cm)", HistType::kTH2F, {{200, -2.0, 2.0}, {200, -2.0, 2.0}}); - - histos.add("tracks/proton/h1ProtonSpectra", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/deuteron/h1DeuteronSpectra", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/helium/h1HeliumSpectra", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); - - if (doprocessMCReco) { - histos.add("tracks/proton/h1ProtonSpectraTrue", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/proton/h1ProtonSpectraTruePrim", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/proton/h1ProtonSpectraTrueSec", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/proton/h1ProtonSpectraTrueTransport", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - - histos.add("tracks/proton/h1antiProtonSpectraTrue", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/proton/h1antiProtonSpectraTruePrim", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/proton/h1antiProtonSpectraTrueSec", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/proton/h1antiProtonSpectraTrueTransport", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); - - histos.add("tracks/deuteron/h1DeuteronSpectraTrue", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/deuteron/h1DeuteronSpectraTruePrim", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/deuteron/h1DeuteronSpectraTrueSec", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/deuteron/h1DeuteronSpectraTrueTransport", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - - histos.add("tracks/deuteron/h1antiDeuteronSpectraTrue", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/deuteron/h1antiDeuteronSpectraTruePrim", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/deuteron/h1antiDeuteronSpectraTrueSec", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/deuteron/h1antiDeuteronSpectraTrueTransport", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); - - histos.add("tracks/helium/h1HeliumSpectraTrue", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/helium/h1HeliumSpectraTruePrim", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/helium/h1HeliumSpectraTrueSec", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); - histos.add("tracks/helium/h1HeliumSpectraTrueTransport", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); - - histos.add("tracks/helium/h1antiHeliumSpectraTrue", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); - } + histos.add("tracks/h1pT", "Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts", HistType::kTH1F, {{1000, 0., 10}}); + histos.add("tracks/h1p", "Track momentum; p (GeV/#it{c}); counts", HistType::kTH1F, {{1000, 0., 10.}}); + + // tracks + histos.add("tracks/hDCAxy", "DCAxy; #DCAxy; counts", HistType::kTH1F, {{200, -2.0, 2.0}}); + histos.add("tracks/hDCAz", "DCAz; #DCAz; counts", HistType::kTH1F, {{200, -2.0, 2.0}}); + histos.add("tracks/hDCAxyVsDCAz", "DCAxy vs DCAz; DCAxy (cm); DCAz (cm)", HistType::kTH2F, {{200, -2.0, 2.0}, {200, -2.0, 2.0}}); + + histos.add("tracks/proton/h1ProtonSpectra", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/deuteron/h1DeuteronSpectra", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/helium/h1HeliumSpectra", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); + + if (doprocessMCReco) { + histos.add("tracks/proton/h1ProtonSpectraTrue", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/proton/h1ProtonSpectraTruePrim", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/proton/h1ProtonSpectraTrueSec", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/proton/h1ProtonSpectraTrueTransport", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + + histos.add("tracks/proton/h1antiProtonSpectraTrue", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/proton/h1antiProtonSpectraTruePrim", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/proton/h1antiProtonSpectraTrueSec", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/proton/h1antiProtonSpectraTrueTransport", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); + + histos.add("tracks/deuteron/h1DeuteronSpectraTrue", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/deuteron/h1DeuteronSpectraTruePrim", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/deuteron/h1DeuteronSpectraTrueSec", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/deuteron/h1DeuteronSpectraTrueTransport", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + + histos.add("tracks/deuteron/h1antiDeuteronSpectraTrue", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/deuteron/h1antiDeuteronSpectraTruePrim", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/deuteron/h1antiDeuteronSpectraTrueSec", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/deuteron/h1antiDeuteronSpectraTrueTransport", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); + + histos.add("tracks/helium/h1HeliumSpectraTrue", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/helium/h1HeliumSpectraTruePrim", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/helium/h1HeliumSpectraTrueSec", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/helium/h1HeliumSpectraTrueTransport", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); + + histos.add("tracks/helium/h1antiHeliumSpectraTrue", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); + } - histos.add("tracks/h2TPCsignVsTPCmomentum", "-dE/dX vs p; p (GeV/c); -dE/dx (a.u.)", HistType::kTH2F, {{500, 0.0, 5.0}, {81000, 0.0, 1E3}}); - histos.add("tracks/h2TOFbetaVsP", "#beta (TOF) vs p; p (GeV/c); #beta", HistType::kTH2F, {{500, 0.0, 5.0}, {1200, 0.0, 1.2}}); - - histos.add("tracks/pion/h2PionVspTNSigmaTPC", "NSigmaTPC(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/kaon/h2KaonVspTNSigmaTPC", "NSigmaTPC(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/proton/h2ProtonVspTNSigmaTPC", "NSigmaTPC(proton) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTPC", "NSigmaTPC(D) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/helium/h2HeliumVspTNSigmaTPC", "NSigmaTPC(He) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/pion/h2PionVspTNSigmaTOF", "NSigmaTOF(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/kaon/h2KaonVspTNSigmaTOF", "NSigmaTOF(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(proton) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(D) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/helium/h2HeliumVspTNSigmaTOF", "NSigmaTOF(He) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - - // TOF mass histograms - histos.add("tracks/h2TOFmassVsPt", "h2TOFmassVsPt; TOFmass; #it{p}_{T} (GeV)", HistType::kTH2F, {{600, 0., 3.}, {500, 0., 5.}}); - - // TOF mass squared histograms - histos.add("tracks/proton/h2TOFmass2ProtonVsPt", "#Delta M^{2} (p) vs #it{p}_{T}; #Delta M^{2} (p); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{600, -3., 3.}, {800, 0., 8.}}); - histos.add("tracks/deuteron/h2TOFmass2DeuteronVsPt", "#Delta M^{2} (d) vs #it{p}_{T}; #Delta M^{2} (d); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{1000, -5., 5.}, {800, 0., 8.}}); - histos.add("tracks/helium/h2TOFmass2HeliumVsPt", "#Delta M^{2} (He) vs #it{p}_{T}; #Delta M^{2} (He); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{1800, -9., 9.}, {800, 0., 8.}}); - - // MC histograms - // AxisSpec ptAxis = {2000, 0.f, 20.f, "#it{p}_{T} (GeV/#it{c})"}; - histos.add("spectraGen/histGenVetxZ", "PosZ generated events", HistType::kTH1F, {{2000, -20.f, 20.f, "Vertex Z (cm)"}}); - histos.add("spectraGen/histGenPtPion", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtPionPrim", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtPionSec", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histSecTransportPtPion", "generated particles", HistType::kTH1F, {ptAxis}); - - histos.add("spectraGen/histGenPtKaon", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtKaonPrim", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtKaonSec", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histSecTransportPtKaon", "generated particles", HistType::kTH1F, {ptAxis}); - - histos.add("spectraGen/histGenPtProton", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtProtonPrim", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtProtonSec", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histSecTransportPtProton", "generated particles", HistType::kTH1F, {ptAxis}); - - histos.add("spectraGen/histGenPtantiProton", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtantiProtonPrim", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtantiProtonSec", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histSecTransportPtantiProton", "generated particles", HistType::kTH1F, {ptAxis}); - - histos.add("spectraGen/histGenPtD", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtDPrim", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtDSec", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histSecTransportPtD", "generated particles", HistType::kTH1F, {ptAxis}); - - histos.add("spectraGen/histGenPtantiD", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtantiDPrim", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtantiDSec", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histSecTransportPtantiD", "generated particles", HistType::kTH1F, {ptAxis}); - - histos.add("spectraGen/histGenPtHe", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtHePrim", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtHeSec", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histSecTransportPtHe", "generated particles", HistType::kTH1F, {ptAxis}); - - histos.add("spectraGen/histGenPtantiHe", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtantiHePrim", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histGenPtantiHeSec", "generated particles", HistType::kTH1F, {ptAxis}); - histos.add("spectraGen/histSecTransportPtantiHe", "generated particles", HistType::kTH1F, {ptAxis}); -} + histos.add("tracks/h2TPCsignVsTPCmomentum", "-dE/dX vs p; p (GeV/c); -dE/dx (a.u.)", HistType::kTH2F, {{500, 0.0, 5.0}, {81000, 0.0, 1E3}}); + histos.add("tracks/h2TOFbetaVsP", "#beta (TOF) vs p; p (GeV/c); #beta", HistType::kTH2F, {{500, 0.0, 5.0}, {1200, 0.0, 1.2}}); + + histos.add("tracks/pion/h2PionVspTNSigmaTPC", "NSigmaTPC(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/kaon/h2KaonVspTNSigmaTPC", "NSigmaTPC(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/proton/h2ProtonVspTNSigmaTPC", "NSigmaTPC(proton) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTPC", "NSigmaTPC(D) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/helium/h2HeliumVspTNSigmaTPC", "NSigmaTPC(He) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/pion/h2PionVspTNSigmaTOF", "NSigmaTOF(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/kaon/h2KaonVspTNSigmaTOF", "NSigmaTOF(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(proton) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(D) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/helium/h2HeliumVspTNSigmaTOF", "NSigmaTOF(He) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + + // TOF mass histograms + histos.add("tracks/h2TOFmassVsPt", "h2TOFmassVsPt; TOFmass; #it{p}_{T} (GeV)", HistType::kTH2F, {{600, 0., 3.}, {500, 0., 5.}}); + + // TOF mass squared histograms + histos.add("tracks/proton/h2TOFmass2ProtonVsPt", "#Delta M^{2} (p) vs #it{p}_{T}; #Delta M^{2} (p); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{600, -3., 3.}, {800, 0., 8.}}); + histos.add("tracks/deuteron/h2TOFmass2DeuteronVsPt", "#Delta M^{2} (d) vs #it{p}_{T}; #Delta M^{2} (d); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{1000, -5., 5.}, {800, 0., 8.}}); + histos.add("tracks/helium/h2TOFmass2HeliumVsPt", "#Delta M^{2} (He) vs #it{p}_{T}; #Delta M^{2} (He); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{1800, -9., 9.}, {800, 0., 8.}}); + + // MC histograms + // AxisSpec ptAxis = {2000, 0.f, 20.f, "#it{p}_{T} (GeV/#it{c})"}; + histos.add("spectraGen/histGenVetxZ", "PosZ generated events", HistType::kTH1F, {{2000, -20.f, 20.f, "Vertex Z (cm)"}}); + histos.add("spectraGen/histGenPtPion", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtPionPrim", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtPionSec", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histSecTransportPtPion", "generated particles", HistType::kTH1F, {ptAxis}); + + histos.add("spectraGen/histGenPtKaon", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtKaonPrim", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtKaonSec", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histSecTransportPtKaon", "generated particles", HistType::kTH1F, {ptAxis}); + + histos.add("spectraGen/histGenPtProton", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtProtonPrim", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtProtonSec", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histSecTransportPtProton", "generated particles", HistType::kTH1F, {ptAxis}); + + histos.add("spectraGen/histGenPtantiProton", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtantiProtonPrim", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtantiProtonSec", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histSecTransportPtantiProton", "generated particles", HistType::kTH1F, {ptAxis}); + + histos.add("spectraGen/histGenPtD", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtDPrim", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtDSec", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histSecTransportPtD", "generated particles", HistType::kTH1F, {ptAxis}); + + histos.add("spectraGen/histGenPtantiD", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtantiDPrim", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtantiDSec", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histSecTransportPtantiD", "generated particles", HistType::kTH1F, {ptAxis}); + + histos.add("spectraGen/histGenPtHe", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtHePrim", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtHeSec", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histSecTransportPtHe", "generated particles", HistType::kTH1F, {ptAxis}); + + histos.add("spectraGen/histGenPtantiHe", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtantiHePrim", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histGenPtantiHeSec", "generated particles", HistType::kTH1F, {ptAxis}); + histos.add("spectraGen/histSecTransportPtantiHe", "generated particles", HistType::kTH1F, {ptAxis}); + } -template -void fillHistograms(const CollisionType& event, const TracksType& tracks) -{ + template + void fillHistograms(const CollisionType& event, const TracksType& tracks) + { - float gamma = 0., massTOF = 0.; - - // Event histos fill - histos.fill(HIST("event/h1VtxZ"), event.posZ()); - histos.fill(HIST("event/h1CentV0M"), event.v0m()); - - for (auto& track : tracks) { - // LOG(info)<<"\n collisionId ============>"<"<(event, tracks); + } // CLOSING PROCESS DATA + PROCESS_SWITCH(LFNucleiBATask, processData, "process data", true); + + void processMCReco(o2::aod::LfCandNucleusFullEvents::iterator const& event, + soa::Join const& tracks) + { + fillHistograms(event, tracks); + } // CLOSING PROCESS MC RECO + PROCESS_SWITCH(LFNucleiBATask, processMCReco, "process mc reco", false); + Int_t nCount = 0; + + void processMCGen(aod::McCollision const& mcCollision, aod::McParticles_001& mcParticles) + { + nCount++; + histos.fill(HIST("spectraGen/histGenVetxZ"), mcCollision.posZ()); + for (auto& mcParticleGen : mcParticles) { + if (abs(mcParticleGen.y()) > std::abs(yCut)) { + continue; + } + + bool isPhysPrim = mcParticleGen.isPhysicalPrimary(); + bool isProdByGen = mcParticleGen.producedByGenerator(); + if (std::abs(mcParticleGen.pdgCode()) == PDGPion) { + histos.fill(HIST("spectraGen/histGenPtPion"), mcParticleGen.pt()); if (isPhysPrim) - histos.fill(HIST("tracks/proton/h1ProtonSpectraTruePrim"), track.pt()); + histos.fill(HIST("spectraGen/histGenPtPionPrim"), mcParticleGen.pt()); if (!isPhysPrim && isProdByGen) - histos.fill(HIST("tracks/proton/h1ProtonSpectraTrueSec"), track.pt()); + histos.fill(HIST("spectraGen/histGenPtPionSec"), mcParticleGen.pt()); if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("tracks/proton/h1ProtonSpectraTrueTransport"), track.pt()); + histos.fill(HIST("spectraGen/histSecTransportPtPion"), mcParticleGen.pt()); } - - if (track.pdgCode() == -PDGProton) { - histos.fill(HIST("tracks/proton/h1antiProtonSpectraTrue"), track.pt()); + if (std::abs(mcParticleGen.pdgCode()) == PDGKaon) { + histos.fill(HIST("spectraGen/histGenPtKaon"), mcParticleGen.pt()); if (isPhysPrim) - histos.fill(HIST("tracks/proton/h1antiProtonSpectraTruePrim"), track.pt()); + histos.fill(HIST("spectraGen/histGenPtKaonPrim"), mcParticleGen.pt()); if (!isPhysPrim && isProdByGen) - histos.fill(HIST("tracks/proton/h1antiProtonSpectraTrueSec"), track.pt()); + histos.fill(HIST("spectraGen/histGenPtKaonSec"), mcParticleGen.pt()); if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("tracks/proton/h1antiProtonSpectraTrueTransport"), track.pt()); + histos.fill(HIST("spectraGen/histSecTransportPtKaon"), mcParticleGen.pt()); } - if (track.pdgCode() == PDGDeuteron) { - histos.fill(HIST("tracks/deuteron/h1DeuteronSpectraTrue"), track.pt()); + if (mcParticleGen.pdgCode() == PDGProton) { + histos.fill(HIST("spectraGen/histGenPtProton"), mcParticleGen.pt()); if (isPhysPrim) - histos.fill(HIST("tracks/deuteron/h1DeuteronSpectraTruePrim"), track.pt()); + histos.fill(HIST("spectraGen/histGenPtProtonPrim"), mcParticleGen.pt()); if (!isPhysPrim && isProdByGen) - histos.fill(HIST("tracks/deuteron/h1DeuteronSpectraTrueSec"), track.pt()); + histos.fill(HIST("spectraGen/histGenPtProtonSec"), mcParticleGen.pt()); if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("tracks/deuteron/h1DeuteronSpectraTrueTransport"), track.pt()); + histos.fill(HIST("spectraGen/histSecTransportPtProton"), mcParticleGen.pt()); } - - if (track.pdgCode() == -PDGDeuteron) { - histos.fill(HIST("tracks/deuteron/h1antiDeuteronSpectraTrue"), track.pt()); + if (mcParticleGen.pdgCode() == -PDGProton) { + histos.fill(HIST("spectraGen/histGenPtantiProton"), mcParticleGen.pt()); if (isPhysPrim) - histos.fill(HIST("tracks/deuteron/h1antiDeuteronSpectraTruePrim"), track.pt()); + histos.fill(HIST("spectraGen/histGenPtantiProtonPrim"), mcParticleGen.pt()); if (!isPhysPrim && isProdByGen) - histos.fill(HIST("tracks/deuteron/h1antiDeuteronSpectraTrueSec"), track.pt()); + histos.fill(HIST("spectraGen/histGenPtantiProtonSec"), mcParticleGen.pt()); if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("tracks/deuteron/h1antiDeuteronSpectraTrueTransport"), track.pt()); + histos.fill(HIST("spectraGen/histSecTransportPtantiProton"), mcParticleGen.pt()); } - - if (track.pdgCode() == PDGHelium) { - histos.fill(HIST("tracks/helium/h1HeliumSpectraTrue"), track.pt()); + if (mcParticleGen.pdgCode() == PDGDeuteron) { + histos.fill(HIST("spectraGen/histGenPtD"), mcParticleGen.pt()); if (isPhysPrim) - histos.fill(HIST("tracks/helium/h1HeliumSpectraTruePrim"), track.pt()); + histos.fill(HIST("spectraGen/histGenPtDPrim"), mcParticleGen.pt()); if (!isPhysPrim && isProdByGen) - histos.fill(HIST("tracks/helium/h1HeliumSpectraTrueSec"), track.pt()); + histos.fill(HIST("spectraGen/histGenPtDSec"), mcParticleGen.pt()); if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("tracks/helium/h1HeliumSpectraTrueTransport"), track.pt()); + histos.fill(HIST("spectraGen/histSecTransportPtD"), mcParticleGen.pt()); + } + if (mcParticleGen.pdgCode() == -PDGDeuteron) { + histos.fill(HIST("spectraGen/histGenPtantiD"), mcParticleGen.pt()); + if (isPhysPrim) + histos.fill(HIST("spectraGen/histGenPtantiDPrim"), mcParticleGen.pt()); + if (!isPhysPrim && isProdByGen) + histos.fill(HIST("spectraGen/histGenPtantiDSec"), mcParticleGen.pt()); + if (!isPhysPrim && !isProdByGen) + histos.fill(HIST("spectraGen/histSecTransportPtantiD"), mcParticleGen.pt()); + } + if (mcParticleGen.pdgCode() == PDGHelium) { + histos.fill(HIST("spectraGen/histGenPtHe"), mcParticleGen.pt()); + if (isPhysPrim) + histos.fill(HIST("spectraGen/histGenPtHePrim"), mcParticleGen.pt()); + if (!isPhysPrim && isProdByGen) + histos.fill(HIST("spectraGen/histGenPtHeSec"), mcParticleGen.pt()); + if (!isPhysPrim && !isProdByGen) + histos.fill(HIST("spectraGen/histSecTransportPtHe"), mcParticleGen.pt()); + } + if (mcParticleGen.pdgCode() == -PDGHelium) { + histos.fill(HIST("spectraGen/histGenPtantiHe"), mcParticleGen.pt()); + if (isPhysPrim) + histos.fill(HIST("spectraGen/histGenPtantiHePrim"), mcParticleGen.pt()); + if (!isPhysPrim && isProdByGen) + histos.fill(HIST("spectraGen/histGenPtantiHeSec"), mcParticleGen.pt()); + if (!isPhysPrim && !isProdByGen) + histos.fill(HIST("spectraGen/histSecTransportPtantiHe"), mcParticleGen.pt()); } } - } -} - -void processData(o2::aod::LfCandNucleusFullEvents::iterator const& event, - o2::aod::LfCandNucleusFull const& tracks) -{ - fillHistograms(event, tracks); -} // CLOSING PROCESS DATA -PROCESS_SWITCH(LFNucleiBATask, processData, "process data", true); - -void processMCReco(o2::aod::LfCandNucleusFullEvents::iterator const& event, - soa::Join const& tracks) -{ - fillHistograms(event, tracks); -} // CLOSING PROCESS MC RECO -PROCESS_SWITCH(LFNucleiBATask, processMCReco, "process mc reco", false); -Int_t nCount = 0; - -void processMCGen(aod::McCollision const& mcCollision, aod::McParticles_001& mcParticles) -{ - nCount++; - histos.fill(HIST("spectraGen/histGenVetxZ"), mcCollision.posZ()); - for (auto& mcParticleGen : mcParticles) { - if (abs(mcParticleGen.y()) > std::abs(yCut)) { - continue; - } - - bool isPhysPrim = mcParticleGen.isPhysicalPrimary(); - bool isProdByGen = mcParticleGen.producedByGenerator(); - if (std::abs(mcParticleGen.pdgCode()) == PDGPion) { - histos.fill(HIST("spectraGen/histGenPtPion"), mcParticleGen.pt()); - if (isPhysPrim) - histos.fill(HIST("spectraGen/histGenPtPionPrim"), mcParticleGen.pt()); - if (!isPhysPrim && isProdByGen) - histos.fill(HIST("spectraGen/histGenPtPionSec"), mcParticleGen.pt()); - if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("spectraGen/histSecTransportPtPion"), mcParticleGen.pt()); - } - if (std::abs(mcParticleGen.pdgCode()) == PDGKaon) { - histos.fill(HIST("spectraGen/histGenPtKaon"), mcParticleGen.pt()); - if (isPhysPrim) - histos.fill(HIST("spectraGen/histGenPtKaonPrim"), mcParticleGen.pt()); - if (!isPhysPrim && isProdByGen) - histos.fill(HIST("spectraGen/histGenPtKaonSec"), mcParticleGen.pt()); - if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("spectraGen/histSecTransportPtKaon"), mcParticleGen.pt()); - } - if (mcParticleGen.pdgCode() == PDGProton) { - histos.fill(HIST("spectraGen/histGenPtProton"), mcParticleGen.pt()); - if (isPhysPrim) - histos.fill(HIST("spectraGen/histGenPtProtonPrim"), mcParticleGen.pt()); - if (!isPhysPrim && isProdByGen) - histos.fill(HIST("spectraGen/histGenPtProtonSec"), mcParticleGen.pt()); - if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("spectraGen/histSecTransportPtProton"), mcParticleGen.pt()); - } - if (mcParticleGen.pdgCode() == -PDGProton) { - histos.fill(HIST("spectraGen/histGenPtantiProton"), mcParticleGen.pt()); - if (isPhysPrim) - histos.fill(HIST("spectraGen/histGenPtantiProtonPrim"), mcParticleGen.pt()); - if (!isPhysPrim && isProdByGen) - histos.fill(HIST("spectraGen/histGenPtantiProtonSec"), mcParticleGen.pt()); - if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("spectraGen/histSecTransportPtantiProton"), mcParticleGen.pt()); - } - if (mcParticleGen.pdgCode() == PDGDeuteron) { - histos.fill(HIST("spectraGen/histGenPtD"), mcParticleGen.pt()); - if (isPhysPrim) - histos.fill(HIST("spectraGen/histGenPtDPrim"), mcParticleGen.pt()); - if (!isPhysPrim && isProdByGen) - histos.fill(HIST("spectraGen/histGenPtDSec"), mcParticleGen.pt()); - if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("spectraGen/histSecTransportPtD"), mcParticleGen.pt()); - } - if (mcParticleGen.pdgCode() == -PDGDeuteron) { - histos.fill(HIST("spectraGen/histGenPtantiD"), mcParticleGen.pt()); - if (isPhysPrim) - histos.fill(HIST("spectraGen/histGenPtantiDPrim"), mcParticleGen.pt()); - if (!isPhysPrim && isProdByGen) - histos.fill(HIST("spectraGen/histGenPtantiDSec"), mcParticleGen.pt()); - if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("spectraGen/histSecTransportPtantiD"), mcParticleGen.pt()); - } - if (mcParticleGen.pdgCode() == PDGHelium) { - histos.fill(HIST("spectraGen/histGenPtHe"), mcParticleGen.pt()); - if (isPhysPrim) - histos.fill(HIST("spectraGen/histGenPtHePrim"), mcParticleGen.pt()); - if (!isPhysPrim && isProdByGen) - histos.fill(HIST("spectraGen/histGenPtHeSec"), mcParticleGen.pt()); - if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("spectraGen/histSecTransportPtHe"), mcParticleGen.pt()); - } - if (mcParticleGen.pdgCode() == -PDGHelium) { - histos.fill(HIST("spectraGen/histGenPtantiHe"), mcParticleGen.pt()); - if (isPhysPrim) - histos.fill(HIST("spectraGen/histGenPtantiHePrim"), mcParticleGen.pt()); - if (!isPhysPrim && isProdByGen) - histos.fill(HIST("spectraGen/histGenPtantiHeSec"), mcParticleGen.pt()); - if (!isPhysPrim && !isProdByGen) - histos.fill(HIST("spectraGen/histSecTransportPtantiHe"), mcParticleGen.pt()); - } - } -} // Close processMCGen -PROCESS_SWITCH(LFNucleiBATask, processMCGen, "process MC Generated", true); -} -; + } // Close processMCGen + PROCESS_SWITCH(LFNucleiBATask, processMCGen, "process MC Generated", true); +}; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { From ca15cebe4a8e85e388f677a14dd8e973b672febb Mon Sep 17 00:00:00 2001 From: Giovanni Malfattore Date: Thu, 21 Jul 2022 21:32:53 +0200 Subject: [PATCH 7/8] Add antiparticle histograms in nuclei analysis --- PWGLF/Tasks/LFNucleiBATask.cxx | 117 +++++++++++++++++++++++++-------- 1 file changed, 90 insertions(+), 27 deletions(-) diff --git a/PWGLF/Tasks/LFNucleiBATask.cxx b/PWGLF/Tasks/LFNucleiBATask.cxx index 1acb0c92527..38c0ed780e1 100644 --- a/PWGLF/Tasks/LFNucleiBATask.cxx +++ b/PWGLF/Tasks/LFNucleiBATask.cxx @@ -88,6 +88,10 @@ struct LFNucleiBATask { histos.add("tracks/deuteron/h1DeuteronSpectra", "#it{p}_{T} (d)", HistType::kTH1F, {ptAxis}); histos.add("tracks/helium/h1HeliumSpectra", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/proton/h1antiProtonSpectra", "#it{p}_{T} (#bar{p})", HistType::kTH1F, {ptAxis}); + histos.add("tracks/deuteron/h1antiDeuteronSpectra", "#it{p}_{T} (#bar{d})", HistType::kTH1F, {ptAxis}); + histos.add("tracks/helium/h1antiHeliumSpectra", "#it{p}_{T} (#bar{He})", HistType::kTH1F, {ptAxis}); + if (doprocessMCReco) { histos.add("tracks/proton/h1ProtonSpectraTrue", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); histos.add("tracks/proton/h1ProtonSpectraTruePrim", "#it{p}_{T} (p)", HistType::kTH1F, {ptAxis}); @@ -115,21 +119,31 @@ struct LFNucleiBATask { histos.add("tracks/helium/h1HeliumSpectraTrueTransport", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); histos.add("tracks/helium/h1antiHeliumSpectraTrue", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/helium/h1antiHeliumSpectraTruePrim", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/helium/h1antiHeliumSpectraTrueSec", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); + histos.add("tracks/helium/h1antiHeliumSpectraTrueTransport", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); } - histos.add("tracks/h2TPCsignVsTPCmomentum", "-dE/dX vs p; p (GeV/c); -dE/dx (a.u.)", HistType::kTH2F, {{500, 0.0, 5.0}, {81000, 0.0, 1E3}}); - histos.add("tracks/h2TOFbetaVsP", "#beta (TOF) vs p; p (GeV/c); #beta", HistType::kTH2F, {{500, 0.0, 5.0}, {1200, 0.0, 1.2}}); + histos.add("tracks/h2TPCsignVsTPCmomentum", "-dE/dX vs p/Z; p/Z (GeV/c); -dE/dx (a.u.)", HistType::kTH2F, {{1000, -5.f, 5.f}, {81000, 0.0, 1E3}}); + histos.add("tracks/h2TOFbetaVsP", "#beta (TOF) vs p/Z; p/Z (GeV/c); #beta", HistType::kTH2F, {{1000, -5.f, 5.f}, {1200, 0.0, 1.2}}); histos.add("tracks/pion/h2PionVspTNSigmaTPC", "NSigmaTPC(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); histos.add("tracks/kaon/h2KaonVspTNSigmaTPC", "NSigmaTPC(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/proton/h2ProtonVspTNSigmaTPC", "NSigmaTPC(proton) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTPC", "NSigmaTPC(D) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/proton/h2ProtonVspTNSigmaTPC", "NSigmaTPC(p) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTPC", "NSigmaTPC(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); histos.add("tracks/helium/h2HeliumVspTNSigmaTPC", "NSigmaTPC(He) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/proton/h2antiProtonVspTNSigmaTPC", "NSigmaTPC(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/deuteron/h2antiDeuteronVspTNSigmaTPC", "NSigmaTPC(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/helium/h2antiHeliumVspTNSigmaTPC", "NSigmaTPC(#bar{He}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/pion/h2PionVspTNSigmaTOF", "NSigmaTOF(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); histos.add("tracks/kaon/h2KaonVspTNSigmaTOF", "NSigmaTOF(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(proton) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(D) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(p) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); histos.add("tracks/helium/h2HeliumVspTNSigmaTOF", "NSigmaTOF(He) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/proton/h2antiProtonVspTNSigmaTOF", "NSigmaTOF(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/deuteron/h2antiDeuteronVspTNSigmaTOF", "NSigmaTOF(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + histos.add("tracks/helium/h2antiHeliumVspTNSigmaTOF", "NSigmaTOF(#bar{He}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); // TOF mass histograms histos.add("tracks/h2TOFmassVsPt", "h2TOFmassVsPt; TOFmass; #it{p}_{T} (GeV)", HistType::kTH2F, {{600, 0., 3.}, {500, 0., 5.}}); @@ -139,6 +153,10 @@ struct LFNucleiBATask { histos.add("tracks/deuteron/h2TOFmass2DeuteronVsPt", "#Delta M^{2} (d) vs #it{p}_{T}; #Delta M^{2} (d); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{1000, -5., 5.}, {800, 0., 8.}}); histos.add("tracks/helium/h2TOFmass2HeliumVsPt", "#Delta M^{2} (He) vs #it{p}_{T}; #Delta M^{2} (He); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{1800, -9., 9.}, {800, 0., 8.}}); + histos.add("tracks/proton/h2TOFmass2antiProtonVsPt", "#Delta M^{2} (#bar{p}) vs #it{p}_{T}; #Delta M^{2} (#bar{p}); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{600, -3., 3.}, {800, 0., 8.}}); + histos.add("tracks/deuteron/h2TOFmass2antiDeuteronVsPt", "#Delta M^{2} (#bar{d}) vs #it{p}_{T}; #Delta M^{2} (#bar{d}); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{1000, -5., 5.}, {800, 0., 8.}}); + histos.add("tracks/helium/h2TOFmass2antiHeliumVsPt", "#Delta M^{2} (#bar{He}) vs #it{p}_{T}; #Delta M^{2} (#bar{He}); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{1800, -9., 9.}, {800, 0., 8.}}); + // MC histograms // AxisSpec ptAxis = {2000, 0.f, 20.f, "#it{p}_{T} (GeV/#it{c})"}; histos.add("spectraGen/histGenVetxZ", "PosZ generated events", HistType::kTH1F, {{2000, -20.f, 20.f, "Vertex Z (cm)"}}); @@ -216,33 +234,57 @@ struct LFNucleiBATask { // TPC // if(std::abs(track.nsigTPCD()) < 5. && std::abs(track.nsigTOFD()) < 3.) - histos.fill(HIST("tracks/h2TPCsignVsTPCmomentum"), track.tpcInnerParam(), track.tpcSignal()); + histos.fill(HIST("tracks/h2TPCsignVsTPCmomentum"), track.tpcInnerParam() / (1.f * track.sign()), track.tpcSignal()); histos.fill(HIST("tracks/pion/h2PionVspTNSigmaTPC"), track.pt(), track.nsigTPCPi()); histos.fill(HIST("tracks/kaon/h2KaonVspTNSigmaTPC"), track.pt(), track.nsigTPCKa()); - histos.fill(HIST("tracks/proton/h2ProtonVspTNSigmaTPC"), track.pt(), track.nsigTPCPr()); - histos.fill(HIST("tracks/deuteron/h2DeuteronVspTNSigmaTPC"), track.pt(), track.nsigTPCD()); - histos.fill(HIST("tracks/helium/h2HeliumVspTNSigmaTPC"), track.pt(), track.nsigTPC3He()); + if (track.sign() > 0) { + histos.fill(HIST("tracks/proton/h2ProtonVspTNSigmaTPC"), track.pt(), track.nsigTPCPr()); + histos.fill(HIST("tracks/deuteron/h2DeuteronVspTNSigmaTPC"), track.pt(), track.nsigTPCD()); + histos.fill(HIST("tracks/helium/h2HeliumVspTNSigmaTPC"), track.pt(), track.nsigTPC3He()); + } else { + histos.fill(HIST("tracks/proton/h2antiProtonVspTNSigmaTPC"), track.pt(), track.nsigTPCPr()); + histos.fill(HIST("tracks/deuteron/h2antiDeuteronVspTNSigmaTPC"), track.pt(), track.nsigTPCD()); + histos.fill(HIST("tracks/helium/h2antiHeliumVspTNSigmaTPC"), track.pt(), track.nsigTPC3He()); + } // TOF histos.fill(HIST("tracks/pion/h2PionVspTNSigmaTOF"), track.pt(), track.nsigTOFPi()); histos.fill(HIST("tracks/kaon/h2KaonVspTNSigmaTOF"), track.pt(), track.nsigTOFKa()); - histos.fill(HIST("tracks/proton/h2ProtonVspTNSigmaTOF"), track.pt(), track.nsigTOFPr()); - histos.fill(HIST("tracks/deuteron/h2DeuteronVspTNSigmaTOF"), track.pt(), track.nsigTOFD()); - histos.fill(HIST("tracks/helium/h2HeliumVspTNSigmaTOF"), track.pt(), track.nsigTOF3He()); + if (track.sign() > 0) { + histos.fill(HIST("tracks/proton/h2ProtonVspTNSigmaTOF"), track.pt(), track.nsigTOFPr()); + histos.fill(HIST("tracks/deuteron/h2DeuteronVspTNSigmaTOF"), track.pt(), track.nsigTOFD()); + histos.fill(HIST("tracks/helium/h2HeliumVspTNSigmaTOF"), track.pt(), track.nsigTOF3He()); + } else { + histos.fill(HIST("tracks/proton/h2antiProtonVspTNSigmaTOF"), track.pt(), track.nsigTOFPr()); + histos.fill(HIST("tracks/deuteron/h2antiDeuteronVspTNSigmaTOF"), track.pt(), track.nsigTOFD()); + histos.fill(HIST("tracks/helium/h2antiHeliumVspTNSigmaTOF"), track.pt(), track.nsigTOF3He()); + } // PID - if (std::abs(track.nsigTPCPr()) < nsigmaTPCcut) - histos.fill(HIST("tracks/proton/h1ProtonSpectra"), track.pt()); + if (std::abs(track.nsigTPCPr()) < nsigmaTPCcut) { + if (track.sign() > 0) + histos.fill(HIST("tracks/proton/h1ProtonSpectra"), track.pt()); + else + histos.fill(HIST("tracks/proton/h1antiProtonSpectra"), track.pt()); + } - if (std::abs(track.nsigTPCD()) < nsigmaTPCcut) - histos.fill(HIST("tracks/deuteron/h1DeuteronSpectra"), track.pt()); + if (std::abs(track.nsigTPCD()) < nsigmaTPCcut) { + if (track.sign() > 0) + histos.fill(HIST("tracks/deuteron/h1DeuteronSpectra"), track.pt()); + else + histos.fill(HIST("tracks/deuteron/h1antiDeuteronSpectra"), track.pt()); + } - if (std::abs(track.nsigTPC3He()) < nsigmaTPCcut) - histos.fill(HIST("tracks/helium/h1HeliumSpectra"), track.pt()); + if (std::abs(track.nsigTPC3He()) < nsigmaTPCcut) { + if (track.sign() > 0) + histos.fill(HIST("tracks/helium/h1HeliumSpectra"), track.pt()); + else + histos.fill(HIST("tracks/helium/h1antiHeliumSpectra"), track.pt()); + } if (track.hasTOF()) { - histos.fill(HIST("tracks/h2TOFbetaVsP"), track.p(), track.beta()); + histos.fill(HIST("tracks/h2TOFbetaVsP"), track.p() / (1.f * track.sign()), track.beta()); if ((track.beta() * track.beta()) < 1.) { gamma = 1.f / TMath::Sqrt(1.f - (track.beta() * track.beta())); massTOF = track.p() / TMath::Sqrt(gamma * gamma - 1.f); @@ -251,14 +293,25 @@ struct LFNucleiBATask { } histos.fill(HIST("tracks/h2TOFmassVsPt"), massTOF, track.pt()); - if (std::abs(track.nsigTPCPr()) < nsigmaTPCcut) - histos.fill(HIST("tracks/proton/h2TOFmass2ProtonVsPt"), massTOF * massTOF - fMassProton * fMassProton, track.pt()); - - if (std::abs(track.nsigTPCD()) < nsigmaTPCcut) - histos.fill(HIST("tracks/deuteron/h2TOFmass2DeuteronVsPt"), massTOF * massTOF - fMassDeuteron * fMassDeuteron, track.pt()); + if (std::abs(track.nsigTPCPr()) < nsigmaTPCcut) { + if (track.sign() > 0) + histos.fill(HIST("tracks/proton/h2TOFmass2ProtonVsPt"), massTOF * massTOF - fMassProton * fMassProton, track.pt()); + else + histos.fill(HIST("tracks/proton/h2TOFmass2antiProtonVsPt"), massTOF * massTOF - fMassProton * fMassProton, track.pt()); + } - if (std::abs(track.nsigTPC3He()) < nsigmaTPCcut) - histos.fill(HIST("tracks/helium/h2TOFmass2HeliumVsPt"), massTOF * massTOF - fMassHelium * fMassHelium, track.pt()); + if (std::abs(track.nsigTPCD()) < nsigmaTPCcut) { + if (track.sign() > 0) + histos.fill(HIST("tracks/deuteron/h2TOFmass2DeuteronVsPt"), massTOF * massTOF - fMassDeuteron * fMassDeuteron, track.pt()); + else + histos.fill(HIST("tracks/deuteron/h2TOFmass2antiDeuteronVsPt"), massTOF * massTOF - fMassDeuteron * fMassDeuteron, track.pt()); + } + if (std::abs(track.nsigTPC3He()) < nsigmaTPCcut) { + if (track.sign() > 0) + histos.fill(HIST("tracks/helium/h2TOFmass2HeliumVsPt"), massTOF * massTOF - fMassHelium * fMassHelium, track.pt()); + else + histos.fill(HIST("tracks/helium/h2TOFmass2antiHeliumVsPt"), massTOF * massTOF - fMassHelium * fMassHelium, track.pt()); + } } if constexpr (IsMC) { bool isPhysPrim = track.isPhysicalPrimary(); @@ -313,6 +366,16 @@ struct LFNucleiBATask { if (!isPhysPrim && !isProdByGen) histos.fill(HIST("tracks/helium/h1HeliumSpectraTrueTransport"), track.pt()); } + + if (track.pdgCode() == -PDGHelium) { + histos.fill(HIST("tracks/helium/h1antiHeliumSpectraTrue"), track.pt()); + if (isPhysPrim) + histos.fill(HIST("tracks/helium/h1antiHeliumSpectraTruePrim"), track.pt()); + if (!isPhysPrim && isProdByGen) + histos.fill(HIST("tracks/helium/h1antiHeliumSpectraTrueSec"), track.pt()); + if (!isPhysPrim && !isProdByGen) + histos.fill(HIST("tracks/helium/h1antiHeliumSpectraTrueTransport"), track.pt()); + } } } } From 79d5d8b55da3288cedfda365430a7a8bc6780458 Mon Sep 17 00:00:00 2001 From: Giovanni Malfattore Date: Fri, 29 Jul 2022 17:31:38 +0200 Subject: [PATCH 8/8] Nuclei task - Extend NSigma range for double Gauss fit. Add comments. Fix formatting. --- PWGLF/Tasks/LFNucleiBATask.cxx | 47 ++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/PWGLF/Tasks/LFNucleiBATask.cxx b/PWGLF/Tasks/LFNucleiBATask.cxx index 38c0ed780e1..47138581c1b 100644 --- a/PWGLF/Tasks/LFNucleiBATask.cxx +++ b/PWGLF/Tasks/LFNucleiBATask.cxx @@ -12,9 +12,9 @@ /// /// \file LFNucleiBATask.cxx /// -/// \brief Analysis task for the measurement of the coalescence parameter +/// \brief Analysis task for the measurement of the coalescence parameter B2/B3 in pp collisions for (anti)deutheron/(anti)helium-3 /// -/// \author Rutuparna Rath and Giovanni Malfattore +/// \author Giovanni Malfattore and Rutuparna Rath /// #include "ReconstructionDataFormats/Track.h" @@ -124,26 +124,29 @@ struct LFNucleiBATask { histos.add("tracks/helium/h1antiHeliumSpectraTrueTransport", "#it{p}_{T} (He)", HistType::kTH1F, {ptAxis}); } + // Bethe-Bloch TPC distribution and Beta vs pT TOF distribution histos.add("tracks/h2TPCsignVsTPCmomentum", "-dE/dX vs p/Z; p/Z (GeV/c); -dE/dx (a.u.)", HistType::kTH2F, {{1000, -5.f, 5.f}, {81000, 0.0, 1E3}}); histos.add("tracks/h2TOFbetaVsP", "#beta (TOF) vs p/Z; p/Z (GeV/c); #beta", HistType::kTH2F, {{1000, -5.f, 5.f}, {1200, 0.0, 1.2}}); - histos.add("tracks/pion/h2PionVspTNSigmaTPC", "NSigmaTPC(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/kaon/h2KaonVspTNSigmaTPC", "NSigmaTPC(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/proton/h2ProtonVspTNSigmaTPC", "NSigmaTPC(p) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTPC", "NSigmaTPC(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/helium/h2HeliumVspTNSigmaTPC", "NSigmaTPC(He) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/proton/h2antiProtonVspTNSigmaTPC", "NSigmaTPC(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/deuteron/h2antiDeuteronVspTNSigmaTPC", "NSigmaTPC(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/helium/h2antiHeliumVspTNSigmaTPC", "NSigmaTPC(#bar{He}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - - histos.add("tracks/pion/h2PionVspTNSigmaTOF", "NSigmaTOF(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/kaon/h2KaonVspTNSigmaTOF", "NSigmaTOF(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(p) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/helium/h2HeliumVspTNSigmaTOF", "NSigmaTOF(He) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/proton/h2antiProtonVspTNSigmaTOF", "NSigmaTOF(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/deuteron/h2antiDeuteronVspTNSigmaTOF", "NSigmaTOF(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); - histos.add("tracks/helium/h2antiHeliumVspTNSigmaTOF", "NSigmaTOF(#bar{He}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {200, -10, 10.}}); + // NSigmasTPC histograms + histos.add("tracks/pion/h2PionVspTNSigmaTPC", "NSigmaTPC(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {400, -10, 10.}}); + histos.add("tracks/kaon/h2KaonVspTNSigmaTPC", "NSigmaTPC(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {400, -10, 10.}}); + histos.add("tracks/proton/h2ProtonVspTNSigmaTPC", "NSigmaTPC(p) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {400, -20, 20.}}); + histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTPC", "NSigmaTPC(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {400, -20, 20.}}); + histos.add("tracks/helium/h2HeliumVspTNSigmaTPC", "NSigmaTPC(He) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {400, -20, 20.}}); + histos.add("tracks/proton/h2antiProtonVspTNSigmaTPC", "NSigmaTPC(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {400, -20, 20.}}); + histos.add("tracks/deuteron/h2antiDeuteronVspTNSigmaTPC", "NSigmaTPC(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {400, -20, 20.}}); + histos.add("tracks/helium/h2antiHeliumVspTNSigmaTPC", "NSigmaTPC(#bar{He}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTPC", HistType::kTH2F, {{ptAxis}, {400, -20, 20.}}); + + // NSigmaTOF histograms + histos.add("tracks/pion/h2PionVspTNSigmaTOF", "NSigmaTOF(pi) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {400, -20, 20.}}); + histos.add("tracks/kaon/h2KaonVspTNSigmaTOF", "NSigmaTOF(Ka) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {400, -20, 20.}}); + histos.add("tracks/proton/h2ProtonVspTNSigmaTOF", "NSigmaTOF(p) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {400, -20, 20.}}); + histos.add("tracks/deuteron/h2DeuteronVspTNSigmaTOF", "NSigmaTOF(d) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {400, -20, 20.}}); + histos.add("tracks/helium/h2HeliumVspTNSigmaTOF", "NSigmaTOF(He) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {400, -20, 20.}}); + histos.add("tracks/proton/h2antiProtonVspTNSigmaTOF", "NSigmaTOF(#bar{p}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {400, -20, 20.}}); + histos.add("tracks/deuteron/h2antiDeuteronVspTNSigmaTOF", "NSigmaTOF(#bar{d}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {400, -20, 20.}}); + histos.add("tracks/helium/h2antiHeliumVspTNSigmaTOF", "NSigmaTOF(#bar{He}) vs pT; #it{p}_{T} (GeV/#it{c}); NSigmaTOF", HistType::kTH2F, {{ptAxis}, {400, -20, 20.}}); // TOF mass histograms histos.add("tracks/h2TOFmassVsPt", "h2TOFmassVsPt; TOFmass; #it{p}_{T} (GeV)", HistType::kTH2F, {{600, 0., 3.}, {500, 0., 5.}}); @@ -157,9 +160,9 @@ struct LFNucleiBATask { histos.add("tracks/deuteron/h2TOFmass2antiDeuteronVsPt", "#Delta M^{2} (#bar{d}) vs #it{p}_{T}; #Delta M^{2} (#bar{d}); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{1000, -5., 5.}, {800, 0., 8.}}); histos.add("tracks/helium/h2TOFmass2antiHeliumVsPt", "#Delta M^{2} (#bar{He}) vs #it{p}_{T}; #Delta M^{2} (#bar{He}); #it{p}_{T} (GeV/#it{c})", HistType::kTH2F, {{1800, -9., 9.}, {800, 0., 8.}}); - // MC histograms - // AxisSpec ptAxis = {2000, 0.f, 20.f, "#it{p}_{T} (GeV/#it{c})"}; + // MC histograms - all, primary, sec. from weak decay, sec. from material histos.add("spectraGen/histGenVetxZ", "PosZ generated events", HistType::kTH1F, {{2000, -20.f, 20.f, "Vertex Z (cm)"}}); + histos.add("spectraGen/histGenPtPion", "generated particles", HistType::kTH1F, {ptAxis}); histos.add("spectraGen/histGenPtPionPrim", "generated particles", HistType::kTH1F, {ptAxis}); histos.add("spectraGen/histGenPtPionSec", "generated particles", HistType::kTH1F, {ptAxis}); @@ -233,7 +236,6 @@ struct LFNucleiBATask { histos.fill(HIST("tracks/h1p"), track.p()); // TPC - // if(std::abs(track.nsigTPCD()) < 5. && std::abs(track.nsigTOFD()) < 3.) histos.fill(HIST("tracks/h2TPCsignVsTPCmomentum"), track.tpcInnerParam() / (1.f * track.sign()), track.tpcSignal()); histos.fill(HIST("tracks/pion/h2PionVspTNSigmaTPC"), track.pt(), track.nsigTPCPi()); @@ -395,6 +397,7 @@ struct LFNucleiBATask { PROCESS_SWITCH(LFNucleiBATask, processMCReco, "process mc reco", false); Int_t nCount = 0; + // LOOP OVER GENERATED MC PARTICLES void processMCGen(aod::McCollision const& mcCollision, aod::McParticles_001& mcParticles) { nCount++;