Skip to content

Commit 5a776ff

Browse files
ariedel-cernwiechula
authored andcommitted
Feat: add ratio plots to TrackClusters QA task
1 parent 1f08dbe commit 5a776ff

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Detectors/TPC/qc/src/TrackClusters.cxx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,21 @@ struct binning {
3535
double max;
3636
};
3737

38+
const binning binsClusters{160, 0., 160.};
3839
const binning binsSharedClusters{160, 0., 160.};
3940
const binning binsFoundClusters{160, 0., 160.};
4041
const binning binsCrossedRows{160, 0., 160.};
42+
const binning binsRatio{150, 0., 1.5};
4143

4244
//______________________________________________________________________________
4345
void TrackClusters::initializeHistograms()
4446
{
4547
TH1::AddDirectory(false);
48+
mMapHist["clusters"].emplace_back(std::make_unique<TH1F>("clusters", "Clusters;NClusters;Entries", binsClusters.bins, binsClusters.min, binsClusters.max));
4649
mMapHist["sharedClusters"].emplace_back(std::make_unique<TH1F>("sharedClusters", "sharedClusters;NSharedClusters;Entries", binsSharedClusters.bins, binsSharedClusters.min, binsSharedClusters.max));
47-
mMapHist["crossedRows"].emplace_back(std::make_unique<TH1F>("crossedRows", "crossedRows;crossedRows;Entries", binsCrossedRows.bins, binsCrossedRows.min, binsCrossedRows.max));
50+
mMapHist["crossedRows"].emplace_back(std::make_unique<TH1F>("crossedRows", "crossedRows;NCrossedRows;Entries", binsCrossedRows.bins, binsCrossedRows.min, binsCrossedRows.max));
51+
mMapHist["sharedClustersOverClusters"].emplace_back(std::make_unique<TH1F>("sharedClustersOverClusters", "sharedClustersOverClusters;NSharedClusters/NClusters;Entries", binsRatio.bins, binsRatio.min, binsRatio.max));
52+
mMapHist["clustersOverCrossedRow"].emplace_back(std::make_unique<TH1F>("clustersOverCrossedRow", "clustersOverCrossedRow;NClusters/NCrossedRows;Entries", binsRatio.bins, binsRatio.min, binsRatio.max));
4853
}
4954

5055
//______________________________________________________________________________
@@ -71,16 +76,19 @@ bool TrackClusters::processTrackAndClusters(const std::vector<o2::tpc::TrackTPC>
7176
const auto nCls = uint8_t(track.getNClusters());
7277
const auto eta = track.getEta();
7378

74-
if (nCls < mCutMinNCls || dEdxTot < mCutMindEdxTot || abs(eta) > mCutAbsEta) {
79+
if (nCls < mCutMinNCls || dEdxTot < mCutMindEdxTot || std::fabs(eta) > mCutAbsEta) {
7580
continue;
7681
}
7782

7883
uint8_t shared = 200, found = 0, crossed = 0;
7984

8085
o2::TrackMethods::countTPCClusters(track, *clusRefs, mBufVec, *clusterIndex, shared, found, crossed);
8186

87+
mMapHist["clusters"][0]->Fill(found);
8288
mMapHist["sharedClusters"][0]->Fill(shared);
8389
mMapHist["crossedRows"][0]->Fill(crossed);
90+
mMapHist["sharedClustersOverClusters"][0]->Fill(static_cast<float>(shared) / static_cast<float>(found));
91+
mMapHist["clustersOverCrossedRow"][0]->Fill(static_cast<float>(found) / static_cast<float>(crossed));
8492
}
8593

8694
return true;

Detectors/TPC/qc/src/Tracks.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct binning {
3838
const std::vector<std::string_view> types{"A_Pos", "A_Neg", "C_Pos", "C_Neg"};
3939
const binning binsDCAr{200, -5., 5.};
4040
const binning binsDCArLargerRange{400, -10., 10.};
41-
const binning binsEta{200, -1., 1.};
41+
const binning binsEta{300, -1.5, 1.5};
4242
const binning binsClus{120, 60., 180.};
4343
const binning binsClusLargerRange{140, 60., 200.};
4444
//______________________________________________________________________________

0 commit comments

Comments
 (0)