Skip to content

Commit acda30d

Browse files
authored
MFT: Display bins outside acceptance (#2085)
* Updated header file for outside of acceptance bins. * Updated header file for ouside of acceptance bins. * Updated utils tabels for outside of acceptance mapping. * New code for displaying outside of acceptance bins. * New code for displaying outside of acceptance bins. * Updated utils tabels of outside of acceptance mapping. * New code for displaying outside of acceptance bins. * New code for displaying outside of acceptance bins.
1 parent c5b3420 commit acda30d

5 files changed

Lines changed: 138 additions & 0 deletions

File tree

Modules/MFT/include/MFT/QcMFTClusterCheck.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ class QcMFTClusterCheck : public o2::quality_control::checker::CheckInterface
5050
bool mFirstCall;
5151
std::vector<int> mMaskedChips;
5252
std::vector<string> mChipMapName;
53+
std::vector<string> mOutsideAccName;
5354

5455
void readMaskedChips(std::shared_ptr<MonitorObject> mo);
5556
void createMaskedChipsNames();
57+
void createOutsideAccNames();
5658

5759
// to form the name of the masked chips histograms
5860
int mHalf[936] = { 0 };

Modules/MFT/include/MFT/QcMFTDigitCheck.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ class QcMFTDigitCheck : public o2::quality_control::checker::CheckInterface
4949
bool mFirstCall;
5050
std::vector<int> mMaskedChips;
5151
std::vector<string> mChipMapName;
52+
std::vector<string> mOutsideAccName;
5253

5354
void readMaskedChips(std::shared_ptr<MonitorObject> mo);
5455
void createMaskedChipsNames();
56+
void createOutsideAccNames();
5557

5658
// to form the name of the masked chips histograms
5759
int mHalf[936] = { 0 };

Modules/MFT/include/MFT/QcMFTUtilTables.h

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,60 @@ class QcMFTUtilTables
351351
{ 17, -14, 14, 5, 0, 15 },
352352
{ 17, -14, 14, 5, 0, 15 },
353353
};
354+
355+
// binX for outside acceptance (-1 due to uneven number of empty bins different parts of the detector)
356+
int mBinX[20][21] = {
357+
// half0
358+
{ 1, 2, 3, 4, 8, 9, 10, 11, 12, 1, 11, 12, 5, 6, 7, -1, -1, -1, -1, -1, -1 },
359+
{ 1, 2, 3, 4, 5, 9, 10, 11, 12, 1, 2, 12, 6, 7, 8, -1, -1, -1, -1, -1, -1 },
360+
{ 1, 2, 3, 4, 8, 9, 10, 11, 12, 1, 11, 12, 5, 6, 7, -1, -1, -1, -1, -1, -1 },
361+
{ 1, 2, 3, 4, 5, 9, 10, 11, 12, 1, 2, 12, 6, 7, 8, -1, -1, -1, -1, -1, -1 },
362+
{ 1, 2, 3, 11, 12, 13, 1, 13, 6, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
363+
{ 1, 2, 3, 11, 12, 13, 1, 13, 6, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
364+
{ 1, 2, 3, 4, 5, 11, 12, 13, 14, 15, 16, 1, 2, 14, 15, 16, 6, 7, 8, 9, 10 },
365+
{ 1, 2, 3, 4, 5, 6, 12, 13, 14, 15, 16, 1, 2, 3, 15, 16, 7, 8, 9, 10, 11 },
366+
{ 1, 2, 3, 4, 14, 15, 16, 17, 1, 2, 16, 17, 7, 8, 9, 10, 11, -1, -1, -1, -1 },
367+
{ 1, 2, 3, 4, 14, 15, 16, 17, 1, 2, 16, 17, 7, 8, 9, 10, 11, -1, -1, -1, -1 },
368+
369+
// half1
370+
{ 6, 7, 8, 1, 2, 12, 1, 2, 3, 4, 5, 9, 10, 11, 12, -1, -1, -1, -1, -1, -1 },
371+
{ 5, 6, 7, 1, 11, 12, 1, 2, 3, 4, 8, 9, 10, 11, 12, -1, -1, -1, -1, -1, -1 },
372+
{ 6, 7, 8, 1, 2, 12, 1, 2, 3, 4, 5, 9, 10, 11, 12, -1, -1, -1, -1, -1, -1 },
373+
{ 5, 6, 7, 1, 11, 12, 1, 2, 3, 4, 8, 9, 10, 11, 12, -1, -1, -1, -1, -1, -1 },
374+
{ 6, 7, 8, 1, 13, 1, 2, 3, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
375+
{ 6, 7, 8, 1, 13, 1, 2, 3, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
376+
{ 7, 8, 9, 10, 11, 1, 2, 3, 15, 16, 1, 2, 3, 4, 5, 6, 12, 13, 14, 15, 16 },
377+
{ 6, 7, 8, 9, 10, 1, 2, 14, 15, 16, 1, 2, 3, 4, 5, 11, 12, 13, 14, 15, 16 },
378+
{ 7, 8, 9, 10, 11, 1, 2, 16, 17, 1, 2, 3, 4, 14, 15, 16, 17, -1, -1, -1, -1 },
379+
{ 7, 8, 9, 10, 11, 1, 2, 16, 17, 1, 2, 3, 4, 14, 15, 16, 17, -1, -1, -1, -1 },
380+
};
381+
382+
// binY for outside acceptance (-1 due to uneven number of empty bins different parts of the detector)
383+
int mBinY[20][21] = {
384+
// half0
385+
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 4, 4, 4, -1, -1, -1, -1, -1, -1 },
386+
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 4, 4, 4, -1, -1, -1, -1, -1, -1 },
387+
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 4, 4, 4, -1, -1, -1, -1, -1, -1 },
388+
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 4, 4, 4, -1, -1, -1, -1, -1, -1 },
389+
{ 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
390+
{ 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
391+
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5 },
392+
{ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5 },
393+
{ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 5, 5, 5, 5, 5, -1, -1, -1, -1 },
394+
{ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 5, 5, 5, 5, 5, -1, -1, -1, -1 },
395+
396+
// half1
397+
{ 1, 1, 1, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, -1, -1, -1, -1, -1, -1 },
398+
{ 1, 1, 1, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, -1, -1, -1, -1, -1, -1 },
399+
{ 1, 1, 1, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, -1, -1, -1, -1, -1, -1 },
400+
{ 1, 1, 1, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, -1, -1, -1, -1, -1, -1 },
401+
{ 1, 1, 1, 3, 3, 4, 4, 4, 4, 4, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
402+
{ 1, 1, 1, 3, 3, 4, 4, 4, 4, 4, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
403+
{ 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 },
404+
{ 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 },
405+
{ 1, 1, 1, 1, 1, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, -1, -1, -1, -1 },
406+
{ 1, 1, 1, 1, 1, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, -1, -1, -1, -1 },
407+
};
354408
};
355409
} // namespace o2::quality_control_modules::mft
356410

Modules/MFT/src/QcMFTClusterCheck.cxx

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
#include <TLatex.h>
2727
#include <TList.h>
2828
#include <TPaveText.h>
29+
#include <TBox.h>
30+
#include <TPad.h>
31+
#include <TCanvas.h>
2932
// O2
3033
#include <DataFormatsITSMFT/NoiseMap.h>
3134
#include <ITSMFTReconstruction/ChipMappingMFT.h>
@@ -193,6 +196,18 @@ void QcMFTClusterCheck::createMaskedChipsNames()
193196
}
194197
}
195198

