16#include "TGLIncludes.h"
150 if (x1 < fM->GetEtaMin()) x1 =
fM->GetEtaMin();
151 if (x2 >
fM->GetEtaMax()) x2 =
fM->GetEtaMax();
153 if (y1 < fM->GetPhiMin()) y1 =
fM->GetPhiMin();
154 if (y2 >
fM->GetPhiMax()) y2 =
fM->GetPhiMax();
159 glNormal3f(0, 0, -1);
160 glVertex3f(x2, y2, z1);
161 glVertex3f(x2, y1, z1);
162 glVertex3f(x1, y1, z1);
163 glVertex3f(x1, y2, z1);
166 glVertex3f(x2, y2, z2);
167 glVertex3f(x1, y2, z2);
168 glVertex3f(x1, y1, z2);
169 glVertex3f(x2, y1, z2);
173 glVertex3f(x2, y2, z1);
174 glVertex3f(x2, y2, z2);
175 glVertex3f(x2, y1, z2);
176 glVertex3f(x2, y1, z1);
178 glNormal3f(-1, 0, 0);
179 glVertex3f(x1, y2, z1);
180 glVertex3f(x1, y1, z1);
181 glVertex3f(x1, y1, z2);
182 glVertex3f(x1, y2, z2);
186 glVertex3f(x2, y2, z1);
187 glVertex3f(x1, y2, z1);
188 glVertex3f(x1, y2, z2);
189 glVertex3f(x2, y2, z2);
191 glNormal3f(0, -1, 0);
192 glVertex3f(x2, y1, z1);
193 glVertex3f(x2, y1, z2);
194 glVertex3f(x1, y1, z2);
195 glVertex3f(x1, y1, z1);
211 Int_t nSlices =
fM->fData->GetNSlices();
212 for (
Int_t s = 0; s < nSlices; ++s)
214 if (dlMap.empty() || dlMap[s] == 0)
215 dlMap[s] = glGenLists(1);
217 glNewList(dlMap[s], GL_COMPILE);
219 for (
UInt_t i = 0; i < cellList.size(); ++i)
221 if (cellList[i].fSlice > s)
continue;
222 if (cellList[i].fTower != prevTower) {
224 prevTower = cellList[i].fTower;
227 fM->fData->GetCellData(cellList[i], cellData);
228 if (s == cellList[i].fSlice)
230 if (selection) glLoadName(i);
236 offset += cellData.
Value(
fM->fPlotEt);
248 Int_t nSlices =
fM->fData->GetNSlices();
253 for (
Int_t s = 0; s < nSlices; ++s)
255 if (dlMap.empty() || dlMap[s] == 0)
256 dlMap[s] = glGenLists(1);
258 glNewList(dlMap[s], GL_COMPILE);
270 for (
Int_t t = 0; t < s; ++t)
277 if (selection) glLoadName(bin);
280 fEtaAxis->GetBinWidth(i), y1-y0, vals[s]);
296 glGetDoublev(GL_MODELVIEW_MATRIX, mm);
297 glGetIntegerv(GL_VIEWPORT, vp);
298 GLdouble projX[4], projY[4], projZ[4];
302 cornerX[0] = x0; cornerY[0] = y0;
303 cornerX[1] = x1; cornerY[1] = y0;
304 cornerX[2] = x1; cornerY[2] = y1;
305 cornerX[3] = x0; cornerY[3] = y1;
307 gluProject(cornerX[0], cornerY[0], 0, mm, pm, vp, &projX[0], &projY[0], &projZ[0]);
308 gluProject(cornerX[1], cornerY[1], 0, mm, pm, vp, &projX[1], &projY[1], &projZ[1]);
309 gluProject(cornerX[2], cornerY[2], 0, mm, pm, vp, &projX[2], &projY[2], &projZ[2]);
310 gluProject(cornerX[3], cornerY[3], 0, mm, pm, vp, &projX[3], &projY[3], &projZ[3]);
317 for (
Int_t i = 1; i < 4; ++i) {
331 for (
Int_t i = 0; i < 4; ++i) {
336 if (projZ[i] > zMin) zMin = projZ[i];
340 Int_t xyIdx = idxFront;
341 if (zMin - zt < 1
e-2) xyIdx = 0;
386 for (
Int_t i = 0; i < 4; ++i)
388 if (projZ[i] < zm && projZ[i] >= zt && i != idxFront )
394 if (idxFront == idxLeft) idxFront =idxDepthT;
428 glGetDoublev(GL_MODELVIEW_MATRIX, mm.
Arr());
429 glGetDoublev(GL_PROJECTION_MATRIX, pm);
436 + (up[1] - dn[1]) * (up[1] - dn[1])
437 + (up[2] - dn[2]) * (up[2] - dn[2]));
466 fZAxis->SetNdivisions(
fM->fNZSteps*100 + 10);
468 fZAxis->SetTitle(
fM->GetPlotEt() ?
"Et[GeV]" :
"E[GeV]");
478 fZAxis->SetLabelOffset(labelOffset);
479 fZAxis->SetTickLength(tickLength);
487 glPushAttrib(GL_ENABLE_BIT | GL_LINE_BIT);
514 glEnable(GL_LINE_STIPPLE);
515 glLineStipple(1, 0x5555);
518 for (
Int_t i = 1; i <= ondiv; ++i, hz += bw1) {
543 ax.SetTitleFont(
fM->GetData()->GetEtaBins()->GetTitleFont());
544 ax.SetLabelOffset(labelOffset);
545 ax.SetTickLength(tickLength);
556 ax.SetNdivisions(
fM->GetData()->GetEtaBins()->GetNdivisions());
557 ax.SetLimits(
fM->GetEtaMin(),
fM->GetEtaMax());
558 ax.SetTitle(
fM->GetData()->GetEtaBins()->GetTitle());
566 ax.SetNdivisions(
fM->GetData()->GetPhiBins()->GetNdivisions());
567 ax.SetLimits(
fM->GetPhiMin(),
fM->GetPhiMax());
568 ax.SetTitle(
fM->GetData()->GetPhiBins()->GetTitle());
583 fM->fData->GetEtaLimits(em, eM);
584 fM->fData->GetPhiLimits(pm, pM);
585 Double_t unit = ((eM - em) < (pM - pm)) ? (eM - em) : (pM - pm);
586 sx = (eM - em) / (
fM->GetEtaRng() * unit);
587 sy = (pM - pm) / (
fM->GetPhiRng() * unit);
592 sz =
fM->GetMaxTowerH() /
fM->fMaxValAbs;
594 else if (!
fM->fData->Empty())
605 if (
fM->GetData()->Empty())
614 ax.SetTitleFont(
fM->GetData()->GetEtaBins()->GetTitleFont());
615 ax.SetTitleSize(
TMath::Max(
fM->GetData()->GetEtaBins()->GetTitleSize(), 0.02f));
616 ax.SetLabelOffset(
TMath::Max(
fM->GetData()->GetEtaBins()->GetLabelOffset(), 0.02f));
617 ax.SetTickLength(
TMath::Max(
fM->GetData()->GetEtaBins()->GetTickLength(), 0.05f));
626 glGetDoublev(GL_MODELVIEW_MATRIX, mm.
Arr());
627 glGetDoublev(GL_PROJECTION_MATRIX, pm);
628 glGetIntegerv(GL_VIEWPORT, vp);
632 gluProject(
fM->GetEtaMin(),
fM->GetPhiMin(), 0, mm.
Arr(), pm, vp, &dn[0], &dn[1], &dn[2]);
633 gluProject(
fM->GetEtaMax(),
fM->GetPhiMax(), 0, mm.
Arr(), pm, vp, &up[0], &up[1], &up[2]);
635 + (up[1] - dn[1]) * (up[1] - dn[1])
636 + (up[2] - dn[2]) * (up[2] - dn[2]));
645 ax.SetNdivisions(
fM->GetData()->GetEtaBins()->GetNdivisions());
646 ax.SetLimits(
fM->GetEtaMin(),
fM->GetEtaMax());
647 ax.SetTitle(
fM->GetData()->GetEtaBins()->GetTitle());
648 fAxisPainter.RefTitlePos().Set(
fM->GetEtaMax(), -
fM->GetPhiRng()*(ax.GetTickLength()+ ax.GetLabelOffset()), 0 );
656 glTranslatef(0,
fM->GetPhiMin(), 0);
661 ax.SetNdivisions(
fM->GetData()->GetPhiBins()->GetNdivisions());
662 ax.SetLimits(
fM->GetPhiMin(),
fM->GetPhiMax());
663 ax.SetTitle(
fM->GetData()->GetPhiBins()->GetTitle());
664 fAxisPainter.RefTitlePos().Set(-
fM->GetEtaRng()*(ax.GetTickLength()+ ax.GetLabelOffset()),
fM->GetPhiMax(), 0);
671 glTranslatef(
fM->GetEtaMin(), 0, 0);
690 GLint vp[4]; glGetIntegerv(GL_VIEWPORT, vp);
691 Float_t viewportD =
TMath::Sqrt((vp[1] - vp[0]) * (vp[1] - vp[0]) + (vp[3] - vp[1]) * (vp[3] - vp[1]));
692 Float_t deltaToViewport = viewportD/frustD;
695 GLdouble em, eM, pm, pM;
696 fM->GetData()->GetEtaLimits(pm, pM);
697 fM->GetData()->GetPhiLimits(em, eM);
698 Int_t i0 =
fM->fData->GetEtaBins()->FindBin(
fM->GetEtaMin());
699 Int_t i1 =
fM->fData->GetEtaBins()->FindBin(
fM->GetEtaMax());
700 Int_t j0 =
fM->fData->GetPhiBins()->FindBin(
fM->GetPhiMin());
701 Int_t j1 =
fM->fData->GetPhiBins()->FindBin(
fM->GetPhiMax());
704 Float_t ppb = deltaToViewport*averageBinWidth;
707 if (
fM->fAutoRebin &&
fM->fPixelsPerBin > ppb)
710 Int_t maxGroup =
TMath::Min(
fM->fData->GetEtaBins()->GetNbins(),
fM->fData->GetPhiBins()->GetNbins())/4;
713 if (ngroup > maxGroup) ngroup = maxGroup;
729 if (bc > center) --idx0;
733 std::vector<Double_t> bins(nbR + 1);
734 for (
Int_t i = 0; i <= nbR; ++i)
738 curr->
Set(nbR, &bins[0]);
756 glVertex2f(eta0, phi0);
757 glVertex2f(eta0, phi1);
758 glVertex2f(eta1, phi0);
759 glVertex2f(eta1, phi1);
761 glVertex2f(eta0, phi0);
762 glVertex2f(eta1, phi0);
763 glVertex2f(eta0, phi1);
764 glVertex2f(eta1, phi1);
769 for (
Int_t i = 0; i<= neb; i++)
772 if (val > eta0 && val < eta1 )
774 glVertex2f(val, phi0);
775 glVertex2f(val, phi1);
781 for (
Int_t i = 1; i <= npb; i++) {
783 if (val > phi0 && val < phi1)
785 glVertex2f(eta0, val);
786 glVertex2f(eta1, val);
794 glPushAttrib(GL_ENABLE_BIT | GL_LINE_BIT | GL_POLYGON_BIT);
817 glLoadName(i->first);
819 glCallList(i->second);
826 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
827 glDisable(GL_POLYGON_OFFSET_FILL);
830 glCallList(i->second);
840 Int_t max_energy_slice, cellID=0;
843 TEveCaloData::vCellId_t::iterator currentCell = cellList.begin();
844 TEveCaloData::vCellId_t::iterator nextCell = currentCell;
852 fM->fData->GetCellData(*currentCell, currentCellData);
853 sum = max_energy = currentCellData.
Value(
fM->fPlotEt);
854 max_energy_slice = currentCell->fSlice;
855 while (nextCell != cellList.end() && currentCell->fTower == nextCell->fTower)
857 fM->fData->GetCellData(*nextCell, nextCellData);
860 if (energy > max_energy)
863 max_energy_slice = nextCell->fSlice;
870 cells2D.push_back(
Cell2D_t(cellID,
sum, max_energy_slice));
871 cells2D.back().SetGeom(currentCellData.
fEtaMin, currentCellData.
fEtaMax,
874 if (nextCell == cellList.end())
877 currentCell = nextCell;
890 std::vector<Float_t>
vec;
891 vec.assign((nEta + 2)*(nPhi + 2), 0.f);
892 std::vector<Float_t> max_e;
893 std::vector<Int_t> max_e_slice;
894 max_e.assign((nEta + 2) * (nPhi + 2), 0.f);
895 max_e_slice.assign((nEta + 2) * (nPhi + 2), -1);
899 if (rebinData.
fBinData[bin] != -1) {
903 if (val[s] > max_e[bin]) {
905 max_e_slice[bin] = s;
913 Float_t threshold =
fM->GetDataSliceThreshold(0);
914 for (
Int_t s = 1; s <
fM->fData->GetNSlices(); ++s) {
915 if (threshold >
fM->GetDataSliceThreshold(s))
916 threshold =
fM->GetDataSliceThreshold(s);
922 const Int_t bin = j * (nEta + 2) + i;
923 if (
vec[bin] > threshold && rebinData.
fBinData[bin] != -1) {
924 cells2D.push_back(
Cell2D_t(bin,
vec[bin], max_e_slice[bin]));
925 cells2D.back().SetGeom(
fEtaAxis->GetBinLowEdge(i),
fEtaAxis->GetBinUpEdge(i),
947 for (
vCell2D_i i = cells2D.begin(); i != cells2D.end(); ++i)
952 col[3] =
fM->GetData()->GetSliceTransparency(i->fMaxSlice);
954 Float_t z =
fM->GetHasFixedHeightIn2DMode() ? baseOffset : i->fSumVal;
955 glVertex3f(i->fX0, i->fY0, z);
956 glVertex3f(i->fX1, i->fY0, z);
957 glVertex3f(i->fX1, i->fY1, z);
958 glVertex3f(i->fX0, i->fY1, z);
968 if (i->MinSize() < bws) bws = i->MinSize();
969 if (i->fSumVal > maxv) maxv = i->fSumVal;
979 for (
vCell2D_i i = cells2D.begin(); i != cells2D.end(); ++i)
981 glLoadName(i->fMaxSlice);
985 Float_t z =
fM->GetHasFixedHeightIn2DMode() ? baseOffset : i->fSumVal;
986 glVertex3f(i->fX0, i->fY0, z);
987 glVertex3f(i->fX1, i->fY0, z);
988 glVertex3f(i->fX1, i->fY1, z);
989 glVertex3f(i->fX0, i->fY1, z);
1002 for (
vCell2D_i i = cells2D.begin(); i != cells2D.end(); ++i)
1005 Float_t z =
fM->GetHasFixedHeightIn2DMode() ? baseOffset : i->fSumVal;
1006 glVertex3f(i->X(), i->Y() , z);
1012 for (
vCell2D_i i = cells2D.begin(); i != cells2D.end(); ++i)
1018 Float_t z =
fM->GetHasFixedHeightIn2DMode() ? baseOffset : i->fSumVal;
1019 glVertex3f(
x - bw,
y - bw, z);
1020 glVertex3f(
x + bw,
y - bw, z);
1021 glVertex3f(
x + bw,
y + bw, z);
1022 glVertex3f(
x - bw,
y + bw, z);
1028 glPushAttrib(GL_ENABLE_BIT | GL_POLYGON_BIT);
1032 for (
vCell2D_i i = cells2D.begin(); i != cells2D.end(); ++i) {
1033 Char_t transp =
TMath::Min(100, 80 +
fM->fData->GetSliceTransparency(i->fMaxSlice) / 5);
1035 z =
fM->GetHasFixedHeightIn2DMode() ? baseOffset : i->fSumVal;
1037 glVertex3f(i->fX0, i->fY0, z);
1038 glVertex3f(i->fX1, i->fY0, z);
1039 glVertex3f(i->fX1, i->fY1, z);
1040 glVertex3f(i->fX0, i->fY1, z);
1044 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
1046 for (
vCell2D_i i = cells2D.begin(); i != cells2D.end(); ++i) {
1048 z =
fM->GetHasFixedHeightIn2DMode() ? baseOffset : i->fSumVal;
1050 glVertex3f(i->fX0, i->fY0, z);
1051 glVertex3f(i->fX1, i->fY0, z);
1052 glVertex3f(i->fX1, i->fY1, z);
1053 glVertex3f(i->fX0, i->fY1, z);
1069 for (
vCell2D_i i = cells2D.begin(); i != cells2D.end(); ++i) {
1075 txt =
Form(
"%.1f", val);
1076 else if (val > 0.01 )
1091 if (
fM->fData->GetCellsSelected().empty() &&
fM->fData->GetCellsHighlighted().empty())
1100 glScalef(sx, sy, sz);
1101 glTranslatef(-
fM->GetEta(), -
fM->fPhi, 0);
1105 glPushAttrib(GL_ENABLE_BIT | GL_LINE_BIT | GL_POLYGON_BIT);
1106 glDisable(GL_LIGHTING);
1107 glDisable(GL_CULL_FACE);
1108 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
1113 if (!
fM->fData->GetCellsHighlighted().empty())
1118 if (!
fM->fData->GetCellsSelected().empty())
1144 fM->fData->GetCellData((*i), cellData);
1145 if (
fM->CellInEtaPhiRng(cellData))
1146 cellsSelected.push_back(*i);
1154 if (
fM->fNormalizeRebin) {
1156 for (std::vector<Float_t>::iterator it = rebinDataSelected.
fSliceData.begin();
1157 it != rebinDataSelected.
fSliceData.end(); ++it)
1171 Int_t orig_slice = j->fSlice;
1172 for (
Int_t s = 0; s < orig_slice; ++s)
1175 fM->fData->GetCellData(*j, cellData);
1176 offset += cellData.
Value(
fM->fPlotEt);
1178 j->fSlice = orig_slice;
1180 fM->fData->GetCellData(*j, cellData);
1191 Int_t nSlices =
fM->fData->GetNSlices();
1197 if (rebinDataSelected.
fBinData[bin] !=-1)
1202 for (
Int_t s = 0; s < nSlices; ++s)
1210 fEtaAxis->GetBinWidth(i), y1-y0, vals[s]);
1212 offset += valsRef[s];
1227 std::set<Int_t> towers;
1230 towers.insert(j->fTower);
1237 if (towers.find(cell.
fTower) != towers.end())
1239 cells2DSelected.push_back(*i);
1256 if (!
fM->fData || !
fM->fData->GetEtaBins() || !
fM->fData->GetPhiBins())
1271 if (
fM->AssertCellIdCache() ||
fBinStep != new_bin_step)
1295 if (
fM->fNormalizeRebin)
1298 for (std::vector<Float_t>::iterator it =
fRebinData.fSliceData.begin(); it !=
fRebinData.fSliceData.end();
1315 glScalef(sx, sy, sz);
1316 glTranslatef(-
fM->GetEta(), -
fM->fPhi, 0);
1328 c1->GetGreen()*
f1 +
c2->GetGreen()*f2,
1329 c1->GetBlue() *
f1 +
c2->GetBlue() *f2);
1334 c1->GetGreen()*
f1 +
c2->GetGreen()*f2,
1335 c1->GetBlue() *
f1 +
c2->GetBlue() *f2);
1339 glPushAttrib(GL_ENABLE_BIT | GL_LINE_BIT | GL_POLYGON_BIT);
1342 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
1343 if (!
fM->fData->Empty())
1356 glEnable(GL_NORMALIZE);
1357 glEnable(GL_POLYGON_OFFSET_FILL);
1358 glPolygonOffset(0.8, 1);
1364 glDisable(GL_LIGHTING);
1381 glPushAttrib(GL_ENABLE_BIT | GL_LINE_BIT | GL_POLYGON_BIT);
1382 glDisable(GL_LIGHTING);
1384 if (
fM->fDrawHPlane) {
1385 glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
1386 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
1387 glDisable(GL_CULL_FACE);
1390 glBegin(GL_POLYGON);
1391 glVertex3f(
fM->fEtaMin,
fM->GetPhiMin(), zhp);
1392 glVertex3f(
fM->fEtaMax,
fM->GetPhiMin(), zhp);
1393 glVertex3f(
fM->fEtaMax,
fM->GetPhiMax(), zhp);
1394 glVertex3f(
fM->fEtaMin,
fM->GetPhiMax(), zhp);
1416 Int_t tower =
fM->fCellList[cell].fTower;
1417 while (cell > 0 && tower ==
fM->fCellList[cell].fTower)
1419 sel.push_back(
fM->fCellList[cell]);
1430 Int_t etaBin = cell - phiBin*(nEta+2);
1432 fM->fData->GetCellList(
fEtaAxis->GetBinCenter(etaBin),
fEtaAxis->GetBinWidth(etaBin),
1439 if ((*it).fSlice == slice ) sel.push_back(*it);
1441 if ((*it).fSlice <= slice ) sel.push_back(*it);
1447 fM->fData->ProcessSelection(sel, rec);
int Int_t
Signed integer 4 bytes (int).
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char).
char Char_t
Character 1 byte (char).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
float Float_t
Float 4 bytes (float).
const char Option_t
Option string (const char).
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Class to manage histogram axis.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
virtual Int_t FindBin(Double_t x)
Find bin number corresponding to abscissa x.
virtual void Set(Int_t nbins, Double_t xmin, Double_t xmax)
Initialize axis with fix bins.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
static Int_t GetColor(const char *hexcolor)
std::vector< CellId_t > vCellId_t
std::vector< CellId_t >::iterator vCellId_i
std::vector< Cell2D_t > vCell2D_t
void MakeQuad(Float_t x, Float_t y, Float_t z, Float_t xw, Float_t yw, Float_t zh) const
Draw an axis-aligned box using quads.
TEveVector fBackPlaneYConst[2]
TEveVector fZAxisTitlePos
void WrapTwoPi(Float_t &min, Float_t &max) const
void PrepareCell2DData(TEveCaloData::vCellId_t &cellList, vCell2D_t &cells2D) const
Prepare cells 2D data non-rebinned for drawing.
void DLCacheDrop() override
Drop all display-list definitions.
Int_t fCurrentPixelsPerBin
void DrawSelectedCells(TGLRnrCtx &rnrCtx, TEveCaloData::vCellId_t cells) const
Draw selected cells in highlight mode.
void DrawCells3D(TGLRnrCtx &rnrCtx) const
Render the calo lego-plot with OpenGL.
void DrawHistBase(TGLRnrCtx &rnrCtx) const
Draw basic histogram components: x-y grid.
TEveVector fXAxisTitlePos
void DrawCells2D(TGLRnrCtx &rnrCtx, vCell2D_t &cells2D) const
Draw cells in top view.
void DrawAxis3D(TGLRnrCtx &rnrCtx) const
Draw z-axis and z-box at the appropriate grid corner-point including tick-marks and labels.
Bool_t SetModel(TObject *obj, const Option_t *opt=nullptr) override
Set model object.
void RebinAxis(TAxis *orig, TAxis *curr) const
Rebin eta, phi axis.
void ProcessSelection(TGLRnrCtx &rnrCtx, TGLSelectRecord &rec) override
Processes tower selection from TGLViewer.
Int_t GetGridStep(TGLRnrCtx &rnrCtx) const
Calculate view-dependent grid density.
void DLCachePurge() override
Unregister all display-lists.
void DirectDraw(TGLRnrCtx &rnrCtx) const override
Draw the object.
std::vector< Cell2D_t >::iterator vCell2D_i
void GetScaleForMatrix(Float_t &sx, Float_t &sy, Float_t &sz) const
Get scale for matrix.
TEveVector fBackPlaneXConst[2]
~TEveCaloLegoGL() override
Destructor.
void SetBBox() override
Set bounding box.
void Make3DDisplayListRebin(TEveCaloData::RebinData_t &rebinData, SliceDLMap_t &map, Bool_t select) const
Create display-list that draws histogram bars for rebinned data.
void DrawHighlight(TGLRnrCtx &rnrCtx, const TGLPhysicalShape *ps, Int_t lvl=-1) const override
Draw highligted cells.
void SetAxis3DTitlePos(TGLRnrCtx &rnrCtx, Float_t x0, Float_t x1, Float_t y0, Float_t y1) const
Set the axis 3D title position.
TEveCaloLegoGL()
Constructor.
void DrawAxis2D(TGLRnrCtx &rnrCtx) const
Draw XY axis.
void Make3DDisplayList(TEveCaloData::vCellId_t &cellList, SliceDLMap_t &map, Bool_t select) const
Create display-list that draws histogram bars for non-rebinned data.
TGLAxisPainter fAxisPainter
std::map< Int_t, UInt_t > SliceDLMap_t
TEveVector fYAxisTitlePos
std::map< Int_t, UInt_t >::iterator SliceDLMap_i
void PrepareCell2DDataRebin(TEveCaloData::RebinData_t &rebinData, vCell2D_t &cells2D) const
Prepare cells 2D rebinned data for drawing.
TEveCaloData::RebinData_t fRebinData
Visualization of calorimeter data as eta/phi histogram.
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
TGLMatrix & RefLastNoPickProjM() const
const TGLMatrix & GetCamBase() const
TGLVector3 ViewportDeltaToWorld(const TGLVertex3 &worldRef, Double_t viewportXDelta, Double_t viewportYDelta, TGLMatrix *modviewMat=nullptr) const
Apply a 2D viewport delta (shift) to the projection of worldRef onto viewport, returning the resultan...
const TGLPlane & FrustumPlane(EFrustumPlane plane) const
TGLColor & Selection(Int_t i)
const UChar_t * CArr() const
Color_t GetColorIndex() const
Returns color-index representing the color.
A wrapper class for FTFont.
void Render(const char *txt, Double_t x, Double_t y, Double_t angle, Double_t mgn) const
virtual void DLCachePurge()
Purge all entries for all LODs for this drawable from the display list cache, returning the reserved ...
TObject * fExternalObj
! Also plays the role of ID.
virtual void DLCacheDrop()
Drop all entries for all LODs for this drawable from the display list cache, WITHOUT returning the re...
void PurgeDLRange(UInt_t base, Int_t size) const
Purge given display-list range.
Bool_t fDLCache
! use display list caching
16 component (4x4) transform matrix - column MAJOR as per GL.
TGLVector3 GetBaseVec(Int_t b) const
const Double_t * CArr() const
TT * SetModelDynCast(TObject *obj)
void SetAxisAlignedBBox(Float_t xmin, Float_t xmax, Float_t ymin, Float_t ymax, Float_t zmin, Float_t zmax)
Set axis-aligned bounding-box.
Concrete physical shape - a GL drawable.
const Int_t * CArr() const
Int_t Diagonal() const
Return the diagonal of the rectangle.
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Short_t SceneStyle() const
Bool_t SecSelection() const
void RegisterFontNoScale(Int_t size, Int_t file, Int_t mode, TGLFont &out)
Get font in the GL rendering context.
Bool_t IsDrawPassFilled() const
Returns true if current render-pass uses filled polygon style.
TGLColorSet & ColorSet()
Return reference to current color-set (top of the stack).
UInt_t GetItem(Int_t i) const
Standard selection record including information about containing scene and details ob out selected ob...
static void Color4ubv(const UChar_t *rgba)
Wrapper for glColor4ubv.
static UInt_t LockColor()
Prevent further color changes.
static void ColorTransparency(Color_t color_index, Char_t transparency=0)
Set color from color_index and ROOT-style transparency (default 0).
static UInt_t UnlockColor()
Allow color changes.
static void Color(const TGLColor &color)
Set color from TGLColor.
static Float_t LineWidth()
Get the line-width, taking the global scaling into account.
3 component (x/y/z) vector class.
3 component (x/y/z) vertex class.
void Set(Double_t x, Double_t y, Double_t z)
static void Optimize(Double_t A1, Double_t A2, Int_t nold, Double_t &BinLow, Double_t &BinHigh, Int_t &nbins, Double_t &BWID, Option_t *option="")
Static function to compute reasonable axis limits.
Mother of all ROOT objects.
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
constexpr Double_t Sqrt2()
Int_t FloorNint(Double_t x)
Returns the nearest integer of TMath::Floor(x).
Double_t Sqrt(Double_t x)
Returns the square root of x.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Double_t Hypot(Double_t x, Double_t y)
Returns sqrt(x*x + y*y).
Double_t Log10(Double_t x)
Returns the common (base-10) logarithm of x.
Cell data inner structure.
Float_t Value(Bool_t) const
Return energy value associated with the cell, usually Et.
std::vector< Float_t > fSliceData
std::vector< Int_t > fBinData
Float_t * GetSliceVals(Int_t bin)
static uint64_t sum(uint64_t i)