Skip to content

Commit 69c43d5

Browse files
committed
GPU QA: Fix some histogram names / titles / axes
1 parent 3c161fc commit 69c43d5

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

GPU/GPUTracking/qa/GPUQA.cxx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ static const constexpr char* CLUSTER_NAMES[GPUQA::N_CLS_HIST] = {"Correctly atta
176176
static const constexpr char* CLUSTER_TITLES[GPUQA::N_CLS_TYPE] = {"Clusters Pt Distribution / Attachment", "Clusters Pt Distribution / Attachment (relative to all clusters)", "Clusters Pt Distribution / Attachment (integrated)"};
177177
static const constexpr char* CLUSTER_NAMES_SHORT[GPUQA::N_CLS_HIST] = {"Attached", "Fake", "AttachAdjacent", "FakeAdjacent", "FoundTracks", "Physics", "Protected", "All"};
178178
static const constexpr char* CLUSTER_TYPES[GPUQA::N_CLS_TYPE] = {"", "Ratio", "Integral"};
179+
static const constexpr char* REJECTED_NAMES[3] = {"All", "Rejected", "Fraction"};
179180
static const constexpr int32_t COLORS_HEX[COLORCOUNT] = {0xB03030, 0x00A000, 0x0000C0, 0x9400D3, 0x19BBBF, 0xF25900, 0x7F7F7F, 0xFFD700, 0x07F707, 0x07F7F7, 0xF08080, 0x000000};
180181

181182
static const constexpr int32_t CONFIG_DASHED_MARKERS = 0;
@@ -525,7 +526,7 @@ int32_t GPUQA::InitQACreateHistograms()
525526
}
526527

527528
createHist(mPadRow[0], "padrow0", "padrow0", GPUCA_ROW_COUNT, 0, GPUCA_ROW_COUNT - 1, GPUCA_ROW_COUNT, 0, GPUCA_ROW_COUNT - 1);
528-
createHist(mPadRow[1], "padrow0", "padrow0", 100.f, -0.2f, 0.2f, GPUCA_ROW_COUNT, 0, GPUCA_ROW_COUNT - 1);
529+
createHist(mPadRow[1], "padrow1", "padrow1", 100.f, -0.2f, 0.2f, GPUCA_ROW_COUNT, 0, GPUCA_ROW_COUNT - 1);
529530
}
530531

531532
if (mQATasks & taskTrackStatistics) {
@@ -2863,14 +2864,16 @@ int32_t GPUQA::DrawQAHistograms(TObjArray* qcout)
28632864
}
28642865
mPPadRow[i]->cd();
28652866
e->SetOption("colz");
2866-
e->GetXaxis()->SetTitle("First MC Pad Row");
2867+
e->SetTitle("First Track Pad Row");
2868+
e->GetXaxis()->SetTitle(i ? "Phi (sector)" : "First MC Pad Row");
28672869
e->GetYaxis()->SetTitle("First Pad Row");
28682870
e->Draw();
28692871
mCPadRow[i]->cd();
2870-
snprintf(name, 2048, "plots/padrow%d.pdf", i);
2872+
static const constexpr char* PADROW_NAMES[2] = {"MC", "Phi"};
2873+
snprintf(name, 2048, "plots/padRow%s.pdf", PADROW_NAMES[i]);
28712874
mCPadRow[i]->Print(name);
28722875
if (mConfig.writeRootFiles) {
2873-
snprintf(name, 2048, "plots/padrow%d.root", i);
2876+
snprintf(name, 2048, "plots/padRow%s.root", PADROW_NAMES[i]);
28742877
mCPadRow[i]->Print(name);
28752878
}
28762879
}
@@ -3052,13 +3055,14 @@ int32_t GPUQA::DrawQAHistograms(TObjArray* qcout)
30523055
mClRej[i]->Write();
30533056
}
30543057
mPClRej[i]->cd();
3058+
mClRej[i]->SetTitle(REJECTED_NAMES[i]);
30553059
mClRej[i]->SetOption("colz");
30563060
mClRej[i]->Draw();
30573061
mCClRej[i]->cd();
3058-
snprintf(name, 2048, "plots/clustersRej%d.pdf", i);
3062+
snprintf(name, 2048, "plots/clustersRej%d%s.pdf", i, REJECTED_NAMES[i]);
30593063
mCClRej[i]->Print(name);
30603064
if (mConfig.writeRootFiles) {
3061-
snprintf(name, 2048, "plots/clustersRej%d.root", i);
3065+
snprintf(name, 2048, "plots/clustersRej%d%s.root", i, REJECTED_NAMES[i]);
30623066
mCClRej[i]->Print(name);
30633067
}
30643068
}
@@ -3092,11 +3096,14 @@ int32_t GPUQA::DrawQAHistograms(TObjArray* qcout)
30923096
delete proj2;
30933097
e->SetMinimum(-0.02);
30943098
e->SetMaximum(0.22);
3099+
e->SetTitle("Rejected Clusters");
3100+
e->GetXaxis()->SetTitle("Pad Row");
3101+
e->GetYaxis()->SetTitle("Rejected Clusters (fraction)");
30953102
e->Draw(k == 0 ? "" : "same");
30963103
}
3097-
mPClRejP->Print("plots/clustersRejP.pdf"); // TODO: Add option to write pngs
3104+
mPClRejP->Print("plots/clustersRejProjected.pdf"); // TODO: Add option to write pngs
30983105
if (mConfig.writeRootFiles) {
3099-
mPClRejP->Print("plots/clustersRejP.root");
3106+
mPClRejP->Print("plots/clustersRejProjected.root");
31003107
}
31013108
}
31023109
}

0 commit comments

Comments
 (0)