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),
45
46 fEtaMin(-10),
47 fEtaMax(10),
48
49 fPhi(0.),
50 fPhiOffset(TMath::Pi()),
51
53
54 fBarrelRadius(-1.f),
55 fEndCapPosF(-1.f),
56 fEndCapPosB(-1.f),
57
59
60 fMaxTowerH(100),
62 fMaxValAbs(100),
63
65 fPalette(nullptr)
66{
67 // Constructor.
68
71 SetData(data);
72}
73
74////////////////////////////////////////////////////////////////////////////////
75/// Destructor.
76
78{
79 if (fPalette) fPalette->DecRefCount();
80}
81
82////////////////////////////////////////////////////////////////////////////////
83/// Get threshold for given slice.
84
86{
87 return fData->RefSliceInfo(slice).fThreshold;
88}
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
137{
138 fEtaMin=l;
139 fEtaMax=u;
140
142}
143
144////////////////////////////////////////////////////////////////////////////////
145/// Set E/Et plot.
146
148{
149 fPlotEt=isEt;
150 if (fPalette)
151 fPalette->SetLimits(0, TMath::CeilNint(GetMaxVal()));
152
154}
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 {
280 fPalette->SetLimits(0, hlimit);
281 fPalette->SetMin(0);
282 fPalette->SetMax(hlimit);
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;
337 if (fPalette) fPalette->DecRefCount();
339 fPalette->SetDefaultColor(mp.GetDefaultColor());
340 }
341}
342
343////////////////////////////////////////////////////////////////////////////////
344/// Set TEveRGBAPalette object pointer.
345
347{
348 if ( fPalette == p) return;
349 if (fPalette) fPalette->DecRefCount();
350 fPalette = p;
351 if (fPalette) fPalette->IncRefCount();
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
368 return fMaxTowerH/fData->GetMaxVal(fPlotEt);
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) {
381 fPalette->SetDefaultColor((Color_t)4);
382
384 fPalette->SetLimits(0, hlimit);
385 fPalette->SetMin(0);
386 fPalette->SetMax(hlimit);
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
414void TEveCaloViz::SetupColorHeight(Float_t value, Int_t slice, Float_t& outH) const
415{
416 if (fValueIsColor)
417 {
418 outH = GetValToHeight()*fData->GetMaxVal(fPlotEt);
419 UChar_t c[4];
420 fPalette->ColorFromValue((Int_t)value, c);
421 c[3] = fData->GetSliceTransparency(slice);
423 }
424 else
425 {
426 TGLUtil::ColorTransparency(fData->GetSliceColor(slice), fData->GetSliceTransparency(slice));
427 outH = GetValToHeight()*value;
428 }
429}
430
431/** \class TEveCalo3D
432\ingroup TEve
433Visualization of a calorimeter event data in 3D.
434*/
435
436
437////////////////////////////////////////////////////////////////////////////////
438/// Constructor.
439
453
454////////////////////////////////////////////////////////////////////////////////
455/// Build list of drawn cell IDs. See TEveCalo3DGL::DirectDraw().
456
458{
459 fCellList.clear();
460
461 fData->GetCellList(GetEta(), GetEtaRng(), GetPhi(), GetPhiRng(), fCellList);
463}
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
473 Float_t th = (fData) ? GetValToHeight() * fData->GetMaxVal(fPlotEt) : 0;
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),
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) {
512 cids = fCellListsSelected[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
534{
535 if (fManager->GetProjection()->GetType() != fOldProjectionType)
536 {
538 fOldProjectionType = fManager->GetProjection()->GetType();
539 }
540 ComputeBBox();
541}
542
543////////////////////////////////////////////////////////////////////////////////
544/// Set projection manager and model object.
545
547{
549 TEveCaloViz* viz = dynamic_cast<TEveCaloViz*>(model);
551}
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
570 TEveProjection::EPType_e pt = fManager->GetProjection()->GetType();
571 TEveCaloData::vCellId_t* clv; // ids per phi bin in r-phi projection else ids per eta bins in rho-z projection
572
573 Bool_t isRPhi = (pt == TEveProjection::kPT_RPhi);
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 {
588 clv = new TEveCaloData::vCellId_t();
589 fData->GetCellList(GetEta(), GetEtaRng(), axis->GetBinCenter(ibin), axis->GetBinWidth(ibin), *clv);
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 {
607 clv = new TEveCaloData::vCellId_t();
608 fData->GetCellList(axis->GetBinCenter(ibin), axis->GetBinWidth(ibin), fPhi, GetPhiRng(), *clv);
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 {
632 fData->GetCellData(*it, cellData);
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
658void TEveCalo2D::CellSelectionChangedInternal(TEveCaloData::vCellId_t& inputCells, std::vector<TEveCaloData::vCellId_t*>& outputCellLists)
659{
660 Bool_t isRPhi = (fManager->GetProjection()->GetType() == TEveProjection::kPT_RPhi);
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 {
680 TEveCaloData::vCellId_t* idsInBin = fCellLists[bin];
681 if (!idsInBin)
682 continue;
683
684 for (TEveCaloData::vCellId_i i = idsInBin->begin(); i != idsInBin->end(); i++)
685 {
686 for (TEveCaloData::vCellId_i j = inputCells.begin(); j != inputCells.end(); j++)
687 {
688 if( (*i).fTower == (*j).fTower && (*i).fSlice == (*j).fSlice)
689 {
690 if (!outputCellLists[bin])
691 outputCellLists[bin] = new TEveCaloData::vCellId_t();
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;
746 fManager->GetProjection()->ProjectPoint(x, y, z, fDepth);
747 BBoxCheckPoint(x, y, z);
748 x = -r, y = 0, z = 0;
749 fManager->GetProjection()->ProjectPoint(x, y, z, fDepth);
750 BBoxCheckPoint(x, y, z);
751
752 x = 0, y = 0, z = fEndCapPosF + th;
753 fManager->GetProjection()->ProjectPoint(x, y, z, fDepth);
754 BBoxCheckPoint(x, y, z);
755 x = 0, y = 0, z = fEndCapPosB - th;
756 fManager->GetProjection()->ProjectPoint(x, y, z, fDepth);
757 BBoxCheckPoint(x, y, z);
758
759 x = 0, y = r, z = 0;
760 fManager->GetProjection()->ProjectPoint(x, y, z, fDepth);
761 BBoxCheckPoint(x, y, z);
762 x = 0, y = -r, z = 0;
763 fManager->GetProjection()->ProjectPoint(x, y, z, fDepth);
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),
784
785 fNZSteps(6),
786 fZAxisStep(0.f),
787
789
790 fPixelsPerBin(12),
792
796
798 fHPlaneVal(0),
799
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
822{
823 fCellList.clear();
824
825 fData->GetCellList(GetEta(), GetEtaRng(), GetPhi(), GetPhiRng(), fCellList);
827}
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;
851 fData->GetEtaLimits(em, eM);
852 fData->GetPhiLimits(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}
ROOT::R::TRInterface & r
Definition Object.C:4
#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
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char).
Definition RtypesCore.h:52
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
Definition RtypesCore.h:60
bool Bool_t
Boolean (0=false, 1=true) (bool).
Definition RtypesCore.h:77
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
double Double_t
Double 8 bytes.
Definition RtypesCore.h:73
short Color_t
Color number (short).
Definition RtypesCore.h:99
float Float_t
Float 4 bytes (float).
Definition RtypesCore.h:71
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
#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:41
void BBoxInit(Float_t infinity=1e6)
Allocate and prepare for incremental filling.
Definition TAttBBox.cxx:28
Float_t * fBBox
! Dynamic Float_t[6] X(min,max), Y(min,max), Z(min,max)
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:482
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
Definition TAxis.cxx:522
Int_t GetNbins() const
Definition TAxis.h:127
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
Definition TAxis.cxx:546
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
Definition TAxis.cxx:532
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
Bool_t fRnrBarrelFrame
Definition TEveCalo.h:168
Color_t fFrameColor
Definition TEveCalo.h:171
Bool_t fRnrEndCapFrame
Definition TEveCalo.h:167
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
Char_t fFrameTransparency
Definition TEveCalo.h:172
TEveCalo3D(const TEveCalo3D &)=delete
Float_t fFrameWidth
Definition TEveCalo.h:170
A central manager for calorimeter event data.
std::vector< CellId_t > vCellId_t
std::vector< CellId_t >::iterator vCellId_i
TEveCaloLego(const TEveCaloLego &)=delete
Float_t fZAxisStep
Definition TEveCalo.h:283
EProjection_e fProjection
Definition TEveCalo.h:289
Bool_t fNormalizeRebin
Definition TEveCalo.h:287
Char_t fPlaneTransparency
Definition TEveCalo.h:280
virtual void SetData(TEveCaloData *d)
Definition TEveCalo.cxx:813
Color_t fPlaneColor
Definition TEveCalo.h:279
EBoxMode_e fBoxMode
Definition TEveCalo.h:291
Int_t fDrawNumberCellPixels
Definition TEveCalo.h:299
E2DMode_e f2DMode
Definition TEveCalo.h:290
Float_t fHPlaneVal
Definition TEveCalo.h:294
TEveCaloData::vCellId_t fCellList
Definition TEveCalo.h:275
Bool_t fHasFixedHeightIn2DMode
Definition TEveCalo.h:296
void BuildCellIdCache() override
Build list of drawn cell IDs. For more information see TEveCaloLegoGL:DirectDraw().
Definition TEveCalo.cxx:821
Float_t fFixedHeightValIn2DMode
Definition TEveCalo.h:297
Color_t fFontColor
Definition TEveCalo.h:277
Bool_t fDrawHPlane
Definition TEveCalo.h:293
void ComputeBBox() override
Fill bounding-box information of the base-class TAttBBox (virtual method).
Definition TEveCalo.cxx:833
Bool_t fAutoRebin
Definition TEveCalo.h:285
Int_t fCellPixelFontSize
Definition TEveCalo.h:300
Color_t fGridColor
Definition TEveCalo.h:278
Int_t fNZSteps
Definition TEveCalo.h:282
Int_t fPixelsPerBin
Definition TEveCalo.h:286
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
virtual void BuildCellIdCache()=0
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
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
TEveElement()
Default constructor.
Bool_t fCanEditMainColor
Definition TEveElement.h:94
virtual void PaintStandard(TObject *id)
Paint object – a generic implementation for EVE elements.
Bool_t fPickable
TEveProjectable(const TEveProjectable &)
TEveProjectionManager * fManager
virtual void SetProjection(TEveProjectionManager *mng, TEveProjectable *model)
Sets projection manager and reference in the projectable object.
TEveProjected(const TEveProjected &)
Manager class for steering of projections and managing projected objects.
Base-class for non-linear projections.
A generic, speed-optimised mapping from value to RGBA color supporting different wrapping and range t...
Int_t GetMinVal() const
Int_t GetMaxVal() const
Bool_t GetInterpolate() const
Color_t GetDefaultColor() const
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
TNamed()
Definition TNamed.h:38
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:249
Double_t ATan(Double_t)
Returns the principal value of the arc tangent of x, expressed in radians.
Definition TMath.h:651
Double_t Log(Double_t x)
Returns the natural logarithm of x.
Definition TMath.h:767
Int_t CeilNint(Double_t x)
Returns the nearest integer of TMath::Ceil(x).
Definition TMath.h:685
Double_t Tan(Double_t)
Returns the tangent of an angle of x radians.
Definition TMath.h:611
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