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
35
36////////////////////////////////////////////////////////////////////////////////
37
38TEveCaloViz::TEveCaloViz(TEveCaloData* data, const char* n, const char* t) :
40 TNamed(n, t),
42
43 fData(nullptr),
44 fCellIdCacheOK(kFALSE),
45
46 fEtaMin(-10),
47 fEtaMax(10),
48
49 fPhi(0.),
50 fPhiOffset(TMath::Pi()),
51
52 fAutoRange(kTRUE),
53
54 fBarrelRadius(-1.f),
55 fEndCapPosF(-1.f),
56 fEndCapPosB(-1.f),
57
58 fPlotEt(kTRUE),
59
60 fMaxTowerH(100),
61 fScaleAbs(kFALSE),
62 fMaxValAbs(100),
63
64 fValueIsColor(kFALSE),
65 fPalette(nullptr)
66{
67 // Constructor.
68
72}
73
74////////////////////////////////////////////////////////////////////////////////
75/// Destructor.
76
81
82////////////////////////////////////////////////////////////////////////////////
83/// Get threshold for given slice.
84
89
90////////////////////////////////////////////////////////////////////////////////
91/// Management of selection state and ownership of selected cell list
92/// is done in TEveCaloData. This is a reason selection is forwarded to it.
93
98
99////////////////////////////////////////////////////////////////////////////////
100/// Management of selection state and ownership of selected cell list
101/// is done in TEveCaloData. We still want GUI editor to display
102/// concrete calo-viz object.
103
105{
106 return this;
107}
108
109////////////////////////////////////////////////////////////////////////////////
110/// Set threshold for given slice.
111
113{
114 fData->SetSliceThreshold(slice, val);
115}
116
117////////////////////////////////////////////////////////////////////////////////
118/// Get slice color from data.
119
121{
122 return fData->RefSliceInfo(slice).fColor;
123}
124
125////////////////////////////////////////////////////////////////////////////////
126/// Set slice color in data.
127
129{
130 fData->SetSliceColor(slice, col);
131}
132
133////////////////////////////////////////////////////////////////////////////////
134/// Set eta range.
135
143
144////////////////////////////////////////////////////////////////////////////////
145/// Set E/Et plot.
146
155
156////////////////////////////////////////////////////////////////////////////////
157
159{
160 // Get maximum plotted value.
161
162 return fData->GetMaxVal(fPlotEt);
163
164}
165
166////////////////////////////////////////////////////////////////////////////////
167/// Set phi range.
168
170{
171 using namespace TMath;
172
173 fPhi = phi;
174 fPhiOffset = rng;
175
177}
178
179////////////////////////////////////////////////////////////////////////////////
180/// Get transition angle between barrel and end-cap cells, assuming fEndCapPosF = -fEndCapPosB.
181
186
187////////////////////////////////////////////////////////////////////////////////
188/// Get transition eta between barrel and end-cap cells, assuming fEndCapPosF = -fEndCapPosB.
189
191{
192 using namespace TMath;
193 Float_t t = GetTransitionTheta()*0.5f;
194 return -Log(Tan(t));
195}
196
197////////////////////////////////////////////////////////////////////////////////
198/// Get transition angle between barrel and forward end-cap cells.
199
204
205////////////////////////////////////////////////////////////////////////////////
206/// Get transition eta between barrel and forward end-cap cells.
207
209{
210 using namespace TMath;
212 return -Log(Tan(t));
213}
214
215////////////////////////////////////////////////////////////////////////////////
216/// Get transition angle between barrel and backward end-cap cells.
217
222
223////////////////////////////////////////////////////////////////////////////////
224/// Get transition eta between barrel and backward end-cap cells.
225
227{
228 using namespace TMath;
230 //negative theta means negative eta
231 return Log(-Tan(t));
232}
233
234
235////////////////////////////////////////////////////////////////////////////////
236/// Set calorimeter event data.
237
239{
240
241 if (data == fData) return;
242 if (fData) fData->RemoveElement(this);
243 fData = data;
244 if (fData)
245 {
246 fData->AddElement(this);
247 DataChanged();
248 }
249}
250
251////////////////////////////////////////////////////////////////////////////////
252/// Update setting and cache on data changed.
253/// Called from TEvecaloData::BroadcastDataChange()
254
256{
257 Double_t min, max, delta;
258
259 fData->GetEtaLimits(min, max);
260 if (fAutoRange) {
261 fEtaMin = min;
262 fEtaMax = max;
263 } else {
264 if (fEtaMin < min) fEtaMin = min;
265 if (fEtaMax > max) fEtaMax = max;
266 }
267
268 fData->GetPhiLimits(min, max);
269 delta = 0.5*(max - min);
270 if (fAutoRange || fPhi < min || fPhi > max) {
271 fPhi = 0.5*(max + min);
272 fPhiOffset = delta;
273 } else {
274 if (fPhiOffset > delta) fPhiOffset = delta;
275 }
276
277 if (fPalette)
278 {
281 fPalette->SetMin(0);
283 }
284
286}
287
288////////////////////////////////////////////////////////////////////////////////
289/// Assert cell id cache is ok.
290/// Returns true if the cache has been updated.
291
293{
294 TEveCaloViz* cv = const_cast<TEveCaloViz*>(this);
295 if (!fCellIdCacheOK) {
296 cv->BuildCellIdCache();
297 return kTRUE;
298 } else {
299 return kFALSE;
300 }
301}
302
303////////////////////////////////////////////////////////////////////////////////
304/// Returns true if given cell is in the ceta phi range.
305
307{
308 if (cellData.EtaMin() >= fEtaMin && cellData.EtaMax() <= fEtaMax)
309 {
311 (fPhi-fPhiOffset, fPhi+fPhiOffset, cellData.PhiMin(), cellData.PhiMax()))
312 return kTRUE;
313 }
314 return kFALSE;
315}
316
317////////////////////////////////////////////////////////////////////////////////
318/// Assign parameters from given model.
319
321{
322 SetData(m->fData);
323
324 fEtaMin = m->fEtaMin;
325 fEtaMax = m->fEtaMax;
326
327 fPhi = m->fPhi;
328 fPhiOffset = m->fPhiOffset;
329
330 fBarrelRadius = m->fBarrelRadius;
331 fEndCapPosF = m->fEndCapPosF;
332 fEndCapPosB = m->fEndCapPosB;
333
334 if (m->fPalette)
335 {
336 TEveRGBAPalette& mp = * m->fPalette;
338 fPalette = new TEveRGBAPalette(mp.GetMinVal(), mp.GetMaxVal(), mp.GetInterpolate());
339 fPalette->SetDefaultColor(mp.GetDefaultColor());
340 }
341}
342
343////////////////////////////////////////////////////////////////////////////////
344/// Set TEveRGBAPalette object pointer.
345
347{
348 if ( fPalette == p) return;
350 fPalette = p;
352}
353
354////////////////////////////////////////////////////////////////////////////////
355/// Get transformation factor from E/Et to height
356
358{
359 if (fScaleAbs)
360 {
361 return fMaxTowerH/fMaxValAbs;
362 }
363 else
364 {
365 if (fData->Empty())
366 return 1;
367
369 }
370}
371
372////////////////////////////////////////////////////////////////////////////////
373/// Make sure the TEveRGBAPalette pointer is not null.
374/// If it is not set, a new one is instantiated and the range is set
375/// to current min/max signal values.
376
378{
379 if (fPalette == nullptr) {
382
385 fPalette->SetMin(0);
387
388 }
389 return fPalette;
390}
391
392////////////////////////////////////////////////////////////////////////////////
393/// Paint this object. Only direct rendering is supported.
394
396{
397 if (fData)
398 {
399 PaintStandard(this);
400 }
401}
402
403////////////////////////////////////////////////////////////////////////////////
404/// Virtual from TEveProjectable, returns TEveCalo2D class.
405
410
411////////////////////////////////////////////////////////////////////////////////
412/// Set color and height for a given value and slice using slice color or TEveRGBAPalette.
413
430
431/** \class TEveCalo3D
432\ingroup TEve
433Visualization of a calorimeter event data in 3D.
434*/
435
436
437////////////////////////////////////////////////////////////////////////////////
438/// Constructor.
439
440TEveCalo3D::TEveCalo3D(TEveCaloData* d, const char* n, const char* t):
441 TEveCaloViz(d, n, t),
442
443 fRnrEndCapFrame (kTRUE),
444 fRnrBarrelFrame (kTRUE),
445 fFrameWidth (0.5),
446 fFrameColor (kGray+1),
447 fFrameTransparency (80)
448{
452}
453
454////////////////////////////////////////////////////////////////////////////////
455/// Build list of drawn cell IDs. See TEveCalo3DGL::DirectDraw().
456
464
465////////////////////////////////////////////////////////////////////////////////
466/// Fill bounding-box information of the base-class TAttBBox (virtual method).
467/// If member 'TEveFrameBox* fFrame' is set, frame's corners are used as bbox.
468
470{
471 BBoxInit();
472
474
475 fBBox[0] = -fBarrelRadius - th;
476 fBBox[1] = fBarrelRadius + th;
477 fBBox[2] = fBBox[0];
478 fBBox[3] = fBBox[1];
479 fBBox[4] = fEndCapPosB - th;
480 fBBox[5] = fEndCapPosF + th;
481}
482
483/** \class TEveCalo2D
484\ingroup TEve
485Visualization of a calorimeter event data in 2D.
486*/
487
488
489////////////////////////////////////////////////////////////////////////////////
490/// Constructor.
491
492TEveCalo2D::TEveCalo2D(const char* n, const char* t):
493 TEveCaloViz(nullptr, n, t),
495 fOldProjectionType(TEveProjection::kPT_Unknown),
496 fMaxESumBin( 0),
497 fMaxEtSumBin(0)
498{
499}
500
501////////////////////////////////////////////////////////////////////////////////
502/// Destructor.
503
505{
507 UInt_t n;
508
509 // clear selected cell ids
510 n = fCellListsSelected.size();
511 for(UInt_t i = 0; i < n; ++i) {
513 if (cids) {
514 cids->clear(); delete cids;
515 }
516 }
517 fCellListsSelected.clear();
518
519 // clear all cell dds
520 n = fCellLists.size();
521 for(UInt_t i = 0; i < n; ++i) {
522 cids = fCellLists[i];
523 if (cids) {
524 cids->clear(); delete cids;
525 }
526 }
527 fCellLists.clear();
528}
529
530////////////////////////////////////////////////////////////////////////////////
531/// This is virtual method from base-class TEveProjected.
532
542
543////////////////////////////////////////////////////////////////////////////////
544/// Set projection manager and model object.
545
552
553////////////////////////////////////////////////////////////////////////////////
554/// Build lists of drawn cell IDs. See TEveCalo2DGL::DirecDraw().
555
557{
558 // clear old cache
559 for (vBinCells_i it = fCellLists.begin(); it != fCellLists.end(); it++)
560 {
561 if (*it)
562 {
563 (*it)->clear();
564 delete *it;
565 }
566 }
567 fCellLists.clear();
568 fCellLists.push_back(nullptr);
569
571 TEveCaloData::vCellId_t* clv; // ids per phi bin in r-phi projection else ids per eta bins in rho-z projection
572
574
575 const TAxis* axis = isRPhi ? fData->GetPhiBins() : fData->GetEtaBins();
576 Int_t nBins = axis->GetNbins();
577
578 Float_t min, max;
579 if (isRPhi)
580 {
581 min = GetPhiMin() - fData->GetEps();
582 max = GetPhiMax() + fData->GetEps();
583 for (Int_t ibin = 1; ibin <= nBins; ++ibin) {
584 clv = nullptr;
586 (min, max, axis->GetBinLowEdge(ibin), axis->GetBinUpEdge(ibin)))
587 {
590 if (clv->empty()) {
591 delete clv; clv = nullptr;
592 }
593 }
594 fCellLists.push_back(clv);
595 }
596 }
597 else
598 {
599 min = GetEtaMin() - fData->GetEps();
600 max = GetEtaMax() + fData->GetEps();
601 for (Int_t ibin = 1; ibin <= nBins; ++ibin) {
602 clv = nullptr;
603 Float_t low = axis->GetBinLowEdge(ibin);
604 Float_t up = axis->GetBinUpEdge(ibin) ;
605 if (low >= min && up <= max)
606 {
609 if (clv->empty()) {
610 delete clv; clv = nullptr;
611 }
612 }
613 fCellLists.push_back(clv);
614 }
615 }
616
617 // cache max bin sum for auto scale
618 if (!fScaleAbs)
619 {
620 fMaxESumBin = 0;
621 fMaxEtSumBin = 0;
622 Float_t sumE = 0;
623 Float_t sumEt = 0;
625 for (Int_t ibin = 1; ibin <= nBins; ++ibin) {
627 if (cids)
628 {
629 sumE = 0; sumEt = 0;
630 for (TEveCaloData::vCellId_i it = cids->begin(); it != cids->end(); it++)
631 {
633 sumE += cellData.Value(kFALSE);
634 sumEt += cellData.Value(kTRUE);
635 }
638 }
639 }
640 ComputeBBox();
641 }
642
644}
645
646////////////////////////////////////////////////////////////////////////////////
647/// Sort selected cells in eta or phi bins for selection and highlight.
648
654
655////////////////////////////////////////////////////////////////////////////////
656/// Sort selected cells in eta or phi bins.
657
659{
661 const TAxis* axis = isRPhi ? fData->GetPhiBins() : fData->GetEtaBins();
662
663 // clear old cache
664 for (vBinCells_i it = outputCellLists.begin(); it != outputCellLists.end(); it++)
665 {
666 if (*it)
667 {
668 (*it)->clear();
669 delete *it;
670 }
671 }
672 outputCellLists.clear();
673 UInt_t nBins = axis->GetNbins();
674 outputCellLists.resize(nBins+1);
675 for (UInt_t b = 0; b <= nBins; ++b)
676 outputCellLists[b] = nullptr;
677
678 for(UInt_t bin = 1; bin <= nBins; ++bin)
679 {
681 if (!idsInBin)
682 continue;
683
684 for (TEveCaloData::vCellId_i i = idsInBin->begin(); i != idsInBin->end(); i++)
685 {
687 {
688 if( (*i).fTower == (*j).fTower && (*i).fSlice == (*j).fSlice)
689 {
690 if (!outputCellLists[bin])
692
693 outputCellLists[bin]->push_back(TEveCaloData::CellId_t((*i).fTower, (*i).fSlice, (*i).fFraction));
694 }
695 }
696 }
697 }
698}
699
700////////////////////////////////////////////////////////////////////////////////
701/// Set absolute scale in projected calorimeter.
702
708
709////////////////////////////////////////////////////////////////////////////////
710/// Virtual function of TEveCaloViz.
711/// Get transformation factor from E/Et to height.
712
714{
716
717 if (fScaleAbs)
718 {
719 return fMaxTowerH/fMaxValAbs;
720 }
721 else
722 {
723 if (fData->Empty())
724 return 1;
725
726 if (fPlotEt)
728 else
729 return fMaxTowerH/fMaxESumBin;
730 }
731}
732
733////////////////////////////////////////////////////////////////////////////////
734/// Fill bounding-box information of the base-class TAttBBox (virtual method).
735/// If member 'TEveFrameBox* fFrame' is set, frame's corners are used as bbox.
736
738{
739 BBoxZero();
740
741 Float_t x, y, z;
742 Float_t th = fMaxTowerH ;
743 Float_t r = fBarrelRadius + th;
744
745 x = r, y = 0, z = 0;
747 BBoxCheckPoint(x, y, z);
748 x = -r, y = 0, z = 0;
750 BBoxCheckPoint(x, y, z);
751
752 x = 0, y = 0, z = fEndCapPosF + th;
754 BBoxCheckPoint(x, y, z);
755 x = 0, y = 0, z = fEndCapPosB - th;
757 BBoxCheckPoint(x, y, z);
758
759 x = 0, y = r, z = 0;
761 BBoxCheckPoint(x, y, z);
762 x = 0, y = -r, z = 0;
764 BBoxCheckPoint(x, y, z);
765}
766
767
768/** \class TEveCaloLego
769\ingroup TEve
770Visualization of calorimeter data as eta/phi histogram.
771*/
772
773
774////////////////////////////////////////////////////////////////////////////////
775/// Constructor.
776
777TEveCaloLego::TEveCaloLego(TEveCaloData* d, const char* n, const char* t):
778 TEveCaloViz(d, n, t),
779
780 fFontColor(-1),
781 fGridColor(-1),
782 fPlaneColor(kRed-5),
783 fPlaneTransparency(60),
784
785 fNZSteps(6),
786 fZAxisStep(0.f),
787
788 fAutoRebin(kTRUE),
789
790 fPixelsPerBin(12),
791 fNormalizeRebin(kFALSE),
792
793 fProjection(kAuto),
794 f2DMode(kValSize),
795 fBoxMode(kBack),
796
797 fDrawHPlane(kFALSE),
798 fHPlaneVal(0),
799
800 fHasFixedHeightIn2DMode(kFALSE),
801 fFixedHeightValIn2DMode(0.f),
802
803 fDrawNumberCellPixels(18), // draw numbers on cell above 30 pixels
804 fCellPixelFontSize(12) // size of cell fonts in pixels
805{
806 fMaxTowerH = 1;
807 SetElementNameTitle("TEveCaloLego", "TEveCaloLego");
808}
809
810////////////////////////////////////////////////////////////////////////////////
811// Set data.
812
817
818////////////////////////////////////////////////////////////////////////////////
819/// Build list of drawn cell IDs. For more information see TEveCaloLegoGL:DirectDraw().
820
828
829////////////////////////////////////////////////////////////////////////////////
830/// Fill bounding-box information of the base-class TAttBBox (virtual method).
831/// If member 'TEveFrameBox* fFrame' is set, frame's corners are used as bbox.
832
834{
835
836 // fBBox = Float_t[6] X(min,max), Y(min,max), Z(min,max)
837
838 BBoxZero();
839
840 Float_t ex = 1.2; // 20% offset for axis labels
841
842 Float_t a = 0.5*ex;
843
844 fBBox[0] = -a;
845 fBBox[1] = a;
846 fBBox[2] = -a;
847 fBBox[3] = a;
848
849 // scaling is relative to shortest XY axis
850 Double_t em, eM, pm, pM;
853 Double_t r = (eM-em)/(pM-pm);
854 if (r<1)
855 {
856 fBBox[2] /= r;
857 fBBox[3] /= r;
858 }
859 else
860 {
861 fBBox[0] *= r;
862 fBBox[1] *= r;
863 }
864
865 fBBox[4] = 0;
866 if (fScaleAbs && !fData->Empty())
868 else
869 fBBox[5] = fMaxTowerH;
870}
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
Color number (short)
Definition RtypesCore.h:99
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:71
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
const char Option_t
Option string (const char)
Definition RtypesCore.h:80
@ kGray
Definition Rtypes.h:66
@ kRed
Definition Rtypes.h:67
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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
const_iterator begin() const
const_iterator end() const
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:41
void BBoxInit(Float_t infinity=1e6)
Dynamic Float_t[6] X(min,max), Y(min,max), Z(min,max)
Definition TAttBBox.cxx:28
Float_t * fBBox
Definition TAttBBox.h:20
Class to manage histogram axis.
Definition TAxis.h:32
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
Definition TAxis.cxx:481
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
Definition TAxis.cxx:521
Int_t GetNbins() const
Definition TAxis.h:127
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
Definition TAxis.cxx:545
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
Definition TAxis.cxx:531
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:84
void UpdateProjection() override
This is virtual method from base-class TEveProjected.
Definition TEveCalo.cxx:533
Float_t fMaxEtSumBin
Definition TEveCalo.h:223
~TEveCalo2D() override
Destructor.
Definition TEveCalo.cxx:504
void BuildCellIdCache() override
Build lists of drawn cell IDs. See TEveCalo2DGL::DirecDraw().
Definition TEveCalo.cxx:556
TEveCalo2D(const TEveCalo2D &)=delete
void CellSelectionChanged() override
Sort selected cells in eta or phi bins for selection and highlight.
Definition TEveCalo.cxx:649
void ComputeBBox() override
Fill bounding-box information of the base-class TAttBBox (virtual method).
Definition TEveCalo.cxx:737
static TClass * Class()
void SetScaleAbs(Bool_t) override
Set absolute scale in projected calorimeter.
Definition TEveCalo.cxx:703
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:658
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:713
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:546
std::vector< TEveCaloData::vCellId_t * > fCellListsSelected
Definition TEveCalo.h:219
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:469
void BuildCellIdCache() override
Build list of drawn cell IDs. See TEveCalo3DGL::DirectDraw().
Definition TEveCalo.cxx:457
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
TEveCaloLego(const TEveCaloLego &)=delete
virtual void SetData(TEveCaloData *d)
Definition TEveCalo.cxx:813
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:821
void ComputeBBox() override
Fill bounding-box information of the base-class TAttBBox (virtual method).
Definition TEveCalo.cxx:833
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:128
Color_t GetDataSliceColor(Int_t slice) const
Get slice color from data.
Definition TEveCalo.cxx:120
Float_t fMaxTowerH
Definition TEveCalo.h:57
~TEveCaloViz() override
Destructor.
Definition TEveCalo.cxx:77
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:292
void SetDataSliceThreshold(Int_t slice, Float_t val)
Set threshold for given slice.
Definition TEveCalo.cxx:112
Float_t fPlotEt
Definition TEveCalo.h:55
Float_t GetDataSliceThreshold(Int_t slice) const
Get threshold for given slice.
Definition TEveCalo.cxx:85
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:226
void SetPlotEt(Bool_t x)
Set E/Et plot.
Definition TEveCalo.cxx:147
TEveRGBAPalette * fPalette
Definition TEveCalo.h:62
void SetPhiWithRng(Float_t x, Float_t r)
Set phi range.
Definition TEveCalo.cxx:169
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:218
Float_t GetTransitionEta() const
Get transition eta between barrel and end-cap cells, assuming fEndCapPosF = -fEndCapPosB.
Definition TEveCalo.cxx:190
Bool_t fAutoRange
Definition TEveCalo.h:49
Float_t GetMaxVal() const
Definition TEveCalo.cxx:158
void SetEta(Float_t l, Float_t u)
Set eta range.
Definition TEveCalo.cxx:136
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:377
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:104
void InvalidateCellIdCache()
Definition TEveCalo.h:93
TClass * ProjectedClass(const TEveProjection *p) const override
Virtual from TEveProjectable, returns TEveCalo2D class.
Definition TEveCalo.cxx:406
void SetPalette(TEveRGBAPalette *p)
Set TEveRGBAPalette object pointer.
Definition TEveCalo.cxx:346
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:200
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:208
Float_t GetTransitionTheta() const
Get transition angle between barrel and end-cap cells, assuming fEndCapPosF = -fEndCapPosB.
Definition TEveCalo.cxx:182
void AssignCaloVizParameters(TEveCaloViz *cv)
Assign parameters from given model.
Definition TEveCalo.cxx:320
void Paint(Option_t *option="") override
Paint this object. Only direct rendering is supported.
Definition TEveCalo.cxx:395
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:94
Double_t fEtaMin
Definition TEveCalo.h:43
virtual Float_t GetValToHeight() const
Get transformation factor from E/Et to height.
Definition TEveCalo.cxx:357
void SetData(TEveCaloData *d)
Set calorimeter event data.
Definition TEveCalo.cxx:238
Float_t GetEtaRng() const
Definition TEveCalo.h:139
void DataChanged()
Update setting and cache on data changed.
Definition TEveCalo.cxx:255
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:306
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:414
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...
void SetMax(Int_t max)
Set current max value.
void SetMin(Int_t min)
Set current min value.
void SetDefaultColor(Color_t ci)
Set default color.
const UChar_t * ColorFromValue(Int_t val) 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:362
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:341
static void Color4ubv(const UChar_t *rgba)
Wrapper for glColor4ubv.
Definition TGLUtil.cxx:1770
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:1732
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:251
Double_t ATan(Double_t)
Returns the principal value of the arc tangent of x, expressed in radians.
Definition TMath.h:651
Int_t CeilNint(Double_t x)
Returns the nearest integer of TMath::Ceil(x).
Definition TMath.h:685
Cell data inner structure.
TMarker m
Definition textangle.C:8
TLine l
Definition textangle.C:4