From 28e903a1393e2232fa76a0899dccb5cc8b429ff7 Mon Sep 17 00:00:00 2001 From: Anton Riedel Date: Fri, 4 Jul 2025 14:03:01 +0200 Subject: [PATCH] Feat: add ratio plots to TrackClusters QA task --- Detectors/TPC/qc/src/TrackClusters.cxx | 12 ++++++++++-- Detectors/TPC/qc/src/Tracks.cxx | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Detectors/TPC/qc/src/TrackClusters.cxx b/Detectors/TPC/qc/src/TrackClusters.cxx index bcc071920e2e9..f57a35c395d58 100644 --- a/Detectors/TPC/qc/src/TrackClusters.cxx +++ b/Detectors/TPC/qc/src/TrackClusters.cxx @@ -35,16 +35,21 @@ struct binning { double max; }; +const binning binsClusters{160, 0., 160.}; const binning binsSharedClusters{160, 0., 160.}; const binning binsFoundClusters{160, 0., 160.}; const binning binsCrossedRows{160, 0., 160.}; +const binning binsRatio{150, 0., 1.5}; //______________________________________________________________________________ void TrackClusters::initializeHistograms() { TH1::AddDirectory(false); + mMapHist["clusters"].emplace_back(std::make_unique("clusters", "Clusters;NClusters;Entries", binsClusters.bins, binsClusters.min, binsClusters.max)); mMapHist["sharedClusters"].emplace_back(std::make_unique("sharedClusters", "sharedClusters;NSharedClusters;Entries", binsSharedClusters.bins, binsSharedClusters.min, binsSharedClusters.max)); - mMapHist["crossedRows"].emplace_back(std::make_unique("crossedRows", "crossedRows;crossedRows;Entries", binsCrossedRows.bins, binsCrossedRows.min, binsCrossedRows.max)); + mMapHist["crossedRows"].emplace_back(std::make_unique("crossedRows", "crossedRows;NCrossedRows;Entries", binsCrossedRows.bins, binsCrossedRows.min, binsCrossedRows.max)); + mMapHist["sharedClustersOverClusters"].emplace_back(std::make_unique("sharedClustersOverClusters", "sharedClustersOverClusters;NSharedClusters/NClusters;Entries", binsRatio.bins, binsRatio.min, binsRatio.max)); + mMapHist["clustersOverCrossedRow"].emplace_back(std::make_unique("clustersOverCrossedRow", "clustersOverCrossedRow;NClusters/NCrossedRows;Entries", binsRatio.bins, binsRatio.min, binsRatio.max)); } //______________________________________________________________________________ @@ -71,7 +76,7 @@ bool TrackClusters::processTrackAndClusters(const std::vector const auto nCls = uint8_t(track.getNClusters()); const auto eta = track.getEta(); - if (nCls < mCutMinNCls || dEdxTot < mCutMindEdxTot || abs(eta) > mCutAbsEta) { + if (nCls < mCutMinNCls || dEdxTot < mCutMindEdxTot || std::fabs(eta) > mCutAbsEta) { continue; } @@ -79,8 +84,11 @@ bool TrackClusters::processTrackAndClusters(const std::vector o2::TrackMethods::countTPCClusters(track, *clusRefs, mBufVec, *clusterIndex, shared, found, crossed); + mMapHist["clusters"][0]->Fill(found); mMapHist["sharedClusters"][0]->Fill(shared); mMapHist["crossedRows"][0]->Fill(crossed); + mMapHist["sharedClustersOverClusters"][0]->Fill(static_cast(shared) / static_cast(found)); + mMapHist["clustersOverCrossedRow"][0]->Fill(static_cast(found) / static_cast(crossed)); } return true; diff --git a/Detectors/TPC/qc/src/Tracks.cxx b/Detectors/TPC/qc/src/Tracks.cxx index 5f29e80c89d2e..dd74502540fb9 100644 --- a/Detectors/TPC/qc/src/Tracks.cxx +++ b/Detectors/TPC/qc/src/Tracks.cxx @@ -38,7 +38,7 @@ struct binning { const std::vector types{"A_Pos", "A_Neg", "C_Pos", "C_Neg"}; const binning binsDCAr{200, -5., 5.}; const binning binsDCArLargerRange{400, -10., 10.}; -const binning binsEta{200, -1., 1.}; +const binning binsEta{300, -1.5, 1.5}; const binning binsClus{120, 60., 180.}; const binning binsClusLargerRange{140, 60., 200.}; //______________________________________________________________________________