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;
114 eta = ax->GetBinUpEdge(i);
115 if (eta >= transF && (eta > etaMin && eta <
etaMax))
119 z =
Sign(zEF, ax->GetBinLowEdge(i));
122 phiL = ay->GetBinLowEdge(j);
123 phiU = ay->GetBinUpEdge(j);
130 }
else if (eta <= transB && (eta > etaMin && eta <
etaMax)) {
133 z =
Sign(zEB, ax->GetBinLowEdge(i));
136 phiL = ay->GetBinLowEdge(j);
137 phiU = ay->GetBinUpEdge(j);
159 phiL = ay->GetBinLowEdge(j);
160 phiU = ay->GetBinUpEdge(j);
184 phiL = ay->GetBinLowEdge(j);
185 phiU = ay->GetBinUpEdge(j);
202 using namespace TMath;
222 eta = ax->GetBinUpEdge(i);
223 if (eta<=transF && eta>=transB && (etaMin < eta && eta <
etaMax))
229 phiU = ay->GetBinUpEdge(j);
230 phiL = ay->GetBinLowEdge(j);
233 glVertex3f(rB*
Cos(phiL), rB*
Sin(phiL),
z);
234 glVertex3f(rB*
Cos(phiU), rB*
Sin(phiU),
z);
256 phiU = ay->GetBinUpEdge(j);
257 phiL = ay->GetBinLowEdge(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.
vCellId_t & GetCellsSelected()
const UChar_t * CArr() const
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
virtual TAxis * GetPhiBins() const
TEveCalo3DGL()
Constructor.
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).
void RenderGridBarrel() const
Render barrel grid.
TVector3 cross(const TVector3 &v1, const TVector3 &v2)
void DrawSelectedCells(TEveCaloData::vCellId_t cells) const
virtual Bool_t ShouldDLCache(const TGLRnrCtx &rnrCtx) const
Decide if display-list should be used for this pass rendering, as determined by rnrCtx.
Float_t GetForwardEndCapPos() const
Bool_t CellInEtaPhiRng(TEveCaloData::CellData_t &) const
Returns true if given cell is in the ceta phi range.
Bool_t GetRnrBarrelFrame() const
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 box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Concrete physical shape - a GL drawable.
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.
static Float_t EtaToTheta(Float_t eta)
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const
GL rendering.
std::vector< Float_t > fOffset
Base-class for direct OpenGL renderers.
void RenderGridEndCap() const
Render end cap grid.
std::vector< CellId_t > vCellId_t
void RenderGrid(TGLRnrCtx &rnrCtx) const
Draw frame reading eta, phi axis.
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
Float_t GetEtaMin() const
void RenderBarrelCell(const TEveCaloData::CellGeom_t &cell, Float_t towerH, Float_t &offset) const
Render barrel cell.
virtual void BuildCellIdCache()
Build list of drawn cell IDs. See TEveCalo3DGL::DirectDraw().
TEveCaloData * GetData() const
Class to manage histogram axis.
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...
unsigned int r1[N_CITIES]
Float_t GetPhiMin() const
Bool_t GetRnrEndCapFrame() const
OpenGL renderer class for TEveCalo3D.
void RenderBox(const Float_t pnts[8]) const
Render box with given points.
Float_t GetTransitionEtaBackward() const
Get transition eta between barrel and backward end-cap cells.
virtual void SetBBox()
Set bounding box.
Cell geometry inner structure.
virtual void GetCellData(const CellId_t &id, CellData_t &data) const =0
Bool_t SecSelection() const
Bool_t IsDrawPassOutlineLine() const
Char_t fFrameTransparency
vCellId_t & GetCellsHighlighted()
Float_t Value(Bool_t) const
Return energy value associated with the cell, usually Et.
virtual void DrawHighlight(TGLRnrCtx &rnrCtx, const TGLPhysicalShape *ps, Int_t lvl=-1) const
Draw polygons in highlight mode.
Float_t GetTransitionEtaForward() const
Get transition eta between barrel and forward end-cap cells.
UInt_t GetItem(Int_t i) const
Float_t GetPhiMax() 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.
Float_t GetEtaMax() const
Mother of all ROOT objects.
TGLColor & Selection(Int_t i)
virtual TAxis * GetEtaBins() const
Float_t GetBarrelRadius() const
Float_t GetFrameWidth() const
void RenderEndCapCell(const TEveCaloData::CellGeom_t &cell, Float_t towerH, Float_t &offset) const
Render an endcap cell.
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 GetBackwardEndCapPos() const
Bool_t GetValueIsColor() const
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.
unsigned int r2[N_CITIES]
virtual Bool_t ShouldDLCache(const TGLRnrCtx &rnrCtx) const
Override from TGLObject.