From e1708975cc8f53285444a6c57858baa8f7b58720 Mon Sep 17 00:00:00 2001 From: "s.zharko@gsi.de" <s.zharko@gsi.de> Date: Fri, 7 Mar 2025 03:13:32 +0100 Subject: [PATCH] small fixes in different QAs --- algo/ca/qa/CaQa.cxx | 13 ++++++++++++- algo/ca/qa/CaQa.h | 4 ++++ algo/kfp/KfpV0Finder.cxx | 2 +- algo/kfp/KfpV0FinderMonitor.h | 2 ++ algo/kfp/KfpV0FinderQa.cxx | 13 +++++++------ algo/qa/hitfind/TofHitfindQaParameters.cxx | 4 ++-- algo/qa/trigger/V0TriggerQa.h | 6 +++--- algo/trigger/V0Trigger.cxx | 2 +- external/InstallParameter.cmake | 4 ++-- 9 files changed, 34 insertions(+), 16 deletions(-) diff --git a/algo/ca/qa/CaQa.cxx b/algo/ca/qa/CaQa.cxx index 8d081862c..b921d1681 100644 --- a/algo/ca/qa/CaQa.cxx +++ b/algo/ca/qa/CaQa.cxx @@ -216,6 +216,11 @@ void Qa::Init() auto sTitl = "First vs. last station index;ID^{last}_{station};ID^{first}_{station}"; fphTrkFstLstSta = MakeObj<H2D>(sName, sTitl, nBins, xMin, xMax, nBins, xMin, xMax); } + { + auto sName = format("{}_track_origin", GetTaskName()); + auto sTitl = "Track origin;x [cm];y [cm]"; + fphTrkOriginXY = MakeObj<H2D>(sName, sTitl, kOriginB, kOriginL, kOriginU, kOriginB, kOriginL, kOriginU); + } fphTrkNofHits = MakeObj<H1D>("n_hits", "Number of hits;N_{hit}", nBins, xMin, xMax); } @@ -231,7 +236,7 @@ void Qa::Init() auto titl = format("{} hit occupancy in different stations in XY plane", setNm); auto canv = CanvasConfig(name, titl); for (int iSt = 0; iSt < nSt; ++iSt) { - auto pad = PadConfig(); + auto pad = PadConfig(false, false, false, false, true); pad.RegisterHistogram(fvphHitOccupXY[iSt][hitSet], "colz"); canv.AddPadConfig(pad); } @@ -294,6 +299,11 @@ void Qa::Init() pad.RegisterHistogram(fphTrkFstLstSta, "colz"); canv.AddPadConfig(pad); } + { + auto pad = PadConfig(true, true, false, false, false); + pad.RegisterHistogram(fphTrkOriginXY, "colz"); + canv.AddPadConfig(pad); + } AddCanvasConfig(canv); } } @@ -371,6 +381,7 @@ void Qa::Exec() // Other distributions fphTrkFstLstSta->Fill(fpInputData->GetHit(iLstHit).Station(), fpInputData->GetHit(iFstHit).Station()); fphTrkNofHits->Fill(nHits); + fphTrkOriginXY->Fill(track.fParPV.X(), track.fParPV.Y()); trkFirstHit += nHits; } } diff --git a/algo/ca/qa/CaQa.h b/algo/ca/qa/CaQa.h index 1c42b6056..ae3658a64 100644 --- a/algo/ca/qa/CaQa.h +++ b/algo/ca/qa/CaQa.h @@ -117,6 +117,9 @@ namespace cbm::algo::ca static constexpr int knTrkParPoints = 2; ///< Number of track points to build par distributions static constexpr int knStaMax = 16; ///< Max number of stations (histogram binning) static constexpr bool kDebug = false; ///< Additional histograms + static constexpr int kOriginB = 100; ///< Track X(Y) at origin: n bins + static constexpr double kOriginL = -10.; ///< Track X(Y) at origin: lower bound [cm] + static constexpr double kOriginU = +10.; ///< Track X(Y) at origin: upper bound [cm] double fMinHitTime = std::numeric_limits<double>::max(); double fMaxHitTime = std::numeric_limits<double>::lowest(); @@ -145,6 +148,7 @@ namespace cbm::algo::ca std::array<qa::H1D*, knTrkParPoints> fvphTrkChi2Ndf = {{0}}; ///< hist: chi2/NDF at first/last hit std::array<qa::H2D*, knTrkParPoints> fvphTrkPhiTheta = {{0}}; ///< hist: theta vs. phi at first/last hit + qa::H2D* fphTrkOriginXY = nullptr; ///< hist: origin of tracks in x-y plane [cm] qa::H2D* fphTrkFstLstSta = nullptr; ///< hist: fst vs lst station index qa::H1D* fphTrkNofHits = nullptr; ///< hist: number of hits in track }; diff --git a/algo/kfp/KfpV0Finder.cxx b/algo/kfp/KfpV0Finder.cxx index c95965bc8..820078945 100644 --- a/algo/kfp/KfpV0Finder.cxx +++ b/algo/kfp/KfpV0Finder.cxx @@ -80,7 +80,7 @@ void V0Finder::AssignPid(ParticleInfo& particleInfo) // primary //particleInfo.fPdg = fPrimaryAssignedPdg; particleInfo.fPdg = kUndefPdg; - fEventMonitor.IncrementCounter(ECounter::TracksWoPid); + fEventMonitor.IncrementCounter(ECounter::PrimaryDca); } } diff --git a/algo/kfp/KfpV0FinderMonitor.h b/algo/kfp/KfpV0FinderMonitor.h index d60d5b135..3f3b68ef6 100644 --- a/algo/kfp/KfpV0FinderMonitor.h +++ b/algo/kfp/KfpV0FinderMonitor.h @@ -28,6 +28,7 @@ namespace cbm::algo::kfp TracksWUnphysicalBeta, ///< Tracks with beta > 1 PionsDca, ///< Number of raw pion-candidates ProtonsDca, ///< Number of raw proton-candidates + PrimaryDca, ///< Number of raw proton-candidates Pions, ///< Number of pion-candidates Protons, ///< Number of proton-candidates EventsTotal, ///< Total number of events @@ -76,6 +77,7 @@ namespace cbm::algo::kfp SetCounterName(ECounter::TracksWUnphysicalBeta, "tracks w/ beta > 1"); SetCounterName(ECounter::PionsDca, "raw pion candidates"); SetCounterName(ECounter::ProtonsDca, "raw proton candidates"); + SetCounterName(ECounter::PrimaryDca, "number of primary particles"); SetCounterName(ECounter::Pions, "pion candidates"); SetCounterName(ECounter::Protons, "proton candidates"); SetCounterName(ECounter::EventsTotal, "all events"); diff --git a/algo/kfp/KfpV0FinderQa.cxx b/algo/kfp/KfpV0FinderQa.cxx index ffc903e2a..703f067f9 100644 --- a/algo/kfp/KfpV0FinderQa.cxx +++ b/algo/kfp/KfpV0FinderQa.cxx @@ -57,7 +57,8 @@ void V0FinderQa::Exec(const RecoResults& recoEvent, const V0Finder& v0Finder) const auto& particleInfo{v0Finder.GetParticleInfo()[iTrk]}; const auto& trkParFst{(v0Finder.GetTrackAssignedParams()[iTrk]).first}; bool bPdgDefined = (particleInfo.fPdg != V0Finder::kUndefPdg); - fvphDcaAll->Fill(bPdgDefined ? particleInfo.fDca : -999); + // All particles with defined DCA (primaries + secondary pions and protons) + fvphDcaAll->Fill(std::isnan(particleInfo.fDca) ? -999 : particleInfo.fDca); fvphBetaAll->Fill(particleInfo.fBeta); if (bPdgDefined) { if (particleInfo.fPdg == -211) { @@ -75,15 +76,15 @@ void V0FinderQa::Exec(const RecoResults& recoEvent, const V0Finder& v0Finder) for (uint32_t iTrk = 0; iTrk < tracks.size(); ++iTrk) { const auto& particleInfo{v0Finder.GetParticleInfo()[iTrk]}; bool bPdgDefined = (particleInfo.fPdg != V0Finder::kUndefPdg); - fvphDcaAll->Fill(bPdgDefined ? particleInfo.fDca : -999); - fvphBetaAll->Fill(-999); + fvphDcaAll->Fill(std::isnan(particleInfo.fDca) ? -999 : particleInfo.fDca); + fvphBetaAll->Fill(-9999); if (bPdgDefined) { if (particleInfo.fPdg == -211) { - fvphBetaPion->Fill(-999); - fvphMomPion->Fill(-999); + fvphBetaPion->Fill(-9999); + fvphMomPion->Fill(-9999); } else if (particleInfo.fPdg == 2212) { - fvphBetaProton->Fill(-999); + fvphBetaProton->Fill(-9999); } } } diff --git a/algo/qa/hitfind/TofHitfindQaParameters.cxx b/algo/qa/hitfind/TofHitfindQaParameters.cxx index 95251731a..3cb2f35b8 100644 --- a/algo/qa/hitfind/TofHitfindQaParameters.cxx +++ b/algo/qa/hitfind/TofHitfindQaParameters.cxx @@ -29,10 +29,10 @@ HitfindQaParameters::HitfindQaParameters(const HitfindSetup& hitSetup) auto& rpcPar = rpcs.emplace_back(); rpcPar.address = address; rpcPar.chAddresses.resize(rpc.chanPar.size()); - L_(info) << "RPC: " << CbmTofAddress::ToString(address); + L_(debug) << "RPC: " << CbmTofAddress::ToString(address); for (int iCh = 0; iCh < rpcPar.chAddresses.size(); ++iCh) { rpcPar.chAddresses[iCh] = rpc.chanPar[iCh].address; - L_(info) << "----> ch: " << CbmTofAddress::ToString(rpcPar.chAddresses[iCh]); + L_(debug) << "----> ch: " << CbmTofAddress::ToString(rpcPar.chAddresses[iCh]); } iUniqueRpcId++; } diff --git a/algo/qa/trigger/V0TriggerQa.h b/algo/qa/trigger/V0TriggerQa.h index 6f1aa13dc..fff885f86 100644 --- a/algo/qa/trigger/V0TriggerQa.h +++ b/algo/qa/trigger/V0TriggerQa.h @@ -56,9 +56,9 @@ namespace cbm::algo::evbuild static constexpr int kPairZVertexB{120}; ///< Track pair z vertex: n bins static constexpr double kPairZVertexL{-60.}; ///< Track pair z vertex: lower bound [cm] static constexpr double kPairZVertexU{+60.}; ///< Track pair z vertex: upper bound [cm] - static constexpr int kPairDcaB{100}; ///< Track pair DCA: n bins - static constexpr double kPairDcaL{-2.}; ///< Track pair DCA: lower bound [cm] - static constexpr double kPairDcaU{+2.}; ///< Track pair DCA: upper bound [cm] + static constexpr int kPairDcaB{300}; ///< Track pair DCA: n bins + static constexpr double kPairDcaL{-0.5}; ///< Track pair DCA: lower bound [cm] + static constexpr double kPairDcaU{+5.5}; ///< Track pair DCA: upper bound [cm] //* Histograms qa::H1D* fphPairDeltaT{nullptr}; ///< Track pair delta T diff --git a/algo/trigger/V0Trigger.cxx b/algo/trigger/V0Trigger.cxx index 49cd41825..e3ff8ef9f 100644 --- a/algo/trigger/V0Trigger.cxx +++ b/algo/trigger/V0Trigger.cxx @@ -34,7 +34,7 @@ namespace cbm::algo::evbuild float time2 = trackIter2->fParPV.GetTime(); if (fpQa->IsActive()) { - fpQa->fphPairDeltaT->Fill(time1 - time2); + fpQa->fphPairDeltaT->Fill(time2 - time1); } if (time2 < time1) { diff --git a/external/InstallParameter.cmake b/external/InstallParameter.cmake index 342e33541..67356a801 100644 --- a/external/InstallParameter.cmake +++ b/external/InstallParameter.cmake @@ -1,5 +1,5 @@ -set(PARAMETER_VERSION 125dc2b53e6123739a19deabd9465e4fe568a5dc) # 2025/02/24 -set(PARAMETER_SRC_URL "https://git.cbm.gsi.de/CbmSoft/cbmroot_parameter.git") +set(PARAMETER_VERSION 4d23b9bfddd5e61fd347ba2090fc215ea72b5f32) # 2025/02/24 +set(PARAMETER_SRC_URL "https://git.cbm.gsi.de/s.zharko/cbmroot_parameter.git") download_project_if_needed(PROJECT Parameter_source GIT_REPOSITORY ${PARAMETER_SRC_URL} -- GitLab