From 3576a1e0bd83c9ef897012ac085bdfc30ee382d9 Mon Sep 17 00:00:00 2001 From: slebedev <s.lebedev@gsi.de> Date: Thu, 9 Dec 2021 12:16:00 +0100 Subject: [PATCH] LMVM: Add TRD Likelihood vs momentum histogram. --- analysis/PWGDIL/dielectron/lmvm/LmvmCand.h | 2 ++ analysis/PWGDIL/dielectron/lmvm/LmvmDraw.cxx | 3 +++ analysis/PWGDIL/dielectron/lmvm/LmvmTask.cxx | 5 +++++ macro/analysis/dielectron/run_reco.C | 4 ++-- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/analysis/PWGDIL/dielectron/lmvm/LmvmCand.h b/analysis/PWGDIL/dielectron/lmvm/LmvmCand.h index 38618bd2e3..c14db26234 100644 --- a/analysis/PWGDIL/dielectron/lmvm/LmvmCand.h +++ b/analysis/PWGDIL/dielectron/lmvm/LmvmCand.h @@ -69,6 +69,8 @@ public: double fRichAnn = 0.; double fTrdAnn = 0.; double fMass2 = 0.; + double fTrdLikeEl = -1.; + double fTrdLikePi = -1.; // Cuts. If true then cut is passed bool fIsChi2Prim = false; diff --git a/analysis/PWGDIL/dielectron/lmvm/LmvmDraw.cxx b/analysis/PWGDIL/dielectron/lmvm/LmvmDraw.cxx index e0116bbba2..6229db8419 100644 --- a/analysis/PWGDIL/dielectron/lmvm/LmvmDraw.cxx +++ b/analysis/PWGDIL/dielectron/lmvm/LmvmDraw.cxx @@ -337,6 +337,9 @@ void LmvmDraw::DrawCuts() //Draw1DCut("hMom", "left"); Draw1DCut("hChi2Sts", "right"); + Draw2DCut("hTrdLike_El"); + Draw2DCut("hTrdLike_Pi"); + for (const string& type : {"all", "pion", "truePair"}) { Draw2DCut("hStCut_" + type, fCuts.fStCutPP, fCuts.fStCutAngle); Draw2DCut("hTtCut_" + type, fCuts.fTtCutPP, fCuts.fTtCutAngle); diff --git a/analysis/PWGDIL/dielectron/lmvm/LmvmTask.cxx b/analysis/PWGDIL/dielectron/lmvm/LmvmTask.cxx index bb05b6a162..7f34fb19e1 100644 --- a/analysis/PWGDIL/dielectron/lmvm/LmvmTask.cxx +++ b/analysis/PWGDIL/dielectron/lmvm/LmvmTask.cxx @@ -98,6 +98,7 @@ void LmvmTask::InitHists() fH.CreateH1("hChi2PrimVertex", fH.fSrcNames, "#chi^{2}_{prim}", ax, 200, 0., 20.); fH.CreateH1("hNofMvdHits", fH.fSrcNames, "Number of hits in MVD", ax, 5, -0.5, 4.5); fH.CreateH1("hNofStsHits", fH.fSrcNames, "Number of hits in STS", ax, 9, -0.5, 8.5); + fH.CreateH2("hTrdLike", {"El", "Pi"}, fH.fSrcNames, "P [GeV/c]", "Likelihood output", ax, 100, 0., 6., 100, -0.1, 1.1); fH.CreateH2("hTtCut", {"all", "pion", "truePair"}, fH.fSrcNames, "#sqrt{p_{e^{#pm}} p_{rec}} [GeV/c]", "#theta_{e^{+},e^{-}} [deg]", ax, 100, 0., 5., 100, 0., 5.); @@ -555,6 +556,8 @@ void LmvmTask::FillCands() if (richRing == nullptr || trdTrack == nullptr || tofHit == nullptr) continue; LmvmUtils::IsElectron(iGTrack, cand.fMomentum.Mag(), fCuts.fMomentumCut, &cand); + cand.fTrdLikeEl = trdTrack->GetPidLikeEL(); + cand.fTrdLikePi = trdTrack->GetPidLikePI(); fCands.push_back(cand); @@ -960,6 +963,8 @@ void LmvmTask::DifferenceSignalAndBg() fH.FillH1("hRichAnn", cand.fMcSrc, cand.fRichAnn, fW); fH.FillH1("hTrdAnn", cand.fMcSrc, cand.fTrdAnn, fW); fH.FillH2("hTofM2", cand.fMcSrc, cand.fMomentum.Mag(), cand.fMass2, fW); + fH.FillH2("hTrdLike_El", cand.fMcSrc, cand.fMomentum.Mag(), cand.fTrdLikeEl, fW); + fH.FillH2("hTrdLike_Pi", cand.fMcSrc, cand.fMomentum.Mag(), cand.fTrdLikePi, fW); if (!cand.IsCutTill(ELmvmAnaStep::ElId)) continue; //fH.FillSourceH1("hPt", cand.fMcSrc, cand.fMomentum.Perp(), fW); diff --git a/macro/analysis/dielectron/run_reco.C b/macro/analysis/dielectron/run_reco.C index 24f7bc9c0e..77d44b5cdc 100644 --- a/macro/analysis/dielectron/run_reco.C +++ b/macro/analysis/dielectron/run_reco.C @@ -88,8 +88,8 @@ void run_reco(const string& traFile, const string& parFile, const string& digiFi } if (useSts) { - CbmRecoSts* stsReco = new CbmRecoSts(kCbmRecoTimeslice); - if (eventBased) stsReco->SetMode(kCbmRecoEvent); + CbmRecoSts* stsReco = new CbmRecoSts(ECbmRecoMode::kCbmRecoTimeslice); + if (eventBased) stsReco->SetMode(ECbmRecoMode::kCbmRecoEvent); run->AddTask(stsReco); } -- GitLab