-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_DCM_float.C
More file actions
33 lines (27 loc) · 874 Bytes
/
test_DCM_float.C
File metadata and controls
33 lines (27 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
void testDCM(TString deadchannelmap)
{
using namespace o2::TPC;
TFile f(deadchannelmap);
gROOT->cd();
static const Mapper& mapper = Mapper::instance();
ROC roc(0);
CalDet<float> *dcm = nullptr;
f.GetObject("DeadChannelMap", dcm);
CalDet<float> *dcmVis = new CalDet<float>(PadSubset::ROC);
CalArray<float> dcmVisualisation = dcmVis->getCalArray(roc);
for (int irow=0; irow<63; ++irow) {
int npads = mapper.getNumberOfPadsInRowROC(roc, irow);
for (int ipad=0; ipad<npads; ++ipad) {
bool val = dcm->getValue(roc, irow, ipad);
if (val == 1) {
dcmVisualisation.setValue(irow, ipad, 10);
}
else {
dcmVisualisation.setValue(irow, ipad, 5);
}
}
}
auto visplot = Painter::getHistogram2D(dcmVisualisation);
auto cdcmVis = new TCanvas ("cdcmVis","DCM Visualization");
visplot->Draw("colz");
}