199+
void QcMFTClusterCheck::createOutsideAccNames()
200+
{
201+
for (int iHalf = 0; iHalf < 2; iHalf++) {
202+
for (int iDisk = 0; iDisk < 5; iDisk++) {
203+
for (int iFace = 0; iFace < 2; iFace++) {
204+
mOutsideAccName.push_back(Form("ChipOccupancyMaps/Half_%d/Disk_%d/Face_%d/mClusterChipOccupancyMap",
205+
iHalf, iDisk, iFace));
206+
}
207+
}
208+
}
209+
}
210+
196211
void QcMFTClusterCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult)
197212
{
198213
// set up masking of dead chips once
@@ -201,6 +216,7 @@ void QcMFTClusterCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality chec
201216
readMaskedChips(mo);
202217
getChipMapData();
203218
createMaskedChipsNames();
219+
createOutsideAccNames();
204220
}
205221
// print skull in maps to display dead chips
206222
int nMaskedChips = mMaskedChips.size();
@@ -217,6 +233,32 @@ void QcMFTClusterCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality chec
217233
tl->Draw();
218234
}
219235
}
236+
237+
QcMFTUtilTables MFTTable;
238+
for (int iHalf = 0; iHalf < 2; iHalf++) {
239+
for (int iDisk = 0; iDisk < 5; iDisk++) {
240+
for (int iFace = 0; iFace < 2; iFace++) {
241+
int idx = (iDisk * 2 + iFace) + (10 * iHalf);
242+
if (mo->getName().find(mOutsideAccName[idx]) != std::string::npos) {
243+
// LOGF(info, "Name: %s", mo->getName());
244+
auto* h = dynamic_cast<TH2F*>(mo->getObject());
245+
// TBox *b = new TBox();
246+
for (int i = 0; i < 21; i++) {
247+
int binX = MFTTable.mBinX[idx][i];
248+
int binY = MFTTable.mBinY[idx][i];
249+
if (binX == -1 || binY == -1)
250+
continue;
251+
TBox* b = new TBox(h->GetXaxis()->GetBinLowEdge(binX), h->GetYaxis()->GetBinLowEdge(binY), h->GetXaxis()->GetBinWidth(binX) + h->GetXaxis()->GetBinLowEdge(binX), h->GetYaxis()->GetBinWidth(binY) + h->GetYaxis()->GetBinLowEdge(binY));
252+
b->SetFillStyle(4055);
253+
b->SetFillColor(15);
254+
h->GetListOfFunctions()->Add(b);
255+
b->Draw();
256+
}
257+
}
258+
}
259+
}
260+
}
261+
220262
if (mo->getName().find("mClusterOccupancySummary") != std::string::npos) {
221263
auto* hOccupancySummary = dynamic_cast<TH2F*>(mo->getObject());
222264
TPaveText* msg1 = new TPaveText(0.05, 0.9, 0.35, 1.0, "NDC NB");

Modules/MFT/src/QcMFTDigitCheck.cxx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
#include <TLatex.h>
2727
#include <TList.h>
2828
#include <TPaveText.h>
29+
#include <TBox.h>
30+
#include <TPad.h>
31+
#include <TCanvas.h>
2932
// O2
3033
#include <DataFormatsITSMFT/NoiseMap.h>
3134
#include <ITSMFTReconstruction/ChipMappingMFT.h>
@@ -156,6 +159,17 @@ void QcMFTDigitCheck::createMaskedChipsNames()
156159
}
157160
}
158161

