From d9c0e57a6dae196c760df2769a3bf01a542df9db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Thu, 14 Jul 2022 12:39:53 +0200 Subject: [PATCH 1/4] Extend DPG tools - more plots with different ev. time for TOF - Fixes in hist naming in qaEfficiency - extend qaPIDPTC - improve PDG selection in qa lite --- DPG/Tasks/qaEfficiency.cxx | 28 +++++++------- DPG/Tasks/qaEventTrackLite.cxx | 36 ++++++++++++++---- DPG/Tasks/qaPIDTOF.h | 67 +++++++++++++++++++++++++++++++--- DPG/Tasks/qaPIDTPC.h | 57 +++++++++++++++++++++++++---- 4 files changed, 153 insertions(+), 35 deletions(-) diff --git a/DPG/Tasks/qaEfficiency.cxx b/DPG/Tasks/qaEfficiency.cxx index bfcd7c0a895..9937b326b85 100644 --- a/DPG/Tasks/qaEfficiency.cxx +++ b/DPG/Tasks/qaEfficiency.cxx @@ -142,10 +142,10 @@ struct QaEfficiency { "MC/ka/pos/prm/pt/num", "MC/pr/pos/prm/pt/num", "MC/de/pos/prm/pt/num", "MC/tr/pos/prm/pt/num", "MC/he/pos/prm/pt/num", "MC/al/pos/prm/pt/num", "MC/all/pos/prm/pt/num", - "MC/el/den/prm/pt/num", "MC/mu/den/prm/pt/num", "MC/pi/den/prm/pt/num", - "MC/ka/den/prm/pt/num", "MC/pr/den/prm/pt/num", "MC/de/den/prm/pt/num", - "MC/tr/den/prm/pt/num", "MC/he/den/prm/pt/num", "MC/al/den/prm/pt/num", - "MC/all/den/prm/pt/num"}; + "MC/el/neg/prm/pt/num", "MC/mu/neg/prm/pt/num", "MC/pi/neg/prm/pt/num", + "MC/ka/neg/prm/pt/num", "MC/pr/neg/prm/pt/num", "MC/de/neg/prm/pt/num", + "MC/tr/neg/prm/pt/num", "MC/he/neg/prm/pt/num", "MC/al/neg/prm/pt/num", + "MC/all/neg/prm/pt/num"}; static constexpr std::string_view hPtPrmNumTrk[nHistograms] = {"MC/el/sum/prm/pt/numtrk", "MC/mu/sum/prm/pt/numtrk", "MC/pi/sum/prm/pt/numtrk", "MC/ka/sum/prm/pt/numtrk", "MC/pr/sum/prm/pt/numtrk", "MC/de/sum/prm/pt/numtrk", "MC/tr/sum/prm/pt/numtrk", "MC/he/sum/prm/pt/numtrk", "MC/al/sum/prm/pt/numtrk", @@ -191,10 +191,10 @@ struct QaEfficiency { "MC/ka/pos/dec/pt/num", "MC/pr/pos/dec/pt/num", "MC/de/pos/dec/pt/num", "MC/tr/pos/dec/pt/num", "MC/he/pos/dec/pt/num", "MC/al/pos/dec/pt/num", "MC/all/pos/dec/pt/num", - "MC/el/den/dec/pt/num", "MC/mu/den/dec/pt/num", "MC/pi/den/dec/pt/num", - "MC/ka/den/dec/pt/num", "MC/pr/den/dec/pt/num", "MC/de/den/dec/pt/num", - "MC/tr/den/dec/pt/num", "MC/he/den/dec/pt/num", "MC/al/den/dec/pt/num", - "MC/all/den/dec/pt/num"}; + "MC/el/neg/dec/pt/num", "MC/mu/neg/dec/pt/num", "MC/pi/neg/dec/pt/num", + "MC/ka/neg/dec/pt/num", "MC/pr/neg/dec/pt/num", "MC/de/neg/dec/pt/num", + "MC/tr/neg/dec/pt/num", "MC/he/neg/dec/pt/num", "MC/al/neg/dec/pt/num", + "MC/all/neg/dec/pt/num"}; static constexpr std::string_view hPtDecNumTrk[nHistograms] = {"MC/el/sum/dec/pt/numtrk", "MC/mu/sum/dec/pt/numtrk", "MC/pi/sum/dec/pt/numtrk", "MC/ka/sum/dec/pt/numtrk", "MC/pr/sum/dec/pt/numtrk", "MC/de/sum/dec/pt/numtrk", "MC/tr/sum/dec/pt/numtrk", "MC/he/sum/dec/pt/numtrk", "MC/al/sum/dec/pt/numtrk", @@ -240,10 +240,10 @@ struct QaEfficiency { "MC/ka/pos/mat/pt/num", "MC/pr/pos/mat/pt/num", "MC/de/pos/mat/pt/num", "MC/tr/pos/mat/pt/num", "MC/he/pos/mat/pt/num", "MC/al/pos/mat/pt/num", "MC/all/pos/mat/pt/num", - "MC/el/den/mat/pt/num", "MC/mu/den/mat/pt/num", "MC/pi/den/mat/pt/num", - "MC/ka/den/mat/pt/num", "MC/pr/den/mat/pt/num", "MC/de/den/mat/pt/num", - "MC/tr/den/mat/pt/num", "MC/he/den/mat/pt/num", "MC/al/den/mat/pt/num", - "MC/all/den/mat/pt/num"}; + "MC/el/neg/mat/pt/num", "MC/mu/neg/mat/pt/num", "MC/pi/neg/mat/pt/num", + "MC/ka/neg/mat/pt/num", "MC/pr/neg/mat/pt/num", "MC/de/neg/mat/pt/num", + "MC/tr/neg/mat/pt/num", "MC/he/neg/mat/pt/num", "MC/al/neg/mat/pt/num", + "MC/all/neg/mat/pt/num"}; static constexpr std::string_view hPtMatNumTrk[nHistograms] = {"MC/el/sum/mat/pt/numtrk", "MC/mu/sum/mat/pt/numtrk", "MC/pi/sum/mat/pt/numtrk", "MC/ka/sum/mat/pt/numtrk", "MC/pr/sum/mat/pt/numtrk", "MC/de/sum/mat/pt/numtrk", "MC/tr/sum/mat/pt/numtrk", "MC/he/sum/mat/pt/numtrk", "MC/al/sum/mat/pt/numtrk", @@ -1189,11 +1189,11 @@ struct QaEfficiency { if (!isTrackSelected(track)) { // Check general cuts continue; } - histos.fill(HIST("MC/trackSelection"), 11); + histos.fill(HIST("MC/trackSelection"), 9); if (!track.has_collision()) { continue; } - histos.fill(HIST("MC/trackSelection"), 12); + histos.fill(HIST("MC/trackSelection"), 10); // Filling variable histograms histos.fill(HIST("MC/trackLength"), track.length()); if (doEl) { diff --git a/DPG/Tasks/qaEventTrackLite.cxx b/DPG/Tasks/qaEventTrackLite.cxx index 48423742a8f..1b0d6d719c9 100644 --- a/DPG/Tasks/qaEventTrackLite.cxx +++ b/DPG/Tasks/qaEventTrackLite.cxx @@ -114,7 +114,7 @@ struct qaEventTrackLite { Configurable dcaXYmaxSel3{"dcaXYMaxSel3", 999., "Max dca XY sel3"}; // MC selections - Configurable pdgCodeSel{"pdgCodeSel", 2, "pdgCode based particle selection, 1 defines pi,K,p,mu,e, 2 all final-state charged particles including light (hyper)nuclei"}; + Configurable pdgCodeSel{"pdgCodeSel", 2, "pdgCode based particle selection, PDG code required for particles to have OR: 1 defines pi,K,p,mu,e, 2 all final-state charged particles including light (hyper)nuclei"}; Configurable checkPdgAtReco{"checkPdgAtReco", false, "check pdg code also at reco levo for data-like reference"}; // TPC dEdx splines @@ -578,18 +578,38 @@ struct qaEventTrackLite { return true; } - bool isPdgSelected(const Int_t pdgcode) + bool isPdgSelected(const int pdgcode) { // mimics selection of charged particles or id particles - Int_t abspdgcode = TMath::Abs(pdgcode); - if (abspdgcode == pdgCodeSel) + + if (pdgcode == pdgCodeSel) { // Check that the pdg code is exactly what was asked return true; + } + const int abspdgcode = abs(pdgcode); if (pdgCodeSel == 1 || pdgCodeSel == 2) { - if (abspdgcode == 211 || abspdgcode == 321 || abspdgcode == 2212 || abspdgcode == 11 || abspdgcode == 13) - return true; - if (pdgCodeSel == 2) { - if (abspdgcode == 3222 || abspdgcode == 3112 || abspdgcode == 3312 || abspdgcode == 3334 || abspdgcode == 1000010020 || abspdgcode == 1000010030 || abspdgcode == 1000020030 || abspdgcode == 1000020040 || abspdgcode == 1010010030 || abspdgcode == 1010020040) + switch (abspdgcode) { + case 11: // electron + case 13: // muon + case 211: // pion + case 321: // kaon + case 2212: // proton return true; } + + if (pdgCodeSel == 2) { + switch (abspdgcode) { + case 3222: // Σ+ + case 3112: // Σ− + case 3312: // Ξ− + case 3334: // Ω− + case 1000010020: // deuteron + case 1000010030: // triton + case 1000020030: // helium3 + case 1000020040: // helium4 + case 1010010030: // hyper triton + case 1010020040: // hyper helium4 + return true; + } + } } return false; } diff --git a/DPG/Tasks/qaPIDTOF.h b/DPG/Tasks/qaPIDTOF.h index 30518f9ce18..341e3b830eb 100644 --- a/DPG/Tasks/qaPIDTOF.h +++ b/DPG/Tasks/qaPIDTOF.h @@ -67,7 +67,7 @@ struct tofPidQa { Configurable nBinsNSigma{"nBinsNSigma", 200, "Number of bins for the NSigma"}; Configurable minNSigma{"minNSigma", -10.f, "Minimum NSigma in range"}; Configurable maxNSigma{"maxNSigma", 10.f, "Maximum NSigma in range"}; - Configurable applyEvSel{"applyEvSel", 2, "Flag to apply rapidity cut: 0 -> no event selection, 1 -> Run 2 event selection, 2 -> Run 3 event selection"}; + Configurable applyEvSel{"applyEvSel", 2, "Flag to apply event selection cut: 0 -> no event selection, 1 -> Run 2 event selection, 2 -> Run 3 event selection"}; Configurable applyTrackCut{"applyTrackCut", false, "Flag to apply standard track cuts"}; Configurable applyRapidityCut{"applyRapidityCut", false, "Flag to apply rapidity cut"}; Configurable enableEvTimeSplitting{"enableEvTimeSplitting", false, "Flag to enable histograms splitting depending on the Event Time used"}; @@ -482,6 +482,8 @@ struct tofPidBetaQa { Configurable nBinsBeta{"nBinsBeta", 4000, "Number of bins for the beta"}; Configurable minBeta{"minBeta", 0, "Minimum beta in range"}; Configurable maxBeta{"maxBeta", 2.f, "Maximum beta in range"}; + Configurable applyEvSel{"applyEvSel", 2, "Flag to apply event selection cut: 0 -> no event selection, 1 -> Run 2 event selection, 2 -> Run 3 event selection"}; + Configurable applyTrackCut{"applyTrackCut", false, "Flag to apply standard track cuts"}; void init(o2::framework::InitContext&) { @@ -502,11 +504,24 @@ struct tofPidBetaQa { // Event properties histos.add("event/tofsignal", "", HistType::kTH2F, {pAxis, tofAxis}); histos.add("event/tofbeta", "", HistType::kTH2F, {pAxis, betaAxis}); - histos.add("event/tofbetaEvTimeTOF", "", HistType::kTH2F, {pAxis, betaAxis}); + histos.add("event/tofbetaEvTimeTOF", "Ev. Time TOF", HistType::kTH2F, {pAxis, betaAxis}); + histos.add("event/tofbetaEvTimeTOFOnly", "Ev. Time TOF Only", HistType::kTH2F, {pAxis, betaAxis}); + histos.add("event/tofbetaEvTimeT0AC", "Ev. Time T0AC", HistType::kTH2F, {pAxis, betaAxis}); + histos.add("event/tofbetaEvTimeT0ACOnly", "Ev. Time T0AC Only", HistType::kTH2F, {pAxis, betaAxis}); histos.add("event/eta", "", HistType::kTH1F, {etaAxis}); histos.add("event/length", "", HistType::kTH1F, {lAxis}); histos.add("event/pt", "", HistType::kTH1F, {ptAxis}); histos.add("event/p", "", HistType::kTH1F, {pAxis}); + auto h = histos.add("event/evsel", "", kTH1F, {{10, 0.5, 10.5, "Ev. Sel."}}); + h->GetXaxis()->SetBinLabel(1, "Events read"); + h->GetXaxis()->SetBinLabel(2, "Passed ev. sel."); + h->GetXaxis()->SetBinLabel(3, "Passed mult."); + h->GetXaxis()->SetBinLabel(4, "Passed vtx Z"); + + h = histos.add("event/trackselection", "", kTH1F, {{10, 0.5, 10.5, "Selection passed"}}); + h->GetXaxis()->SetBinLabel(1, "Tracks read"); + h->GetXaxis()->SetBinLabel(2, "hasTOF"); + h->GetXaxis()->SetBinLabel(3, "isGlobalTrack"); } template @@ -516,20 +531,62 @@ struct tofPidBetaQa { histos.fill(HIST(hexpected_diff[i]), t.p(), exp_diff); histos.fill(HIST(hnsigma[i]), t.p(), nsigma); } - void process(soa::Join const& tracks, - aod::Collisions const&) + + using CollisionCandidate = soa::Join::iterator; + void process(CollisionCandidate const& collision, + soa::Join const& tracks) { - for (auto const& track : tracks) { + histos.fill(HIST("event/evsel"), 1); + if (applyEvSel == 1) { + if (!collision.sel7()) { + return; + } + } else if (applyEvSel == 2) { + if (!collision.sel8()) { + return; + } + } + + histos.fill(HIST("event/evsel"), 2); + + // Computing Multiplicity first + float ntracks = 0; + for (auto t : tracks) { + if (applyTrackCut && !t.isGlobalTrack()) { + continue; + } + ntracks += 1; + } + histos.fill(HIST("event/evsel"), 3); + if (abs(collision.posZ()) > 10.f) { + return; + } + + histos.fill(HIST("event/evsel"), 4); + + for (auto const& track : tracks) { + histos.fill(HIST("event/trackselection"), 1.f); if (!track.hasTOF()) { // Skipping tracks without TOF continue; } + histos.fill(HIST("event/trackselection"), 2.f); if (!track.isGlobalTrack()) { continue; } + histos.fill(HIST("event/trackselection"), 3.f); if (track.isEvTimeTOF()) { histos.fill(HIST("event/tofbetaEvTimeTOF"), track.p(), track.beta()); } + if (track.isEvTimeTOF() && !track.isEvTimeT0AC()) { + histos.fill(HIST("event/tofbetaEvTimeTOFOnly"), track.p(), track.beta()); + } + if (track.isEvTimeT0AC()) { + histos.fill(HIST("event/tofbetaEvTimeT0AC"), track.p(), track.beta()); + } + if (track.isEvTimeT0AC() && !track.isEvTimeTOF()) { + histos.fill(HIST("event/tofbetaEvTimeT0ACOnly"), track.p(), track.beta()); + } histos.fill(HIST("event/tofbeta"), track.p(), track.beta()); histos.fill(HIST("event/length"), track.length()); histos.fill(HIST("event/eta"), track.eta()); diff --git a/DPG/Tasks/qaPIDTPC.h b/DPG/Tasks/qaPIDTPC.h index ee6b7ef0dc9..05205bd9992 100644 --- a/DPG/Tasks/qaPIDTPC.h +++ b/DPG/Tasks/qaPIDTPC.h @@ -36,6 +36,20 @@ struct tpcPidQa { static constexpr std::string_view hexpected_diff[Np] = {"expected_diff/El", "expected_diff/Mu", "expected_diff/Pi", "expected_diff/Ka", "expected_diff/Pr", "expected_diff/De", "expected_diff/Tr", "expected_diff/He", "expected_diff/Al"}; + static constexpr std::string_view hexpected_diffptpos[Np] = {"expected_diffptpos/El", "expected_diffptpos/Mu", "expected_diffptpos/Pi", + "expected_diffptpos/Ka", "expected_diffptpos/Pr", "expected_diffptpos/De", + "expected_diffptpos/Tr", "expected_diffptpos/He", "expected_diffptpos/Al"}; + static constexpr std::string_view hexpected_diffptneg[Np] = {"expected_diffptneg/El", "expected_diffptneg/Mu", "expected_diffptneg/Pi", + "expected_diffptneg/Ka", "expected_diffptneg/Pr", "expected_diffptneg/De", + "expected_diffptneg/Tr", "expected_diffptneg/He", "expected_diffptneg/Al"}; + // With TOF + static constexpr std::string_view hexpectedwtof[Np] = {"expectedwtof/El", "expectedwtof/Mu", "expectedwtof/Pi", + "expectedwtof/Ka", "expectedwtof/Pr", "expectedwtof/De", + "expectedwtof/Tr", "expectedwtof/He", "expectedwtof/Al"}; + static constexpr std::string_view hexpected_diffwtof[Np] = {"expected_diffwtof/El", "expected_diffwtof/Mu", "expected_diffwtof/Pi", + "expected_diffwtof/Ka", "expected_diffwtof/Pr", "expected_diffwtof/De", + "expected_diffwtof/Tr", "expected_diffwtof/He", "expected_diffwtof/Al"}; + static constexpr std::string_view hexpsigma[Np] = {"expsigma/El", "expsigma/Mu", "expsigma/Pi", "expsigma/Ka", "expsigma/Pr", "expsigma/De", "expsigma/Tr", "expsigma/He", "expsigma/Al"}; @@ -51,9 +65,24 @@ struct tpcPidQa { static constexpr std::string_view hnsigmanegpt[Np] = {"nsigmanegpt/El", "nsigmanegpt/Mu", "nsigmanegpt/Pi", "nsigmanegpt/Ka", "nsigmanegpt/Pr", "nsigmanegpt/De", "nsigmanegpt/Tr", "nsigmanegpt/He", "nsigmanegpt/Al"}; + // With TOF + static constexpr std::string_view hexpsigmawtof[Np] = {"expsigmawtof/El", "expsigmawtof/Mu", "expsigmawtof/Pi", + "expsigmawtof/Ka", "expsigmawtof/Pr", "expsigmawtof/De", + "expsigmawtof/Tr", "expsigmawtof/He", "expsigmawtof/Al"}; + static constexpr std::string_view hnsigmawtof[Np] = {"nsigmawtof/El", "nsigmawtof/Mu", "nsigmawtof/Pi", + "nsigmawtof/Ka", "nsigmawtof/Pr", "nsigmawtof/De", + "nsigmawtof/Tr", "nsigmawtof/He", "nsigmawtof/Al"}; + static constexpr std::string_view hnsigmaptwtof[Np] = {"nsigmaptwtof/El", "nsigmaptwtof/Mu", "nsigmaptwtof/Pi", + "nsigmaptwtof/Ka", "nsigmaptwtof/Pr", "nsigmaptwtof/De", + "nsigmaptwtof/Tr", "nsigmaptwtof/He", "nsigmaptwtof/Al"}; + static constexpr std::string_view hsignal[Np] = {"signal/El", "signal/Mu", "signal/Pi", "signal/Ka", "signal/Pr", "signal/De", "signal/Tr", "signal/He", "signal/Al"}; + // With TOF + static constexpr std::string_view hsignalwtof[Np] = {"signalwtof/El", "signalwtof/Mu", "signalwtof/Pi", + "signalwtof/Ka", "signalwtof/Pr", "signalwtof/De", + "signalwtof/Tr", "signalwtof/He", "signalwtof/Al"}; HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; @@ -70,7 +99,7 @@ struct tpcPidQa { Configurable nBinsNSigma{"nBinsNSigma", 200, "Number of bins for the NSigma"}; Configurable minNSigma{"minNSigma", -10.f, "Minimum NSigma in range"}; Configurable maxNSigma{"maxNSigma", 10.f, "Maximum NSigma in range"}; - Configurable applyEvSel{"applyEvSel", 2, "Flag to apply rapidity cut: 0 -> no event selection, 1 -> Run 2 event selection, 2 -> Run 3 event selection"}; + Configurable applyEvSel{"applyEvSel", 2, "Flag to apply event selection cut: 0 -> no event selection, 1 -> Run 2 event selection, 2 -> Run 3 event selection"}; Configurable applyTrackCut{"applyTrackCut", false, "Flag to apply standard track cuts"}; Configurable applyRapidityCut{"applyRapidityCut", false, "Flag to apply rapidity cut"}; @@ -105,6 +134,8 @@ struct tpcPidQa { // Signal - Expected signal const AxisSpec deltaAxis{nBinsDelta, minDelta, maxDelta, Form("d#it{E}/d#it{x} - d#it{E}/d#it{x}(%s)", pT[id])}; histos.add(hexpected_diff[id].data(), "", kTH2F, {pAxis, deltaAxis}); + histos.add(hexpected_diffptpos[id].data(), "Positive", kTH2F, {pAxis, deltaAxis}); + histos.add(hexpected_diffptneg[id].data(), "Negative", kTH2F, {pAxis, deltaAxis}); // Exp Sigma const AxisSpec expSigmaAxis{nBinsExpSigma, minExpSigma, maxExpSigma, Form("Exp_{#sigma}^{TPC}(%s)", pT[id])}; @@ -132,13 +163,14 @@ struct tpcPidQa { const AxisSpec phiAxis{100, 0, TMath::TwoPi(), "#it{#phi}"}; const AxisSpec lAxis{100, 0, 500, "Track length (cm)"}; const AxisSpec pAxisPosNeg{nBinsP, -maxP, maxP, "Signed #it{p} (GeV/#it{c})"}; + const AxisSpec ptAxisPosNeg{nBinsP, -maxP, maxP, "Signed #it{p}_{T} (GeV/#it{c})"}; AxisSpec ptAxis{nBinsP, minP, maxP, "#it{p}_{T} (GeV/#it{c})"}; AxisSpec pAxis{nBinsP, minP, maxP, "#it{p} (GeV/#it{c})"}; if (logAxis) { ptAxis.makeLogaritmic(); pAxis.makeLogaritmic(); } - const AxisSpec dedxAxis{1000, 0, 1000, "d#it{E}/d#it{x} A.U."}; + const AxisSpec dedxAxis{5000, 0, 5000, "d#it{E}/d#it{x} A.U."}; // Event properties auto h = histos.add("event/evsel", "", kTH1F, {{10, 0.5, 10.5, "Ev. Sel."}}); @@ -161,6 +193,8 @@ struct tpcPidQa { histos.add("event/trackmultiplicity", "", kTH1F, {multAxis}); histos.add("event/tpcsignal", "", kTH2F, {pAxis, dedxAxis}); histos.add("event/signedtpcsignal", "", kTH2F, {pAxisPosNeg, dedxAxis}); + histos.add("event/tpcsignalvspt", "", kTH2F, {ptAxis, dedxAxis}); + histos.add("event/signedtpcsignalvspt", "", kTH2F, {ptAxisPosNeg, dedxAxis}); histos.add("event/eta", "", kTH1F, {etaAxis}); histos.add("event/phi", "", kTH1F, {phiAxis}); histos.add("event/etaphi", "", kTH2F, {etaAxis, phiAxis}); @@ -237,6 +271,8 @@ struct tpcPidQa { histos.fill(HIST("event/particlehypo"), track.pidForTracking()); histos.fill(HIST("event/tpcsignal"), track.tpcInnerParam(), track.tpcSignal()); histos.fill(HIST("event/signedtpcsignal"), track.tpcInnerParam() * track.sign(), track.tpcSignal()); + histos.fill(HIST("event/tpcsignalvspt"), track.pt(), track.tpcSignal()); + histos.fill(HIST("event/signedtpcsignalvspt"), track.pt() * track.sign(), track.tpcSignal()); histos.fill(HIST("event/eta"), track.eta()); histos.fill(HIST("event/phi"), track.phi()); histos.fill(HIST("event/etaphi"), track.eta(), track.phi()); @@ -291,21 +327,26 @@ struct tpcPidQa { // Fill histograms histos.fill(HIST(hexpected[id]), t.tpcInnerParam(), t.tpcSignal() - diff); histos.fill(HIST(hexpected_diff[id]), t.tpcInnerParam(), diff); + if (t.sign() > 0) { + histos.fill(HIST(hexpected_diffptpos[id]), t.pt(), diff); + } else { + histos.fill(HIST(hexpected_diffptneg[id]), t.pt(), diff); + } histos.fill(HIST(hexpsigma[id]), t.tpcInnerParam(), o2::aod::pidutils::tpcExpSigma(t)); if constexpr (fillWithTOFHistograms) { if (std::abs(o2::aod::pidutils::tofNSigma(t)) < 3.f) { - histos.fill(HIST(hexpected[id]), t.tpcInnerParam(), t.tpcSignal() - diff); - histos.fill(HIST(hexpected_diff[id]), t.tpcInnerParam(), diff); - histos.fill(HIST(hexpsigma[id]), t.p(), o2::aod::pidutils::tpcExpSigma(t)); + histos.fill(HIST(hexpectedwtof[id]), t.tpcInnerParam(), t.tpcSignal() - diff); + histos.fill(HIST(hexpected_diffwtof[id]), t.tpcInnerParam(), diff); + histos.fill(HIST(hexpsigmawtof[id]), t.p(), o2::aod::pidutils::tpcExpSigma(t)); } } } if constexpr (fillWithTOFHistograms) { const auto& nsigmatof = o2::aod::pidutils::tofNSigma(t); if (std::abs(nsigmatof) < 3.f) { - histos.fill(HIST(hnsigma[id]), t.p(), nsigma); - histos.fill(HIST(hnsigmapt[id]), t.pt(), nsigma); - histos.fill(HIST(hsignal[id]), t.tpcInnerParam(), t.tpcSignal()); + histos.fill(HIST(hnsigmawtof[id]), t.p(), nsigma); + histos.fill(HIST(hnsigmaptwtof[id]), t.pt(), nsigma); + histos.fill(HIST(hsignalwtof[id]), t.tpcInnerParam(), t.tpcSignal()); // histos.fill(HIST("event/signedtpcsignal"), t.tpcInnerParam() * t.sign(), t.tpcSignal()); } } From 075caf940f913f927d195b9dd19d71ef9ce4e696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Fri, 22 Jul 2022 09:30:07 +0200 Subject: [PATCH 2/4] Fix --- DPG/Tasks/qaEventTrackLite.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DPG/Tasks/qaEventTrackLite.cxx b/DPG/Tasks/qaEventTrackLite.cxx index 1b0d6d719c9..07a971200fe 100644 --- a/DPG/Tasks/qaEventTrackLite.cxx +++ b/DPG/Tasks/qaEventTrackLite.cxx @@ -114,7 +114,7 @@ struct qaEventTrackLite { Configurable dcaXYmaxSel3{"dcaXYMaxSel3", 999., "Max dca XY sel3"}; // MC selections - Configurable pdgCodeSel{"pdgCodeSel", 2, "pdgCode based particle selection, PDG code required for particles to have OR: 1 defines pi,K,p,mu,e, 2 all final-state charged particles including light (hyper)nuclei"}; + Configurable pdgCodeSel{"pdgCodeSel", 2, "pdgCode based particle selection. Either provide a PDG code required for particles OR `1` defines pi,K,p,mu,e, `2` all final-state charged particles including light (hyper)nuclei"}; Configurable checkPdgAtReco{"checkPdgAtReco", false, "check pdg code also at reco levo for data-like reference"}; // TPC dEdx splines From b735dc8875a5794325d3959d29294e3ef84426d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Fri, 22 Jul 2022 09:43:13 +0200 Subject: [PATCH 3/4] Add pdg selection configurable for multiple particles --- DPG/Tasks/qaEventTrackLite.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/DPG/Tasks/qaEventTrackLite.cxx b/DPG/Tasks/qaEventTrackLite.cxx index 07a971200fe..318e8fdc243 100644 --- a/DPG/Tasks/qaEventTrackLite.cxx +++ b/DPG/Tasks/qaEventTrackLite.cxx @@ -114,7 +114,9 @@ struct qaEventTrackLite { Configurable dcaXYmaxSel3{"dcaXYMaxSel3", 999., "Max dca XY sel3"}; // MC selections - Configurable pdgCodeSel{"pdgCodeSel", 2, "pdgCode based particle selection. Either provide a PDG code required for particles OR `1` defines pi,K,p,mu,e, `2` all final-state charged particles including light (hyper)nuclei"}; + Configurable pdgCodeSel{"pdgCodeSel", 0, "pdgCode based particle selection. Provide a PDG code required for particles to have. To be used in combo with pdgCodeSelMode"}; + Configurable pdgCodeMode{"pdgCodeSelMode", 2, "multiple pdgCode based particle selection. `1` accepts pi,K,p,mu,e, `2` accepts all final-state charged particles including light (hyper)nuclei"}; + Configurable checkPdgAtReco{"checkPdgAtReco", false, "check pdg code also at reco levo for data-like reference"}; // TPC dEdx splines @@ -585,7 +587,7 @@ struct qaEventTrackLite { return true; } const int abspdgcode = abs(pdgcode); - if (pdgCodeSel == 1 || pdgCodeSel == 2) { + if (pdgCodeSelMode == 1 || pdgCodeSelMode == 2) { switch (abspdgcode) { case 11: // electron case 13: // muon @@ -595,7 +597,7 @@ struct qaEventTrackLite { return true; } - if (pdgCodeSel == 2) { + if (pdgCodeSelMode == 2) { switch (abspdgcode) { case 3222: // Σ+ case 3112: // Σ− From 7cf3ed66abbefadea04d7224b414c92d7e7e63de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Fri, 22 Jul 2022 10:46:32 +0200 Subject: [PATCH 4/4] Second fix --- DPG/Tasks/qaEventTrackLite.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DPG/Tasks/qaEventTrackLite.cxx b/DPG/Tasks/qaEventTrackLite.cxx index 318e8fdc243..b08edf431c4 100644 --- a/DPG/Tasks/qaEventTrackLite.cxx +++ b/DPG/Tasks/qaEventTrackLite.cxx @@ -115,7 +115,7 @@ struct qaEventTrackLite { // MC selections Configurable pdgCodeSel{"pdgCodeSel", 0, "pdgCode based particle selection. Provide a PDG code required for particles to have. To be used in combo with pdgCodeSelMode"}; - Configurable pdgCodeMode{"pdgCodeSelMode", 2, "multiple pdgCode based particle selection. `1` accepts pi,K,p,mu,e, `2` accepts all final-state charged particles including light (hyper)nuclei"}; + Configurable pdgCodeSelMode{"pdgCodeSelMode", 2, "multiple pdgCode based particle selection. `1` accepts pi,K,p,mu,e, `2` accepts all final-state charged particles including light (hyper)nuclei"}; Configurable checkPdgAtReco{"checkPdgAtReco", false, "check pdg code also at reco levo for data-like reference"};