diff --git a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx index 33d9ee0e40d..fda62b2f5e8 100644 --- a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx +++ b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx @@ -9,6 +9,7 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. // +/// \file hadronnucleicorrelation.cxx /// \brief Hadron-nuclei correlation analysis task /// \author Francesca Ercolessi /// \since 21 April 2024 @@ -40,7 +41,6 @@ #include #include #include -#include #include #include #include @@ -78,7 +78,7 @@ enum Origin { struct HadronNucleiCorrelation { - static constexpr int betahasTOFthr = -100; + static constexpr int BetahasTOFthr = -100; SliceCache cache; @@ -152,32 +152,32 @@ struct HadronNucleiCorrelation { using FilteredTracksMC = soa::Filtered>; // new tables (v3) HistogramRegistry registry{"registry"}; - HistogramRegistry QA{"QA"}; + HistogramRegistry registryQa{"registryQa"}; - using trkType = const FilteredTracks::iterator*; - // using trkTypeMC = const FilteredTracksMC::iterator*; - // typedef std::shared_ptr colType; + using TrkType = const FilteredTracks::iterator*; + // using TrkTypeMC = const FilteredTracksMC::iterator*; + // typedef std::shared_ptr ColType; // typedef std::shared_ptr MCcolType; - std::unique_ptr> Pair = std::make_unique>(); - // std::unique_ptr> PairMC = std::make_unique>(); + std::unique_ptr> pair = std::make_unique>(); + // std::unique_ptr> PairMC = std::make_unique>(); // Data histograms - std::vector> hEtaPhi_SE; - std::vector> hEtaPhi_ME; - std::vector> hCorrEtaPhi_SE; - std::vector> hCorrEtaPhi_ME; - - int nBinspT; - TH2F* hEffpTEta_proton; - TH2F* hEffpTEta_antiproton; - TH2F* hEffpTEta_deuteron; - TH2F* hEffpTEta_antideuteron; - - Service ccdb; + std::vector> hEtaPhiSameEv; + std::vector> hEtaPhiMixdEv; + std::vector> hCorrEtaPhiSameEv; + std::vector> hCorrEtaPhiMixdEv; + + int nBinspT = 0; + TH2F* hEffPtEtaProton = nullptr; + TH2F* hEffPtEtaAntiProton = nullptr; + TH2F* hEffPtEtaDeuteron = nullptr; + TH2F* hEffPtEtaAntiDeuteron = nullptr; + + Service ccdb{}; o2::ccdb::CcdbApi ccdbApi; - Service pdgDB; + Service pdgDB{}; void init(o2::framework::InitContext&) { @@ -189,173 +189,174 @@ struct HadronNucleiCorrelation { if (doCorrection) { GetCorrection(ccdb, TString(fCorrectionPath), TString(fCorrectionHisto)); - } else { - hEffpTEta_proton = nullptr; - hEffpTEta_antiproton = nullptr; - hEffpTEta_deuteron = nullptr; - hEffpTEta_antideuteron = nullptr; } - AxisSpec ptBinnedAxis = {pTBins, "#it{p}_{T} of #bar{p} (GeV/c)"}; - AxisSpec etaAxis = {100, -1., 1., "#eta"}; - AxisSpec phiAxis = {157, 0., o2::constants::math::TwoPI, "#phi (rad)"}; - AxisSpec pTAxis = {200, -10.f, 10.f, "p_{T} GeV/c"}; - AxisSpec pTAxis_small = {100, -5.f, 5.f, "p_{T} GeV/c"}; + const AxisSpec ptBinnedAxis = {pTBins, "#it{p}_{T} of #bar{p} (GeV/#it{c})"}; + const AxisSpec etaAxis = {100, -1., 1., "#eta"}; + const AxisSpec phiAxis = {157, 0., o2::constants::math::TwoPI, "#phi (rad)"}; + const AxisSpec ptAxis = {200, -10.f, 10.f, "#it{p}_{T} GeV/#it{c}"}; + const AxisSpec ptAxisSmall = {100, -5.f, 5.f, "#it{p}_{T} GeV/#it{c}"}; - AxisSpec DeltaEtaAxis = {300, -1.5, 1.5, "#Delta#eta"}; - AxisSpec DeltaRapAxis = {300, -1.5, 1.5, "#Delta y"}; + const AxisSpec deltaEtaAxis = {300, -1.5, 1.5, "#Delta#eta"}; + const AxisSpec deltaRapAxis = {300, -1.5, 1.5, "#Delta y"}; - registry.add("hNEvents", "hNEvents", {HistType::kTH1D, {{7, 0.f, 7.f}}}); - registry.get(HIST("hNEvents"))->GetXaxis()->SetBinLabel(1, "Selected"); - registry.get(HIST("hNEvents"))->GetXaxis()->SetBinLabel(2, "Mixing"); + if (doprocessSameEvent || doprocessSameEventEvSel) { + registry.add("hNEvents", "hNEvents", {HistType::kTH1D, {{7, 0.f, 7.f}}}); + registry.get(HIST("hNEvents"))->GetXaxis()->SetBinLabel(1, "Selected"); + registry.get(HIST("hNEvents"))->GetXaxis()->SetBinLabel(2, "Mixing"); + } - registry.add("hNtrig_total", "hNtrig_total", {HistType::kTH1D, {ptBinnedAxis}}); + // Not used, commented out for now + // registry.add("hNtrig_total", "hNtrig_total", {HistType::kTH1D, {ptBinnedAxis}}); nBinspT = pTBins.value.size() - 1; - TString name = "AntiDeAntiPr"; + TString name = "Undefined"; switch (mode) { - case kDP: + case kDbarPbar: // 0 + name = "AntiDeAntiPr"; + break; + case kDP: // 1 name = "DePr"; break; - case kDbarP: + case kDbarP: // 2 name = "AntiDePr"; break; - case kDPbar: + case kDPbar: // 3 name = "DeAntiPr"; break; - case kPbarP: + case kPbarP: // 4 name = "AntiPrPr"; break; - case kPbarPbar: + case kPbarPbar: // 5 name = "AntiPrAntiPr"; break; - case kPP: + case kPP: // 6 name = "PrPr"; break; - case kPPbar: + case kPPbar: // 7 name = "PrAntiPr"; break; + default: + LOG(fatal) << "Unhandled case " << mode; } if (!isMC) { for (int i = 0; i < nBinspT; i++) { - + const TString ptTag = Form("pt%02.0f%02.0f", pTBins.value.at(i) * 10, pTBins.value.at(i + 1) * 10); + const TString ptInterval = Form("(%.1f(Form("hEtaPhi_%s_SE_pt%s", name.Data(), ptTag.Data()), "Raw #Delta y #Delta#phi " + ptInterval, {HistType::kTH3F, {deltaRapAxis, deltaPhiAxis, ptBinnedAxis}})); + hEtaPhiMixdEv.push_back(registry.add(Form("hEtaPhi_%s_ME_pt%s", name.Data(), ptTag.Data()), "Raw #Delta y #Delta#phi " + ptInterval, {HistType::kTH3F, {deltaRapAxis, deltaPhiAxis, ptBinnedAxis}})); - auto htempSE_AntiDeAntiPr = registry.add(Form("hEtaPhi_%s_SE_pt%02.0f%02.0f", name.Data(), pTBins.value.at(i) * 10, pTBins.value.at(i + 1) * 10), Form("Raw #Delta y #Delta#phi (%.1f(Form("hEtaPhi_%s_ME_pt%02.0f%02.0f", name.Data(), pTBins.value.at(i) * 10, pTBins.value.at(i + 1) * 10), Form("Raw #Delta y #Delta#phi (%.1f(Form("hCorrEtaPhi_%s_SE_pt%02.0f%02.0f", name.Data(), pTBins.value.at(i) * 10, pTBins.value.at(i + 1) * 10), Form("#Delta y #Delta#phi (%.1f(Form("hCorrEtaPhi_%s_ME_pt%02.0f%02.0f", name.Data(), pTBins.value.at(i) * 10, pTBins.value.at(i + 1) * 10), Form("#Delta y #Delta#phi (%.1f(Form("hCorrEtaPhi_%s_SE_pt%s", name.Data(), ptTag.Data()), "#Delta y #Delta#phi " + ptInterval, {HistType::kTH3F, {deltaRapAxis, deltaPhiAxis, ptBinnedAxis}})); + hCorrEtaPhiMixdEv.push_back(registry.add(Form("hCorrEtaPhi_%s_ME_pt%s", name.Data(), ptTag.Data()), "#Delta y #Delta#phi " + ptInterval, {HistType::kTH3F, {deltaRapAxis, deltaPhiAxis, ptBinnedAxis}})); } else { + hEtaPhiSameEv.push_back(registry.add(Form("hEtaPhi_%s_SE_pt%s", name.Data(), ptTag.Data()), "Raw #Delta#eta#Delta#phi " + ptInterval, {HistType::kTH3F, {deltaEtaAxis, deltaPhiAxis, ptBinnedAxis}})); + hEtaPhiMixdEv.push_back(registry.add(Form("hEtaPhi_%s_ME_pt%s", name.Data(), ptTag.Data()), "Raw #Delta#eta#Delta#phi " + ptInterval, {HistType::kTH3F, {deltaEtaAxis, deltaPhiAxis, ptBinnedAxis}})); - auto htempSE_AntiDeAntiPr = registry.add(Form("hEtaPhi_%s_SE_pt%02.0f%02.0f", name.Data(), pTBins.value.at(i) * 10, pTBins.value.at(i + 1) * 10), Form("Raw #Delta#eta#Delta#phi (%.1f(Form("hEtaPhi_%s_ME_pt%02.0f%02.0f", name.Data(), pTBins.value.at(i) * 10, pTBins.value.at(i + 1) * 10), Form("Raw #Delta#eta#Delta#phi (%.1f(Form("hCorrEtaPhi_%s_SE_pt%02.0f%02.0f", name.Data(), pTBins.value.at(i) * 10, pTBins.value.at(i + 1) * 10), Form("#Delta#eta#Delta#phi (%.1f(Form("hCorrEtaPhi_%s_ME_pt%02.0f%02.0f", name.Data(), pTBins.value.at(i) * 10, pTBins.value.at(i + 1) * 10), Form("#Delta#eta#Delta#phi (%.1f(Form("hCorrEtaPhi_%s_SE_pt%s", name.Data(), ptTag.Data()), "#Delta#eta#Delta#phi " + ptInterval, {HistType::kTH3F, {deltaEtaAxis, deltaPhiAxis, ptBinnedAxis}})); + hCorrEtaPhiMixdEv.push_back(registry.add(Form("hCorrEtaPhi_%s_ME_pt%s", name.Data(), ptTag.Data()), "#Delta#eta#Delta#phi " + ptInterval, {HistType::kTH3F, {deltaEtaAxis, deltaPhiAxis, ptBinnedAxis}})); } } } - registry.add("hPrDCAxy", "DCAxy p", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); - registry.add("hAntiPrDCAxy", "DCAxy #bar{p}", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); - registry.add("hDeDCAxy", "DCAxy d", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); - registry.add("hAntiDeDCAxy", "DCAxy #bar{d}", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); + if (doprocessSameEvent || doprocessSameEventEvSel || doprocessMC) { + registry.add("hPrDCAxy", "DCAxy p", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); + registry.add("hAntiPrDCAxy", "DCAxy #bar{p}", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); + registry.add("hDeDCAxy", "DCAxy d", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); + registry.add("hAntiDeDCAxy", "DCAxy #bar{d}", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); + } registry.add("hMult", "multiplicity", {HistType::kTH1D, {{200, 0.f, 200.f, "N_{ch}"}}}); if (doQA) { // Track QA - QA.add("QA/hVtxZ_trk", "#it{z}_{vtx}", {HistType::kTH1D, {{150, -15.f, 15.f, "#it{z}_{vtx} (cm)"}}}); - QA.add("QA/hTPCnClusters", "N TPC Clusters; N TPC Clusters", {HistType::kTH1D, {{200, 0.f, 200.f}}}); - QA.add("QA/hTPCSharedClusters", "N TPC Shared Clusters; N TPC SharedClusters", {HistType::kTH1D, {{100, 0.f, 1.f}}}); - QA.add("QA/hTPCchi2", "TPC chi2/Ncls; TPC chi2/Ncls", {HistType::kTH1D, {{100, 0.f, 10.f}}}); - QA.add("QA/hTPCcrossedRowsOverFindableCls", "TPC crossed Rows Over Findable Cls; TPC Crossed Rows Over Findable Cls", {HistType::kTH1D, {{100, 0.f, 2.f}}}); - QA.add("QA/hITSchi2", "ITS chi2/Ncls; ITS chi2/Ncls", {HistType::kTH1D, {{100, 0.f, 20.f}}}); - QA.add("QA/hDCAxy", "DCAxy", {HistType::kTH2D, {{200, -0.2f, 0.2f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); - QA.add("QA/hDCAz", "DCAz", {HistType::kTH2D, {{200, -0.2f, 0.2f, "DCA z (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); - QA.add("QA/TPCChi2VsPZ", "TPCChi2VsPZ", {HistType::kTH2D, {{100, 0.f, 10.f, "p_{TPC}/Z (GeV/c)"}, {120, 0.f, 6.f, "TPC Chi2"}}}); - QA.add("QA/h2dTPCTOF_Pr", "n#sigma TPC vs n#sigma TOF; n#sigma TPC; n#sigma TOF", {HistType::kTH2D, {axisNSigma, axisNSigma}}); - QA.add("QA/h2dTPCTOF_AntiPr", "n#sigma TPC vs n#sigma TOF; n#sigma TPC; n#sigma TOF", {HistType::kTH2D, {axisNSigma, axisNSigma}}); - QA.add("QA/hnSigmaTPCVsPt_El", "n#sigma TPC vs p_{T} for e hypothesis (all tracks); p_{T} (GeV/c); n#sigma TPC", {HistType::kTH2D, {pTAxis, axisNSigma}}); - QA.add("QA/hnSigmaTPCVsPt_Pr", "n#sigma TPC vs p_{T} for p hypothesis (all tracks); p_{T} (GeV/c); n#sigma TPC", {HistType::kTH2D, {pTAxis, axisNSigma}}); - QA.add("QA/hnSigmaTPCVsPt_De", "n#sigma TPC vs p_{T} for d hypothesis (all tracks); p_{T} (GeV/c); n#sigma TPC", {HistType::kTH2D, {pTAxis, axisNSigma}}); - QA.add("QA/hnSigmaTOFVsPt_Pr", "n#sigma TOF vs p_{T} for p hypothesis (all tracks); p_{T} (GeV/c); n#sigma TOF", {HistType::kTH2D, {pTAxis, axisNSigma}}); - QA.add("QA/hnSigmaTOFVsPt_De", "n#sigma TOF vs p_{T} for d hypothesis (all tracks); p_{T} (GeV/c); n#sigma TOF", {HistType::kTH2D, {pTAxis, axisNSigma}}); - QA.add("QA/hnSigmaITSVsPt_Pr", "n#sigma ITS vs p_{T} for p hypothesis (all tracks); p_{T} (GeV/c); n#sigma ITS", {HistType::kTH2D, {pTAxis, axisNSigma}}); - QA.add("QA/hnSigmaITSVsPt_De", "n#sigma ITS vs p_{T} for d hypothesis (all tracks); p_{T} (GeV/c); n#sigma ITS", {HistType::kTH2D, {pTAxis, axisNSigma}}); - QA.add("QA/hdEtadPhistar", ";dPhi*;dEta ", {HistType::kTH2D, {{101, -0.2, 0.2, "dPhi*"}, {101, -0.2, 0.2, "dEta"}}}); + registryQa.add("QA/hVtxZ_trk", "#it{z}_{vtx}", {HistType::kTH1D, {{150, -15.f, 15.f, "#it{z}_{vtx} (cm)"}}}); + registryQa.add("QA/hTPCnClusters", "N TPC Clusters; N TPC Clusters", {HistType::kTH1D, {{200, 0.f, 200.f}}}); + registryQa.add("QA/hTPCSharedClusters", "N TPC Shared Clusters; N TPC SharedClusters", {HistType::kTH1D, {{100, 0.f, 1.f}}}); + registryQa.add("QA/hTPCchi2", "TPC chi2/Ncls; TPC chi2/Ncls", {HistType::kTH1D, {{100, 0.f, 10.f}}}); + registryQa.add("QA/hTPCcrossedRowsOverFindableCls", "TPC crossed Rows Over Findable Cls; TPC Crossed Rows Over Findable Cls", {HistType::kTH1D, {{100, 0.f, 2.f}}}); + registryQa.add("QA/hITSchi2", "ITS chi2/Ncls; ITS chi2/Ncls", {HistType::kTH1D, {{100, 0.f, 20.f}}}); + registryQa.add("QA/hDCAxy", "DCAxy", {HistType::kTH2D, {{200, -0.2f, 0.2f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); + registryQa.add("QA/hDCAz", "DCAz", {HistType::kTH2D, {{200, -0.2f, 0.2f, "DCA z (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); + registryQa.add("QA/TPCChi2VsPZ", "TPCChi2VsPZ", {HistType::kTH2D, {{100, 0.f, 10.f, "p_{TPC}/Z (GeV/c)"}, {120, 0.f, 6.f, "TPC Chi2"}}}); + const AxisSpec tofNSigmaAxis = {axisNSigma, "n#sigma TOF"}; + const AxisSpec tpcNSigmaAxis = {axisNSigma, "n#sigma TPC"}; + const AxisSpec itsNSigmaAxis = {axisNSigma, "n#sigma ITS"}; + registryQa.add("QA/h2dTPCTOF_Pr", "n#sigma TPC vs n#sigma TOF", {HistType::kTH2D, {tpcNSigmaAxis, tofNSigmaAxis}}); + registryQa.add("QA/h2dTPCTOF_AntiPr", "n#sigma TPC vs n#sigma TOF", {HistType::kTH2D, {tpcNSigmaAxis, tofNSigmaAxis}}); + registryQa.add("QA/hnSigmaTPCVsPt_El", "n#sigma TPC vs p_{T} for e hypothesis (all tracks)", {HistType::kTH2D, {ptAxis, tpcNSigmaAxis}}); + registryQa.add("QA/hnSigmaTPCVsPt_Pr", "n#sigma TPC vs p_{T} for p hypothesis (all tracks)", {HistType::kTH2D, {ptAxis, tpcNSigmaAxis}}); + registryQa.add("QA/hnSigmaTPCVsPt_De", "n#sigma TPC vs p_{T} for d hypothesis (all tracks)", {HistType::kTH2D, {ptAxis, tpcNSigmaAxis}}); + registryQa.add("QA/hnSigmaTOFVsPt_Pr", "n#sigma TOF vs p_{T} for p hypothesis (all tracks)", {HistType::kTH2D, {ptAxis, tofNSigmaAxis}}); + registryQa.add("QA/hnSigmaTOFVsPt_De", "n#sigma TOF vs p_{T} for d hypothesis (all tracks)", {HistType::kTH2D, {ptAxis, tofNSigmaAxis}}); + registryQa.add("QA/hnSigmaITSVsPt_Pr", "n#sigma ITS vs p_{T} for p hypothesis (all tracks)", {HistType::kTH2D, {ptAxis, itsNSigmaAxis}}); + registryQa.add("QA/hnSigmaITSVsPt_De", "n#sigma ITS vs p_{T} for d hypothesis (all tracks)", {HistType::kTH2D, {ptAxis, itsNSigmaAxis}}); + registryQa.add("QA/hdEtadPhistar", ";dPhi*;dEta ", {HistType::kTH2D, {{101, -0.2, 0.2, "dPhi*"}, {101, -0.2, 0.2, "dEta"}}}); if (!isMC) { - QA.add("QA/hEtaPr", Form("#eta ditribution for p"), {HistType::kTH1F, {etaAxis}}); - QA.add("QA/hPhiPr", Form("#phi ditribution for p"), {HistType::kTH1F, {phiAxis}}); - QA.add("QA/hEtaAntiPr", Form("#eta ditribution for #bar{p}"), {HistType::kTH1F, {etaAxis}}); - QA.add("QA/hPhiAntiPr", Form("#phi ditribution for #bar{p}"), {HistType::kTH1F, {phiAxis}}); - QA.add("QA/hEtaDe", Form("#eta ditribution for d"), {HistType::kTH1F, {etaAxis}}); - QA.add("QA/hPhiDe", Form("#phi ditribution for d"), {HistType::kTH1F, {phiAxis}}); - QA.add("QA/hEtaAntiDe", Form("#eta ditribution for #bar{d}"), {HistType::kTH1F, {etaAxis}}); - QA.add("QA/hPhiAntiDe", Form("#phi ditribution for #bar{d}"), {HistType::kTH1F, {phiAxis}}); - - QA.add("QA/hnSigmaTPCVsPt_Pr_AfterSel", "n#sigma TPC vs p_{T} for p hypothesis (all tracks); p_{T} (GeV/c); n#sigma TPC", {HistType::kTH2D, {pTAxis, axisNSigma}}); - QA.add("QA/hnSigmaTPCVsPt_De_AfterSel", "n#sigma TPC vs p_{T} for d hypothesis (all tracks); p_{T} (GeV/c); n#sigma TPC", {HistType::kTH2D, {pTAxis, axisNSigma}}); - QA.add("QA/hnSigmaTOFVsPt_Pr_AfterSel", "n#sigma TOF vs p_{T} for p hypothesis (all tracks); p_{T} (GeV/c); n#sigma TOF", {HistType::kTH2D, {pTAxis, axisNSigma}}); - QA.add("QA/hnSigmaTOFVsPt_De_AfterSel", "n#sigma TOF vs p_{T} for d hypothesis (all tracks); p_{T} (GeV/c); n#sigma TOF", {HistType::kTH2D, {pTAxis, axisNSigma}}); - QA.add("QA/hnSigmaITSVsPt_Pr_AfterSel", "n#sigma ITS vs p_{T} for p hypothesis (all tracks); p_{T} (GeV/c); n#sigma ITS", {HistType::kTH2D, {pTAxis, axisNSigma}}); - QA.add("QA/hnSigmaITSVsPt_De_AfterSel", "n#sigma ITS vs p_{T} for d hypothesis (all tracks); p_{T} (GeV/c); n#sigma ITS", {HistType::kTH2D, {pTAxis, axisNSigma}}); - QA.add("QA/h2dTPCTOF_Pr_AfterSel", "n#sigma TPC vs n#sigma TOF; n#sigma TPC; n#sigma TOF", {HistType::kTH2D, {axisNSigma, axisNSigma}}); - QA.add("QA/h2dTPCTOF_AntiPr_AfterSel", "n#sigma TPC vs n#sigma TOF; n#sigma TPC; n#sigma TOF", {HistType::kTH2D, {axisNSigma, axisNSigma}}); + registryQa.add("QA/hEtaPr", Form("#eta ditribution for p"), {HistType::kTH1F, {etaAxis}}); + registryQa.add("QA/hPhiPr", Form("#phi ditribution for p"), {HistType::kTH1F, {phiAxis}}); + registryQa.add("QA/hEtaAntiPr", Form("#eta ditribution for #bar{p}"), {HistType::kTH1F, {etaAxis}}); + registryQa.add("QA/hPhiAntiPr", Form("#phi ditribution for #bar{p}"), {HistType::kTH1F, {phiAxis}}); + registryQa.add("QA/hEtaDe", Form("#eta ditribution for d"), {HistType::kTH1F, {etaAxis}}); + registryQa.add("QA/hPhiDe", Form("#phi ditribution for d"), {HistType::kTH1F, {phiAxis}}); + registryQa.add("QA/hEtaAntiDe", Form("#eta ditribution for #bar{d}"), {HistType::kTH1F, {etaAxis}}); + registryQa.add("QA/hPhiAntiDe", Form("#phi ditribution for #bar{d}"), {HistType::kTH1F, {phiAxis}}); + + registryQa.add("QA/hnSigmaTPCVsPt_Pr_AfterSel", "n#sigma TPC vs p_{T} for p hypothesis (all tracks)", {HistType::kTH2D, {ptAxis, tpcNSigmaAxis}}); + registryQa.add("QA/hnSigmaTPCVsPt_De_AfterSel", "n#sigma TPC vs p_{T} for d hypothesis (all tracks)", {HistType::kTH2D, {ptAxis, tpcNSigmaAxis}}); + registryQa.add("QA/hnSigmaTOFVsPt_Pr_AfterSel", "n#sigma TOF vs p_{T} for p hypothesis (all tracks)", {HistType::kTH2D, {ptAxis, tofNSigmaAxis}}); + registryQa.add("QA/hnSigmaTOFVsPt_De_AfterSel", "n#sigma TOF vs p_{T} for d hypothesis (all tracks)", {HistType::kTH2D, {ptAxis, tofNSigmaAxis}}); + registryQa.add("QA/hnSigmaITSVsPt_Pr_AfterSel", "n#sigma ITS vs p_{T} for p hypothesis (all tracks)", {HistType::kTH2D, {ptAxis, itsNSigmaAxis}}); + registryQa.add("QA/hnSigmaITSVsPt_De_AfterSel", "n#sigma ITS vs p_{T} for d hypothesis (all tracks)", {HistType::kTH2D, {ptAxis, itsNSigmaAxis}}); + registryQa.add("QA/h2dTPCTOF_Pr_AfterSel", "n#sigma TPC vs n#sigma TOF", {HistType::kTH2D, {tpcNSigmaAxis, tofNSigmaAxis}}); + registryQa.add("QA/h2dTPCTOF_AntiPr_AfterSel", "n#sigma TPC vs n#sigma TOF", {HistType::kTH2D, {tpcNSigmaAxis, tofNSigmaAxis}}); } } if (isMC && doprocessMC) { - registry.add("hPrimPrDCAxy", "DCAxy p", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); - registry.add("hPrimAntiPrDCAxy", "DCAxy #bar{p}", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); - registry.add("hPrimDeDCAxy", "DCAxy d", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); - registry.add("hPrimAntiDeDCAxy", "DCAxy #bar{d}", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); - registry.add("hSecMatPrDCAxy", "DCAxy p", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); - registry.add("hSecMatAntiPrDCAxy", "DCAxy #bar{p}", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); - registry.add("hSecMatDeDCAxy", "DCAxy d", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); - registry.add("hSecMatAntiDeDCAxy", "DCAxy #bar{d}", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); - registry.add("hSecWeakPrDCAxy", "DCAxy p", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); - registry.add("hSecWeakAntiPrDCAxy", "DCAxy #bar{p}", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); - registry.add("hSecWeakDeDCAxy", "DCAxy d", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); - registry.add("hSecWeakAntiDeDCAxy", "DCAxy #bar{d}", {HistType::kTH2D, {{600, -3.f, 3.f, "DCA xy (cm)"}, {100, 0.f, 10.f, "p_{T} GeV/c"}}}); - - registry.add("hReco_EtaPhiPt_Proton", "Gen (anti)protons in reco collisions", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}}); - registry.add("hReco_EtaPhiPt_Deuteron", "Gen (anti)deuteron in reco collisions", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}}); - registry.add("hReco_PID_EtaPhiPt_Proton", "Gen (anti)protons + PID in reco collisions", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}}); - registry.add("hReco_PID_EtaPhiPt_Deuteron", "Gen (anti)deuteron + PID in reco collisions", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}}); - registry.add("hReco_EtaPhiPtMC_Proton", "Gen (anti)protons in reco collisions (MC info used)", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}}); - registry.add("hReco_EtaPhiPtMC_Deuteron", "Gen (anti)deuteron in reco collisions (MC info used)", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}}); - registry.add("hReco_Pt_Proton", "Reco (anti)protons in reco collisions", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hReco_Pt_Deuteron", "Reco (anti)deuterons in reco collisions", {HistType::kTH1F, {pTAxis_small}}); - - registry.add("hSec_EtaPhiPt_Proton", "Secondary (anti)protons", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}}); - registry.add("hPrimSec_EtaPhiPt_Proton", "Primary + Secondary (anti)protons", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}}); - - registry.add("hnSigmaTPCVsPt_Pr_MC", "n#sigma TPC vs p_{T} for p hypothesis true MC; p_{T} (GeV/c); n#sigma TPC", {HistType::kTH2F, {pTAxis, axisNSigma}}); - registry.add("hnSigmaTPCVsPt_De_MC", "n#sigma TPC vs p_{T} for d hypothesis true MC; p_{T} (GeV/c); n#sigma TPC", {HistType::kTH2F, {pTAxis, axisNSigma}}); - registry.add("hnSigmaTOFVsPt_Pr_MC", "n#sigma TOF vs p_{T} for p hypothesis true MC; p_{T} (GeV/c); n#sigma TOF", {HistType::kTH2F, {pTAxis, axisNSigma}}); - registry.add("hnSigmaTOFVsPt_De_MC", "n#sigma TOF vs p_{T} for d hypothesis true MC; p_{T} (GeV/c); n#sigma TOF", {HistType::kTH2F, {pTAxis, axisNSigma}}); + const AxisSpec dcaAxis = {600, -3.f, 3.f, "DCA xy (cm)"}; + const AxisSpec mcPtAxis = {100, 0.f, 10.f, "#it{p}_{T} GeV/#it{c}"}; + registry.add("hPrimPrDCAxy", "DCAxy p", {HistType::kTH2D, {dcaAxis, mcPtAxis}}); + registry.add("hPrimAntiPrDCAxy", "DCAxy #bar{p}", {HistType::kTH2D, {dcaAxis, mcPtAxis}}); + registry.add("hPrimDeDCAxy", "DCAxy d", {HistType::kTH2D, {dcaAxis, mcPtAxis}}); + registry.add("hPrimAntiDeDCAxy", "DCAxy #bar{d}", {HistType::kTH2D, {dcaAxis, mcPtAxis}}); + registry.add("hSecMatPrDCAxy", "DCAxy p", {HistType::kTH2D, {dcaAxis, mcPtAxis}}); + registry.add("hSecMatAntiPrDCAxy", "DCAxy #bar{p}", {HistType::kTH2D, {dcaAxis, mcPtAxis}}); + registry.add("hSecMatDeDCAxy", "DCAxy d", {HistType::kTH2D, {dcaAxis, mcPtAxis}}); + registry.add("hSecMatAntiDeDCAxy", "DCAxy #bar{d}", {HistType::kTH2D, {dcaAxis, mcPtAxis}}); + registry.add("hSecWeakPrDCAxy", "DCAxy p", {HistType::kTH2D, {dcaAxis, mcPtAxis}}); + registry.add("hSecWeakAntiPrDCAxy", "DCAxy #bar{p}", {HistType::kTH2D, {dcaAxis, mcPtAxis}}); + registry.add("hSecWeakDeDCAxy", "DCAxy d", {HistType::kTH2D, {dcaAxis, mcPtAxis}}); + registry.add("hSecWeakAntiDeDCAxy", "DCAxy #bar{d}", {HistType::kTH2D, {dcaAxis, mcPtAxis}}); + + registry.add("hReco_EtaPhiPt_Proton", "Gen (anti)protons in reco collisions", {HistType::kTH3F, {etaAxis, phiAxis, ptAxisSmall}}); + registry.add("hReco_EtaPhiPt_Deuteron", "Gen (anti)deuteron in reco collisions", {HistType::kTH3F, {etaAxis, phiAxis, ptAxisSmall}}); + registry.add("hReco_PID_EtaPhiPt_Proton", "Gen (anti)protons + PID in reco collisions", {HistType::kTH3F, {etaAxis, phiAxis, ptAxisSmall}}); + registry.add("hReco_PID_EtaPhiPt_Deuteron", "Gen (anti)deuteron + PID in reco collisions", {HistType::kTH3F, {etaAxis, phiAxis, ptAxisSmall}}); + registry.add("hReco_EtaPhiPtMC_Proton", "Gen (anti)protons in reco collisions (MC info used)", {HistType::kTH3F, {etaAxis, phiAxis, ptAxisSmall}}); + registry.add("hReco_EtaPhiPtMC_Deuteron", "Gen (anti)deuteron in reco collisions (MC info used)", {HistType::kTH3F, {etaAxis, phiAxis, ptAxisSmall}}); + registry.add("hReco_Pt_Proton", "Reco (anti)protons in reco collisions", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hReco_Pt_Deuteron", "Reco (anti)deuterons in reco collisions", {HistType::kTH1F, {ptAxisSmall}}); + + registry.add("hSec_EtaPhiPt_Proton", "Secondary (anti)protons", {HistType::kTH3F, {etaAxis, phiAxis, ptAxisSmall}}); + registry.add("hPrimSec_EtaPhiPt_Proton", "Primary + Secondary (anti)protons", {HistType::kTH3F, {etaAxis, phiAxis, ptAxisSmall}}); + + registry.add("hnSigmaTPCVsPt_Pr_MC", "n#sigma TPC vs p_{T} for p hypothesis true MC; p_{T} (GeV/c); n#sigma TPC", {HistType::kTH2F, {ptAxis, axisNSigma}}); + registry.add("hnSigmaTPCVsPt_De_MC", "n#sigma TPC vs p_{T} for d hypothesis true MC; p_{T} (GeV/c); n#sigma TPC", {HistType::kTH2F, {ptAxis, axisNSigma}}); + registry.add("hnSigmaTOFVsPt_Pr_MC", "n#sigma TOF vs p_{T} for p hypothesis true MC; p_{T} (GeV/c); n#sigma TOF", {HistType::kTH2F, {ptAxis, axisNSigma}}); + registry.add("hnSigmaTOFVsPt_De_MC", "n#sigma TOF vs p_{T} for d hypothesis true MC; p_{T} (GeV/c); n#sigma TOF", {HistType::kTH2F, {ptAxis, axisNSigma}}); registry.add("hResPt_Proton", "; p_{T}(gen) [GeV/c]; p_{T}(reco) - p_{T}(gen) ", {HistType::kTH2F, {{100, 0.f, 10.f, "p_{T}(gen) GeV/c"}, {200, -1.f, 1.f, "p_{T}(reco) - p_{T}(gen) "}}}); registry.add("hResPt_Deuteron", "; p_{T}(gen) [GeV/c]; p_{T}(reco) - p_{T}(gen) ", {HistType::kTH2F, {{100, 0.f, 10.f, "p_{T}(gen) GeV/c"}, {200, -1.f, 1.f, "p_{T}(reco) - p_{T}(gen) "}}}); registry.add("hResPt_AntiProton", "; p_{T}(gen) [GeV/c]; p_{T}(reco) - p_{T}(gen) ", {HistType::kTH2F, {{100, 0.f, 10.f, "p_{T}(gen) GeV/c"}, {200, -1.f, 1.f, "p_{T}(reco) - p_{T}(gen) "}}}); registry.add("hResPt_AntiDeuteron", "; p_{T}(gen) [GeV/c]; p_{T}(reco) - p_{T}(gen) ", {HistType::kTH2F, {{100, 0.f, 10.f, "p_{T}(gen) GeV/c"}, {200, -1.f, 1.f, "p_{T}(reco) - p_{T}(gen) "}}}); - registry.add("hNumeratorPurity_Proton", " p(#bar{p}); p_{T} (GeV/c);S", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hNumeratorPurity_Deuteron", " d(#bar{d}); p_{T} (GeV/c);S", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hDenominatorPurity_Proton", " p(#bar{p}); p_{T} (GeV/c);(S + B)", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hDenominatorPurity_Deuteron", " d(#bar{d}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {pTAxis_small}}); + registry.add("hNumeratorPurity_Proton", " p(#bar{p}); p_{T} (GeV/c);S", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hNumeratorPurity_Deuteron", " d(#bar{d}); p_{T} (GeV/c);S", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hDenominatorPurity_Proton", " p(#bar{p}); p_{T} (GeV/c);(S + B)", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hDenominatorPurity_Deuteron", " d(#bar{d}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {ptAxisSmall}}); if (doMCQA) { @@ -368,37 +369,37 @@ struct HadronNucleiCorrelation { registry.add("hResPhi_AntiProton", "; #phi(gen); #phi(reco) - #phi(gen)", {HistType::kTH2F, {{100, 0.f, o2::constants::math::TwoPI, "#phi(gen)"}, {200, -0.5f, 0.5f, "#phi(reco) - #phi(gen)"}}}); registry.add("hResPhi_AntiDeuteron", "; #phi(gen); #phi(reco) - #phi(gen)", {HistType::kTH2F, {{100, 0.f, o2::constants::math::TwoPI, "#phi(gen)"}, {200, -0.5f, 0.5f, "#phi(reco) - #phi(gen)"}}}); - registry.add("hNumeratorPurity_Proton_TPC", " p(#bar{p}); p_{T} (GeV/c);S", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hNumeratorPurity_Deuteron_TPC", " d(#bar{d}); p_{T} (GeV/c);S", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hNumeratorPurity_Proton_TPCTOF", " p(#bar{p}); p_{T} (GeV/c);S", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hNumeratorPurity_Deuteron_TPCTOF", " d(#bar{d}); p_{T} (GeV/c);S", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hNumeratorPurity_Proton_TPC_or_TOF", " p(#bar{p}); p_{T} (GeV/c);S", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hNumeratorPurity_Deuteron_TPC_or_TOF", " d(#bar{d}); p_{T} (GeV/c);S", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hNumeratorPurity_Proton_TPCEl_or_TOF", " p(#bar{p}); p_{T} (GeV/c);S", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hNumeratorPurity_Proton_TPCEl", " p(#bar{p}); p_{T} (GeV/c);S", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hNumeratorPurity_Deuteron_TPCEl", " d(#bar{d}); p_{T} (GeV/c);S", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hNumeratorPurity_Deuteron_TPCEl_or_TOF", " d(#bar{d}); p_{T} (GeV/c);S", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hDenominatorPurity_Proton_TPC", " p(#bar{p}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hDenominatorPurity_Deuteron_TPC", " d(#bar{d}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hDenominatorPurity_Proton_TPCTOF", " p(#bar{p}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hDenominatorPurity_Deuteron_TPCTOF", " d(#bar{d}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hDenominatorPurity_Proton_TPC_or_TOF", " p(#bar{p}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hDenominatorPurity_Deuteron_TPC_or_TOF", " d(#bar{d}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hDenominatorPurity_Proton_TPCEl", " p(#bar{p}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hDenominatorPurity_Proton_TPCEl_or_TOF", " p(#bar{p}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hDenominatorPurity_Deuteron_TPCEl", " d(#bar{d}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hDenominatorPurity_Deuteron_TPCEl_or_TOF", " d(#bar{d}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {pTAxis_small}}); - - registry.add("hReco_Pt_Proton_TPC", "Reco (anti)protons in reco collisions", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hReco_Pt_Deuteron_TPC", "Reco (anti)deuterons in reco collisions", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hReco_Pt_Proton_TPCTOF", "Reco (anti)protons in reco collisions", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hReco_Pt_Deuteron_TPCTOF", "Reco (anti)deuterons in reco collisions", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hReco_Pt_Proton_TPC_or_TOF", "Reco (anti)protons in reco collisions", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hReco_Pt_Deuteron_TPC_or_TOF", "Reco (anti)deuterons in reco collisions", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hReco_Pt_Proton_TPCEl", "Reco (anti)protons in reco collisions", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hReco_Pt_Proton_TPCEl_or_TOF", "Reco (anti)protons in reco collisions", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hReco_Pt_Deuteron_TPCEl", "Reco (anti)deuterons in reco collisions", {HistType::kTH1F, {pTAxis_small}}); - registry.add("hReco_Pt_Deuteron_TPCEl_or_TOF", "Reco (anti)protons in reco collisions", {HistType::kTH1F, {pTAxis_small}}); + registry.add("hNumeratorPurity_Proton_TPC", " p(#bar{p}); p_{T} (GeV/c);S", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hNumeratorPurity_Deuteron_TPC", " d(#bar{d}); p_{T} (GeV/c);S", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hNumeratorPurity_Proton_TPCTOF", " p(#bar{p}); p_{T} (GeV/c);S", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hNumeratorPurity_Deuteron_TPCTOF", " d(#bar{d}); p_{T} (GeV/c);S", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hNumeratorPurity_Proton_TPC_or_TOF", " p(#bar{p}); p_{T} (GeV/c);S", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hNumeratorPurity_Deuteron_TPC_or_TOF", " d(#bar{d}); p_{T} (GeV/c);S", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hNumeratorPurity_Proton_TPCEl_or_TOF", " p(#bar{p}); p_{T} (GeV/c);S", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hNumeratorPurity_Proton_TPCEl", " p(#bar{p}); p_{T} (GeV/c);S", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hNumeratorPurity_Deuteron_TPCEl", " d(#bar{d}); p_{T} (GeV/c);S", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hNumeratorPurity_Deuteron_TPCEl_or_TOF", " d(#bar{d}); p_{T} (GeV/c);S", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hDenominatorPurity_Proton_TPC", " p(#bar{p}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hDenominatorPurity_Deuteron_TPC", " d(#bar{d}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hDenominatorPurity_Proton_TPCTOF", " p(#bar{p}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hDenominatorPurity_Deuteron_TPCTOF", " d(#bar{d}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hDenominatorPurity_Proton_TPC_or_TOF", " p(#bar{p}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hDenominatorPurity_Deuteron_TPC_or_TOF", " d(#bar{d}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hDenominatorPurity_Proton_TPCEl", " p(#bar{p}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hDenominatorPurity_Proton_TPCEl_or_TOF", " p(#bar{p}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hDenominatorPurity_Deuteron_TPCEl", " d(#bar{d}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hDenominatorPurity_Deuteron_TPCEl_or_TOF", " d(#bar{d}); p_{T} (GeV/c); (S + B)", {HistType::kTH1F, {ptAxisSmall}}); + + registry.add("hReco_Pt_Proton_TPC", "Reco (anti)protons in reco collisions", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hReco_Pt_Deuteron_TPC", "Reco (anti)deuterons in reco collisions", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hReco_Pt_Proton_TPCTOF", "Reco (anti)protons in reco collisions", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hReco_Pt_Deuteron_TPCTOF", "Reco (anti)deuterons in reco collisions", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hReco_Pt_Proton_TPC_or_TOF", "Reco (anti)protons in reco collisions", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hReco_Pt_Deuteron_TPC_or_TOF", "Reco (anti)deuterons in reco collisions", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hReco_Pt_Proton_TPCEl", "Reco (anti)protons in reco collisions", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hReco_Pt_Proton_TPCEl_or_TOF", "Reco (anti)protons in reco collisions", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hReco_Pt_Deuteron_TPCEl", "Reco (anti)deuterons in reco collisions", {HistType::kTH1F, {ptAxisSmall}}); + registry.add("hReco_Pt_Deuteron_TPCEl_or_TOF", "Reco (anti)protons in reco collisions", {HistType::kTH1F, {ptAxisSmall}}); } } @@ -406,8 +407,8 @@ struct HadronNucleiCorrelation { registry.add("Generated/hNEventsMC", "hNEventsMC", {HistType::kTH1D, {{1, 0.f, 1.f}}}); registry.get(HIST("Generated/hNEventsMC"))->GetXaxis()->SetBinLabel(1, "All"); - registry.add("hGen_EtaPhiPt_Proton", "Gen (anti)protons in gen collisions", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}}); - registry.add("hGen_EtaPhiPt_Deuteron", "Gen (anti)deuteron in gen collisions", {HistType::kTH3F, {etaAxis, phiAxis, pTAxis_small}}); + registry.add("hGen_EtaPhiPt_Proton", "Gen (anti)protons in gen collisions", {HistType::kTH3F, {etaAxis, phiAxis, ptAxisSmall}}); + registry.add("hGen_EtaPhiPt_Deuteron", "Gen (anti)deuteron in gen collisions", {HistType::kTH3F, {etaAxis, phiAxis, ptAxisSmall}}); auto hp = registry.add("Generated/hQAProtons", "hQAProtons", {HistType::kTH1D, {{5, 0.f, 5.f}}}); hp->GetXaxis()->SetBinLabel(1, "All"); @@ -415,14 +416,20 @@ struct HadronNucleiCorrelation { hp->GetXaxis()->SetBinLabel(3, "|#eta|<0.8"); hp->GetXaxis()->SetBinLabel(4, "no daughters"); hp->GetXaxis()->SetBinLabel(5, "d daughter"); + registry.addClone("Generated/hQAProtons", "Generated/hQAAntiProtons"); + + registry.addClone("Generated/hQAProtons", "Generated/hQANeutrons"); + registry.addClone("Generated/hQAProtons", "Generated/hQAAntiNeutrons"); auto hd = registry.add("Generated/hQADeuterons", "hQADeuterons", {HistType::kTH1D, {{3, 0.f, 3.f}}}); hd->GetXaxis()->SetBinLabel(1, "All"); hd->GetXaxis()->SetBinLabel(2, "PhysicalPrimary"); hd->GetXaxis()->SetBinLabel(3, "|#eta|<0.8"); + registry.addClone("Generated/hQADeuterons", "Generated/hQAAntiDeuterons"); - registry.add("Generated/hDeuteronsVsPt", "hDeuteronsVsPt; p_{T} (GeV/c);", {HistType::kTH1D, {{100, 0.f, 10.f}}}); - registry.add("Generated/hAntiDeuteronsVsPt", "hAntiDeuteronsVsPt; p_{T} (GeV/c);", {HistType::kTH1D, {{100, 0.f, 10.f}}}); + const AxisSpec ptAxisGen = {100, 0.f, 10.f, "#it{p}_{T} GeV/#it{c}"}; + registry.add("Generated/hDeuteronsVsPt", "hDeuteronsVsPt;", {HistType::kTH1D, {ptAxisGen}}); + registry.add("Generated/hAntiDeuteronsVsPt", "hAntiDeuteronsVsPt;", {HistType::kTH1D, {ptAxisGen}}); } } @@ -439,226 +446,102 @@ struct HadronNucleiCorrelation { Filter simvertexFilter = nabs(o2::aod::mccollision::posZ) <= cutzVertex; template - bool IsProton(Type const& track, int sign) + bool isProton(Type const& track, const int sign) { - bool isProton = false; + const bool isTPCPID = std::abs(track.tpcNSigmaPr()) < nsigmaTPC; + const bool isTOFPID = std::abs(track.tofNSigmaPr()) < nsigmaTOF; + const bool isTPCElRejection = rejectionEl && track.beta() < BetahasTOFthr && track.pt() < pTthrprTPCEl && track.tpcNSigmaEl() >= nsigmaElPr; + const bool isITSPID = track.itsNSigmaPr() > nsigmaITSPr; - bool isTPCPID = std::abs(track.tpcNSigmaPr()) < nsigmaTPC; - bool isTOFPID = std::abs(track.tofNSigmaPr()) < nsigmaTOF; - bool isTPCElRejection = rejectionEl && track.beta() < betahasTOFthr && track.pt() < pTthrprTPCEl && track.tpcNSigmaEl() >= nsigmaElPr; - bool isITSPID = track.itsNSigmaPr() > nsigmaITSPr; - - bool isQuadraticPID = TMath::Sqrt(track.tpcNSigmaPr() * track.tpcNSigmaPr() + track.tofNSigmaPr() * track.tofNSigmaPr()) < nsigmaTPC; + const bool isQuadraticPID = std::hypot(track.tpcNSigmaPr(), track.tofNSigmaPr()) < nsigmaTPC; + // Check if the sign of the track matches the expected sign for protons or antiprotons + const bool signCheck = (sign > 0 && track.sign() > 0) || (sign < 0 && track.sign() < 0); if (!doQuadraticPID) { if (isTPCPID) { if (track.pt() < pTthrprTOF) { if (!doITSPID || isITSPID) { - if (sign > 0) { - if (track.sign() > 0) { - isProton = true; - } else if (track.sign() < 0) { - isProton = false; - } - } else if (sign < 0) { - if (track.sign() > 0) { - isProton = false; - } else if (track.sign() < 0) { - isProton = true; - } - } - } - } else if (isTPCElRejection) { - if (sign > 0) { - if (track.sign() > 0) { - isProton = true; - } else if (track.sign() < 0) { - isProton = false; - } - } else if (sign < 0) { - if (track.sign() > 0) { - isProton = false; - } else if (track.sign() < 0) { - isProton = true; - } - } - } else if (isTOFPID) { - if (sign > 0) { - if (track.sign() > 0) { - isProton = true; - } else if (track.sign() < 0) { - isProton = false; - } - } else if (sign < 0) { - if (track.sign() > 0) { - isProton = false; - } else if (track.sign() < 0) { - isProton = true; - } + return signCheck; } + } else if (isTPCElRejection || isTOFPID) { + return signCheck; } } } else { if (track.pt() < pTthrprTOF) { if (isTPCPID) { if (!doITSPID || isITSPID) { - if (sign > 0) { - if (track.sign() > 0) { - isProton = true; - } else if (track.sign() < 0) { - isProton = false; - } - } else if (sign < 0) { - if (track.sign() > 0) { - isProton = false; - } else if (track.sign() < 0) { - isProton = true; - } - } + return signCheck; } } } else if (isQuadraticPID) { - if (sign > 0) { - if (track.sign() > 0) { - isProton = true; - } else if (track.sign() < 0) { - isProton = false; - } - } else if (sign < 0) { - if (track.sign() > 0) { - isProton = false; - } else if (track.sign() < 0) { - isProton = true; - } - } + return signCheck; } } - return isProton; + return false; } template - bool IsDeuteron(Type const& track, int sign) + bool isDeuteron(Type const& track, const int sign) { - bool isDeuteron = false; - bool isTPCPID = std::abs(track.tpcNSigmaDe()) < nsigmaTPC; - bool isTOFPID = std::abs(track.tofNSigmaDe()) < nsigmaTOF; - bool isTPCElRejection = rejectionEl && track.beta() < betahasTOFthr && track.pt() < pTthrdeTPCEl && track.tpcNSigmaEl() >= nsigmaElDe; - bool isITSPID = track.itsNSigmaDe() > nsigmaITSDe; + const bool isTPCPID = std::abs(track.tpcNSigmaDe()) < nsigmaTPC; + const bool isTOFPID = std::abs(track.tofNSigmaDe()) < nsigmaTOF; + const bool isTPCElRejection = rejectionEl && track.beta() < BetahasTOFthr && track.pt() < pTthrdeTPCEl && track.tpcNSigmaEl() >= nsigmaElDe; + const bool isITSPID = track.itsNSigmaDe() > nsigmaITSDe; - bool isQuadraticPID = TMath::Sqrt(track.tpcNSigmaDe() * track.tpcNSigmaDe() + track.tofNSigmaDe() * track.tofNSigmaDe()) < nsigmaTPC; + const bool isQuadraticPID = std::hypot(track.tpcNSigmaDe(), track.tofNSigmaDe()) < nsigmaTPC; + // Check if the sign of the track matches the expected sign for deuterons or antideuterons + const bool signCheck = (sign > 0 && track.sign() > 0) || (sign < 0 && track.sign() < 0); if (!doQuadraticPID) { if (isTPCPID) { if (track.pt() < pTthrdeTOF) { if (!doITSPID || isITSPID) { - if (sign > 0) { - if (track.sign() > 0) { - isDeuteron = true; - } else if (track.sign() < 0) { - isDeuteron = false; - } - } else if (sign < 0) { - if (track.sign() > 0) { - isDeuteron = false; - } else if (track.sign() < 0) { - isDeuteron = true; - } - } - } - } else if (isTPCElRejection) { - if (sign > 0) { - if (track.sign() > 0) { - isDeuteron = true; - } else if (track.sign() < 0) { - isDeuteron = false; - } - } else if (sign < 0) { - if (track.sign() > 0) { - isDeuteron = false; - } else if (track.sign() < 0) { - isDeuteron = true; - } - } - } else if (isTOFPID) { - if (sign > 0) { - if (track.sign() > 0) { - isDeuteron = true; - } else if (track.sign() < 0) { - isDeuteron = false; - } - } else if (sign < 0) { - if (track.sign() > 0) { - isDeuteron = false; - } else if (track.sign() < 0) { - isDeuteron = true; - } + return signCheck; } + } else if (isTPCElRejection || isTOFPID) { + return signCheck; } } } else { if (track.pt() < pTthrprTOF) { if (isTPCPID) { if (!doITSPID || isITSPID) { - if (sign > 0) { - if (track.sign() > 0) { - isDeuteron = true; - } else if (track.sign() < 0) { - isDeuteron = false; - } - } else if (sign < 0) { - if (track.sign() > 0) { - isDeuteron = false; - } else if (track.sign() < 0) { - isDeuteron = true; - } - } + return signCheck; } } } else if (isQuadraticPID) { - if (sign > 0) { - if (track.sign() > 0) { - isDeuteron = true; - } else if (track.sign() < 0) { - isDeuteron = false; - } - } else if (sign < 0) { - if (track.sign() > 0) { - isDeuteron = false; - } else if (track.sign() < 0) { - isDeuteron = true; - } - } + return signCheck; } } - return isDeuteron; + return false; } template bool applyDCAcut(const T1& track) { - bool passcut = true; // pt-dependent selection - if (std::abs(track.dcaXY()) > (dcaPar0 + dcaPar1 / track.pt())) - passcut = false; - - if (doDCAZ && std::abs(track.dcaZ()) > (dcaPar0 + dcaPar1 / track.pt())) - passcut = false; - - return passcut; + if (std::abs(track.dcaXY()) > (dcaPar0 + dcaPar1 / track.pt())) { + return false; + } + if (doDCAZ && std::abs(track.dcaZ()) > (dcaPar0 + dcaPar1 / track.pt())) { + return false; + } + return true; } template void fillHistograms(T1 const& part0, T1 const& part1, bool ME, bool isIdentical) { - Pair->SetPair(&part0, &part1); - Pair->SetIdentical(isIdentical); - if (isIdentical && Pair->IsClosePair(dEta, dPhi, radiusTPC)) { - QA.fill(HIST("QA/hdEtadPhistar"), Pair->GetPhiStarDiff(radiusTPC), Pair->GetEtaDiff()); + pair->SetPair(&part0, &part1); + pair->SetIdentical(isIdentical); + if (isIdentical && pair->IsClosePair(dEta, dPhi, radiusTPC)) { + registryQa.fill(HIST("QA/hdEtadPhistar"), pair->GetPhiStarDiff(radiusTPC), pair->GetEtaDiff()); return; } - if (doClosePairRejection && Pair->IsClosePair(dEta, dPhi, radiusTPC)) { - QA.fill(HIST("QA/hdEtadPhistar"), Pair->GetPhiStarDiff(radiusTPC), Pair->GetEtaDiff()); + if (doClosePairRejection && pair->IsClosePair(dEta, dPhi, radiusTPC)) { + registryQa.fill(HIST("QA/hdEtadPhistar"), pair->GetPhiStarDiff(radiusTPC), pair->GetEtaDiff()); return; } @@ -675,55 +558,58 @@ struct HadronNucleiCorrelation { if (doCorrection) { // Apply corrections switch (mode) { case kDbarPbar: - corr0 = hEffpTEta_antideuteron->Interpolate(part0.pt(), part0.eta()); - corr1 = hEffpTEta_antiproton->Interpolate(part1.pt(), part1.eta()); + corr0 = hEffPtEtaAntiDeuteron->Interpolate(part0.pt(), part0.eta()); + corr1 = hEffPtEtaAntiProton->Interpolate(part1.pt(), part1.eta()); break; case kDP: - corr0 = hEffpTEta_deuteron->Interpolate(part0.pt(), part0.eta()); - corr1 = hEffpTEta_proton->Interpolate(part1.pt(), part1.eta()); + corr0 = hEffPtEtaDeuteron->Interpolate(part0.pt(), part0.eta()); + corr1 = hEffPtEtaProton->Interpolate(part1.pt(), part1.eta()); break; case kDbarP: - corr0 = hEffpTEta_antideuteron->Interpolate(part0.pt(), part0.eta()); - corr1 = hEffpTEta_proton->Interpolate(part1.pt(), part1.eta()); + corr0 = hEffPtEtaAntiDeuteron->Interpolate(part0.pt(), part0.eta()); + corr1 = hEffPtEtaProton->Interpolate(part1.pt(), part1.eta()); break; case kDPbar: - corr0 = hEffpTEta_deuteron->Interpolate(part0.pt(), part0.eta()); - corr1 = hEffpTEta_antiproton->Interpolate(part1.pt(), part1.eta()); + corr0 = hEffPtEtaDeuteron->Interpolate(part0.pt(), part0.eta()); + corr1 = hEffPtEtaAntiProton->Interpolate(part1.pt(), part1.eta()); break; case kPbarP: - corr0 = hEffpTEta_antiproton->Interpolate(part0.pt(), part0.eta()); - corr1 = hEffpTEta_proton->Interpolate(part1.pt(), part1.eta()); + corr0 = hEffPtEtaAntiProton->Interpolate(part0.pt(), part0.eta()); + corr1 = hEffPtEtaProton->Interpolate(part1.pt(), part1.eta()); break; case kPbarPbar: - corr0 = hEffpTEta_antiproton->Interpolate(part0.pt(), part0.eta()); - corr1 = hEffpTEta_antiproton->Interpolate(part1.pt(), part1.eta()); + corr0 = hEffPtEtaAntiProton->Interpolate(part0.pt(), part0.eta()); + corr1 = hEffPtEtaAntiProton->Interpolate(part1.pt(), part1.eta()); break; case kPP: - corr0 = hEffpTEta_proton->Interpolate(part0.pt(), part0.eta()); - corr1 = hEffpTEta_proton->Interpolate(part1.pt(), part1.eta()); + corr0 = hEffPtEtaProton->Interpolate(part0.pt(), part0.eta()); + corr1 = hEffPtEtaProton->Interpolate(part1.pt(), part1.eta()); break; case kPPbar: - corr0 = hEffpTEta_proton->Interpolate(part0.pt(), part0.eta()); - corr1 = hEffpTEta_antiproton->Interpolate(part1.pt(), part1.eta()); + corr0 = hEffPtEtaProton->Interpolate(part0.pt(), part0.eta()); + corr1 = hEffPtEtaAntiProton->Interpolate(part1.pt(), part1.eta()); + break; + default: + LOG(error) << "Unknown mode for efficiency correction: " << mode; break; } } if (ME) { - hEtaPhi_ME[k]->Fill(deltaEta, deltaPhi, part1.pt()); + hEtaPhiMixdEv[k]->Fill(deltaEta, deltaPhi, part1.pt()); if (corr0 != 0 && corr1 != 0) { - hCorrEtaPhi_ME[k]->Fill(deltaEta, deltaPhi, part1.pt(), 1. / (corr0 * corr1)); + hCorrEtaPhiMixdEv[k]->Fill(deltaEta, deltaPhi, part1.pt(), 1. / (corr0 * corr1)); } } else { - hEtaPhi_SE[k]->Fill(deltaEta, deltaPhi, part1.pt()); + hEtaPhiSameEv[k]->Fill(deltaEta, deltaPhi, part1.pt()); if (corr0 != 0 && corr1 != 0) { - hCorrEtaPhi_SE[k]->Fill(deltaEta, deltaPhi, part1.pt(), 1. / (corr0 * corr1)); + hCorrEtaPhiSameEv[k]->Fill(deltaEta, deltaPhi, part1.pt(), 1. / (corr0 * corr1)); } } // SE } // pT condition } // nBinspT loop - Pair->ResetPair(); + pair->ResetPair(); } template @@ -739,40 +625,40 @@ struct HadronNucleiCorrelation { if (part0.pt() >= pTBins.value.at(k) && part0.pt() < pTBins.value.at(k + 1)) { if (ME) { - hEtaPhi_ME[k]->Fill(deltaEta, deltaPhi, part1.pt()); - hCorrEtaPhi_ME[k]->Fill(deltaEta, deltaPhi, part1.pt()); + hEtaPhiMixdEv[k]->Fill(deltaEta, deltaPhi, part1.pt()); + hCorrEtaPhiMixdEv[k]->Fill(deltaEta, deltaPhi, part1.pt()); } else { - hEtaPhi_SE[k]->Fill(deltaEta, deltaPhi, part1.pt()); - hCorrEtaPhi_SE[k]->Fill(deltaEta, deltaPhi, part1.pt()); + hEtaPhiSameEv[k]->Fill(deltaEta, deltaPhi, part1.pt()); + hCorrEtaPhiSameEv[k]->Fill(deltaEta, deltaPhi, part1.pt()); } // SE } // pT condition } // nBinspT loop } - void GetCorrection(o2::framework::Service const& ccdbObj, TString filepath, TString histname) + void GetCorrection(o2::framework::Service const& ccdbObj, const TString& filepath, const TString& histname) { - TList* l = ccdbObj->get(filepath.Data()); + auto* l = ccdbObj->get(filepath.Data()); if (!l) { LOGP(error, "Could not open corrections file {}", Form("%s", filepath.Data())); return; } - hEffpTEta_proton = static_cast(l->FindObject(Form("%s_proton", histname.Data()))); - if (!hEffpTEta_proton) { + hEffPtEtaProton = dynamic_cast(l->FindObject(Form("%s_proton", histname.Data()))); + if (!hEffPtEtaProton) { LOGP(error, "Could not open histogram {}", Form("%s_proton", histname.Data())); return; } - hEffpTEta_antiproton = static_cast(l->FindObject(Form("%s_antiproton", histname.Data()))); - if (!hEffpTEta_antiproton) { + hEffPtEtaAntiProton = dynamic_cast(l->FindObject(Form("%s_antiproton", histname.Data()))); + if (!hEffPtEtaAntiProton) { LOGP(error, "Could not open histogram {}", Form("%s_antiproton", histname.Data())); return; } - hEffpTEta_deuteron = static_cast(l->FindObject(Form("%s_deuteron", histname.Data()))); - if (!hEffpTEta_deuteron) { + hEffPtEtaDeuteron = dynamic_cast(l->FindObject(Form("%s_deuteron", histname.Data()))); + if (!hEffPtEtaDeuteron) { LOGP(error, "Could not open histogram {}", Form("%s_deuteron", histname.Data())); return; } - hEffpTEta_antideuteron = static_cast(l->FindObject(Form("%s_antideuteron", histname.Data()))); - if (!hEffpTEta_antideuteron) { + hEffPtEtaAntiDeuteron = dynamic_cast(l->FindObject(Form("%s_antideuteron", histname.Data()))); + if (!hEffPtEtaAntiDeuteron) { LOGP(error, "Could not open histogram {}", Form("%s_antideuteron", histname.Data())); return; } @@ -785,7 +671,7 @@ struct HadronNucleiCorrelation { template float getMCMultiplicity(TParticles const& particles) { - float Ncharged = 0.; + float nCharged = 0.; for (const auto& mcParticle : particles) { if (!mcParticle.isPhysicalPrimary()) { @@ -798,12 +684,12 @@ struct HadronNucleiCorrelation { TParticlePDG* p = pdgDB->GetParticle(mcParticle.pdgCode()); if (std::abs(p->Charge()) > 1E-3) { - Ncharged++; + nCharged++; } } - registry.fill(HIST("hMult"), Ncharged); - return Ncharged; + registry.fill(HIST("hMult"), nCharged); + return nCharged; } void processSameEvent(FilteredCollisions::iterator const& collision, FilteredTracks const& tracks) @@ -814,116 +700,135 @@ struct HadronNucleiCorrelation { for (const auto& track : tracks) { - if (track.tpcFractionSharedCls() > maxtpcSharedCls) + if (track.tpcFractionSharedCls() > maxtpcSharedCls) { continue; - if (track.itsNCls() < minitsNCls) + } + if (track.itsNCls() < minitsNCls) { continue; + } - if (IsProton(track, +1)) + if (isProton(track, +1)) { registry.fill(HIST("hPrDCAxy"), track.dcaXY(), track.pt()); - if (IsProton(track, -1)) + } + if (isProton(track, -1)) { registry.fill(HIST("hAntiPrDCAxy"), track.dcaXY(), track.pt()); - if (IsDeuteron(track, +1)) + } + if (isDeuteron(track, +1)) { registry.fill(HIST("hDeDCAxy"), track.dcaXY(), track.pt()); - if (IsDeuteron(track, -1)) + } + if (isDeuteron(track, -1)) { registry.fill(HIST("hAntiDeDCAxy"), track.dcaXY(), track.pt()); + } - if (!applyDCAcut(track)) + if (!applyDCAcut(track)) { continue; + } if (doQA) { - QA.fill(HIST("QA/hTPCnClusters"), track.tpcNClsFound()); - QA.fill(HIST("QA/hTPCSharedClusters"), track.tpcFractionSharedCls()); - QA.fill(HIST("QA/hTPCchi2"), track.tpcChi2NCl()); - QA.fill(HIST("QA/hTPCcrossedRowsOverFindableCls"), track.tpcCrossedRowsOverFindableCls()); - QA.fill(HIST("QA/hITSchi2"), track.itsChi2NCl()); - QA.fill(HIST("QA/hDCAxy"), track.dcaXY(), track.pt()); - QA.fill(HIST("QA/hDCAz"), track.dcaZ(), track.pt()); - QA.fill(HIST("QA/TPCChi2VsPZ"), track.tpcInnerParam() / track.sign(), track.tpcChi2NCl()); - QA.fill(HIST("QA/hVtxZ_trk"), collision.posZ()); - QA.fill(HIST("QA/hnSigmaTPCVsPt_El"), track.pt() * track.sign(), track.tpcNSigmaEl()); - QA.fill(HIST("QA/hnSigmaTPCVsPt_Pr"), track.pt() * track.sign(), track.tpcNSigmaPr()); - QA.fill(HIST("QA/hnSigmaTPCVsPt_De"), track.pt() * track.sign(), track.tpcNSigmaDe()); - QA.fill(HIST("QA/hnSigmaTOFVsPt_Pr"), track.pt() * track.sign(), track.tofNSigmaPr()); - QA.fill(HIST("QA/hnSigmaTOFVsPt_De"), track.pt() * track.sign(), track.tofNSigmaDe()); - QA.fill(HIST("QA/hnSigmaITSVsPt_Pr"), track.pt() * track.sign(), track.itsNSigmaPr()); - QA.fill(HIST("QA/hnSigmaITSVsPt_De"), track.pt() * track.sign(), track.itsNSigmaDe()); - QA.fill(HIST("QA/h2dTPCTOF_AntiPr"), track.tpcNSigmaPr(), track.tofNSigmaPr()); - QA.fill(HIST("QA/h2dTPCTOF_Pr"), track.tpcNSigmaPr(), track.tofNSigmaPr()); - - if (IsProton(track, -1)) { - QA.fill(HIST("QA/hEtaAntiPr"), track.eta()); - QA.fill(HIST("QA/hPhiAntiPr"), track.phi()); - QA.fill(HIST("QA/hnSigmaTOFVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tofNSigmaPr()); - QA.fill(HIST("QA/hnSigmaTPCVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaPr()); - QA.fill(HIST("QA/hnSigmaITSVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.itsNSigmaPr()); - QA.fill(HIST("QA/h2dTPCTOF_AntiPr_AfterSel"), track.tpcNSigmaPr(), track.tofNSigmaPr()); - } - if (IsProton(track, +1)) { - QA.fill(HIST("QA/hEtaPr"), track.eta()); - QA.fill(HIST("QA/hPhiPr"), track.phi()); - QA.fill(HIST("QA/hnSigmaTOFVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tofNSigmaPr()); - QA.fill(HIST("QA/hnSigmaTPCVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaPr()); - QA.fill(HIST("QA/hnSigmaITSVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.itsNSigmaPr()); - QA.fill(HIST("QA/h2dTPCTOF_Pr_AfterSel"), track.tpcNSigmaPr(), track.tofNSigmaPr()); - } - if (IsDeuteron(track, -1)) { - QA.fill(HIST("QA/hEtaAntiDe"), track.eta()); - QA.fill(HIST("QA/hPhiAntiDe"), track.phi()); - QA.fill(HIST("QA/hnSigmaTOFVsPt_De_AfterSel"), track.pt() * track.sign(), track.tofNSigmaDe()); - QA.fill(HIST("QA/hnSigmaTPCVsPt_De_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaDe()); - QA.fill(HIST("QA/hnSigmaITSVsPt_De_AfterSel"), track.pt() * track.sign(), track.itsNSigmaDe()); - } - if (IsDeuteron(track, +1)) { - QA.fill(HIST("QA/hEtaDe"), track.eta()); - QA.fill(HIST("QA/hPhiDe"), track.phi()); - QA.fill(HIST("QA/hnSigmaTOFVsPt_De_AfterSel"), track.pt() * track.sign(), track.tofNSigmaDe()); - QA.fill(HIST("QA/hnSigmaTPCVsPt_De_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaDe()); - QA.fill(HIST("QA/hnSigmaITSVsPt_De_AfterSel"), track.pt() * track.sign(), track.itsNSigmaDe()); + registryQa.fill(HIST("QA/hTPCnClusters"), track.tpcNClsFound()); + registryQa.fill(HIST("QA/hTPCSharedClusters"), track.tpcFractionSharedCls()); + registryQa.fill(HIST("QA/hTPCchi2"), track.tpcChi2NCl()); + registryQa.fill(HIST("QA/hTPCcrossedRowsOverFindableCls"), track.tpcCrossedRowsOverFindableCls()); + registryQa.fill(HIST("QA/hITSchi2"), track.itsChi2NCl()); + registryQa.fill(HIST("QA/hDCAxy"), track.dcaXY(), track.pt()); + registryQa.fill(HIST("QA/hDCAz"), track.dcaZ(), track.pt()); + registryQa.fill(HIST("QA/TPCChi2VsPZ"), track.tpcInnerParam() / track.sign(), track.tpcChi2NCl()); + registryQa.fill(HIST("QA/hVtxZ_trk"), collision.posZ()); + registryQa.fill(HIST("QA/hnSigmaTPCVsPt_El"), track.pt() * track.sign(), track.tpcNSigmaEl()); + registryQa.fill(HIST("QA/hnSigmaTPCVsPt_Pr"), track.pt() * track.sign(), track.tpcNSigmaPr()); + registryQa.fill(HIST("QA/hnSigmaTPCVsPt_De"), track.pt() * track.sign(), track.tpcNSigmaDe()); + registryQa.fill(HIST("QA/hnSigmaTOFVsPt_Pr"), track.pt() * track.sign(), track.tofNSigmaPr()); + registryQa.fill(HIST("QA/hnSigmaTOFVsPt_De"), track.pt() * track.sign(), track.tofNSigmaDe()); + registryQa.fill(HIST("QA/hnSigmaITSVsPt_Pr"), track.pt() * track.sign(), track.itsNSigmaPr()); + registryQa.fill(HIST("QA/hnSigmaITSVsPt_De"), track.pt() * track.sign(), track.itsNSigmaDe()); + registryQa.fill(HIST("QA/h2dTPCTOF_AntiPr"), track.tpcNSigmaPr(), track.tofNSigmaPr()); + registryQa.fill(HIST("QA/h2dTPCTOF_Pr"), track.tpcNSigmaPr(), track.tofNSigmaPr()); + + if (isProton(track, -1)) { + registryQa.fill(HIST("QA/hEtaAntiPr"), track.eta()); + registryQa.fill(HIST("QA/hPhiAntiPr"), track.phi()); + registryQa.fill(HIST("QA/hnSigmaTOFVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tofNSigmaPr()); + registryQa.fill(HIST("QA/hnSigmaTPCVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaPr()); + registryQa.fill(HIST("QA/hnSigmaITSVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.itsNSigmaPr()); + registryQa.fill(HIST("QA/h2dTPCTOF_AntiPr_AfterSel"), track.tpcNSigmaPr(), track.tofNSigmaPr()); + } + if (isProton(track, +1)) { + registryQa.fill(HIST("QA/hEtaPr"), track.eta()); + registryQa.fill(HIST("QA/hPhiPr"), track.phi()); + registryQa.fill(HIST("QA/hnSigmaTOFVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tofNSigmaPr()); + registryQa.fill(HIST("QA/hnSigmaTPCVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaPr()); + registryQa.fill(HIST("QA/hnSigmaITSVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.itsNSigmaPr()); + registryQa.fill(HIST("QA/h2dTPCTOF_Pr_AfterSel"), track.tpcNSigmaPr(), track.tofNSigmaPr()); + } + if (isDeuteron(track, -1)) { + registryQa.fill(HIST("QA/hEtaAntiDe"), track.eta()); + registryQa.fill(HIST("QA/hPhiAntiDe"), track.phi()); + registryQa.fill(HIST("QA/hnSigmaTOFVsPt_De_AfterSel"), track.pt() * track.sign(), track.tofNSigmaDe()); + registryQa.fill(HIST("QA/hnSigmaTPCVsPt_De_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaDe()); + registryQa.fill(HIST("QA/hnSigmaITSVsPt_De_AfterSel"), track.pt() * track.sign(), track.itsNSigmaDe()); + } + if (isDeuteron(track, +1)) { + registryQa.fill(HIST("QA/hEtaDe"), track.eta()); + registryQa.fill(HIST("QA/hPhiDe"), track.phi()); + registryQa.fill(HIST("QA/hnSigmaTOFVsPt_De_AfterSel"), track.pt() * track.sign(), track.tofNSigmaDe()); + registryQa.fill(HIST("QA/hnSigmaTPCVsPt_De_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaDe()); + registryQa.fill(HIST("QA/hnSigmaITSVsPt_De_AfterSel"), track.pt() * track.sign(), track.itsNSigmaDe()); } } } - Pair->SetMagField1(collision.magField()); - Pair->SetMagField2(collision.magField()); + pair->SetMagField1(collision.magField()); + pair->SetMagField2(collision.magField()); if (mode == kPbarPbar || mode == kPP) { // Identical particle combinations for (const auto& [part0, part1] : combinations(CombinationsStrictlyUpperIndexPolicy(tracks, tracks))) { - if (part0.tpcFractionSharedCls() > maxtpcSharedCls) + if (part0.tpcFractionSharedCls() > maxtpcSharedCls) { continue; - if (part0.itsNCls() < minitsNCls) + } + if (part0.itsNCls() < minitsNCls) { continue; - if (part1.tpcFractionSharedCls() > maxtpcSharedCls) + } + if (part1.tpcFractionSharedCls() > maxtpcSharedCls) { continue; - if (part1.itsNCls() < minitsNCls) + } + if (part1.itsNCls() < minitsNCls) { continue; + } - if (!applyDCAcut(part0)) + if (!applyDCAcut(part0)) { continue; - if (!applyDCAcut(part1)) + } + if (!applyDCAcut(part1)) { continue; + } // remove tracks outside pt bins - if (part0.pt() < pTBins.value.at(0) || part0.pt() >= pTBins.value.at(nBinspT)) + if (part0.pt() < pTBins.value.at(0) || part0.pt() >= pTBins.value.at(nBinspT)) { continue; - if (part1.pt() < pTBins.value.at(0) || part1.pt() >= pTBins.value.at(nBinspT)) + } + if (part1.pt() < pTBins.value.at(0) || part1.pt() >= pTBins.value.at(nBinspT)) { continue; + } // mode 6 if (mode == kPP) { - if (!IsProton(part0, +1)) + if (!isProton(part0, +1)) { continue; - if (!IsProton(part1, +1)) + } + if (!isProton(part1, +1)) { continue; + } } // mode 5 if (mode == kPbarPbar) { - if (!IsProton(part0, -1)) + if (!isProton(part0, -1)) { continue; - if (!IsProton(part1, -1)) + } + if (!isProton(part1, -1)) { continue; + } } fillHistograms(part0, part1, false, true); @@ -933,62 +838,82 @@ struct HadronNucleiCorrelation { for (const auto& [part0, part1] : combinations(CombinationsFullIndexPolicy(tracks, tracks))) { - if (part0.tpcFractionSharedCls() > maxtpcSharedCls) + if (part0.tpcFractionSharedCls() > maxtpcSharedCls) { continue; - if (part0.itsNCls() < minitsNCls) + } + if (part0.itsNCls() < minitsNCls) { continue; - if (part1.tpcFractionSharedCls() > maxtpcSharedCls) + } + if (part1.tpcFractionSharedCls() > maxtpcSharedCls) { continue; - if (part1.itsNCls() < minitsNCls) + } + if (part1.itsNCls() < minitsNCls) { continue; + } - if (!applyDCAcut(part0)) + if (!applyDCAcut(part0)) { continue; - if (!applyDCAcut(part1)) + } + if (!applyDCAcut(part1)) { continue; + } // remove tracks outside pt bins - if (part0.pt() < pTBins.value.at(0) || part0.pt() >= pTBins.value.at(nBinspT)) + if (part0.pt() < pTBins.value.at(0) || part0.pt() >= pTBins.value.at(nBinspT)) { continue; - if (part1.pt() < pTBins.value.at(0) || part1.pt() >= pTBins.value.at(nBinspT)) + } + if (part1.pt() < pTBins.value.at(0) || part1.pt() >= pTBins.value.at(nBinspT)) { continue; + } // modes 0,1,2,3,4,7 if (mode == kDbarPbar) { - if (!IsDeuteron(part0, -1)) + if (!isDeuteron(part0, -1)) { continue; - if (!IsProton(part1, -1)) + } + if (!isProton(part1, -1)) { continue; + } } if (mode == kDP) { - if (!IsDeuteron(part0, +1)) + if (!isDeuteron(part0, +1)) { continue; - if (!IsProton(part1, +1)) + } + if (!isProton(part1, +1)) { continue; + } } if (mode == kDbarP) { - if (!IsDeuteron(part0, -1)) + if (!isDeuteron(part0, -1)) { continue; - if (!IsProton(part1, +1)) + } + if (!isProton(part1, +1)) { continue; + } } if (mode == kDPbar) { - if (!IsDeuteron(part0, +1)) + if (!isDeuteron(part0, +1)) { continue; - if (!IsProton(part1, -1)) + } + if (!isProton(part1, -1)) { continue; + } } if (mode == kPbarP) { - if (!IsProton(part0, -1)) + if (!isProton(part0, -1)) { continue; - if (!IsProton(part1, +1)) + } + if (!isProton(part1, +1)) { continue; + } } if (mode == kPPbar) { - if (!IsProton(part0, +1)) + if (!isProton(part0, +1)) { continue; - if (!IsProton(part1, -1)) + } + if (!isProton(part1, -1)) { continue; + } } fillHistograms(part0, part1, false, false); @@ -1005,122 +930,143 @@ struct HadronNucleiCorrelation { for (const auto& track : tracks) { - if (removeSameBunchPileup && !track.template singleCollSel_as().isNoSameBunchPileup()) + if (removeSameBunchPileup && !track.template singleCollSel_as().isNoSameBunchPileup()) { continue; + } - if (track.tpcFractionSharedCls() > maxtpcSharedCls) + if (track.tpcFractionSharedCls() > maxtpcSharedCls) { continue; - if (track.itsNCls() < minitsNCls) + } + if (track.itsNCls() < minitsNCls) { continue; + } - if (IsProton(track, +1)) + if (isProton(track, +1)) { registry.fill(HIST("hPrDCAxy"), track.dcaXY(), track.pt()); - if (IsProton(track, -1)) + } + if (isProton(track, -1)) { registry.fill(HIST("hAntiPrDCAxy"), track.dcaXY(), track.pt()); - if (IsDeuteron(track, +1)) + } + if (isDeuteron(track, +1)) { registry.fill(HIST("hDeDCAxy"), track.dcaXY(), track.pt()); - if (IsDeuteron(track, -1)) + } + if (isDeuteron(track, -1)) { registry.fill(HIST("hAntiDeDCAxy"), track.dcaXY(), track.pt()); + } - if (!applyDCAcut(track)) + if (!applyDCAcut(track)) { continue; + } if (doQA) { - QA.fill(HIST("QA/hTPCnClusters"), track.tpcNClsFound()); - QA.fill(HIST("QA/hTPCSharedClusters"), track.tpcFractionSharedCls()); - QA.fill(HIST("QA/hTPCchi2"), track.tpcChi2NCl()); - QA.fill(HIST("QA/hTPCcrossedRowsOverFindableCls"), track.tpcCrossedRowsOverFindableCls()); - QA.fill(HIST("QA/hITSchi2"), track.itsChi2NCl()); - QA.fill(HIST("QA/hDCAxy"), track.dcaXY(), track.pt()); - QA.fill(HIST("QA/hDCAz"), track.dcaZ(), track.pt()); - QA.fill(HIST("QA/TPCChi2VsPZ"), track.tpcInnerParam() / track.sign(), track.tpcChi2NCl()); - QA.fill(HIST("QA/hVtxZ_trk"), collision.posZ()); - QA.fill(HIST("QA/hnSigmaTPCVsPt_El"), track.pt() * track.sign(), track.tpcNSigmaEl()); - QA.fill(HIST("QA/hnSigmaTPCVsPt_Pr"), track.pt() * track.sign(), track.tpcNSigmaPr()); - QA.fill(HIST("QA/hnSigmaTPCVsPt_De"), track.pt() * track.sign(), track.tpcNSigmaDe()); - QA.fill(HIST("QA/hnSigmaTOFVsPt_Pr"), track.pt() * track.sign(), track.tofNSigmaPr()); - QA.fill(HIST("QA/hnSigmaTOFVsPt_De"), track.pt() * track.sign(), track.tofNSigmaDe()); - QA.fill(HIST("QA/hnSigmaITSVsPt_Pr"), track.pt() * track.sign(), track.itsNSigmaPr()); - QA.fill(HIST("QA/hnSigmaITSVsPt_De"), track.pt() * track.sign(), track.itsNSigmaDe()); - QA.fill(HIST("QA/h2dTPCTOF_AntiPr"), track.tpcNSigmaPr(), track.tofNSigmaPr()); - QA.fill(HIST("QA/h2dTPCTOF_Pr"), track.tpcNSigmaPr(), track.tofNSigmaPr()); - - if (IsProton(track, -1)) { - QA.fill(HIST("QA/hEtaAntiPr"), track.eta()); - QA.fill(HIST("QA/hPhiAntiPr"), track.phi()); - QA.fill(HIST("QA/hnSigmaTOFVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tofNSigmaPr()); - QA.fill(HIST("QA/hnSigmaTPCVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaPr()); - QA.fill(HIST("QA/hnSigmaITSVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.itsNSigmaPr()); - QA.fill(HIST("QA/h2dTPCTOF_AntiPr_AfterSel"), track.tpcNSigmaPr(), track.tofNSigmaPr()); - } - if (IsProton(track, +1)) { - QA.fill(HIST("QA/hEtaPr"), track.eta()); - QA.fill(HIST("QA/hPhiPr"), track.phi()); - QA.fill(HIST("QA/hnSigmaTOFVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tofNSigmaPr()); - QA.fill(HIST("QA/hnSigmaTPCVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaPr()); - QA.fill(HIST("QA/hnSigmaITSVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.itsNSigmaPr()); - QA.fill(HIST("QA/h2dTPCTOF_Pr_AfterSel"), track.tpcNSigmaPr(), track.tofNSigmaPr()); - } - if (IsDeuteron(track, -1)) { - QA.fill(HIST("QA/hEtaAntiDe"), track.eta()); - QA.fill(HIST("QA/hPhiAntiDe"), track.phi()); - QA.fill(HIST("QA/hnSigmaTOFVsPt_De_AfterSel"), track.pt() * track.sign(), track.tofNSigmaDe()); - QA.fill(HIST("QA/hnSigmaTPCVsPt_De_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaDe()); - QA.fill(HIST("QA/hnSigmaITSVsPt_De_AfterSel"), track.pt() * track.sign(), track.itsNSigmaDe()); - } - if (IsDeuteron(track, +1)) { - QA.fill(HIST("QA/hEtaDe"), track.eta()); - QA.fill(HIST("QA/hPhiDe"), track.phi()); - QA.fill(HIST("QA/hnSigmaTOFVsPt_De_AfterSel"), track.pt() * track.sign(), track.tofNSigmaDe()); - QA.fill(HIST("QA/hnSigmaTPCVsPt_De_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaDe()); - QA.fill(HIST("QA/hnSigmaITSVsPt_De_AfterSel"), track.pt() * track.sign(), track.itsNSigmaDe()); + registryQa.fill(HIST("QA/hTPCnClusters"), track.tpcNClsFound()); + registryQa.fill(HIST("QA/hTPCSharedClusters"), track.tpcFractionSharedCls()); + registryQa.fill(HIST("QA/hTPCchi2"), track.tpcChi2NCl()); + registryQa.fill(HIST("QA/hTPCcrossedRowsOverFindableCls"), track.tpcCrossedRowsOverFindableCls()); + registryQa.fill(HIST("QA/hITSchi2"), track.itsChi2NCl()); + registryQa.fill(HIST("QA/hDCAxy"), track.dcaXY(), track.pt()); + registryQa.fill(HIST("QA/hDCAz"), track.dcaZ(), track.pt()); + registryQa.fill(HIST("QA/TPCChi2VsPZ"), track.tpcInnerParam() / track.sign(), track.tpcChi2NCl()); + registryQa.fill(HIST("QA/hVtxZ_trk"), collision.posZ()); + registryQa.fill(HIST("QA/hnSigmaTPCVsPt_El"), track.pt() * track.sign(), track.tpcNSigmaEl()); + registryQa.fill(HIST("QA/hnSigmaTPCVsPt_Pr"), track.pt() * track.sign(), track.tpcNSigmaPr()); + registryQa.fill(HIST("QA/hnSigmaTPCVsPt_De"), track.pt() * track.sign(), track.tpcNSigmaDe()); + registryQa.fill(HIST("QA/hnSigmaTOFVsPt_Pr"), track.pt() * track.sign(), track.tofNSigmaPr()); + registryQa.fill(HIST("QA/hnSigmaTOFVsPt_De"), track.pt() * track.sign(), track.tofNSigmaDe()); + registryQa.fill(HIST("QA/hnSigmaITSVsPt_Pr"), track.pt() * track.sign(), track.itsNSigmaPr()); + registryQa.fill(HIST("QA/hnSigmaITSVsPt_De"), track.pt() * track.sign(), track.itsNSigmaDe()); + registryQa.fill(HIST("QA/h2dTPCTOF_AntiPr"), track.tpcNSigmaPr(), track.tofNSigmaPr()); + registryQa.fill(HIST("QA/h2dTPCTOF_Pr"), track.tpcNSigmaPr(), track.tofNSigmaPr()); + + if (isProton(track, -1)) { + registryQa.fill(HIST("QA/hEtaAntiPr"), track.eta()); + registryQa.fill(HIST("QA/hPhiAntiPr"), track.phi()); + registryQa.fill(HIST("QA/hnSigmaTOFVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tofNSigmaPr()); + registryQa.fill(HIST("QA/hnSigmaTPCVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaPr()); + registryQa.fill(HIST("QA/hnSigmaITSVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.itsNSigmaPr()); + registryQa.fill(HIST("QA/h2dTPCTOF_AntiPr_AfterSel"), track.tpcNSigmaPr(), track.tofNSigmaPr()); + } + if (isProton(track, +1)) { + registryQa.fill(HIST("QA/hEtaPr"), track.eta()); + registryQa.fill(HIST("QA/hPhiPr"), track.phi()); + registryQa.fill(HIST("QA/hnSigmaTOFVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tofNSigmaPr()); + registryQa.fill(HIST("QA/hnSigmaTPCVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaPr()); + registryQa.fill(HIST("QA/hnSigmaITSVsPt_Pr_AfterSel"), track.pt() * track.sign(), track.itsNSigmaPr()); + registryQa.fill(HIST("QA/h2dTPCTOF_Pr_AfterSel"), track.tpcNSigmaPr(), track.tofNSigmaPr()); + } + if (isDeuteron(track, -1)) { + registryQa.fill(HIST("QA/hEtaAntiDe"), track.eta()); + registryQa.fill(HIST("QA/hPhiAntiDe"), track.phi()); + registryQa.fill(HIST("QA/hnSigmaTOFVsPt_De_AfterSel"), track.pt() * track.sign(), track.tofNSigmaDe()); + registryQa.fill(HIST("QA/hnSigmaTPCVsPt_De_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaDe()); + registryQa.fill(HIST("QA/hnSigmaITSVsPt_De_AfterSel"), track.pt() * track.sign(), track.itsNSigmaDe()); + } + if (isDeuteron(track, +1)) { + registryQa.fill(HIST("QA/hEtaDe"), track.eta()); + registryQa.fill(HIST("QA/hPhiDe"), track.phi()); + registryQa.fill(HIST("QA/hnSigmaTOFVsPt_De_AfterSel"), track.pt() * track.sign(), track.tofNSigmaDe()); + registryQa.fill(HIST("QA/hnSigmaTPCVsPt_De_AfterSel"), track.pt() * track.sign(), track.tpcNSigmaDe()); + registryQa.fill(HIST("QA/hnSigmaITSVsPt_De_AfterSel"), track.pt() * track.sign(), track.itsNSigmaDe()); } } } - Pair->SetMagField1(collision.magField()); - Pair->SetMagField2(collision.magField()); + pair->SetMagField1(collision.magField()); + pair->SetMagField2(collision.magField()); if (mode == kPbarPbar || mode == kPP) { // Identical particle combinations for (const auto& [part0, part1] : combinations(CombinationsStrictlyUpperIndexPolicy(tracks, tracks))) { - if (removeSameBunchPileup && !part0.template singleCollSel_as().isNoSameBunchPileup()) + if (removeSameBunchPileup && !part0.template singleCollSel_as().isNoSameBunchPileup()) { continue; + } - if (part0.tpcFractionSharedCls() > maxtpcSharedCls) + if (part0.tpcFractionSharedCls() > maxtpcSharedCls) { continue; - if (part0.itsNCls() < minitsNCls) + } + if (part0.itsNCls() < minitsNCls) { continue; - if (part1.tpcFractionSharedCls() > maxtpcSharedCls) + } + if (part1.tpcFractionSharedCls() > maxtpcSharedCls) { continue; - if (part1.itsNCls() < minitsNCls) + } + if (part1.itsNCls() < minitsNCls) { continue; + } - if (!applyDCAcut(part0)) + if (!applyDCAcut(part0)) { continue; - if (!applyDCAcut(part1)) + } + if (!applyDCAcut(part1)) { continue; + } // remove tracks outside pt bins - if (part0.pt() < pTBins.value.at(0) || part0.pt() >= pTBins.value.at(nBinspT)) + if (part0.pt() < pTBins.value.at(0) || part0.pt() >= pTBins.value.at(nBinspT)) { continue; - if (part1.pt() < pTBins.value.at(0) || part1.pt() >= pTBins.value.at(nBinspT)) + } + if (part1.pt() < pTBins.value.at(0) || part1.pt() >= pTBins.value.at(nBinspT)) { continue; + } // mode 6 if (mode == kPP) { - if (!IsProton(part0, +1)) + if (!isProton(part0, +1)) { continue; - if (!IsProton(part1, +1)) + } + if (!isProton(part1, +1)) { continue; + } } // mode 5 if (mode == kPbarPbar) { - if (!IsProton(part0, -1)) + if (!isProton(part0, -1)) { continue; - if (!IsProton(part1, -1)) + } + if (!isProton(part1, -1)) { continue; + } } fillHistograms(part0, part1, false, true); @@ -1130,65 +1076,86 @@ struct HadronNucleiCorrelation { for (const auto& [part0, part1] : combinations(CombinationsFullIndexPolicy(tracks, tracks))) { - if (removeSameBunchPileup && !part0.template singleCollSel_as().isNoSameBunchPileup()) + if (removeSameBunchPileup && !part0.template singleCollSel_as().isNoSameBunchPileup()) { continue; + } - if (part0.tpcFractionSharedCls() > maxtpcSharedCls) + if (part0.tpcFractionSharedCls() > maxtpcSharedCls) { continue; - if (part0.itsNCls() < minitsNCls) + } + if (part0.itsNCls() < minitsNCls) { continue; - if (part1.tpcFractionSharedCls() > maxtpcSharedCls) + } + if (part1.tpcFractionSharedCls() > maxtpcSharedCls) { continue; - if (part1.itsNCls() < minitsNCls) + } + if (part1.itsNCls() < minitsNCls) { continue; + } - if (!applyDCAcut(part0)) + if (!applyDCAcut(part0)) { continue; - if (!applyDCAcut(part1)) + } + if (!applyDCAcut(part1)) { continue; + } // remove tracks outside pt bins - if (part0.pt() < pTBins.value.at(0) || part0.pt() >= pTBins.value.at(nBinspT)) + if (part0.pt() < pTBins.value.at(0) || part0.pt() >= pTBins.value.at(nBinspT)) { continue; - if (part1.pt() < pTBins.value.at(0) || part1.pt() >= pTBins.value.at(nBinspT)) + } + if (part1.pt() < pTBins.value.at(0) || part1.pt() >= pTBins.value.at(nBinspT)) { continue; + } // modes 0,1,2,3,4,7 if (mode == kDbarPbar) { - if (!IsDeuteron(part0, -1)) + if (!isDeuteron(part0, -1)) { continue; - if (!IsProton(part1, -1)) + } + if (!isProton(part1, -1)) { continue; + } } if (mode == kDP) { - if (!IsDeuteron(part0, +1)) + if (!isDeuteron(part0, +1)) { continue; - if (!IsProton(part1, +1)) + } + if (!isProton(part1, +1)) { continue; + } } if (mode == kDbarP) { - if (!IsDeuteron(part0, -1)) + if (!isDeuteron(part0, -1)) { continue; - if (!IsProton(part1, +1)) + } + if (!isProton(part1, +1)) { continue; + } } if (mode == kDPbar) { - if (!IsDeuteron(part0, +1)) + if (!isDeuteron(part0, +1)) { continue; - if (!IsProton(part1, -1)) + } + if (!isProton(part1, -1)) { continue; + } } if (mode == kPbarP) { - if (!IsProton(part0, -1)) + if (!isProton(part0, -1)) { continue; - if (!IsProton(part1, +1)) + } + if (!isProton(part1, +1)) { continue; + } } if (mode == kPPbar) { - if (!IsProton(part0, +1)) + if (!isProton(part0, +1)) { continue; - if (!IsProton(part1, -1)) + } + if (!isProton(part1, -1)) { continue; + } } fillHistograms(part0, part1, false, false); @@ -1216,84 +1183,109 @@ struct HadronNucleiCorrelation { continue; } - Pair->SetMagField1(magFieldTesla1); - Pair->SetMagField2(magFieldTesla2); + pair->SetMagField1(magFieldTesla1); + pair->SetMagField2(magFieldTesla2); for (const auto& [part0, part1] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { - if (part0.tpcFractionSharedCls() > maxtpcSharedCls) + if (part0.tpcFractionSharedCls() > maxtpcSharedCls) { continue; - if (part0.itsNCls() < minitsNCls) + } + if (part0.itsNCls() < minitsNCls) { continue; - if (part1.tpcFractionSharedCls() > maxtpcSharedCls) + } + if (part1.tpcFractionSharedCls() > maxtpcSharedCls) { continue; - if (part1.itsNCls() < minitsNCls) + } + if (part1.itsNCls() < minitsNCls) { continue; + } - if (!applyDCAcut(part0)) + if (!applyDCAcut(part0)) { continue; - if (!applyDCAcut(part1)) + } + if (!applyDCAcut(part1)) { continue; + } // remove tracks outside pt bins - if (part0.pt() < pTBins.value.at(0) || part0.pt() >= pTBins.value.at(nBinspT)) + if (part0.pt() < pTBins.value.at(0) || part0.pt() >= pTBins.value.at(nBinspT)) { continue; - if (part1.pt() < pTBins.value.at(0) || part1.pt() >= pTBins.value.at(nBinspT)) + } + if (part1.pt() < pTBins.value.at(0) || part1.pt() >= pTBins.value.at(nBinspT)) { continue; + } //{"mode", 0, "0: antid-antip, 1: d-p, 2: antid-p, 3: d-antip, 4: antip-p, 5: antip-antip, 6: p-p, 7: p-antip"}; if (mode == kDbarPbar) { - if (!IsDeuteron(part0, -1)) + if (!isDeuteron(part0, -1)) { continue; - if (!IsProton(part1, -1)) + } + if (!isProton(part1, -1)) { continue; + } } if (mode == kDP) { - if (!IsDeuteron(part0, +1)) + if (!isDeuteron(part0, +1)) { continue; - if (!IsProton(part1, +1)) + } + if (!isProton(part1, +1)) { continue; + } } if (mode == kDbarP) { - if (!IsDeuteron(part0, -1)) + if (!isDeuteron(part0, -1)) { continue; - if (!IsProton(part1, +1)) + } + if (!isProton(part1, +1)) { continue; + } } if (mode == kDPbar) { - if (!IsDeuteron(part0, +1)) + if (!isDeuteron(part0, +1)) { continue; - if (!IsProton(part1, -1)) + } + if (!isProton(part1, -1)) { continue; + } } if (mode == kPbarP) { - if (!IsProton(part0, -1)) + if (!isProton(part0, -1)) { continue; - if (!IsProton(part1, +1)) + } + if (!isProton(part1, +1)) { continue; + } } if (mode == kPbarPbar) { - if (!IsProton(part0, -1)) + if (!isProton(part0, -1)) { continue; - if (!IsProton(part1, -1)) + } + if (!isProton(part1, -1)) { continue; + } } if (mode == kPP) { - if (!IsProton(part0, +1)) + if (!isProton(part0, +1)) { continue; - if (!IsProton(part1, +1)) + } + if (!isProton(part1, +1)) { continue; + } } if (mode == kPPbar) { - if (!IsProton(part0, +1)) + if (!isProton(part0, +1)) { continue; - if (!IsProton(part1, -1)) + } + if (!isProton(part1, -1)) { continue; + } } bool isIdentical = false; - if (mode == kPbarPbar || mode == kPP) + if (mode == kPbarPbar || mode == kPP) { isIdentical = true; + } fillHistograms(part0, part1, true, isIdentical); } @@ -1320,89 +1312,116 @@ struct HadronNucleiCorrelation { continue; } - Pair->SetMagField1(magFieldTesla1); - Pair->SetMagField2(magFieldTesla2); + pair->SetMagField1(magFieldTesla1); + pair->SetMagField2(magFieldTesla2); for (const auto& [part0, part1] : combinations(CombinationsFullIndexPolicy(groupPartsOne, groupPartsTwo))) { - if (removeSameBunchPileup && !part0.template singleCollSel_as().isNoSameBunchPileup()) + if (removeSameBunchPileup && !part0.template singleCollSel_as().isNoSameBunchPileup()) { continue; - if (removeSameBunchPileup && !part1.template singleCollSel_as().isNoSameBunchPileup()) + } + if (removeSameBunchPileup && !part1.template singleCollSel_as().isNoSameBunchPileup()) { continue; + } - if (part0.tpcFractionSharedCls() > maxtpcSharedCls) + if (part0.tpcFractionSharedCls() > maxtpcSharedCls) { continue; - if (part0.itsNCls() < minitsNCls) + } + if (part0.itsNCls() < minitsNCls) { continue; - if (part1.tpcFractionSharedCls() > maxtpcSharedCls) + } + if (part1.tpcFractionSharedCls() > maxtpcSharedCls) { continue; - if (part1.itsNCls() < minitsNCls) + } + if (part1.itsNCls() < minitsNCls) { continue; + } - if (!applyDCAcut(part0)) + if (!applyDCAcut(part0)) { continue; - if (!applyDCAcut(part1)) + } + if (!applyDCAcut(part1)) { continue; + } // remove tracks outside pt bins - if (part0.pt() < pTBins.value.at(0) || part0.pt() >= pTBins.value.at(nBinspT)) + if (part0.pt() < pTBins.value.at(0) || part0.pt() >= pTBins.value.at(nBinspT)) { continue; - if (part1.pt() < pTBins.value.at(0) || part1.pt() >= pTBins.value.at(nBinspT)) + } + if (part1.pt() < pTBins.value.at(0) || part1.pt() >= pTBins.value.at(nBinspT)) { continue; + } //{"mode", 0, "0: antid-antip, 1: d-p, 2: antid-p, 3: d-antip, 4: antip-p, 5: antip-antip, 6: p-p, 7: p-antip"}; if (mode == kDbarPbar) { - if (!IsDeuteron(part0, -1)) + if (!isDeuteron(part0, -1)) { continue; - if (!IsProton(part1, -1)) + } + if (!isProton(part1, -1)) { continue; + } } if (mode == kDP) { - if (!IsDeuteron(part0, +1)) + if (!isDeuteron(part0, +1)) { continue; - if (!IsProton(part1, +1)) + } + if (!isProton(part1, +1)) { continue; + } } if (mode == kDbarP) { - if (!IsDeuteron(part0, -1)) + if (!isDeuteron(part0, -1)) { continue; - if (!IsProton(part1, +1)) + } + if (!isProton(part1, +1)) { continue; + } } if (mode == kDPbar) { - if (!IsDeuteron(part0, +1)) + if (!isDeuteron(part0, +1)) { continue; - if (!IsProton(part1, -1)) + } + if (!isProton(part1, -1)) { continue; + } } if (mode == kPbarP) { - if (!IsProton(part0, -1)) + if (!isProton(part0, -1)) { continue; - if (!IsProton(part1, +1)) + } + if (!isProton(part1, +1)) { continue; + } } if (mode == kPbarPbar) { - if (!IsProton(part0, -1)) + if (!isProton(part0, -1)) { continue; - if (!IsProton(part1, -1)) + } + if (!isProton(part1, -1)) { continue; + } } if (mode == kPP) { - if (!IsProton(part0, +1)) + if (!isProton(part0, +1)) { continue; - if (!IsProton(part1, +1)) + } + if (!isProton(part1, +1)) { continue; + } } if (mode == kPPbar) { - if (!IsProton(part0, +1)) + if (!isProton(part0, +1)) { continue; - if (!IsProton(part1, -1)) + } + if (!isProton(part1, -1)) { continue; + } } bool isIdentical = false; - if (mode == kPbarPbar || mode == kPP) + if (mode == kPbarPbar || mode == kPP) { isIdentical = true; + } fillHistograms(part0, part1, true, isIdentical); } @@ -1413,78 +1432,94 @@ struct HadronNucleiCorrelation { void processMC(FilteredCollisions const&, FilteredTracksMC const& tracks) { for (const auto& track : tracks) { - if (std::abs(track.template singleCollSel_as().posZ()) > cutzVertex) + if (std::abs(track.template singleCollSel_as().posZ()) > cutzVertex) { continue; + } - if (track.tpcFractionSharedCls() > maxtpcSharedCls) + if (track.tpcFractionSharedCls() > maxtpcSharedCls) { continue; - if (track.itsNCls() < minitsNCls) + } + if (track.itsNCls() < minitsNCls) { continue; + } - if (IsProton(track, +1) && track.pdgCode() == PDG_t::kProton) { + if (isProton(track, +1) && track.pdgCode() == PDG_t::kProton) { registry.fill(HIST("hPrDCAxy"), track.dcaXY(), track.pt()); - if (track.origin() == kPrimary) + if (track.origin() == kPrimary) { registry.fill(HIST("hPrimPrDCAxy"), track.dcaXY(), track.pt()); - if (track.origin() == kWeakDecay) + } + if (track.origin() == kWeakDecay) { registry.fill(HIST("hSecWeakPrDCAxy"), track.dcaXY(), track.pt()); - if (track.origin() == kMaterial) + } + if (track.origin() == kMaterial) { registry.fill(HIST("hSecMatPrDCAxy"), track.dcaXY(), track.pt()); + } } - if (IsProton(track, -1) && track.pdgCode() == -PDG_t::kProton) { + if (isProton(track, -1) && track.pdgCode() == -PDG_t::kProton) { registry.fill(HIST("hAntiPrDCAxy"), track.dcaXY(), track.pt()); - if (track.origin() == kPrimary) + if (track.origin() == kPrimary) { registry.fill(HIST("hPrimAntiPrDCAxy"), track.dcaXY(), track.pt()); - if (track.origin() == kWeakDecay) + } + if (track.origin() == kWeakDecay) { registry.fill(HIST("hSecWeakAntiPrDCAxy"), track.dcaXY(), track.pt()); - if (track.origin() == kMaterial) + } + if (track.origin() == kMaterial) { registry.fill(HIST("hSecMatAntiPrDCAxy"), track.dcaXY(), track.pt()); + } } - if (IsDeuteron(track, +1) && track.pdgCode() == o2::constants::physics::Pdg::kDeuteron) { + if (isDeuteron(track, +1) && track.pdgCode() == o2::constants::physics::Pdg::kDeuteron) { registry.fill(HIST("hDeDCAxy"), track.dcaXY(), track.pt()); - if (track.origin() == kPrimary) + if (track.origin() == kPrimary) { registry.fill(HIST("hPrimDeDCAxy"), track.dcaXY(), track.pt()); - if (track.origin() == kWeakDecay) + } + if (track.origin() == kWeakDecay) { registry.fill(HIST("hSecWeakDeDCAxy"), track.dcaXY(), track.pt()); - if (track.origin() == kMaterial) + } + if (track.origin() == kMaterial) { registry.fill(HIST("hSecMatDeDCAxy"), track.dcaXY(), track.pt()); + } } - if (IsDeuteron(track, -1) && track.pdgCode() == -o2::constants::physics::Pdg::kDeuteron) { + if (isDeuteron(track, -1) && track.pdgCode() == -o2::constants::physics::Pdg::kDeuteron) { registry.fill(HIST("hAntiDeDCAxy"), track.dcaXY(), track.pt()); - if (track.origin() == kPrimary) + if (track.origin() == kPrimary) { registry.fill(HIST("hPrimAntiDeDCAxy"), track.dcaXY(), track.pt()); - if (track.origin() == kWeakDecay) + } + if (track.origin() == kWeakDecay) { registry.fill(HIST("hSecWeakAntiDeDCAxy"), track.dcaXY(), track.pt()); - if (track.origin() == kMaterial) + } + if (track.origin() == kMaterial) { registry.fill(HIST("hSecMatAntiDeDCAxy"), track.dcaXY(), track.pt()); + } } - if (!applyDCAcut(track)) + if (!applyDCAcut(track)) { continue; + } // Keep only protons and deuterons // if (std::abs(track.pdgCode()) != PDG_t::kProton && std::abs(track.pdgCode()) != o2::constants::physics::Pdg::kDeuteron) // continue; if (doQA) { - QA.fill(HIST("QA/hTPCnClusters"), track.tpcNClsFound()); - QA.fill(HIST("QA/hTPCSharedClusters"), track.tpcFractionSharedCls()); - QA.fill(HIST("QA/hTPCchi2"), track.tpcChi2NCl()); - QA.fill(HIST("QA/hTPCcrossedRowsOverFindableCls"), track.tpcCrossedRowsOverFindableCls()); - QA.fill(HIST("QA/hITSchi2"), track.itsChi2NCl()); - QA.fill(HIST("QA/hDCAxy"), track.dcaXY(), track.pt()); - QA.fill(HIST("QA/hDCAz"), track.dcaZ(), track.pt()); - QA.fill(HIST("QA/hVtxZ_trk"), track.template singleCollSel_as().posZ()); - QA.fill(HIST("QA/hnSigmaTPCVsPt_El"), track.pt() * track.sign(), track.tpcNSigmaEl()); - QA.fill(HIST("QA/hnSigmaTPCVsPt_Pr"), track.pt() * track.sign(), track.tpcNSigmaPr()); - QA.fill(HIST("QA/hnSigmaTPCVsPt_De"), track.pt() * track.sign(), track.tpcNSigmaDe()); - QA.fill(HIST("QA/hnSigmaTOFVsPt_Pr"), track.pt() * track.sign(), track.tofNSigmaPr()); - QA.fill(HIST("QA/hnSigmaTOFVsPt_De"), track.pt() * track.sign(), track.tofNSigmaDe()); - } - - bool isPr = (IsProton(track, +1) && track.pdgCode() == PDG_t::kProton); - bool isAntiPr = (IsProton(track, -1) && track.pdgCode() == -PDG_t::kProton); - bool isDe = (IsDeuteron(track, +1) && track.pdgCode() == o2::constants::physics::Pdg::kDeuteron); - bool isAntiDe = (IsDeuteron(track, -1) && track.pdgCode() == -o2::constants::physics::Pdg::kDeuteron); + registryQa.fill(HIST("QA/hTPCnClusters"), track.tpcNClsFound()); + registryQa.fill(HIST("QA/hTPCSharedClusters"), track.tpcFractionSharedCls()); + registryQa.fill(HIST("QA/hTPCchi2"), track.tpcChi2NCl()); + registryQa.fill(HIST("QA/hTPCcrossedRowsOverFindableCls"), track.tpcCrossedRowsOverFindableCls()); + registryQa.fill(HIST("QA/hITSchi2"), track.itsChi2NCl()); + registryQa.fill(HIST("QA/hDCAxy"), track.dcaXY(), track.pt()); + registryQa.fill(HIST("QA/hDCAz"), track.dcaZ(), track.pt()); + registryQa.fill(HIST("QA/hVtxZ_trk"), track.template singleCollSel_as().posZ()); + registryQa.fill(HIST("QA/hnSigmaTPCVsPt_El"), track.pt() * track.sign(), track.tpcNSigmaEl()); + registryQa.fill(HIST("QA/hnSigmaTPCVsPt_Pr"), track.pt() * track.sign(), track.tpcNSigmaPr()); + registryQa.fill(HIST("QA/hnSigmaTPCVsPt_De"), track.pt() * track.sign(), track.tpcNSigmaDe()); + registryQa.fill(HIST("QA/hnSigmaTOFVsPt_Pr"), track.pt() * track.sign(), track.tofNSigmaPr()); + registryQa.fill(HIST("QA/hnSigmaTOFVsPt_De"), track.pt() * track.sign(), track.tofNSigmaDe()); + } + + bool isPr = (isProton(track, +1) && track.pdgCode() == PDG_t::kProton); + bool isAntiPr = (isProton(track, -1) && track.pdgCode() == -PDG_t::kProton); + bool isDe = (isDeuteron(track, +1) && track.pdgCode() == o2::constants::physics::Pdg::kDeuteron); + bool isAntiDe = (isDeuteron(track, -1) && track.pdgCode() == -o2::constants::physics::Pdg::kDeuteron); if (isPr) { registry.fill(HIST("hPrimSec_EtaPhiPt_Proton"), track.eta(), track.phi(), track.pt() * +1); @@ -1499,8 +1534,9 @@ struct HadronNucleiCorrelation { } } - if (track.origin() != 0) + if (track.origin() != 0) { continue; + } if (track.pdgCode() == PDG_t::kProton) { registry.fill(HIST("hReco_EtaPhiPt_Proton"), track.eta(), track.phi(), track.pt()); @@ -1577,14 +1613,18 @@ struct HadronNucleiCorrelation { registry.fill(HIST("hNumeratorPurity_Deuteron"), track.pt() * -1); registry.fill(HIST("hReco_Pt_Deuteron"), track.pt() * -1); } - if (IsProton(track, +1)) + if (isProton(track, +1)) { registry.fill(HIST("hDenominatorPurity_Proton"), track.pt()); - if (IsProton(track, -1)) + } + if (isProton(track, -1)) { registry.fill(HIST("hDenominatorPurity_Proton"), track.pt() * -1); - if (IsDeuteron(track, +1)) + } + if (isDeuteron(track, +1)) { registry.fill(HIST("hDenominatorPurity_Deuteron"), track.pt()); - if (IsDeuteron(track, -1)) + } + if (isDeuteron(track, -1)) { registry.fill(HIST("hDenominatorPurity_Deuteron"), track.pt() * -1); + } if (doMCQA) { // Proton @@ -1597,8 +1637,8 @@ struct HadronNucleiCorrelation { registry.fill(HIST("hNumeratorPurity_Proton_TPCTOF"), track.pt()); registry.fill(HIST("hReco_Pt_Proton_TPCTOF"), track.pt()); } - if (((std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.beta() < betahasTOFthr) || - (track.beta() > betahasTOFthr && std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF)) && + if (((std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.beta() < BetahasTOFthr) || + (track.beta() > BetahasTOFthr && std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF)) && track.pdgCode() == PDG_t::kProton) { registry.fill(HIST("hNumeratorPurity_Proton_TPC_or_TOF"), track.pt()); registry.fill(HIST("hReco_Pt_Proton_TPC_or_TOF"), track.pt()); @@ -1608,8 +1648,8 @@ struct HadronNucleiCorrelation { registry.fill(HIST("hNumeratorPurity_Proton_TPCEl"), track.pt()); registry.fill(HIST("hReco_Pt_Proton_TPCEl"), track.pt()); } - if (((std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElPr && track.beta() < betahasTOFthr) || - (track.beta() > betahasTOFthr && std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF)) && + if (((std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElPr && track.beta() < BetahasTOFthr) || + (track.beta() > BetahasTOFthr && std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF)) && track.pdgCode() == PDG_t::kProton) { registry.fill(HIST("hNumeratorPurity_Proton_TPCEl_or_TOF"), track.pt()); registry.fill(HIST("hReco_Pt_Proton_TPCEl_or_TOF"), track.pt()); @@ -1625,8 +1665,8 @@ struct HadronNucleiCorrelation { registry.fill(HIST("hNumeratorPurity_Proton_TPCTOF"), track.pt() * -1); registry.fill(HIST("hReco_Pt_Proton_TPCTOF"), track.pt() * -1); } - if (((std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.beta() < betahasTOFthr) || - (track.beta() > betahasTOFthr && std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF)) && + if (((std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.beta() < BetahasTOFthr) || + (track.beta() > BetahasTOFthr && std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF)) && track.pdgCode() == -PDG_t::kProton) { registry.fill(HIST("hNumeratorPurity_Proton_TPC_or_TOF"), track.pt() * -1); registry.fill(HIST("hReco_Pt_Proton_TPC_or_TOF"), track.pt() * -1); @@ -1636,8 +1676,8 @@ struct HadronNucleiCorrelation { registry.fill(HIST("hNumeratorPurity_Proton_TPCEl"), track.pt() * -1); registry.fill(HIST("hReco_Pt_Proton_TPCEl"), track.pt() * -1); } - if (((std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElPr && track.beta() < betahasTOFthr) || - (track.beta() > betahasTOFthr && std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF)) && + if (((std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElPr && track.beta() < BetahasTOFthr) || + (track.beta() > BetahasTOFthr && std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF)) && track.pdgCode() == -PDG_t::kProton) { registry.fill(HIST("hNumeratorPurity_Proton_TPCEl_or_TOF"), track.pt() * -1); registry.fill(HIST("hReco_Pt_Proton_TPCEl_or_TOF"), track.pt() * -1); @@ -1653,8 +1693,8 @@ struct HadronNucleiCorrelation { registry.fill(HIST("hNumeratorPurity_Deuteron_TPCTOF"), track.pt()); registry.fill(HIST("hReco_Pt_Deuteron_TPCTOF"), track.pt()); } - if (((std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.beta() < betahasTOFthr) || - (track.beta() > betahasTOFthr && std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF)) && + if (((std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.beta() < BetahasTOFthr) || + (track.beta() > BetahasTOFthr && std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF)) && track.pdgCode() == o2::constants::physics::Pdg::kDeuteron) { registry.fill(HIST("hNumeratorPurity_Deuteron_TPC_or_TOF"), track.pt()); registry.fill(HIST("hReco_Pt_Deuteron_TPC_or_TOF"), track.pt()); @@ -1664,8 +1704,8 @@ struct HadronNucleiCorrelation { registry.fill(HIST("hNumeratorPurity_Deuteron_TPCEl"), track.pt()); registry.fill(HIST("hReco_Pt_Deuteron_TPCEl"), track.pt()); } - if (((std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElDe && track.beta() < betahasTOFthr) || - (track.beta() > betahasTOFthr && std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF)) && + if (((std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElDe && track.beta() < BetahasTOFthr) || + (track.beta() > BetahasTOFthr && std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF)) && track.pdgCode() == o2::constants::physics::Pdg::kDeuteron) { registry.fill(HIST("hNumeratorPurity_Deuteron_TPCEl_or_TOF"), track.pt()); registry.fill(HIST("hReco_Pt_Deuteron_TPCEl_or_TOF"), track.pt()); @@ -1681,8 +1721,8 @@ struct HadronNucleiCorrelation { registry.fill(HIST("hNumeratorPurity_Deuteron_TPCTOF"), track.pt() * -1); registry.fill(HIST("hReco_Pt_Deuteron_TPCTOF"), track.pt() * -1); } - if (((std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.beta() < betahasTOFthr) || - (track.beta() > betahasTOFthr && std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF)) && + if (((std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.beta() < BetahasTOFthr) || + (track.beta() > BetahasTOFthr && std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF)) && track.pdgCode() == -o2::constants::physics::Pdg::kDeuteron) { registry.fill(HIST("hNumeratorPurity_Deuteron_TPC_or_TOF"), track.pt() * -1); registry.fill(HIST("hReco_Pt_Deuteron_TPC_or_TOF"), track.pt() * -1); @@ -1692,56 +1732,64 @@ struct HadronNucleiCorrelation { registry.fill(HIST("hNumeratorPurity_Deuteron_TPCEl"), track.pt() * -1); registry.fill(HIST("hReco_Pt_Deuteron_TPCEl"), track.pt() * -1); } - if (((std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElDe && track.beta() < betahasTOFthr) || - (track.beta() > betahasTOFthr && std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF)) && + if (((std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElDe && track.beta() < BetahasTOFthr) || + (track.beta() > BetahasTOFthr && std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF)) && track.pdgCode() == -o2::constants::physics::Pdg::kDeuteron) { registry.fill(HIST("hNumeratorPurity_Deuteron_TPCEl_or_TOF"), track.pt() * -1); registry.fill(HIST("hReco_Pt_Deuteron_TPCEl_or_TOF"), track.pt() * -1); } // Denominators - if (std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.sign() > 0) + if (std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.sign() > 0) { registry.fill(HIST("hDenominatorPurity_Proton_TPC"), track.pt()); - if (std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF && track.sign() > 0) + } + if (std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF && track.sign() > 0) { registry.fill(HIST("hDenominatorPurity_Proton_TPCTOF"), track.pt()); - if (((std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.beta() < betahasTOFthr) || - (track.beta() > betahasTOFthr && std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF)) && - track.sign() > 0) + } + if (((std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.beta() < BetahasTOFthr) || + (track.beta() > BetahasTOFthr && std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF)) && + track.sign() > 0) { registry.fill(HIST("hDenominatorPurity_Proton_TPC_or_TOF"), track.pt()); + } if (std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElPr && track.sign() > 0) { registry.fill(HIST("hDenominatorPurity_Proton_TPCEl"), track.pt()); } - if (((std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElPr && track.beta() < betahasTOFthr) || - (track.beta() > betahasTOFthr && std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF)) && + if (((std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElPr && track.beta() < BetahasTOFthr) || + (track.beta() > BetahasTOFthr && std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF)) && track.sign() > 0) { registry.fill(HIST("hDenominatorPurity_Proton_TPCEl_or_TOF"), track.pt()); } - if (std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.sign() < 0) + if (std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.sign() < 0) { registry.fill(HIST("hDenominatorPurity_Proton_TPC"), track.pt() * -1); - if (std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF && track.sign() < 0) + } + if (std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF && track.sign() < 0) { registry.fill(HIST("hDenominatorPurity_Proton_TPCTOF"), track.pt() * -1); - if (((std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.beta() < betahasTOFthr) || - (track.beta() > betahasTOFthr && std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF)) && - track.sign() < 0) + } + if (((std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.beta() < BetahasTOFthr) || + (track.beta() > BetahasTOFthr && std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF)) && + track.sign() < 0) { registry.fill(HIST("hDenominatorPurity_Proton_TPC_or_TOF"), track.pt() * -1); + } if (std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElPr && track.sign() < 0) { registry.fill(HIST("hDenominatorPurity_Proton_TPCEl"), track.pt() * -1); } - if (((std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElPr && track.beta() < betahasTOFthr) || - (track.beta() > betahasTOFthr && std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF)) && + if (((std::abs(track.tpcNSigmaPr()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElPr && track.beta() < BetahasTOFthr) || + (track.beta() > BetahasTOFthr && std::abs(track.tpcNSigmaPr()) < nsigmaTPC && std::abs(track.tofNSigmaPr()) < nsigmaTOF)) && track.sign() < 0) { registry.fill(HIST("hDenominatorPurity_Proton_TPCEl_or_TOF"), track.pt() * -1); } - if (std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.sign() > 0) + if (std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.sign() > 0) { registry.fill(HIST("hDenominatorPurity_Deuteron_TPC"), track.pt()); - if (std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF && track.sign() > 0) + } + if (std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF && track.sign() > 0) { registry.fill(HIST("hDenominatorPurity_Deuteron_TPCTOF"), track.pt()); - if (((std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.beta() < betahasTOFthr) || - (track.beta() > betahasTOFthr && std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF)) && + } + if (((std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.beta() < BetahasTOFthr) || + (track.beta() > BetahasTOFthr && std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF)) && track.sign() > 0) { registry.fill(HIST("hDenominatorPurity_Deuteron_TPC_or_TOF"), track.pt()); } @@ -1749,28 +1797,33 @@ struct HadronNucleiCorrelation { track.tpcNSigmaEl() >= nsigmaElDe && track.sign() > 0) { registry.fill(HIST("hDenominatorPurity_Deuteron_TPCEl"), track.pt()); } - if (((std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElDe && track.beta() < betahasTOFthr) || - (track.beta() > betahasTOFthr && std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF)) && - track.sign() > 0) + if (((std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElDe && track.beta() < BetahasTOFthr) || + (track.beta() > BetahasTOFthr && std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF)) && + track.sign() > 0) { registry.fill(HIST("hDenominatorPurity_Deuteron_TPCEl_or_TOF"), track.pt()); + } - if (std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.sign() < 0) + if (std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.sign() < 0) { registry.fill(HIST("hDenominatorPurity_Deuteron_TPC"), track.pt() * -1); - if (std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF && track.sign() < 0) + } + if (std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF && track.sign() < 0) { registry.fill(HIST("hDenominatorPurity_Deuteron_TPCTOF"), track.pt() * -1); + } if (( - (std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.beta() < betahasTOFthr) || - (track.beta() > betahasTOFthr && std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF)) && - track.sign() < 0) + (std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.beta() < BetahasTOFthr) || + (track.beta() > BetahasTOFthr && std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF)) && + track.sign() < 0) { registry.fill(HIST("hDenominatorPurity_Deuteron_TPC_or_TOF"), track.pt() * -1); + } if (std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElDe && track.sign() < 0) { registry.fill(HIST("hDenominatorPurity_Deuteron_TPCEl"), track.pt() * -1); } - if (((std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElDe && track.beta() < betahasTOFthr) || - (track.beta() > betahasTOFthr && std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF)) && - track.sign() < 0) + if (((std::abs(track.tpcNSigmaDe()) < nsigmaTPC && track.tpcNSigmaEl() >= nsigmaElDe && track.beta() < BetahasTOFthr) || + (track.beta() > BetahasTOFthr && std::abs(track.tpcNSigmaDe()) < nsigmaTPC && std::abs(track.tofNSigmaDe()) < nsigmaTOF)) && + track.sign() < 0) { registry.fill(HIST("hDenominatorPurity_Deuteron_TPCEl_or_TOF"), track.pt() * -1); + } } } // track } @@ -1782,52 +1835,67 @@ struct HadronNucleiCorrelation { registry.fill(HIST("Generated/hNEventsMC"), 0.5); for (const auto& particle : mcParticles) { - - if (particle.pdgCode() == PDG_t::kProton) { - registry.fill(HIST("Generated/hQAProtons"), 0.5); - } - if (particle.pdgCode() == o2::constants::physics::Pdg::kDeuteron) { - registry.fill(HIST("Generated/hQADeuterons"), 0.5); + auto fillGeneratedQa = [this, &particle](const float binPosition) { + switch (particle.pdgCode()) { + case PDG_t::kProton: + registry.fill(HIST("Generated/hQAProtons"), binPosition); + return true; + case -PDG_t::kProton: + registry.fill(HIST("Generated/hQAAntiProtons"), binPosition); + return true; + case o2::constants::physics::Pdg::kDeuteron: + registry.fill(HIST("Generated/hQADeuterons"), binPosition); + return true; + case -o2::constants::physics::Pdg::kDeuteron: + registry.fill(HIST("Generated/hQAAntiDeuterons"), binPosition); + return true; + default: + return false; + } + }; + if (!fillGeneratedQa(0.5)) { + continue; } - if (isPrim && !particle.isPhysicalPrimary()) { continue; } - if (particle.pdgCode() == PDG_t::kProton) { - registry.fill(HIST("Generated/hQAProtons"), 1.5); - } - if (particle.pdgCode() == o2::constants::physics::Pdg::kDeuteron) { - registry.fill(HIST("Generated/hQADeuterons"), 1.5); - } - if (particle.pdgCode() == o2::constants::physics::Pdg::kDeuteron && std::abs(particle.y()) < yRap) { - registry.fill(HIST("Generated/hDeuteronsVsPt"), particle.pt()); - } - if (particle.pdgCode() == -o2::constants::physics::Pdg::kDeuteron && std::abs(particle.y()) < yRap) { - registry.fill(HIST("Generated/hAntiDeuteronsVsPt"), particle.pt()); + fillGeneratedQa(1.5); + + if (std::abs(particle.y()) < yRap) { + switch (particle.pdgCode()) { + case o2::constants::physics::Pdg::kDeuteron: + registry.fill(HIST("Generated/hDeuteronsVsPt"), particle.pt()); + break; + case -o2::constants::physics::Pdg::kDeuteron: + registry.fill(HIST("Generated/hAntiDeuteronsVsPt"), particle.pt()); + break; + default: + break; + } } if (std::abs(particle.eta()) > etaCut) { continue; } - if (particle.pdgCode() == PDG_t::kProton) { - registry.fill(HIST("Generated/hQAProtons"), 2.5); - } - if (particle.pdgCode() == o2::constants::physics::Pdg::kDeuteron) { - registry.fill(HIST("Generated/hQADeuterons"), 2.5); - } - - if (particle.pdgCode() == o2::constants::physics::Pdg::kDeuteron) { - registry.fill(HIST("hGen_EtaPhiPt_Deuteron"), particle.eta(), particle.phi(), particle.pt()); - } - if (particle.pdgCode() == -o2::constants::physics::Pdg::kDeuteron) { - registry.fill(HIST("hGen_EtaPhiPt_Deuteron"), particle.eta(), particle.phi(), -1. * particle.pt()); - } - if (particle.pdgCode() == PDG_t::kProton) { - registry.fill(HIST("hGen_EtaPhiPt_Proton"), particle.eta(), particle.phi(), particle.pt()); - } - if (particle.pdgCode() == -PDG_t::kProton) { - registry.fill(HIST("hGen_EtaPhiPt_Proton"), particle.eta(), particle.phi(), -1. * particle.pt()); + fillGeneratedQa(2.5); + + switch (particle.pdgCode()) { + case PDG_t::kProton: + registry.fill(HIST("hGen_EtaPhiPt_Proton"), particle.eta(), particle.phi(), particle.pt()); + break; + case -PDG_t::kProton: + registry.fill(HIST("hGen_EtaPhiPt_Proton"), particle.eta(), particle.phi(), -1. * particle.pt()); + break; + case o2::constants::physics::Pdg::kDeuteron: + registry.fill(HIST("hGen_EtaPhiPt_Deuteron"), particle.eta(), particle.phi(), particle.pt()); + break; + case -o2::constants::physics::Pdg::kDeuteron: + registry.fill(HIST("hGen_EtaPhiPt_Deuteron"), particle.eta(), particle.phi(), -1. * particle.pt()); + break; + default: + LOG(fatal) << "Unhandled PDG code, should not happen, check the code!" << particle.pdgCode(); + break; } } @@ -1850,17 +1918,21 @@ struct HadronNucleiCorrelation { // mode 6 if (mode == kPP) { - if (part0.pdgCode() != PDG_t::kProton) + if (part0.pdgCode() != PDG_t::kProton) { continue; - if (part1.pdgCode() != PDG_t::kProton) + } + if (part1.pdgCode() != PDG_t::kProton) { continue; + } } // mode 5 if (mode == kPbarPbar) { - if (part0.pdgCode() != -PDG_t::kProton) + if (part0.pdgCode() != -PDG_t::kProton) { continue; - if (part1.pdgCode() != -PDG_t::kProton) + } + if (part1.pdgCode() != -PDG_t::kProton) { continue; + } } fillHistogramsGen(part0, part1, false); @@ -1884,40 +1956,52 @@ struct HadronNucleiCorrelation { } if (mode == kDbarPbar) { - if (part0.pdgCode() != -o2::constants::physics::Pdg::kDeuteron) + if (part0.pdgCode() != -o2::constants::physics::Pdg::kDeuteron) { continue; - if (part1.pdgCode() != -PDG_t::kProton) + } + if (part1.pdgCode() != -PDG_t::kProton) { continue; + } } if (mode == kDP) { - if (part0.pdgCode() != o2::constants::physics::Pdg::kDeuteron) + if (part0.pdgCode() != o2::constants::physics::Pdg::kDeuteron) { continue; - if (part1.pdgCode() != PDG_t::kProton) + } + if (part1.pdgCode() != PDG_t::kProton) { continue; + } } if (mode == kDbarP) { - if (part0.pdgCode() != -o2::constants::physics::Pdg::kDeuteron) + if (part0.pdgCode() != -o2::constants::physics::Pdg::kDeuteron) { continue; - if (part1.pdgCode() != PDG_t::kProton) + } + if (part1.pdgCode() != PDG_t::kProton) { continue; + } } if (mode == kDPbar) { - if (part0.pdgCode() != o2::constants::physics::Pdg::kDeuteron) + if (part0.pdgCode() != o2::constants::physics::Pdg::kDeuteron) { continue; - if (part1.pdgCode() != -PDG_t::kProton) + } + if (part1.pdgCode() != -PDG_t::kProton) { continue; + } } if (mode == kPbarP) { - if (part0.pdgCode() != -PDG_t::kProton) + if (part0.pdgCode() != -PDG_t::kProton) { continue; - if (part1.pdgCode() != PDG_t::kProton) + } + if (part1.pdgCode() != PDG_t::kProton) { continue; + } } if (mode == kPPbar) { - if (part0.pdgCode() != PDG_t::kProton) + if (part0.pdgCode() != PDG_t::kProton) { continue; - if (part1.pdgCode() != -PDG_t::kProton) + } + if (part1.pdgCode() != -PDG_t::kProton) { continue; + } } fillHistogramsGen(part0, part1, false); @@ -1963,52 +2047,68 @@ struct HadronNucleiCorrelation { } if (mode == kDbarPbar) { - if (part0.pdgCode() != -o2::constants::physics::Pdg::kDeuteron) + if (part0.pdgCode() != -o2::constants::physics::Pdg::kDeuteron) { continue; - if (part1.pdgCode() != -PDG_t::kProton) + } + if (part1.pdgCode() != -PDG_t::kProton) { continue; + } } if (mode == kDP) { - if (part0.pdgCode() != o2::constants::physics::Pdg::kDeuteron) + if (part0.pdgCode() != o2::constants::physics::Pdg::kDeuteron) { continue; - if (part1.pdgCode() != PDG_t::kProton) + } + if (part1.pdgCode() != PDG_t::kProton) { continue; + } } if (mode == kDbarP) { - if (part0.pdgCode() != -o2::constants::physics::Pdg::kDeuteron) + if (part0.pdgCode() != -o2::constants::physics::Pdg::kDeuteron) { continue; - if (part1.pdgCode() != PDG_t::kProton) + } + if (part1.pdgCode() != PDG_t::kProton) { continue; + } } if (mode == kDPbar) { - if (part0.pdgCode() != o2::constants::physics::Pdg::kDeuteron) + if (part0.pdgCode() != o2::constants::physics::Pdg::kDeuteron) { continue; - if (part1.pdgCode() != -PDG_t::kProton) + } + if (part1.pdgCode() != -PDG_t::kProton) { continue; + } } if (mode == kPbarP) { - if (part0.pdgCode() != -PDG_t::kProton) + if (part0.pdgCode() != -PDG_t::kProton) { continue; - if (part1.pdgCode() != PDG_t::kProton) + } + if (part1.pdgCode() != PDG_t::kProton) { continue; + } } if (mode == kPbarPbar) { - if (part0.pdgCode() != -PDG_t::kProton) + if (part0.pdgCode() != -PDG_t::kProton) { continue; - if (part1.pdgCode() != -PDG_t::kProton) + } + if (part1.pdgCode() != -PDG_t::kProton) { continue; + } } if (mode == kPP) { - if (part0.pdgCode() != PDG_t::kProton) + if (part0.pdgCode() != PDG_t::kProton) { continue; - if (part1.pdgCode() != PDG_t::kProton) + } + if (part1.pdgCode() != PDG_t::kProton) { continue; + } } if (mode == kPPbar) { - if (part0.pdgCode() != PDG_t::kProton) + if (part0.pdgCode() != PDG_t::kProton) { continue; - if (part1.pdgCode() != -PDG_t::kProton) + } + if (part1.pdgCode() != -PDG_t::kProton) { continue; + } } fillHistogramsGen(part0, part1, true);