16#include "TGLIncludes.h"
57 fCurrentPixelsPerBin(0),
222 if (
cellList[i].fSlice > s)
continue;
271 for (
Int_t t = 0; t < s; ++t)
318 for (
Int_t i = 1; i < 4; ++i) {
332 for (
Int_t i = 0; i < 4; ++i) {
387 for (
Int_t i = 0; i < 4; ++i)
438 + (
up[2] -
dn[2]) * (
up[2] -
dn[2]));
637 + (
up[2] -
dn[2]) * (
up[2] -
dn[2]));
734 std::vector<Double_t> bins(
nbR + 1);
891 std::vector<Float_t>
vec;
893 std::vector<Float_t>
max_e;
904 if (val[s] >
max_e[bin]) {
969 if (i->MinSize() <
bws)
bws = i->MinSize();
970 if (i->fSumVal >
maxv)
maxv = i->fSumVal;
976 if (
rnrCtx.SecSelection())
1000 if ( !
rnrCtx.Highlight())
1077 else if (val > 0.01 )
1262 fCells3D = (!(
rnrCtx.RefCamera().IsOrthographic() &&
rnrCtx.RefCamera().GetCamBase().GetBaseVec(1).Z()));
1329 c1->GetGreen()*
f1 +
c2->GetGreen()*f2,
1330 c1->GetBlue() *
f1 +
c2->GetBlue() *f2);
1335 c1->GetGreen()*
f1 +
c2->GetGreen()*f2,
1336 c1->GetBlue() *
f1 +
c2->GetBlue() *f2);
1412 Int_t slice = rec.GetItem(1);
1440 if ((*it).fSlice == slice )
sel.push_back(*it);
1442 if ((*it).fSlice <= slice )
sel.push_back(*it);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char y1
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
const_iterator begin() const
const_iterator end() const
virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.)
Set color of the line axis and tick marks.
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels.
virtual void SetTitleColor(Color_t color=1)
Set color of axis title.
virtual void SetTickLength(Float_t length=0.03)
Set tick mark length.
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.)
Set color of labels.
Class to manage histogram axis.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
virtual void SetLimits(Double_t xmin, Double_t xmax)
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
The color creation and management class.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
virtual void GetEtaLimits(Double_t &min, Double_t &max) const =0
std::vector< CellId_t > vCellId_t
virtual void GetCellList(Float_t etaMin, Float_t etaMax, Float_t phi, Float_t phiRng, vCellId_t &out) const =0
void ProcessSelection(vCellId_t &sel_cells, TGLSelectRecord &rec)
Process newly selected cells with given select-record.
virtual void GetCellData(const CellId_t &id, CellData_t &data) const =0
Char_t GetSliceTransparency(Int_t slice) const
Get transparency for given slice.
virtual TAxis * GetEtaBins() const
Color_t GetSliceColor(Int_t slice) const
Get color for given slice.
vCellId_t & GetCellsHighlighted()
virtual void GetPhiLimits(Double_t &min, Double_t &max) const =0
virtual TAxis * GetPhiBins() const
vCellId_t & GetCellsSelected()
virtual void Rebin(TAxis *ax, TAxis *ay, vCellId_t &in, Bool_t et, RebinData_t &out) const =0
std::vector< CellId_t >::iterator vCellId_i
OpenGL renderer class for TEveCaloLego.
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.
EProjection_e fProjection
Char_t fPlaneTransparency
Int_t fDrawNumberCellPixels
float GetFixedHeightValIn2DMode() const
TEveCaloData::vCellId_t fCellList
bool GetHasFixedHeightIn2DMode() const
Color_t GetDataSliceColor(Int_t slice) const
Get slice color from data.
Float_t GetEtaMin() const
Bool_t AssertCellIdCache() const
Assert cell id cache is ok.
Float_t GetDataSliceThreshold(Int_t slice) const
Get threshold for given slice.
Float_t GetMaxTowerH() const
Float_t GetPhiRng() const
TEveRGBAPalette * fPalette
Float_t GetMaxVal() const
TEveCaloData * GetData() const
TEveRGBAPalette * AssertPalette()
Make sure the TEveRGBAPalette pointer is not null.
Float_t GetEtaMax() const
Float_t GetPhiMax() const
Float_t GetEtaRng() const
Bool_t CellInEtaPhiRng(TEveCaloData::CellData_t &) const
Returns true if given cell is in the ceta phi range.
Float_t GetPhiMin() const
const UChar_t * ColorFromValue(Int_t val) const
void Set(const Float_t *v)
void SetLabelAlign(TGLFont::ETextAlignH_e, TGLFont::ETextAlignV_e)
Set label align.
TGLVector3 & RefTitlePos()
void SetAttAxis(TAttAxis *a)
void SetLabelPixelFontSize(Int_t fs)
TGLVector3 & RefTMOff(Int_t i)
void SetFontMode(TGLFont::EMode m)
Int_t GetLabelPixelFontSize() const
void PaintAxis(TGLRnrCtx &ctx, TAxis *ax)
GL render TAxis.
void SetTitlePixelFontSize(Int_t fs)
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
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
first replica
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
External object is a fake.
Bool_t fDLCache
display-list validity bit-field
16 component (4x4) transform matrix - column MAJOR as per GL.
Base-class for direct OpenGL renderers.
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.
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
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.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
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.
std::vector< Float_t > fSliceData
Float_t * GetSliceVals(Int_t bin)
static uint64_t sum(uint64_t i)