162+
void QcMFTDigitCheck::createOutsideAccNames()
163+
{
164+
for (int iHalf = 0; iHalf < 2; iHalf++) {
165+
for (int iDisk = 0; iDisk < 5; iDisk++) {
166+
for (int iFace = 0; iFace < 2; iFace++) {
167+
mOutsideAccName.push_back(Form("ChipOccupancyMaps/Half_%d/Disk_%d/Face_%d/mDigitChipOccupancyMap", iHalf, iDisk, iFace));
168+
}
169+
}
170+
}
171+
}
172+
159173
void QcMFTDigitCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult)
160174
{
161175
// set up masking of dead chips once
@@ -164,6 +178,7 @@ void QcMFTDigitCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkR
164178
readMaskedChips(mo);
165179
getChipMapData();
166180
createMaskedChipsNames();
181+
createOutsideAccNames();
167182
}
168183
// print skull in maps to display dead chips
169184
int nMaskedChips = mMaskedChips.size();
@@ -181,6 +196,29 @@ void QcMFTDigitCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkR
181196
}
182197
}
183198

199+
QcMFTUtilTables MFTTable;
200+
for (int iHalf = 0; iHalf < 2; iHalf++) {
201+
for (int iDisk = 0; iDisk < 5; iDisk++) {
202+
for (int iFace = 0; iFace < 2; iFace++) {
203+
int idx = (iDisk * 2 + iFace) + (10 * iHalf);
204+
if (mo->getName().find(mOutsideAccName[idx]) != std::string::npos) {
205+
auto* h = dynamic_cast<TH2F*>(mo->getObject());
206+
for (int i = 0; i < 21; i++) {
207+
int binX = MFTTable.mBinX[idx][i];
208+
int binY = MFTTable.mBinY[idx][i];
209+
if (binX == -1 || binY == -1)
210+
continue;
211+
TBox* b = new TBox(h->GetXaxis()->GetBinLowEdge(binX), h->GetYaxis()->GetBinLowEdge(binY), h->GetXaxis()->GetBinWidth(binX) + h->GetXaxis()->GetBinLowEdge(binX), h->GetYaxis()->GetBinWidth(binY) + h->GetYaxis()->GetBinLowEdge(binY));
212+
b->SetFillStyle(4055);
213+
b->SetFillColor(15);
214+
h->GetListOfFunctions()->Add(b);
215+
b->Draw();
216+
}
217+
}
218+
}
219+
}
220+
}
221+
184222
if (mo->getName().find("mDigitOccupancySummary") != std::string::npos) {
185223
auto* hOccupancySummary = dynamic_cast<TH2F*>(mo->getObject());
186224
TPaveText* msg1 = new TPaveText(0.05, 0.9, 0.35, 1.0, "NDC NB");

0 commit comments

Comments
 (0)