Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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"
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
31Base class for calorimeter data visualization.
32See TEveCalo2D and TEveCalo3D for concrete implementations.
33*/
34
36
37////////////////////////////////////////////////////////////////////////////////
38
39TEveCaloViz::TEveCaloViz(TEveCaloData* data, const char* n, const char* t) :
41 TNamed(n, t),
43
44 fData(nullptr),
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(nullptr)
67{
68 // Constructor.
69
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;
341 }
342}
343
344////////////////////////////////////////////////////////////////////////////////
345/// Set TEveRGBAPalette object pointer.
346
348{
349 if ( fPalette == p) return;
351 fPalette = p;
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 == nullptr) {
383
386 fPalette->SetMin(0);
388
389 }
390 return fPalette;
391}
392
393////////////////////////////////////////////////////////////////////////////////
394/// Paint this object. Only direct rendering is supported.
395
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
416{
417 if (fValueIsColor)
418 {
420 UChar_t c[4];
422 c[3] = fData->GetSliceTransparency(slice);
424 }
425 else
426 {
428 outH = GetValToHeight()*value;
429 }
430}
431
432/** \class TEveCalo3D
433\ingroup TEve
434Visualization of a calorimeter event data in 3D.
435*/
436
438
439////////////////////////////////////////////////////////////////////////////////
440/// Constructor.
441
442TEveCalo3D::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
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
487Visualization of a calorimeter event data in 2D.
488*/
489
491
492////////////////////////////////////////////////////////////////////////////////
493/// Constructor.
494
495TEveCalo2D::TEveCalo2D(const char* n, const char* t):
496 TEveCaloViz(nullptr, n, t),
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(nullptr);
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 = nullptr;
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->empty()) {
594 delete clv; clv = nullptr;
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 = nullptr;
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->empty()) {
613 delete clv; clv = nullptr;
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;
628 for (Int_t ibin = 1; ibin <= nBins; ++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
661void 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] = nullptr;
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)
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
773Visualization of calorimeter data as eta/phi histogram.
774*/
775
777
778////////////////////////////////////////////////////////////////////////////////
779/// Constructor.
780
781TEveCaloLego::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{
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())
872 else
873 fBBox[5] = fMaxTowerH;
874}
std::string kAuto
Definition RColor.cxx:37
#define d(i)
Definition RSha256.hxx:102
#define b(i)
Definition RSha256.hxx:100
#define c(i)
Definition RSha256.hxx:101
#define a(i)
Definition RSha256.hxx:99
short Color_t
Definition RtypesCore.h:92
unsigned char UChar_t
Definition RtypesCore.h:38
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:377
@ kGray
Definition Rtypes.h:65
@ kRed
Definition Rtypes.h:66
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
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 value
#define hlimit
void BBoxCheckPoint(Float_t x, Float_t y, Float_t z)
Definition TAttBBox.h:69
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
void BBoxInit(Float_t infinity=1e6)
Dynamic Float_t[6] X(min,max), Y(min,max), Z(min,max)
Definition TAttBBox.cxx:29
Float_t * fBBox
Definition TAttBBox.h:20
Class to manage histogram axis.
Definition TAxis.h:31
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
Definition TAxis.cxx:478
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
Definition TAxis.cxx:518
Int_t GetNbins() const
Definition TAxis.h:125
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
Definition TAxis.cxx:540
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
Definition TAxis.cxx:528
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
Visualization of a calorimeter event data in 2D.
Definition TEveCalo.h:202
void UpdateProjection() override
This is virtual method from base-class TEveProjected.
Definition TEveCalo.cxx:536
Float_t fMaxEtSumBin
Definition TEveCalo.h:223
~TEveCalo2D() override
Destructor.
Definition TEveCalo.cxx:507
void BuildCellIdCache() override
Build lists of drawn cell IDs. See TEveCalo2DGL::DirecDraw().
Definition TEveCalo.cxx:559
TEveCalo2D(const TEveCalo2D &)=delete
void CellSelectionChanged() override
Sort selected cells in eta or phi bins for selection and highlight.
Definition TEveCalo.cxx:652
void ComputeBBox() override
Fill bounding-box information of the base-class TAttBBox (virtual method).
Definition TEveCalo.cxx:740
static TClass * Class()
void SetScaleAbs(Bool_t) override
Set absolute scale in projected calorimeter.
Definition TEveCalo.cxx:706
std::vector< TEveCaloData::vCellId_t * > fCellListsHighlighted
Definition TEveCalo.h:220
void CellSelectionChangedInternal(TEveCaloData::vCellId_t &cells, std::vector< TEveCaloData::vCellId_t * > &cellLists)
Sort selected cells in eta or phi bins.
Definition TEveCalo.cxx:661
std::vector< TEveCaloData::vCellId_t * >::iterator vBinCells_i
Definition TEveCalo.h:207
Float_t fMaxESumBin
Definition TEveCalo.h:222
Float_t GetValToHeight() const override
Virtual function of TEveCaloViz.
Definition TEveCalo.cxx:716
std::vector< TEveCaloData::vCellId_t * > fCellLists
Definition TEveCalo.h:217
TEveProjection::EPType_e fOldProjectionType
Definition TEveCalo.h:213
void SetProjection(TEveProjectionManager *proj, TEveProjectable *model) override
Set projection manager and model object.
Definition TEveCalo.cxx:549
std::vector< TEveCaloData::vCellId_t * > fCellListsSelected
Definition TEveCalo.h:219
Visualization of a calorimeter event data in 3D.
Definition TEveCalo.h:158
TEveCaloData::vCellId_t fCellList
Definition TEveCalo.h:165
Color_t fFrameColor
Definition TEveCalo.h:171
void ComputeBBox() override
Fill bounding-box information of the base-class TAttBBox (virtual method).
Definition TEveCalo.cxx:471
void BuildCellIdCache() override
Build list of drawn cell IDs. See TEveCalo3DGL::DirectDraw().
Definition TEveCalo.cxx:459
TEveCalo3D(const TEveCalo3D &)=delete
A central manager for calorimeter event data.
virtual void GetEtaLimits(Double_t &min, Double_t &max) const =0
std::vector< CellId_t > vCellId_t
Bool_t Empty() const
void SetSliceColor(Int_t slice, Color_t col)
Set color for given slice.
virtual void GetCellList(Float_t etaMin, Float_t etaMax, Float_t phi, Float_t phiRng, vCellId_t &out) const =0
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 Float_t GetEps() const
virtual TAxis * GetEtaBins() const
void SetSliceThreshold(Int_t slice, Float_t threshold)
Set threshold for given slice.
Color_t GetSliceColor(Int_t slice) const
Get color for given slice.
SliceInfo_t & RefSliceInfo(Int_t s)
vCellId_t & GetCellsHighlighted()
virtual void GetPhiLimits(Double_t &min, Double_t &max) const =0
virtual TAxis * GetPhiBins() const
vCellId_t & GetCellsSelected()
virtual Float_t GetMaxVal(Bool_t et) const
std::vector< CellId_t >::iterator vCellId_i
Visualization of calorimeter data as eta/phi histogram.
Definition TEveCalo.h:251
TEveCaloLego(const TEveCaloLego &)=delete
virtual void SetData(TEveCaloData *d)
Definition TEveCalo.cxx:817
TEveCaloData::vCellId_t fCellList
Definition TEveCalo.h:265
void BuildCellIdCache() override
Build list of drawn cell IDs. For more information see TEveCaloLegoGL:DirectDraw().
Definition TEveCalo.cxx:825
void ComputeBBox() override
Fill bounding-box information of the base-class TAttBBox (virtual method).
Definition TEveCalo.cxx:837
Base class for calorimeter data visualization.
Definition TEveCalo.h:32
void SetDataSliceColor(Int_t slice, Color_t col)
Set slice color in data.
Definition TEveCalo.cxx:129
Color_t GetDataSliceColor(Int_t slice) const
Get slice color from data.
Definition TEveCalo.cxx:121
Float_t fMaxTowerH
Definition TEveCalo.h:57
~TEveCaloViz() override
Destructor.
Definition TEveCalo.cxx:78
Float_t fEndCapPosF
Definition TEveCalo.h:52
Float_t GetEtaMin() const
Definition TEveCalo.h:137
Bool_t AssertCellIdCache() const
Assert cell id cache is ok.
Definition TEveCalo.cxx:293
void SetDataSliceThreshold(Int_t slice, Float_t val)
Set threshold for given slice.
Definition TEveCalo.cxx:113
Float_t fPlotEt
Definition TEveCalo.h:55
Float_t GetDataSliceThreshold(Int_t slice) const
Get threshold for given slice.
Definition TEveCalo.cxx:86
Float_t GetPhiRng() const
Definition TEveCalo.h:147
Float_t GetTransitionEtaBackward() const
Get transition eta between barrel and backward end-cap cells.
Definition TEveCalo.cxx:227
void SetPlotEt(Bool_t x)
Set E/Et plot.
Definition TEveCalo.cxx:148
TEveRGBAPalette * fPalette
Definition TEveCalo.h:62
virtual void BuildCellIdCache()=0
void SetPhiWithRng(Float_t x, Float_t r)
Set phi range.
Definition TEveCalo.cxx:170
Bool_t fValueIsColor
Definition TEveCalo.h:61
Float_t fBarrelRadius
Definition TEveCalo.h:51
Double_t fEtaMax
Definition TEveCalo.h:44
Float_t GetTransitionThetaBackward() const
Get transition angle between barrel and backward end-cap cells.
Definition TEveCalo.cxx:219
Float_t GetTransitionEta() const
Get transition eta between barrel and end-cap cells, assuming fEndCapPosF = -fEndCapPosB.
Definition TEveCalo.cxx:191
Bool_t fAutoRange
Definition TEveCalo.h:49
Float_t GetMaxVal() const
Definition TEveCalo.cxx:159
void SetEta(Float_t l, Float_t u)
Set eta range.
Definition TEveCalo.cxx:137
Float_t GetEta() const
Definition TEveCalo.h:136
virtual void SetScaleAbs(Bool_t x)
Definition TEveCalo.h:85
TEveRGBAPalette * AssertPalette()
Make sure the TEveRGBAPalette pointer is not null.
Definition TEveCalo.cxx:378
TEveCaloViz(const TEveCaloViz &)=delete
Bool_t fCellIdCacheOK
Definition TEveCalo.h:41
Float_t GetPhi() const
Definition TEveCalo.h:144
TEveElement * ForwardEdit() override
Management of selection state and ownership of selected cell list is done in TEveCaloData.
Definition TEveCalo.cxx:105
void InvalidateCellIdCache()
Definition TEveCalo.h:93
TClass * ProjectedClass(const TEveProjection *p) const override
Virtual from TEveProjectable, returns TEveCalo2D class.
Definition TEveCalo.cxx:407
void SetPalette(TEveRGBAPalette *p)
Set TEveRGBAPalette object pointer.
Definition TEveCalo.cxx:347
Float_t GetEtaMax() const
Definition TEveCalo.h:138
Float_t GetTransitionThetaForward() const
Get transition angle between barrel and forward end-cap cells.
Definition TEveCalo.cxx:201
Bool_t fScaleAbs
Definition TEveCalo.h:58
Double_t fPhiOffset
Definition TEveCalo.h:47
Double_t fPhi
Definition TEveCalo.h:46
TEveCaloData * fData
Definition TEveCalo.h:40
Float_t fEndCapPosB
Definition TEveCalo.h:53
Float_t GetTransitionEtaForward() const
Get transition eta between barrel and forward end-cap cells.
Definition TEveCalo.cxx:209
Float_t GetTransitionTheta() const
Get transition angle between barrel and end-cap cells, assuming fEndCapPosF = -fEndCapPosB.
Definition TEveCalo.cxx:183
void AssignCaloVizParameters(TEveCaloViz *cv)
Assign parameters from given model.
Definition TEveCalo.cxx:321
void Paint(Option_t *option="") override
Paint this object. Only direct rendering is supported.
Definition TEveCalo.cxx:396
Float_t GetPhiMax() const
Definition TEveCalo.h:146
TEveElement * ForwardSelection() override
Management of selection state and ownership of selected cell list is done in TEveCaloData.
Definition TEveCalo.cxx:95
Double_t fEtaMin
Definition TEveCalo.h:43
virtual Float_t GetValToHeight() const
Get transformation factor from E/Et to height.
Definition TEveCalo.cxx:358
void SetData(TEveCaloData *d)
Set calorimeter event data.
Definition TEveCalo.cxx:239
Float_t GetEtaRng() const
Definition TEveCalo.h:139
void DataChanged()
Update setting and cache on data changed.
Definition TEveCalo.cxx:256
Float_t fMaxValAbs
Definition TEveCalo.h:59
Bool_t CellInEtaPhiRng(TEveCaloData::CellData_t &) const
Returns true if given cell is in the ceta phi range.
Definition TEveCalo.cxx:307
Float_t GetPhiMin() const
Definition TEveCalo.h:145
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
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition TEveElement.h:36
virtual void AddElement(TEveElement *el)
Add el to the list of children.
virtual void SetElementNameTitle(const char *name, const char *title)
Virtual function for setting of name and title of render element.
Bool_t fCanEditMainTransparency
Definition TEveElement.h:95
Color_t * fMainColorPtr
Definition TEveElement.h:99
virtual void RemoveElement(TEveElement *el)
Remove el from the list of children.
Bool_t fCanEditMainColor
Definition TEveElement.h:94
virtual void PaintStandard(TObject *id)
Paint object – a generic implementation for EVE elements.
Bool_t fPickable
Abstract base-class for non-linear projectable objects.
Abstract base class for classes that hold results of a non-linear projection transformation.
TEveProjectionManager * fManager
virtual void SetProjection(TEveProjectionManager *mng, TEveProjectable *model)
Sets projection manager and reference in the projectable object.
Manager class for steering of projections and managing projected objects.
TEveProjection * GetProjection()
Base-class for non-linear projections.
virtual void ProjectPoint(Float_t &x, Float_t &y, Float_t &z, Float_t d, EPProc_e p=kPP_Full)=0
EPType_e GetType() const
A generic, speed-optimised mapping from value to RGBA color supporting different wrapping and range t...
Int_t GetMinVal() const
void SetMax(Int_t max)
Set current max value.
void SetMin(Int_t min)
Set current min value.
Int_t GetMaxVal() const
void SetDefaultColor(Color_t ci)
Set default color.
Bool_t GetInterpolate() const
const UChar_t * ColorFromValue(Int_t val) const
Color_t GetDefaultColor() const
void SetLimits(Int_t low, Int_t high)
Set low/high limits on signal value.
void IncRefCount()
Definition TEveUtil.h:174
void DecRefCount()
Definition TEveUtil.h:175
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
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
static void Color4ubv(const UChar_t *rgba)
Wrapper for glColor4ubv.
Definition TGLUtil.cxx:1779
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:1741
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
TPaveText * pt
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
Double_t ex[n]
Definition legend1.C:17
TMath.
Definition TMathBase.h:35
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Definition TMathBase.h:250
Double_t ATan(Double_t)
Returns the principal value of the arc tangent of x, expressed in radians.
Definition TMath.h:640
Int_t CeilNint(Double_t x)
Returns the nearest integer of TMath::Ceil(x).
Definition TMath.h:674
Cell data inner structure.
Float_t Value(Bool_t) const
Return energy value associated with the cell, usually Et.
Float_t EtaMax() const
Float_t PhiMin() const
Float_t PhiMax() const
Float_t EtaMin() const
TMarker m
Definition textangle.C:8
TLine l
Definition textangle.C:4