47 fM = SetModelDynCast<TEveCalo3D>(obj);
77 const Float_t v1[3] = { a[0] - c[0], a[1] - c[1], a[2] - c[2] };
78 const Float_t v2[3] = { b[0] - c[0], b[1] - c[1], b[2] - c[2] };
80 out[0] = v1[1] * v2[2] - v1[2] * v2[1];
81 out[1] = v1[2] * v2[0] - v1[0] * v2[2];
82 out[2] = v1[0] * v2[1] - v1[1] * v2[0];
90 using namespace TMath;
112 for (
Int_t i=0; i<=nx; ++i)
115 if (eta >= transF && (eta > etaMin && eta < etaMax))
120 for (
Int_t j=1; j<=ny; ++j)
126 glVertex3f(r*
Cos(phiL), r*
Sin(phiL), z);
127 glVertex3f(r*
Cos(phiU), r*
Sin(phiU), z);
130 }
else if (eta <= transB && (eta > etaMin && eta < etaMax)) {
134 for (
Int_t j=1; j<=ny; ++j)
140 glVertex3f(r*
Cos(phiL), r*
Sin(phiL), z);
141 glVertex3f(r*
Cos(phiU), r*
Sin(phiU), z);
157 for (
Int_t j=1; j<=ny; ++j)
163 glVertex3f( r1*
Cos(phiU), r1*
Sin(phiU), zEF);
164 glVertex3f( r2*
Cos(phiU), r2*
Sin(phiU), zEF);
165 glVertex3f( r1*
Cos(phiL), r1*
Sin(phiL), zEF);
166 glVertex3f( r2*
Cos(phiL), r2*
Sin(phiL), zEF);
182 for (
Int_t j=1; j<=ny; ++j)
188 glVertex3f(r1*
Cos(phiU), r1*
Sin(phiU), zEB);
189 glVertex3f(r2*
Cos(phiU), r2*
Sin(phiU), zEB);
190 glVertex3f(r1*
Cos(phiL), r1*
Sin(phiL), zEB);
191 glVertex3f(r2*
Cos(phiL), r2*
Sin(phiL), zEB);
202 using namespace TMath;
220 for(
Int_t i=0; i<=nx; i++)
223 if (eta<=transF && eta>=transB && (etaMin < eta && eta < etaMax))
227 for (
Int_t j=1; j<=ny; j++)
233 glVertex3f(rB*
Cos(phiL), rB*
Sin(phiL), z);
234 glVertex3f(rB*
Cos(phiU), rB*
Sin(phiU), z);
254 for (
Int_t j=1; j<=ny; j++)
262 glVertex3f(x, y, zB);
263 glVertex3f(x, y, zF);
266 glVertex3f(x, y, zB);
267 glVertex3f(x, y, zF);
283 glPushAttrib(GL_ENABLE_BIT | GL_DEPTH_BUFFER_BIT);
285 glDepthMask(GL_FALSE);
287 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
401 using namespace TMath;
405 Float_t z1In, z1Out, z2In, z2Out;
471 using namespace TMath;
472 Float_t z1, r1In, r1Out, z2, r2In, r2Out;
511 pnts[0] = r1Out*cos1;
512 pnts[1] = r1Out*sin1;
516 pnts[0] = r1Out*cos2;
517 pnts[1] = r1Out*sin2;
521 pnts[0] = r2Out*cos2;
522 pnts[1] = r2Out*sin2;
526 pnts[0] = r2Out*cos1;
527 pnts[1] = r2Out*sin1;
550 glPushAttrib(GL_ENABLE_BIT | GL_LINE_BIT | GL_POLYGON_BIT);
551 glEnable(GL_LIGHTING);
552 glEnable(GL_NORMALIZE);
554 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
559 Int_t prevTower = -1;
570 if (tower != prevTower)
609 glPushAttrib(GL_ENABLE_BIT | GL_LINE_BIT | GL_POLYGON_BIT);
610 glDisable(GL_LIGHTING);
611 glDisable(GL_CULL_FACE);
612 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
625 glGetFloatv(GL_DEPTH_RANGE,dr);
627 glDepthRange(dr[0], 0.8*dr[1]);
629 glDepthRange(dr[0], dr[1]);
TEveRGBAPalette * AssertPalette()
Make sure the TEveRGBAPalette pointer is not null.
virtual Bool_t ShouldDLCache(const TGLRnrCtx &rnrCtx) const
Override from TGLObject.
vCellId_t & GetCellsSelected()
TEveCaloData * GetData() const
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Bool_t SecSelection() const
virtual TAxis * GetEtaBins() const
TEveCalo3DGL()
Constructor.
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const
GL rendering.
std::vector< CellId_t >::iterator vCellId_i
static void ColorTransparency(Color_t color_index, Char_t transparency=0)
Set color from color_index and ROOT-style transparency (default 0).
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
Bool_t GetRnrEndCapFrame() const
Bool_t GetRnrBarrelFrame() const
Float_t GetPhiMax() const
Float_t GetForwardEndCapPos() const
Float_t GetTransitionEtaBackward() const
Get transition eta between barrel and backward end-cap cells.
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.
T etaMax()
Function providing the maximum possible value of pseudorapidity for a non-zero rho, in the Scalar type with the largest dynamic range.
TEveCaloData::vCellId_t fCellList
void DrawSelectedCells(TEveCaloData::vCellId_t cells) const
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Bool_t IsDrawPassOutlineLine() const
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
Concrete physical shape - a GL drawable.
Float_t GetEtaMin() const
Bool_t GetValueIsColor() const
static Float_t EtaToTheta(Float_t eta)
void RenderGridEndCap() const
Render end cap grid.
const UChar_t * CArr() const
virtual void DrawHighlight(TGLRnrCtx &rnrCtx, const TGLPhysicalShape *ps, Int_t lvl=-1) const
Draw polygons in highlight mode.
std::vector< Float_t > fOffset
Float_t GetPhiMin() const
Base-class for direct OpenGL renderers.
std::vector< CellId_t > vCellId_t
static UInt_t LockColor()
Prevent further color changes.
static UInt_t UnlockColor()
Allow color changes.
virtual Bool_t SetModel(TObject *obj, const Option_t *opt=0)
Set model object.
TObject * fExternalObj
first replica
void CrossProduct(const Float_t a[3], const Float_t b[3], const Float_t c[3], Float_t out[3]) const
Calculate cross-product.
Float_t GetFrameWidth() const
virtual void BuildCellIdCache()
Build list of drawn cell IDs. See TEveCalo3DGL::DirectDraw().
Class to manage histogram axis.
Float_t GetTransitionEtaForward() const
Get transition eta between barrel and forward end-cap cells.
void ProcessSelection(vCellId_t &sel_cells, TGLSelectRecord &rec)
Process newly selected cells with given select-record.
Standard selection record including information about containing scene and details ob out selected ob...
OpenGL renderer class for TEveCalo3D.
virtual void SetBBox()
Set bounding box.
Cell geometry inner structure.
virtual void GetCellData(const CellId_t &id, CellData_t &data) const =0
Char_t fFrameTransparency
vCellId_t & GetCellsHighlighted()
void RenderGrid(TGLRnrCtx &rnrCtx) const
Draw frame reading eta, phi axis.
void RenderGridBarrel() const
Render barrel grid.
void SetupColorHeight(Float_t value, Int_t slice, Float_t &height) const
Set color and height for a given value and slice using slice color or TEveRGBAPalette.
Float_t GetBarrelRadius() const
virtual Bool_t ShouldDLCache(const TGLRnrCtx &rnrCtx) const
Decide if display-list should be used for this pass rendering, as determined by rnrCtx.
void RenderBox(const Float_t pnts[8]) const
Render box with given points.
Float_t GetEtaMax() const
UInt_t GetItem(Int_t i) const
static Bool_t IsU1IntervalContainedByMinMax(Float_t minM, Float_t maxM, Float_t minQ, Float_t maxQ)
Return true if interval Q is contained within interval M for U1 variables.
Bool_t CellInEtaPhiRng(TEveCaloData::CellData_t &) const
Returns true if given cell is in the ceta phi range.
virtual TAxis * GetPhiBins() const
Mother of all ROOT objects.
you should not use this method at all Int_t Int_t z
TGLColor & Selection(Int_t i)
void RenderBarrelCell(const TEveCaloData::CellGeom_t &cell, Float_t towerH, Float_t &offset) const
Render barrel cell.
Float_t GetBackwardEndCapPos() const
void RenderEndCapCell(const TEveCaloData::CellGeom_t &cell, Float_t towerH, Float_t &offset) const
Render an endcap cell.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Cell data inner structure.
static Float_t LineWidth()
Get the line-width, taking the global scaling into account.
Visualization of a calorimeter event data in 3D.
virtual void ProcessSelection(TGLRnrCtx &rnrCtx, TGLSelectRecord &rec)
Processes tower selection.
TGLColorSet & ColorSet()
Return reference to current color-set (top of the stack).
Float_t Value(Bool_t) const
Return energy value associated with the cell, usually Et.