Logo ROOT  
Reference Guide
TEveCalo.cxx
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Author: Matevz Tadel 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #include "TEveCalo.h"
13 #include "TEveCaloData.h"
14 #include "TEveProjections.h"
15 #include "TEveProjectionManager.h"
16 #include "TEveRGBAPalette.h"
17 #include "TEveText.h"
18 #include "TEveTrans.h"
19 
20 #include "TClass.h"
21 #include "TMathBase.h"
22 #include "TMath.h"
23 #include "TAxis.h"
24 
25 #include "TGLUtil.h"
26 
27 #include <cassert>
28 
29 /** \class TEveCaloViz
30 \ingroup TEve
31 Base class for calorimeter data visualization.
32 See TEveCalo2D and TEveCalo3D for concrete implementations.
33 */
34 
36 
37 ////////////////////////////////////////////////////////////////////////////////
38 
39 TEveCaloViz::TEveCaloViz(TEveCaloData* data, const char* n, const char* t) :
40  TEveElement(),
41  TNamed(n, t),
43 
44  fData(0),
45  fCellIdCacheOK(kFALSE),
46 
47  fEtaMin(-10),
48  fEtaMax(10),
49 
50  fPhi(0.),
51  fPhiOffset(TMath::Pi()),
52 
53  fAutoRange(kTRUE),
54 
55  fBarrelRadius(-1.f),
56  fEndCapPosF(-1.f),
57  fEndCapPosB(-1.f),
58 
59  fPlotEt(kTRUE),
60 
61  fMaxTowerH(100),
62  fScaleAbs(kFALSE),
63  fMaxValAbs(100),
64 
65  fValueIsColor(kFALSE),
66  fPalette(0)
67 {
68  // Constructor.
69 
70  fPickable = kTRUE;
72  SetData(data);
73 }
74 
75 ////////////////////////////////////////////////////////////////////////////////
76 /// Destructor.
77 
79 {
81 }
82 
83 ////////////////////////////////////////////////////////////////////////////////
84 /// Get threshold for given slice.
85 
87 {
88  return fData->RefSliceInfo(slice).fThreshold;
89 }
90 
91 ////////////////////////////////////////////////////////////////////////////////
92 /// Management of selection state and ownership of selected cell list
93 /// is done in TEveCaloData. This is a reason selection is forwarded to it.
94 
96 {
97  return fData;
98 }
99 
100 ////////////////////////////////////////////////////////////////////////////////
101 /// Management of selection state and ownership of selected cell list
102 /// is done in TEveCaloData. We still want GUI editor to display
103 /// concrete calo-viz object.
104 
106 {
107  return this;
108 }
109 
110 ////////////////////////////////////////////////////////////////////////////////
111 /// Set threshold for given slice.
112 
114 {
115  fData->SetSliceThreshold(slice, val);
116 }
117 
118 ////////////////////////////////////////////////////////////////////////////////
119 /// Get slice color from data.
120 
122 {
123  return fData->RefSliceInfo(slice).fColor;
124 }
125 
126 ////////////////////////////////////////////////////////////////////////////////
127 /// Set slice color in data.
128 
130 {
131  fData->SetSliceColor(slice, col);
132 }
133 
134 ////////////////////////////////////////////////////////////////////////////////
135 /// Set eta range.
136 
138 {
139  fEtaMin=l;
140  fEtaMax=u;
141 
143 }
144 
145 ////////////////////////////////////////////////////////////////////////////////
146 /// Set E/Et plot.
147 
149 {
150  fPlotEt=isEt;
151  if (fPalette)
153 
155 }
156 
157 ////////////////////////////////////////////////////////////////////////////////
158 
160 {
161  // Get maximum plotted value.
162 
163  return fData->GetMaxVal(fPlotEt);
164 
165 }
166 
167 ////////////////////////////////////////////////////////////////////////////////
168 /// Set phi range.
169 
171 {
172  using namespace TMath;
173 
174  fPhi = phi;
175  fPhiOffset = rng;
176 
178 }
179 
180 ////////////////////////////////////////////////////////////////////////////////
181 /// Get transition angle between barrel and end-cap cells, assuming fEndCapPosF = -fEndCapPosB.
182 
184 {
186 }
187 
188 ////////////////////////////////////////////////////////////////////////////////
189 /// Get transition eta between barrel and end-cap cells, assuming fEndCapPosF = -fEndCapPosB.
190 
192 {
193  using namespace TMath;
194  Float_t t = GetTransitionTheta()*0.5f;
195  return -Log(Tan(t));
196 }
197 
198 ////////////////////////////////////////////////////////////////////////////////
199 /// Get transition angle between barrel and forward end-cap cells.
200 
202 {
204 }
205 
206 ////////////////////////////////////////////////////////////////////////////////
207 /// Get transition eta between barrel and forward end-cap cells.
208 
210 {
211  using namespace TMath;
213  return -Log(Tan(t));
214 }
215 
216 ////////////////////////////////////////////////////////////////////////////////
217 /// Get transition angle between barrel and backward end-cap cells.
218 
220 {
222 }
223 
224 ////////////////////////////////////////////////////////////////////////////////
225 /// Get transition eta between barrel and backward end-cap cells.
226 
228 {
229  using namespace TMath;
231  //negative theta means negative eta
232  return Log(-Tan(t));
233 }
234 
235 
236 ////////////////////////////////////////////////////////////////////////////////
237 /// Set calorimeter event data.
238 
240 {
241 
242  if (data == fData) return;
243  if (fData) fData->RemoveElement(this);
244  fData = data;
245  if (fData)
246  {
247  fData->AddElement(this);
248  DataChanged();
249  }
250 }
251 
252 ////////////////////////////////////////////////////////////////////////////////
253 /// Update setting and cache on data changed.
254 /// Called from TEvecaloData::BroadcastDataChange()
255 
257 {
258  Double_t min, max, delta;
259 
260  fData->GetEtaLimits(min, max);
261  if (fAutoRange) {
262  fEtaMin = min;
263  fEtaMax = max;
264  } else {
265  if (fEtaMin < min) fEtaMin = min;
266  if (fEtaMax > max) fEtaMax = max;
267  }
268 
269  fData->GetPhiLimits(min, max);
270  delta = 0.5*(max - min);
271  if (fAutoRange || fPhi < min || fPhi > max) {
272  fPhi = 0.5*(max + min);
273  fPhiOffset = delta;
274  } else {
275  if (fPhiOffset > delta) fPhiOffset = delta;
276  }
277 
278  if (fPalette)
279  {
282  fPalette->SetMin(0);
284  }
285 
287 }
288 
289 ////////////////////////////////////////////////////////////////////////////////
290 /// Assert cell id cache is ok.
291 /// Returns true if the cache has been updated.
292 
294 {
295  TEveCaloViz* cv = const_cast<TEveCaloViz*>(this);
296  if (!fCellIdCacheOK) {
297  cv->BuildCellIdCache();
298  return kTRUE;
299  } else {
300  return kFALSE;
301  }
302 }
303 
304 ////////////////////////////////////////////////////////////////////////////////
305 /// Returns true if given cell is in the ceta phi range.
306 
308 {
309  if (cellData.EtaMin() >= fEtaMin && cellData.EtaMax() <= fEtaMax)
310  {
312  (fPhi-fPhiOffset, fPhi+fPhiOffset, cellData.PhiMin(), cellData.PhiMax()))
313  return kTRUE;
314  }
315  return kFALSE;
316 }
317 
318 ////////////////////////////////////////////////////////////////////////////////
319 /// Assign parameters from given model.
320 
322 {
323  SetData(m->fData);
324 
325  fEtaMin = m->fEtaMin;
326  fEtaMax = m->fEtaMax;
327 
328  fPhi = m->fPhi;
329  fPhiOffset = m->fPhiOffset;
330 
331  fBarrelRadius = m->fBarrelRadius;
332  fEndCapPosF = m->fEndCapPosF;
333  fEndCapPosB = m->fEndCapPosB;
334 
335  if (m->fPalette)
336  {
337  TEveRGBAPalette& mp = * m->fPalette;
338  if (fPalette) fPalette->DecRefCount();
341  }
342 }
343 
344 ////////////////////////////////////////////////////////////////////////////////
345 /// Set TEveRGBAPalette object pointer.
346 
348 {
349  if ( fPalette == p) return;
350  if (fPalette) fPalette->DecRefCount();
351  fPalette = p;
352  if (fPalette) fPalette->IncRefCount();
353 }
354 
355 ////////////////////////////////////////////////////////////////////////////////
356 /// Get transformation factor from E/Et to height
357 
359 {
360  if (fScaleAbs)
361  {
362  return fMaxTowerH/fMaxValAbs;
363  }
364  else
365  {
366  if (fData->Empty())
367  return 1;
368 
370  }
371 }
372 
373 ////////////////////////////////////////////////////////////////////////////////
374 /// Make sure the TEveRGBAPalette pointer is not null.
375 /// If it is not set, a new one is instantiated and the range is set
376 /// to current min/max signal values.
377 
379 {
380  if (fPalette == 0) {
383 
386  fPalette->SetMin(0);
388 
389  }
390  return fPalette;
391 }
392 
393 ////////////////////////////////////////////////////////////////////////////////
394 /// Paint this object. Only direct rendering is supported.
395 
396 void TEveCaloViz::Paint(Option_t* /*option*/)
397 {
398  if (fData)
399  {
400  PaintStandard(this);
401  }
402 }
403 
404 ////////////////////////////////////////////////////////////////////////////////
405 /// Virtual from TEveProjectable, returns TEveCalo2D class.
406 
408 {
409  return TEveCalo2D::Class();
410 }
411 
412 ////////////////////////////////////////////////////////////////////////////////
413 /// Set color and height for a given value and slice using slice color or TEveRGBAPalette.
414 
415 void TEveCaloViz::SetupColorHeight(Float_t value, Int_t slice, Float_t& outH) const
416 {
417  if (fValueIsColor)
418  {
420  UChar_t c[4];
421  fPalette->ColorFromValue((Int_t)value, c);
422  c[3] = fData->GetSliceTransparency(slice);
424  }
425  else
426  {
428  outH = GetValToHeight()*value;
429  }
430 }
431 
432 /** \class TEveCalo3D
433 \ingroup TEve
434 Visualization of a calorimeter event data in 3D.
435 */
436 
438 
439 ////////////////////////////////////////////////////////////////////////////////
440 /// Constructor.
441 
442 TEveCalo3D::TEveCalo3D(TEveCaloData* d, const char* n, const char* t):
443  TEveCaloViz(d, n, t),
444 
445  fRnrEndCapFrame (kTRUE),
446  fRnrBarrelFrame (kTRUE),
447  fFrameWidth (0.5),
448  fFrameColor (kGray+1),
449  fFrameTransparency (80)
450 {
454 }
455 
456 ////////////////////////////////////////////////////////////////////////////////
457 /// Build list of drawn cell IDs. See TEveCalo3DGL::DirectDraw().
458 
460 {
461  fCellList.clear();
462 
465 }
466 
467 ////////////////////////////////////////////////////////////////////////////////
468 /// Fill bounding-box information of the base-class TAttBBox (virtual method).
469 /// If member 'TEveFrameBox* fFrame' is set, frame's corners are used as bbox.
470 
472 {
473  BBoxInit();
474 
475  Float_t th = (fData) ? GetValToHeight() * fData->GetMaxVal(fPlotEt) : 0;
476 
477  fBBox[0] = -fBarrelRadius - th;
478  fBBox[1] = fBarrelRadius + th;
479  fBBox[2] = fBBox[0];
480  fBBox[3] = fBBox[1];
481  fBBox[4] = fEndCapPosB - th;
482  fBBox[5] = fEndCapPosF + th;
483 }
484 
485 /** \class TEveCalo2D
486 \ingroup TEve
487 Visualization of a calorimeter event data in 2D.
488 */
489 
491 
492 ////////////////////////////////////////////////////////////////////////////////
493 /// Constructor.
494 
495 TEveCalo2D::TEveCalo2D(const char* n, const char* t):
496  TEveCaloViz(0, n, t),
497  TEveProjected(),
498  fOldProjectionType(TEveProjection::kPT_Unknown),
499  fMaxESumBin( 0),
500  fMaxEtSumBin(0)
501 {
502 }
503 
504 ////////////////////////////////////////////////////////////////////////////////
505 /// Destructor.
506 
508 {
510  UInt_t n;
511 
512  // clear selected cell ids
513  n = fCellListsSelected.size();
514  for(UInt_t i = 0; i < n; ++i) {
515  cids = fCellListsSelected[i];
516  if (cids) {
517  cids->clear(); delete cids;
518  }
519  }
520  fCellListsSelected.clear();
521 
522  // clear all cell dds
523  n = fCellLists.size();
524  for(UInt_t i = 0; i < n; ++i) {
525  cids = fCellLists[i];
526  if (cids) {
527  cids->clear(); delete cids;
528  }
529  }
530  fCellLists.clear();
531 }
532 
533 ////////////////////////////////////////////////////////////////////////////////
534 /// This is virtual method from base-class TEveProjected.
535 
537 {
539  {
542  }
543  ComputeBBox();
544 }
545 
546 ////////////////////////////////////////////////////////////////////////////////
547 /// Set projection manager and model object.
548 
550 {
552  TEveCaloViz* viz = dynamic_cast<TEveCaloViz*>(model);
554 }
555 
556 ////////////////////////////////////////////////////////////////////////////////
557 /// Build lists of drawn cell IDs. See TEveCalo2DGL::DirecDraw().
558 
560 {
561  // clear old cache
562  for (vBinCells_i it = fCellLists.begin(); it != fCellLists.end(); it++)
563  {
564  if (*it)
565  {
566  (*it)->clear();
567  delete *it;
568  }
569  }
570  fCellLists.clear();
571  fCellLists.push_back(0);
572 
574  TEveCaloData::vCellId_t* clv; // ids per phi bin in r-phi projection else ids per eta bins in rho-z projection
575 
576  Bool_t isRPhi = (pt == TEveProjection::kPT_RPhi);
577 
578  const TAxis* axis = isRPhi ? fData->GetPhiBins() : fData->GetEtaBins();
579  Int_t nBins = axis->GetNbins();
580 
581  Float_t min, max;
582  if (isRPhi)
583  {
584  min = GetPhiMin() - fData->GetEps();
585  max = GetPhiMax() + fData->GetEps();
586  for (Int_t ibin = 1; ibin <= nBins; ++ibin) {
587  clv = 0;
589  (min, max, axis->GetBinLowEdge(ibin), axis->GetBinUpEdge(ibin)))
590  {
591  clv = new TEveCaloData::vCellId_t();
592  fData->GetCellList(GetEta(), GetEtaRng(), axis->GetBinCenter(ibin), axis->GetBinWidth(ibin), *clv);
593  if (!clv->size()) {
594  delete clv; clv = 0;
595  }
596  }
597  fCellLists.push_back(clv);
598  }
599  }
600  else
601  {
602  min = GetEtaMin() - fData->GetEps();
603  max = GetEtaMax() + fData->GetEps();
604  for (Int_t ibin = 1; ibin <= nBins; ++ibin) {
605  clv = 0;
606  Float_t low = axis->GetBinLowEdge(ibin);
607  Float_t up = axis->GetBinUpEdge(ibin) ;
608  if (low >= min && up <= max)
609  {
610  clv = new TEveCaloData::vCellId_t();
611  fData->GetCellList(axis->GetBinCenter(ibin), axis->GetBinWidth(ibin), fPhi, GetPhiRng(), *clv);
612  if (!clv->size()) {
613  delete clv; clv = 0;
614  }
615  }
616  fCellLists.push_back(clv);
617  }
618  }
619 
620  // cache max bin sum for auto scale
621  if (!fScaleAbs)
622  {
623  fMaxESumBin = 0;
624  fMaxEtSumBin = 0;
625  Float_t sumE = 0;
626  Float_t sumEt = 0;
627  TEveCaloData::CellData_t cellData;
628  for (Int_t ibin = 1; ibin <= nBins; ++ibin) {
629  TEveCaloData::vCellId_t* cids = fCellLists[ibin];
630  if (cids)
631  {
632  sumE = 0; sumEt = 0;
633  for (TEveCaloData::vCellId_i it = cids->begin(); it != cids->end(); it++)
634  {
635  fData->GetCellData(*it, cellData);
636  sumE += cellData.Value(kFALSE);
637  sumEt += cellData.Value(kTRUE);
638  }
641  }
642  }
643  ComputeBBox();
644  }
645 
647 }
648 
649 ////////////////////////////////////////////////////////////////////////////////
650 /// Sort selected cells in eta or phi bins for selection and highlight.
651 
653 {
656 }
657 
658 ////////////////////////////////////////////////////////////////////////////////
659 /// Sort selected cells in eta or phi bins.
660 
661 void TEveCalo2D::CellSelectionChangedInternal(TEveCaloData::vCellId_t& inputCells, std::vector<TEveCaloData::vCellId_t*>& outputCellLists)
662 {
664  const TAxis* axis = isRPhi ? fData->GetPhiBins() : fData->GetEtaBins();
665 
666  // clear old cache
667  for (vBinCells_i it = outputCellLists.begin(); it != outputCellLists.end(); it++)
668  {
669  if (*it)
670  {
671  (*it)->clear();
672  delete *it;
673  }
674  }
675  outputCellLists.clear();
676  UInt_t nBins = axis->GetNbins();
677  outputCellLists.resize(nBins+1);
678  for (UInt_t b = 0; b <= nBins; ++b)
679  outputCellLists[b] = 0;
680 
681  for(UInt_t bin = 1; bin <= nBins; ++bin)
682  {
683  TEveCaloData::vCellId_t* idsInBin = fCellLists[bin];
684  if (!idsInBin)
685  continue;
686 
687  for (TEveCaloData::vCellId_i i = idsInBin->begin(); i != idsInBin->end(); i++)
688  {
689  for (TEveCaloData::vCellId_i j = inputCells.begin(); j != inputCells.end(); j++)
690  {
691  if( (*i).fTower == (*j).fTower && (*i).fSlice == (*j).fSlice)
692  {
693  if (!outputCellLists[bin])
694  outputCellLists[bin] = new TEveCaloData::vCellId_t();
695 
696  outputCellLists[bin]->push_back(TEveCaloData::CellId_t((*i).fTower, (*i).fSlice, (*i).fFraction));
697  }
698  }
699  }
700  }
701 }
702 
703 ////////////////////////////////////////////////////////////////////////////////
704 /// Set absolute scale in projected calorimeter.
705 
707 {
710 }
711 
712 ////////////////////////////////////////////////////////////////////////////////
713 /// Virtual function of TEveCaloViz.
714 /// Get transformation factor from E/Et to height.
715 
717 {
719 
720  if (fScaleAbs)
721  {
722  return fMaxTowerH/fMaxValAbs;
723  }
724  else
725  {
726  if (fData->Empty())
727  return 1;
728 
729  if (fPlotEt)
730  return fMaxTowerH/fMaxEtSumBin;
731  else
732  return fMaxTowerH/fMaxESumBin;
733  }
734 }
735 
736 ////////////////////////////////////////////////////////////////////////////////
737 /// Fill bounding-box information of the base-class TAttBBox (virtual method).
738 /// If member 'TEveFrameBox* fFrame' is set, frame's corners are used as bbox.
739 
741 {
742  BBoxZero();
743 
744  Float_t x, y, z;
745  Float_t th = fMaxTowerH ;
746  Float_t r = fBarrelRadius + th;
747 
748  x = r, y = 0, z = 0;
750  BBoxCheckPoint(x, y, z);
751  x = -r, y = 0, z = 0;
753  BBoxCheckPoint(x, y, z);
754 
755  x = 0, y = 0, z = fEndCapPosF + th;
757  BBoxCheckPoint(x, y, z);
758  x = 0, y = 0, z = fEndCapPosB - th;
760  BBoxCheckPoint(x, y, z);
761 
762  x = 0, y = r, z = 0;
764  BBoxCheckPoint(x, y, z);
765  x = 0, y = -r, z = 0;
767  BBoxCheckPoint(x, y, z);
768 }
769 
770 
771 /** \class TEveCaloLego
772 \ingroup TEve
773 Visualization of calorimeter data as eta/phi histogram.
774 */
775 
777 
778 ////////////////////////////////////////////////////////////////////////////////
779 /// Constructor.
780 
781 TEveCaloLego::TEveCaloLego(TEveCaloData* d, const char* n, const char* t):
782  TEveCaloViz(d, n, t),
783 
784  fFontColor(-1),
785  fGridColor(-1),
786  fPlaneColor(kRed-5),
787  fPlaneTransparency(60),
788 
789  fNZSteps(6),
790  fZAxisStep(0.f),
791 
792  fAutoRebin(kTRUE),
793 
794  fPixelsPerBin(12),
795  fNormalizeRebin(kFALSE),
796 
797  fProjection(kAuto),
798  f2DMode(kValSize),
799  fBoxMode(kBack),
800 
801  fDrawHPlane(kFALSE),
802  fHPlaneVal(0),
803 
804  fHasFixedHeightIn2DMode(kFALSE),
805  fFixedHeightValIn2DMode(0.f),
806 
807  fDrawNumberCellPixels(18), // draw numbers on cell above 30 pixels
808  fCellPixelFontSize(12) // size of cell fonts in pixels
809 {
810  fMaxTowerH = 1;
811  SetElementNameTitle("TEveCaloLego", "TEveCaloLego");
812 }
813 
814 ////////////////////////////////////////////////////////////////////////////////
815 // Set data.
816 
818 {
819  TEveCaloViz::SetData(data);
820 }
821 
822 ////////////////////////////////////////////////////////////////////////////////
823 /// Build list of drawn cell IDs. For more information see TEveCaloLegoGL:DirectDraw().
824 
826 {
827  fCellList.clear();
828 
831 }
832 
833 ////////////////////////////////////////////////////////////////////////////////
834 /// Fill bounding-box information of the base-class TAttBBox (virtual method).
835 /// If member 'TEveFrameBox* fFrame' is set, frame's corners are used as bbox.
836 
838 {
839 
840  // fBBox = Float_t[6] X(min,max), Y(min,max), Z(min,max)
841 
842  BBoxZero();
843 
844  Float_t ex = 1.2; // 20% offset for axis labels
845 
846  Float_t a = 0.5*ex;
847 
848  fBBox[0] = -a;
849  fBBox[1] = a;
850  fBBox[2] = -a;
851  fBBox[3] = a;
852 
853  // scaling is relative to shortest XY axis
854  Double_t em, eM, pm, pM;
855  fData->GetEtaLimits(em, eM);
856  fData->GetPhiLimits(pm, pM);
857  Double_t r = (eM-em)/(pM-pm);
858  if (r<1)
859  {
860  fBBox[2] /= r;
861  fBBox[3] /= r;
862  }
863  else
864  {
865  fBBox[0] *= r;
866  fBBox[1] *= r;
867  }
868 
869  fBBox[4] = 0;
870  if (fScaleAbs && !fData->Empty())
871  fBBox[5] = GetMaxVal()*GetValToHeight();
872  else
873  fBBox[5] = fMaxTowerH;
874 }
c
#define c(i)
Definition: RSha256.hxx:119
l
auto * l
Definition: textangle.C:4
m
auto * m
Definition: textangle.C:8
TEveCaloViz::fEndCapPosB
Float_t fEndCapPosB
Definition: TEveCalo.h:53
ex
Double_t ex[n]
Definition: legend1.C:17
TEveProjection::kPT_RPhi
@ kPT_RPhi
Definition: TEveProjections.h:29
n
const Int_t n
Definition: legend1.C:16
TEveCaloViz::GetEtaRng
Float_t GetEtaRng() const
Definition: TEveCalo.h:139
TAxis
Class to manage histogram axis.
Definition: TAxis.h:30
TEveCaloData::CellData_t
Definition: TEveCaloData.h:114
TEveCaloViz::GetDataSliceColor
Color_t GetDataSliceColor(Int_t slice) const
Get slice color from data.
Definition: TEveCalo.cxx:121
TEveElement::PaintStandard
virtual void PaintStandard(TObject *id)
Paint object – a generic implementation for EVE elements.
Definition: TEveElement.cxx:1034
TEveElement
Definition: TEveElement.h:35
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TEveCaloViz::GetEtaMin
Float_t GetEtaMin() const
Definition: TEveCalo.h:137
TAxis::GetBinLowEdge
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
Definition: TAxis.cxx:518
TEveElement::fPickable
Bool_t fPickable
Definition: TEveElement.h:312
f
#define f(i)
Definition: RSha256.hxx:122
TEveRGBAPalette::SetLimits
void SetLimits(Int_t low, Int_t high)
Set low/high limits on signal value.
Definition: TEveRGBAPalette.cxx:165
TMath::Max
Short_t Max(Short_t a, Short_t b)
Definition: TMathBase.h:212
TEveProjected::SetProjection
virtual void SetProjection(TEveProjectionManager *mng, TEveProjectable *model)
Sets projection manager and reference in the projectable object.
Definition: TEveProjectionBases.cxx:193
TEveCaloViz::GetPhiRng
Float_t GetPhiRng() const
Definition: TEveCalo.h:147
TEveRGBAPalette::ColorFromValue
const UChar_t * ColorFromValue(Int_t val) const
Definition: TEveRGBAPalette.h:177
TEveCaloViz::Paint
virtual void Paint(Option_t *option="")
Paint this object. Only direct rendering is supported.
Definition: TEveCalo.cxx:396
TEveCaloViz::fEtaMax
Double_t fEtaMax
Definition: TEveCalo.h:44
TEveUtil::IsU1IntervalOverlappingByMinMax
static Bool_t IsU1IntervalOverlappingByMinMax(Float_t minM, Float_t maxM, Float_t minQ, Float_t maxQ)
Return true if interval Q is overlapping within interval M for U1 variables.
Definition: TEveUtil.cxx:363
TEveCalo2D::GetValToHeight
virtual Float_t GetValToHeight() const
Virtual function of TEveCaloViz.
Definition: TEveCalo.cxx:716
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
TEveCalo2D::fCellListsSelected
std::vector< TEveCaloData::vCellId_t * > fCellListsSelected
Definition: TEveCalo.h:219
TEveRefCnt::DecRefCount
void DecRefCount()
Definition: TEveUtil.h:175
TEveCaloViz::GetEtaMax
Float_t GetEtaMax() const
Definition: TEveCalo.h:138
TEveProjection
Definition: TEveProjections.h:26
r
ROOT::R::TRInterface & r
Definition: Object.C:4
TEveRGBAPalette::SetMax
void SetMax(Int_t max)
Set current max value.
Definition: TEveRGBAPalette.cxx:206
TEveElement::fMainColorPtr
Color_t * fMainColorPtr
Definition: TEveElement.h:99
TEveCaloViz::fAutoRange
Bool_t fAutoRange
Definition: TEveCalo.h:49
TEveCaloViz::GetTransitionTheta
Float_t GetTransitionTheta() const
Get transition angle between barrel and end-cap cells, assuming fEndCapPosF = -fEndCapPosB.
Definition: TEveCalo.cxx:183
TMath::Log
Double_t Log(Double_t x)
Definition: TMath.h:760
TEveCaloData::CellGeom_t::PhiMin
Float_t PhiMin() const
Definition: TEveCaloData.h:95
TEveRGBAPalette::GetMinVal
Int_t GetMinVal() const
Definition: TEveRGBAPalette.h:96
TEveCaloViz::DataChanged
void DataChanged()
Update setting and cache on data changed.
Definition: TEveCalo.cxx:256
TEveProjections.h
TMath::CeilNint
Int_t CeilNint(Double_t x)
Definition: TMath.h:699
TMath::Tan
Double_t Tan(Double_t)
Definition: TMath.h:647
Float_t
float Float_t
Definition: RtypesCore.h:57
TEveCaloViz::SetupColorHeight
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.
Definition: TEveCalo.cxx:415
TAxis::GetBinCenter
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
Definition: TAxis.cxx:478
TEveCaloData::vCellId_t
std::vector< CellId_t > vCellId_t
Definition: TEveCaloData.h:146
TEveRGBAPalette.h
TAttBBox::BBoxZero
void BBoxZero(Float_t epsilon=0, Float_t x=0, Float_t y=0, Float_t z=0)
Create cube of volume (2*epsilon)^3 at (x,y,z).
Definition: TAttBBox.cxx:42
TAxis::GetBinUpEdge
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
Definition: TAxis.cxx:528
TEveCalo3D::ComputeBBox
virtual void ComputeBBox()
Fill bounding-box information of the base-class TAttBBox (virtual method).
Definition: TEveCalo.cxx:471
TEveUtil::IsU1IntervalContainedByMinMax
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.
Definition: TEveUtil.cxx:342
TEveProjection::ProjectPoint
virtual void ProjectPoint(Float_t &x, Float_t &y, Float_t &z, Float_t d, EPProc_e p=kPP_Full)=0
TEveCaloData::GetSliceTransparency
Char_t GetSliceTransparency(Int_t slice) const
Get transparency for given slice.
Definition: TEveCaloData.cxx:358
x
Double_t x[n]
Definition: legend1.C:17
TEveCaloViz::fData
TEveCaloData * fData
Definition: TEveCalo.h:40
TGLUtil::ColorTransparency
static void ColorTransparency(Color_t color_index, Char_t transparency=0)
Set color from color_index and ROOT-style transparency (default 0).
Definition: TGLUtil.cxx:1735
TEveProjection::EPType_e
EPType_e
Definition: TEveProjections.h:29
TEveCaloViz::fPlotEt
Float_t fPlotEt
Definition: TEveCalo.h:55
TClass.h
TEveCaloData::CellGeom_t::EtaMax
Float_t EtaMax() const
Definition: TEveCaloData.h:91
TEveCaloData::GetEps
virtual Float_t GetEps() const
Definition: TEveCaloData.h:224
ROOT::Math::Pi
double Pi()
Mathematical constants.
Definition: Math.h:88
TEveCaloData::Empty
Bool_t Empty() const
Definition: TEveCaloData.h:216
TEveCaloData::SetSliceColor
void SetSliceColor(Int_t slice, Color_t col)
Set color for given slice.
Definition: TEveCaloData.cxx:326
TEveElement::fCanEditMainTransparency
Bool_t fCanEditMainTransparency
Definition: TEveElement.h:95
TEveCaloViz::SetPhiWithRng
void SetPhiWithRng(Float_t x, Float_t r)
Set phi range.
Definition: TEveCalo.cxx:170
TEveCaloData::CellGeom_t::PhiMax
Float_t PhiMax() const
Definition: TEveCaloData.h:96
TEveCaloViz::GetTransitionThetaForward
Float_t GetTransitionThetaForward() const
Get transition angle between barrel and forward end-cap cells.
Definition: TEveCalo.cxx:201
TEveElement::fCanEditMainColor
Bool_t fCanEditMainColor
Definition: TEveElement.h:94
TEveCaloViz::GetPhiMax
Float_t GetPhiMax() const
Definition: TEveCalo.h:146
TEveCalo3D::BuildCellIdCache
virtual void BuildCellIdCache()
Build list of drawn cell IDs. See TEveCalo3DGL::DirectDraw().
Definition: TEveCalo.cxx:459
TEveCalo2D::CellSelectionChangedInternal
void CellSelectionChangedInternal(TEveCaloData::vCellId_t &cells, std::vector< TEveCaloData::vCellId_t * > &cellLists)
Sort selected cells in eta or phi bins.
Definition: TEveCalo.cxx:661
TEveCaloViz::ForwardEdit
virtual TEveElement * ForwardEdit()
Management of selection state and ownership of selected cell list is done in TEveCaloData.
Definition: TEveCalo.cxx:105
Color_t
short Color_t
Definition: RtypesCore.h:83
TEveCaloData::GetEtaLimits
virtual void GetEtaLimits(Double_t &min, Double_t &max) const =0
TEveRGBAPalette::GetDefaultColor
Color_t GetDefaultColor() const
Definition: TEveRGBAPalette.h:129
TEveCaloViz::fPhiOffset
Double_t fPhiOffset
Definition: TEveCalo.h:47
b
#define b(i)
Definition: RSha256.hxx:118
TEveRGBAPalette::GetInterpolate
Bool_t GetInterpolate() const
Definition: TEveRGBAPalette.h:113
TAttBBox::fBBox
Float_t * fBBox
Definition: TAttBBox.h:26
bool
TEveCalo3D::fCellList
TEveCaloData::vCellId_t fCellList
Definition: TEveCalo.h:165
TEveRGBAPalette::GetMaxVal
Int_t GetMaxVal() const
Definition: TEveRGBAPalette.h:97
TEveCalo2D::TEveCalo2D
TEveCalo2D(const TEveCalo2D &)=delete
TEveCalo2D::vBinCells_i
std::vector< TEveCaloData::vCellId_t * >::iterator vBinCells_i
Definition: TEveCalo.h:207
TEveCaloViz::GetPhi
Float_t GetPhi() const
Definition: TEveCalo.h:144
TEveCaloViz::GetTransitionEta
Float_t GetTransitionEta() const
Get transition eta between barrel and end-cap cells, assuming fEndCapPosF = -fEndCapPosB.
Definition: TEveCalo.cxx:191
TAttBBox::BBoxCheckPoint
void BBoxCheckPoint(Float_t x, Float_t y, Float_t z)
Definition: TAttBBox.h:58
TEveCaloLego::BuildCellIdCache
virtual void BuildCellIdCache()
Build list of drawn cell IDs. For more information see TEveCaloLegoGL:DirectDraw().
Definition: TEveCalo.cxx:825
TEveCaloViz::BuildCellIdCache
virtual void BuildCellIdCache()=0
hlimit
void type_of_call hlimit(const int &)
TEveCaloViz::AssertCellIdCache
Bool_t AssertCellIdCache() const
Assert cell id cache is ok.
Definition: TEveCalo.cxx:293
TEveProjectable
Definition: TEveProjectionBases.h:34
TEveCaloViz::AssignCaloVizParameters
void AssignCaloVizParameters(TEveCaloViz *cv)
Assign parameters from given model.
Definition: TEveCalo.cxx:321
TEveCalo2D::SetProjection
virtual void SetProjection(TEveProjectionManager *proj, TEveProjectable *model)
Set projection manager and model object.
Definition: TEveCalo.cxx:549
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TEveProjectionManager.h
TEveCalo3D
Definition: TEveCalo.h:157
TEveCaloData::CellData_t::Value
Float_t Value(Bool_t) const
Return energy value associated with the cell, usually Et.
Definition: TEveCaloData.cxx:71
TEveElement::RemoveElement
virtual void RemoveElement(TEveElement *el)
Remove el from the list of children.
Definition: TEveElement.cxx:1341
TEveCalo2D::fOldProjectionType
TEveProjection::EPType_e fOldProjectionType
Definition: TEveCalo.h:213
TEveCalo3D::TEveCalo3D
TEveCalo3D(const TEveCalo3D &)=delete
TEveCalo2D::~TEveCalo2D
virtual ~TEveCalo2D()
Destructor.
Definition: TEveCalo.cxx:507
TEveCaloData::RefSliceInfo
SliceInfo_t & RefSliceInfo(Int_t s)
Definition: TEveCaloData.h:203
TEveCaloData::GetSliceColor
Color_t GetSliceColor(Int_t slice) const
Get color for given slice.
Definition: TEveCaloData.cxx:338
TEveCaloViz::GetTransitionThetaBackward
Float_t GetTransitionThetaBackward() const
Get transition angle between barrel and backward end-cap cells.
Definition: TEveCalo.cxx:219
TEveCaloData::SetSliceThreshold
void SetSliceThreshold(Int_t slice, Float_t threshold)
Set threshold for given slice.
Definition: TEveCaloData.cxx:309
TEveProjectionManager
Definition: TEveProjectionManager.h:20
TEveCaloData::GetPhiLimits
virtual void GetPhiLimits(Double_t &min, Double_t &max) const =0
TEveCaloViz::GetTransitionEtaBackward
Float_t GetTransitionEtaBackward() const
Get transition eta between barrel and backward end-cap cells.
Definition: TEveCalo.cxx:227
TEveCaloData::SliceInfo_t::fThreshold
Float_t fThreshold
Definition: TEveCaloData.h:33
TEveProjected::fManager
TEveProjectionManager * fManager
Definition: TEveProjectionBases.h:90
TEveCaloViz::GetValToHeight
virtual Float_t GetValToHeight() const
Get transformation factor from E/Et to height.
Definition: TEveCalo.cxx:358
a
auto * a
Definition: textangle.C:12
TNamed
Definition: TNamed.h:29
TEveCaloViz::GetPhiMin
Float_t GetPhiMin() const
Definition: TEveCalo.h:145
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TEveCalo2D::UpdateProjection
virtual void UpdateProjection()
This is virtual method from base-class TEveProjected.
Definition: TEveCalo.cxx:536
TEveCaloViz::ProjectedClass
virtual TClass * ProjectedClass(const TEveProjection *p) const
Virtual from TEveProjectable, returns TEveCalo2D class.
Definition: TEveCalo.cxx:407
TEveElement::AddElement
virtual void AddElement(TEveElement *el)
Add el to the list of children.
Definition: TEveElement.cxx:1324
TEveCaloViz::fPalette
TEveRGBAPalette * fPalette
Definition: TEveCalo.h:62
TAttBBox::BBoxInit
void BBoxInit(Float_t infinity=1e6)
Dynamic Float_t[6] X(min,max), Y(min,max), Z(min,max)
Definition: TAttBBox.cxx:29
TEveCaloViz::CellInEtaPhiRng
Bool_t CellInEtaPhiRng(TEveCaloData::CellData_t &) const
Returns true if given cell is in the ceta phi range.
Definition: TEveCalo.cxx:307
y
Double_t y[n]
Definition: legend1.C:17
TEveCaloViz
Definition: TEveCalo.h:27
TEveText.h
TEveTrans.h
TEveCaloViz::SetDataSliceThreshold
void SetDataSliceThreshold(Int_t slice, Float_t val)
Set threshold for given slice.
Definition: TEveCalo.cxx:113
TEveCaloViz::fMaxTowerH
Float_t fMaxTowerH
Definition: TEveCalo.h:57
TGLUtil::Color4ubv
static void Color4ubv(const UChar_t *rgba)
Wrapper for glColor4ubv.
Definition: TGLUtil.cxx:1773
TEveCalo2D::CellSelectionChanged
virtual void CellSelectionChanged()
Sort selected cells in eta or phi bins for selection and highlight.
Definition: TEveCalo.cxx:652
kRed
@ kRed
Definition: Rtypes.h:66
TEveCaloViz::fScaleAbs
Bool_t fScaleAbs
Definition: TEveCalo.h:58
TEveCaloViz::SetPalette
void SetPalette(TEveRGBAPalette *p)
Set TEveRGBAPalette object pointer.
Definition: TEveCalo.cxx:347
TEveCalo2D::fCellLists
std::vector< TEveCaloData::vCellId_t * > fCellLists
Definition: TEveCalo.h:217
TEveCalo3D::fFrameColor
Color_t fFrameColor
Definition: TEveCalo.h:171
TEveCaloData
Definition: TEveCaloData.h:26
TEveCaloViz::fValueIsColor
Bool_t fValueIsColor
Definition: TEveCalo.h:61
TEveCaloViz::TEveCaloViz
TEveCaloViz(const TEveCaloViz &)=delete
unsigned int
TEveCaloData.h
TEveCaloViz::InvalidateCellIdCache
void InvalidateCellIdCache()
Definition: TEveCalo.h:93
TEveCalo2D::ComputeBBox
virtual void ComputeBBox()
Fill bounding-box information of the base-class TAttBBox (virtual method).
Definition: TEveCalo.cxx:740
TEveCaloData::GetCellsSelected
vCellId_t & GetCellsSelected()
Definition: TEveCaloData.h:188
TEveCaloData::GetPhiBins
virtual TAxis * GetPhiBins() const
Definition: TEveCaloData.h:221
TEveElement::SetElementNameTitle
virtual void SetElementNameTitle(const char *name, const char *title)
Virtual function for setting of name and title of render element.
Definition: TEveElement.cxx:326
TEveCaloViz::fEndCapPosF
Float_t fEndCapPosF
Definition: TEveCalo.h:52
TMath::ATan
Double_t ATan(Double_t)
Definition: TMath.h:675
TEveCaloViz::SetEta
void SetEta(Float_t l, Float_t u)
Set eta range.
Definition: TEveCalo.cxx:137
TEveCaloData::SliceInfo_t::fColor
Color_t fColor
Definition: TEveCaloData.h:34
TEveCaloData::GetEtaBins
virtual TAxis * GetEtaBins() const
Definition: TEveCaloData.h:218
Double_t
double Double_t
Definition: RtypesCore.h:59
TEveCaloViz::SetData
void SetData(TEveCaloData *d)
Set calorimeter event data.
Definition: TEveCalo.cxx:239
TEveCaloViz::SetScaleAbs
virtual void SetScaleAbs(Bool_t x)
Definition: TEveCalo.h:85
TEveCaloViz::AssertPalette
TEveRGBAPalette * AssertPalette()
Make sure the TEveRGBAPalette pointer is not null.
Definition: TEveCalo.cxx:378
TEveCaloLego::SetData
virtual void SetData(TEveCaloData *d)
Definition: TEveCalo.cxx:817
TEveProjected
Definition: TEveProjectionBases.h:83
TEveCaloViz::SetPlotEt
void SetPlotEt(Bool_t x)
Set E/Et plot.
Definition: TEveCalo.cxx:148
TEveRGBAPalette::SetDefaultColor
void SetDefaultColor(Color_t ci)
Set default color.
Definition: TEveRGBAPalette.cxx:261
TClass
Definition: TClass.h:80
UChar_t
unsigned char UChar_t
Definition: RtypesCore.h:38
TEveProjected::fDepth
Float_t fDepth
Definition: TEveProjectionBases.h:92
TEveCaloViz::~TEveCaloViz
virtual ~TEveCaloViz()
Destructor.
Definition: TEveCalo.cxx:78
TEveRGBAPalette::SetMin
void SetMin(Int_t min)
Set current min value.
Definition: TEveRGBAPalette.cxx:197
TEveCalo2D::fCellListsHighlighted
std::vector< TEveCaloData::vCellId_t * > fCellListsHighlighted
Definition: TEveCalo.h:220
TAxis.h
TEveCaloViz::GetEta
Float_t GetEta() const
Definition: TEveCalo.h:136
TEveCalo.h
TEveCaloViz::ForwardSelection
virtual TEveElement * ForwardSelection()
Management of selection state and ownership of selected cell list is done in TEveCaloData.
Definition: TEveCalo.cxx:95
TEveProjection::GetType
EPType_e GetType() const
Definition: TEveProjections.h:105
TEveCaloViz::GetDataSliceThreshold
Float_t GetDataSliceThreshold(Int_t slice) const
Get threshold for given slice.
Definition: TEveCalo.cxx:86
TEveCaloData::GetMaxVal
virtual Float_t GetMaxVal(Bool_t et) const
Definition: TEveCaloData.h:215
TGLUtil.h
d
#define d(i)
Definition: RSha256.hxx:120
TEveCaloLego::TEveCaloLego
TEveCaloLego(const TEveCaloLego &)=delete
TEveCalo2D::fMaxESumBin
Float_t fMaxESumBin
Definition: TEveCalo.h:222
TMathBase.h
TEveCalo2D::fMaxEtSumBin
Float_t fMaxEtSumBin
Definition: TEveCalo.h:223
make_cnn_model.model
model
Definition: make_cnn_model.py:6
kGray
@ kGray
Definition: Rtypes.h:65
TEveCaloViz::SetDataSliceColor
void SetDataSliceColor(Int_t slice, Color_t col)
Set slice color in data.
Definition: TEveCalo.cxx:129
TEveCaloData::GetCellData
virtual void GetCellData(const CellId_t &id, CellData_t &data) const =0
TEveProjectionManager::GetProjection
TEveProjection * GetProjection()
Definition: TEveProjectionManager.h:55
TEveCaloData::CellGeom_t::EtaMin
Float_t EtaMin() const
Definition: TEveCaloData.h:90
TEveCaloViz::fPhi
Double_t fPhi
Definition: TEveCalo.h:46
Float_t
pt
TPaveText * pt
Definition: entrylist_figure1.C:7
TEveCaloData::GetCellsHighlighted
vCellId_t & GetCellsHighlighted()
Definition: TEveCaloData.h:189
TEveCalo2D::SetScaleAbs
virtual void SetScaleAbs(Bool_t)
Set absolute scale in projected calorimeter.
Definition: TEveCalo.cxx:706
TEveCaloLego
Definition: TEveCalo.h:250
Class
void Class()
Definition: Class.C:29
TEveCaloData::GetCellList
virtual void GetCellList(Float_t etaMin, Float_t etaMax, Float_t phi, Float_t phiRng, vCellId_t &out) const =0
TEveCaloViz::fEtaMin
Double_t fEtaMin
Definition: TEveCalo.h:43
TEveCalo2D::BuildCellIdCache
virtual void BuildCellIdCache()
Build lists of drawn cell IDs. See TEveCalo2DGL::DirecDraw().
Definition: TEveCalo.cxx:559
TEveCalo2D
Definition: TEveCalo.h:200
TEveCaloViz::fBarrelRadius
Float_t fBarrelRadius
Definition: TEveCalo.h:51
TEveCaloLego::fCellList
TEveCaloData::vCellId_t fCellList
Definition: TEveCalo.h:265
TEveCaloData::vCellId_i
std::vector< CellId_t >::iterator vCellId_i
Definition: TEveCaloData.h:147
TEveCaloLego::ComputeBBox
virtual void ComputeBBox()
Fill bounding-box information of the base-class TAttBBox (virtual method).
Definition: TEveCalo.cxx:837
TEveCaloViz::fMaxValAbs
Float_t fMaxValAbs
Definition: TEveCalo.h:59
TEveCaloViz::fCellIdCacheOK
Bool_t fCellIdCacheOK
Definition: TEveCalo.h:41
TAxis::GetNbins
Int_t GetNbins() const
Definition: TAxis.h:121
TEveCaloData::CellId_t
Definition: TEveCaloData.h:57
TEveRefCnt::IncRefCount
void IncRefCount()
Definition: TEveUtil.h:174
TMath
TMath.
Definition: TMathBase.h:35
TEveCaloViz::GetMaxVal
Float_t GetMaxVal() const
Definition: TEveCalo.cxx:159
TAxis::GetBinWidth
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
Definition: TAxis.cxx:540
TMath.h
TEveCaloViz::GetTransitionEtaForward
Float_t GetTransitionEtaForward() const
Get transition eta between barrel and forward end-cap cells.
Definition: TEveCalo.cxx:209
int
TEveRGBAPalette
Definition: TEveRGBAPalette.h:22