Project
Loading...
Searching...
No Matches
IDCDrawHelper.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
13#include "TPCBase/Painter.h"
14#include "TPCBase/Mapper.h"
15#include "TH2Poly.h"
16#include "TCanvas.h"
17#include "TLatex.h"
18#include "TGraphErrors.h"
19#include "TMultiGraph.h"
20#include <fmt/format.h>
21#include "TROOT.h"
22
23unsigned int o2::tpc::IDCDrawHelper::getPad(const unsigned int pad, const unsigned int region, const unsigned int row, const Side side)
24{
25 return (side == Side::A) ? pad : (Mapper::PADSPERROW[region][row] - pad - 1); // C-Side is mirrored
26}
27
28void o2::tpc::IDCDrawHelper::drawSector(const IDCDraw& idc, const unsigned int startRegion, const unsigned int endRegion, const unsigned int sector, const std::string zAxisTitle, const std::string filename, const float minZ, const float maxZ)
29{
31 TH2Poly* poly = o2::tpc::painter::makeSectorHist("hSector", "Sector;local #it{x} (cm);local #it{y} (cm); #it{IDC}");
32 poly->SetContour(255);
33 poly->SetTitle(nullptr);
34 poly->GetYaxis()->SetTickSize(0.002f);
35 poly->GetYaxis()->SetTitleOffset(0.7f);
36 poly->GetZaxis()->SetTitleOffset(1.3f);
37 poly->SetStats(0);
38 poly->GetZaxis()->SetTitle(zAxisTitle.data());
39 poly->Sumw2();
40 if (minZ < maxZ) {
41 poly->SetMinimum(minZ);
42 poly->SetMaximum(maxZ);
43 }
44
45 TCanvas* can = new TCanvas("can", "can", 2000, 1400);
46 can->SetRightMargin(0.14f);
47 can->SetLeftMargin(0.06f);
48 can->SetTopMargin(0.04f);
49 poly->Draw("colz");
50
51 const float sign = (Sector(sector).side() == Side::A) ? 1 : -1;
52 for (unsigned int region = startRegion; region < endRegion; ++region) {
53 for (unsigned int irow = 0; irow < Mapper::ROWSPERREGION[region]; ++irow) {
54 for (unsigned int ipad = 0; ipad < Mapper::PADSPERROW[region][irow]; ++ipad) {
55 const auto padNum = Mapper::getGlobalPadNumber(irow, ipad, region);
56 const auto coordinate = coords[padNum]; // start from y=-13 to +13
57 const float yPos = sign * static_cast<float>(coordinate.yVals[0] + coordinate.yVals[2]) / 2; // local coordinate system is mirrored for C side
58 const float xPos = static_cast<float>(coordinate.xVals[0] + coordinate.xVals[2]) / 2;
59 poly->Fill(xPos, yPos, idc.getIDC(sector, region, irow, ipad));
60 }
61 }
62 }
63
66
67 TLatex latex;
68 latex.DrawLatexNDC(.07, .9, fmt::format("Sector {}", sector).data());
69 if (!filename.empty()) {
70 can->SaveAs(filename.data());
71 delete poly;
72 delete can;
73 }
74}
75
76void o2::tpc::IDCDrawHelper::drawSide(const IDCDraw& idc, const o2::tpc::Side side, const std::string zAxisTitle, const std::string filename, const float minZ, const float maxZ)
77{
78 TH2Poly* poly = o2::tpc::IDCDrawHelper::drawSide(idc, side, zAxisTitle);
79 if (minZ < maxZ) {
80 poly->SetMinimum(minZ);
81 poly->SetMaximum(maxZ);
82 }
83
84 TCanvas* can = ((TVirtualPad*)gROOT->GetSelectedPad()) ? ((TCanvas*)((TVirtualPad*)gROOT->GetSelectedPad()->GetCanvas())) : new TCanvas("can", "can", 650, 600);
85 can->SetTopMargin(0.04f);
86 can->SetRightMargin(0.14f);
87 can->SetLeftMargin(0.1f);
88 poly->Draw("colz");
90
91 std::string sideName = (side == Side::A) ? "A-Side" : "C-Side";
92 TLatex latex;
93 latex.DrawLatexNDC(.13, .9, sideName.data());
94
95 if (!filename.empty()) {
96 can->SaveAs(filename.data());
97 delete poly;
98 delete can;
99 }
100}
101
102TH2Poly* o2::tpc::IDCDrawHelper::drawSide(const IDCDraw& idc, const o2::tpc::Side side, const std::string zAxisTitle)
103{
105 TH2Poly* poly = o2::tpc::painter::makeSideHist(side);
106 poly->SetContour(255);
107 poly->SetTitle(nullptr);
108 poly->GetXaxis()->SetTitleOffset(1.2f);
109 poly->GetYaxis()->SetTitleOffset(1.3f);
110 poly->GetZaxis()->SetTitleOffset(1.3f);
111 poly->GetZaxis()->SetTitle(zAxisTitle.data());
112 poly->GetZaxis()->SetMaxDigits(3); // force exponential axis
113 poly->SetStats(0);
114 poly->Sumw2();
115
116 unsigned int sectorStart = (side == Side::A) ? 0 : o2::tpc::SECTORSPERSIDE;
117 unsigned int sectorEnd = (side == Side::A) ? o2::tpc::SECTORSPERSIDE : Mapper::NSECTORS;
118 for (unsigned int sector = sectorStart; sector < sectorEnd; ++sector) {
119 for (unsigned int region = 0; region < Mapper::NREGIONS; ++region) {
120 for (unsigned int irow = 0; irow < Mapper::ROWSPERREGION[region]; ++irow) {
121 for (unsigned int ipad = 0; ipad < Mapper::PADSPERROW[region][irow]; ++ipad) {
122 const auto padNum = Mapper::getGlobalPadNumber(irow, ipad, region);
123 const float angDeg = 10.f + sector * 20;
124 auto coordinate = coords[padNum]; // start from y=-13 to +13
125 coordinate.rotate(angDeg); // start from y=1.2 to +28..
126 const float yPos = static_cast<float>(coordinate.yVals[0] + coordinate.yVals[1] + coordinate.yVals[2] + coordinate.yVals[3]) / 4;
127 const float xPos = static_cast<float>(coordinate.xVals[0] + coordinate.xVals[1] + coordinate.xVals[2] + coordinate.xVals[3]) / 4;
128 const auto padTmp = getPad(ipad, region, irow, side); // IDCs are in pad coordinates. pad0 A side: y=1.2, pad0 C side: y=28.1
129 poly->Fill(xPos, yPos, idc.getIDC(sector, region, irow, padTmp));
130 }
131 }
132 }
133 }
134
135 return poly;
136}
137
138TH1F* o2::tpc::IDCDrawHelper::drawSide(const IDCDraw& idc, std::string_view type, const o2::tpc::Side side, int nbins1D, float xMin1D, float xMax1D)
139{
140 static const Mapper& mapper = Mapper::instance();
141 const int bufferSize = TH1::GetDefaultBufferSize();
142 TH1::SetDefaultBufferSize(Sector::MAXSECTOR * mapper.getPadsInSector());
143 std::string sideName = (side == Side::A) ? "A" : "C";
144 TH1F* h = new TH1F(fmt::format("h_{}_{}side", type.data(), sideName).data(), fmt::format("{} ({}-Side)", type.data(), sideName).data(), nbins1D, xMin1D, xMax1D);
145
146 unsigned int sectorStart = (side == Side::A) ? 0 : o2::tpc::SECTORSPERSIDE;
147 unsigned int sectorEnd = (side == Side::A) ? o2::tpc::SECTORSPERSIDE : Mapper::NSECTORS;
148 for (unsigned int sector = sectorStart; sector < sectorEnd; ++sector) {
149 for (unsigned int region = 0; region < Mapper::NREGIONS; ++region) {
150 for (unsigned int irow = 0; irow < Mapper::ROWSPERREGION[region]; ++irow) {
151 for (unsigned int ipad = 0; ipad < Mapper::PADSPERROW[region][irow]; ++ipad) {
152 const auto padTmp = getPad(ipad, region, irow, side);
153 h->Fill(idc.getIDC(sector, region, irow, padTmp));
154 }
155 }
156 }
157 }
158 TH1::SetDefaultBufferSize(bufferSize);
159 return h;
160}
161
163{
164 const auto& mapper = Mapper::instance();
165
166 unsigned int sectorStart = (side == Side::A) ? 0 : o2::tpc::SECTORSPERSIDE;
167 unsigned int sectorEnd = (side == Side::A) ? o2::tpc::SECTORSPERSIDE : Mapper::NSECTORS;
168 for (unsigned int sector = sectorStart; sector < sectorEnd; ++sector) {
169 for (unsigned int region = 0; region < Mapper::NREGIONS; ++region) {
170 for (unsigned int irow = 0; irow < Mapper::ROWSPERREGION[region]; ++irow) {
171 for (unsigned int ipad = 0; ipad < Mapper::PADSPERROW[region][irow]; ++ipad) {
172 const auto padTmp = getPad(ipad, region, irow, side);
173 const auto padNum = Mapper::getGlobalPadNumber(irow, ipad, region);
174 const float padX = mapper.padCentre(padNum).x();
175 hist.Fill(padX, idc.getIDC(sector, region, irow, padTmp));
176 }
177 }
178 }
179 }
180}
181
182void o2::tpc::IDCDrawHelper::drawIDCZeroStackCanvas(const IDCDraw& idc, const o2::tpc::Side side, const std::string_view type, int nbins1D, float xMin1D, float xMax1D, TCanvas& outputCanvas, int integrationInterval)
183{
184 size_t pad = 1;
185
186 outputCanvas.Divide(4, 18);
187 unsigned int sectorStart = (side == Side::A) ? 0 : o2::tpc::SECTORSPERSIDE;
188 unsigned int sectorEnd = (side == Side::A) ? o2::tpc::SECTORSPERSIDE : Mapper::NSECTORS;
189 for (unsigned int sector = sectorStart; sector < sectorEnd; ++sector) {
190 auto hIROC = new TH1F(fmt::format("h1_{}_IROC_{:02}", type.data(), sector).data(), fmt::format("{} distribution IROC {:02} {}-Side", type.data(), sector, (side == Side::A) ? "A" : "C").data(), nbins1D, xMin1D, xMax1D);
191 auto hOROC1 = new TH1F(fmt::format("h1_{}_OROC1_{:02}", type.data(), sector).data(), fmt::format("{} distribution OROC1 {:02} {}-Side", type.data(), sector, (side == Side::A) ? "A" : "C").data(), nbins1D, xMin1D, xMax1D);
192 auto hOROC2 = new TH1F(fmt::format("h1_{}_OROC2_{:02}", type.data(), sector).data(), fmt::format("{} distribution OROC2 {:02} {}-Side", type.data(), sector, (side == Side::A) ? "A" : "C").data(), nbins1D, xMin1D, xMax1D);
193 auto hOROC3 = new TH1F(fmt::format("h1_{}_OROC3_{:02}", type.data(), sector).data(), fmt::format("{} distribution OROC3 {:02} {}-Side", type.data(), sector, (side == Side::A) ? "A" : "C").data(), nbins1D, xMin1D, xMax1D);
194 for (unsigned int region = 0; region < Mapper::NREGIONS; ++region) {
195 for (unsigned int irow = 0; irow < Mapper::ROWSPERREGION[region]; ++irow) {
196 for (unsigned int ipad = 0; ipad < Mapper::PADSPERROW[region][irow]; ++ipad) {
197 const auto padTmp = getPad(ipad, region, irow, side);
198 if (region < 4) {
199 hIROC->Fill(idc.getIDC(sector, region, irow, padTmp));
200 } else if (region < 6) {
201 hOROC1->Fill(idc.getIDC(sector, region, irow, padTmp));
202 } else if (region < 8) {
203 hOROC2->Fill(idc.getIDC(sector, region, irow, padTmp));
204 } else {
205 hOROC3->Fill(idc.getIDC(sector, region, irow, padTmp));
206 }
207 }
208 }
209 }
210 outputCanvas.cd(pad);
211 hIROC->Draw();
212 hIROC->GetXaxis()->SetTitle(fmt::format("{}", type.data()).data());
213 hIROC->SetTitleOffset(1.05, "XY");
214 hIROC->SetTitleSize(0.05, "XY");
215 pad++;
216 outputCanvas.cd(pad);
217 hOROC1->Draw();
218 hOROC1->GetXaxis()->SetTitle(fmt::format("{}", type.data()).data());
219 hOROC1->SetTitleOffset(1.05, "XY");
220 hOROC1->SetTitleSize(0.05, "XY");
221 pad++;
222 outputCanvas.cd(pad);
223 hOROC2->Draw();
224 hOROC2->GetXaxis()->SetTitle(fmt::format("{}", type.data()).data());
225 hOROC2->SetTitleOffset(1.05, "XY");
226 hOROC2->SetTitleSize(0.05, "XY");
227 pad++;
228 outputCanvas.cd(pad);
229 hOROC3->Draw();
230 hOROC3->GetXaxis()->SetTitle(fmt::format("{}", type.data()).data());
231 hOROC3->SetTitleOffset(1.05, "XY");
232 hOROC3->SetTitleSize(0.05, "XY");
233 pad++;
234
235 // associate histograms to canvas
236 hIROC->SetBit(TObject::kCanDelete);
237 hOROC1->SetBit(TObject::kCanDelete);
238 hOROC2->SetBit(TObject::kCanDelete);
239 hOROC3->SetBit(TObject::kCanDelete);
240 }
241}
242
244{
245 std::string stype = "IDC";
246 switch (type) {
247 case IDCType::IDC:
248 default: {
249 return fmt::format("#it{{{}}} (ADC)", stype);
250 break;
251 }
252 case IDCType::IDCZero: {
253 return fmt::format("#it{{{}_{{0}}}} (ADC)", stype);
254 break;
255 }
257 switch (compression) {
259 default: {
260 return fmt::format("#Delta#it{{{}}}", stype);
261 break;
262 }
264 return fmt::format("#Delta#it{{{}}}_{{medium compressed}}", stype);
265 break;
266 }
268 return fmt::format("#Delta#it{{{}}}_{{high compressed}}", stype);
269 break;
270 }
271 }
272 case IDCType::IDCOne: {
273 return fmt::format("#it{{{}}}_{{1}}", stype);
274 break;
275 }
276 }
277}
278
279void o2::tpc::IDCDrawHelper::drawSideGIF(const IDCDrawGIF& idcs, const unsigned int slices, const std::string zAxisTitle, const std::string filename, const float minZ, const float maxZ, const int run)
280{
281 const int gifSpeed = 40;
282
283 TCanvas can("canvas", "canvas", 3350, 2000);
284 TPad padIDCA("padIDCA", "padIDCA", 0, 0.25, 0.5, 1);
285 TPad padIDCC("padIDCC", "padIDCC", 0.5, 0.25, 1, 1);
286 TPad padIDCOne("padIDCOne", "padIDCOne", 0, 0, 1, 0.25);
287
288 const float tm = 0.04f;
289 const float rm = 0.14f;
290 const float lm = 0.1f;
291 const float bm = 0.2f;
292 padIDCA.SetTopMargin(tm);
293 padIDCA.SetRightMargin(rm);
294 padIDCA.SetLeftMargin(lm);
295 padIDCC.SetTopMargin(tm);
296 padIDCC.SetRightMargin(rm);
297 padIDCC.SetLeftMargin(lm);
298 padIDCOne.SetTopMargin(tm);
299 padIDCOne.SetRightMargin(rm / 2);
300 padIDCOne.SetLeftMargin(lm / 2);
301 padIDCOne.SetBottomMargin(bm);
302
303 padIDCA.Draw();
304 padIDCC.Draw();
305 padIDCOne.Draw();
306
307 std::array<TGraphErrors, SIDES> graphIDCOne;
308 std::array<TGraphErrors, SIDES> graphIDCOneSlice;
309 TMultiGraph multiGraph;
310 float minY = 1000;
311 float maxY = -1;
312 const float widthLine = 0.005f;
313 const float idcWH = 0.5; // IDC width half: 1ms/2
314 for (unsigned int sideT = 0; sideT < SIDES; ++sideT) {
315 const Side side = (sideT == 0) ? Side::A : Side::C;
316 const auto col = (sideT == 0) ? (kGreen + 2) : kBlue;
317 graphIDCOne[sideT].SetFillColorAlpha(col, 0.3);
318 graphIDCOne[sideT].SetLineWidth(5);
319 graphIDCOneSlice[sideT] = graphIDCOne[sideT];
320 graphIDCOneSlice[sideT].Set(1);
321 graphIDCOneSlice[sideT].SetFillColorAlpha(col, 1);
322 for (unsigned int slice = 0; slice < slices; ++slice) {
323 const auto idc = idcs.mIDCOneFunc(side, slice);
324 if (idc < minY) {
325 minY = idc;
326 }
327 if (idc > maxY) {
328 maxY = idc;
329 }
330 graphIDCOne[sideT].AddPoint(slice + idcWH, idc);
331 graphIDCOne[sideT].SetPointError(slice, idcWH, widthLine);
332 }
333 multiGraph.Add(&graphIDCOne[sideT]);
334 }
335
336 const int font = 63;
337 const int fontsize = 50;
338 multiGraph.GetXaxis()->SetTitleFont(font);
339 multiGraph.GetXaxis()->SetLabelFont(font);
340 multiGraph.GetYaxis()->SetTitleFont(font);
341 multiGraph.GetYaxis()->SetLabelFont(font);
342 multiGraph.GetXaxis()->SetLabelSize(fontsize);
343 multiGraph.GetXaxis()->SetTitleSize(fontsize);
344 multiGraph.GetYaxis()->SetLabelSize(fontsize);
345 multiGraph.GetYaxis()->SetTitleSize(fontsize);
346 multiGraph.GetXaxis()->SetTitle("#it{t} (ms)");
347 multiGraph.GetXaxis()->SetTitleOffset(0.9f);
348 multiGraph.GetYaxis()->SetTitleOffset(1.5f);
349 multiGraph.GetYaxis()->SetTitle(IDCDrawHelper::getZAxisTitle(IDCType::IDCOne).data());
350 multiGraph.SetMinimum(0.9 * minY);
351 multiGraph.SetMaximum(1.1 * maxY);
352 multiGraph.GetXaxis()->SetLimits(0, slices);
353
354 for (unsigned int slice = 0; slice < slices; ++slice) {
355 LOGP(info, "Drawing slice {} from {}", slice, slices - 1);
357 std::function<float(const unsigned int, const unsigned int, const unsigned int, const unsigned int)> idcFunc = [slice, idcs](const unsigned int sector, const unsigned int region, const unsigned int irow, const unsigned int pad) {
358 return idcs.mIDCFunc(sector, region, irow, pad, slice);
359 };
360 drawFun.mIDCFunc = idcFunc;
361
362 TH2Poly* poly[SIDES]{nullptr, nullptr};
363 for (int sideT = 0; sideT < SIDES; ++sideT) {
364 const Side side = (sideT == 0) ? Side::A : Side::C;
365 poly[sideT] = o2::tpc::IDCDrawHelper::drawSide(drawFun, side, zAxisTitle);
366 poly[sideT]->GetXaxis()->SetTitleFont(font);
367 poly[sideT]->GetXaxis()->SetLabelFont(font);
368 poly[sideT]->GetYaxis()->SetTitleFont(font);
369 poly[sideT]->GetYaxis()->SetLabelFont(font);
370 poly[sideT]->GetXaxis()->SetLabelSize(fontsize);
371 poly[sideT]->GetXaxis()->SetTitleSize(fontsize);
372 poly[sideT]->GetYaxis()->SetLabelSize(fontsize);
373 poly[sideT]->GetYaxis()->SetTitleSize(fontsize);
374
375 if (minZ < maxZ) {
376 poly[sideT]->SetMinimum(minZ);
377 poly[sideT]->SetMaximum(maxZ);
378 }
379
380 if (sideT == 0) {
381 padIDCA.cd();
382 } else {
383 padIDCC.cd();
384 }
385
386 poly[sideT]->Draw("colz");
387 const std::string sideName = (side == Side::A) ? "A-Side" : "C-Side";
388 TLatex latex;
389 const auto col = (side == Side::A) ? (kGreen + 2) : kBlue;
390 latex.SetTextColor(col);
391 latex.DrawLatexNDC(0.13, 0.9, sideName.data());
392 if (run > 0) {
393 latex.DrawLatexNDC(0.62, 0.9, fmt::format("Run {}", run).data());
394 }
395 graphIDCOneSlice[sideT].SetPoint(0, slice + idcWH, idcs.mIDCOneFunc(side, slice));
396 graphIDCOneSlice[sideT].SetPointError(0, idcWH, widthLine);
397 }
398
399 padIDCOne.cd();
400 multiGraph.Draw("ZA E2");
401 graphIDCOneSlice[0].Draw("Z E2 SAME");
402 graphIDCOneSlice[1].Draw("Z E2 SAME");
403
404 can.Print(Form("%s.gif+%i", filename.data(), gifSpeed));
405 if (slice == (slices - 1)) {
406 can.Print(Form("%s.gif++", filename.data()));
407 }
408
409 delete poly[0];
410 delete poly[1];
411 }
412}
helper class for drawing IDCs per region/side
uint32_t side
Definition RawData.h:0
uint32_t col
Definition RawData.h:4
Class for time synchronization of RawReader instances.
static void drawIDCZeroStackCanvas(const IDCDraw &idc, const o2::tpc::Side side, const std::string_view type, const int nbins1D, const float xMin1D, const float xMax1D, TCanvas &outputCanvas, int integrationInterval)
static void drawSideGIF(const IDCDrawGIF &idcs, const unsigned int slices, const std::string zAxisTitle, const std::string filename="IDCs", const float minZ=0, const float maxZ=-1, const int run=-1)
make a GIF of IDCs for A and C side and the 1D IDCs
static std::string getZAxisTitle(const IDCType type, const IDCDeltaCompression compression=IDCDeltaCompression::NO)
static void drawRadialProfile(const IDCDraw &idc, TH2F &hist, const o2::tpc::Side side)
static void drawSector(const IDCDraw &idc, const unsigned int startRegion, const unsigned int endRegion, const unsigned int sector, const std::string zAxisTitle, const std::string filename, const float minZ=0, const float maxZ=-1)
static void drawSide(const IDCDraw &idc, const o2::tpc::Side side, const std::string zAxisTitle, const std::string filename, const float minZ=0, const float maxZ=-1)
static GlobalPadNumber getGlobalPadNumber(const unsigned int lrow, const unsigned int pad, const unsigned int region)
Definition Mapper.h:64
static const std::vector< unsigned int > PADSPERROW[NREGIONS]
number of pads per row in region
Definition Mapper.h:567
static Mapper & instance(const std::string mappingDir="")
Definition Mapper.h:44
static constexpr unsigned int ROWSPERREGION[NREGIONS]
number of pad rows for region
Definition Mapper.h:532
static constexpr unsigned int NSECTORS
total number of sectors in the TPC
Definition Mapper.h:526
static constexpr unsigned int NREGIONS
total number of regions in one sector
Definition Mapper.h:527
static constexpr unsigned short getPadsInSector()
Definition Mapper.h:414
Side side() const
Definition Sector.h:96
static constexpr int MAXSECTOR
Definition Sector.h:44
GLfloat GLfloat GLfloat GLfloat GLfloat maxY
Definition glcorearb.h:2910
GLsizei const GLubyte GLsizei GLenum const void * coords
Definition glcorearb.h:5468
GLfloat minY
Definition glcorearb.h:2910
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
GLboolean * data
Definition glcorearb.h:298
GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat maxZ
Definition glcorearb.h:2910
GLfloat GLfloat minZ
Definition glcorearb.h:2910
constexpr unsigned char SECTORSPERSIDE
Definition Defs.h:40
IDCType
IDC types.
@ IDC
integrated and grouped IDCs
@ IDCOne
IDC1: I_1(t) = <I(r,\phi,t) / I_0(r,\phi)>_{r,\phi}.
@ IDCZero
IDC0: I_0(r,\phi) = <I(r,\phi,t)>_t.
@ IDCDelta
IDCDelta: \Delta I(r,\phi,t) = I(r,\phi,t) / ( I_0(r,\phi) * I_1(t) )
constexpr unsigned char SIDES
Definition Defs.h:41
Side
TPC readout sidE.
Definition Defs.h:35
@ A
Definition Defs.h:35
@ C
Definition Defs.h:36
IDCDeltaCompression
IDC Delta IDC Compression types.
@ HIGH
high compression using char (data compression ratio ~5.5 when stored in CCDB)
@ NO
no compression using floats
@ MEDIUM
medium compression using short (data compression ratio 2 when stored in CCDB)
std::string filename()
std::function< float(const o2::tpc::Side side, const unsigned int)> mIDCOneFunc
function returning the value which will be drawn for side, slice
std::function< float(const unsigned int, const unsigned int, const unsigned int, const unsigned int, const unsigned int)> mIDCFunc
function returning the value which will be drawn for sector, region, row, pad
std::function< float(const unsigned int, const unsigned int, const unsigned int, const unsigned int)> mIDCFunc
function returning the value which will be drawn for sector, region, row, pad
float getIDC(const unsigned int sector, const unsigned int region, const unsigned int row, const unsigned int pad) const
static TH2Poly * makeSectorHist(const std::string_view name="hSector", const std::string_view title="Sector;local #it{x} (cm);local #it{y} (cm)", const float xMin=83.65f, const float xMax=247.7f, const float yMin=-43.7f, const float yMax=43.7f, const Type type=Type::Pad)
static void drawSectorLocalPadNumberPoly(short padTextColor=kBlack, float lineScalePS=1)
static TH2Poly * makeSideHist(Side side, const Type type=Type::Pad)
static void drawSectorInformationPoly(short regionLineColor=kRed, short rowTextColor=kRed)
static void drawSectorsXY(Side side, int sectorLineColor=920, int sectorTextColor=1)
draw sector boundaris, side name and sector numbers
static std::vector< PadCoordinates > getPadCoordinatesSector()
create a vector of pad corner coordinate for one full sector
std::vector< int > row