14 #include <boost/bind.hpp>
19 #include "TGLViewer.h"
20 #include "TGLLightSet.h"
21 #include "TGLPerspectiveCamera.h"
22 #include "TGLOrthoCamera.h"
23 #include "TEveManager.h"
24 #include "TEveElement.h"
25 #include "TEveScene.h"
27 #include "TEveTrans.h"
28 #include "TEveScene.h"
29 #include "TEveCaloLegoOverlay.h"
55 m_autoRebin(this,
"Auto rebin on zoom-out",
false),
56 m_pixelsPerBin(this,
"Pixels per bin", 10., 1., 20.),
57 m_projectionMode(this,
"Projection", 0
l, 0
l, 2
l),
58 m_cell2DMode(this,
"Cell2DMode", 1
l, 1
l, 2
l),
59 m_drawValuesIn2D(this,
"Draw Cell2D threshold (pixels)", 40
l, 16
l, 1200
l),
60 m_showOverlay(this,
"Draw scales",
true) {
61 viewerGL()->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
62 viewerGL()->GetLightSet()->SetUseSpecular(
false);
98 TEveCaloDataHist* hdata =
new TEveCaloDataHist();
99 hdata->IncDenyDestroy();
101 Bool_t
status = TH1::AddDirectoryStatus();
102 TH1::AddDirectory(kFALSE);
106 TH1::AddDirectory(
status);
107 Int_t sliceIndex = hdata->AddHistogram(
dummy);
108 (hdata)->RefSliceInfo(sliceIndex).Setup(
"background", 0., 0);
112 data->GetEtaBins()->SetNdivisions(710);
113 data->GetPhiBins()->SetNdivisions(510);
114 data->GetEtaBins()->SetTitleFont(120);
115 data->GetEtaBins()->SetTitle(
"h");
116 data->GetPhiBins()->SetTitleFont(120);
117 data->GetPhiBins()->SetTitle(
"f");
118 data->GetEtaBins()->SetLabelSize(0.02);
119 data->GetEtaBins()->SetTitleSize(0.03);
129 m_lego->SetScaleAbs(
true);
132 m_lego->SetHasFixedHeightIn2DMode(
true);
133 m_lego->SetFixedHeightValIn2DMode(0.001);
136 TEveLegoEventHandler* eh = dynamic_cast<TEveLegoEventHandler*>(
viewerGL()->GetEventHandler());
150 m_lego->ElementChanged(kTRUE, kTRUE);
155 m_lego->ElementChanged(kTRUE, kTRUE);
173 if (
value !=
nullptr) {
175 std::istringstream
s(
value->value());
221 viewerGL()->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
222 TGLOrthoCamera* camera = dynamic_cast<TGLOrthoCamera*>(&(
viewerGL()->RefCamera(TGLViewer::kCameraOrthoXOY)));
225 viewerGL()->SetCurrentCamera(TGLViewer::kCameraPerspXOY);
226 TGLPerspectiveCamera* camera =
227 dynamic_cast<TGLPerspectiveCamera*>(&(
viewerGL()->RefCamera(TGLViewer::kCameraPerspXOY)));
232 viewerGL()->ResetCamerasAfterNextUpdate();
239 bool topView =
viewerGL()->CurrentCamera().IsOrthographic();
240 std::ostringstream
s;
246 TGLOrthoCamera* camera = dynamic_cast<TGLOrthoCamera*>(&(
viewerGL()->RefCamera(TGLViewer::kCameraOrthoXOY)));
249 TGLPerspectiveCamera* camera =
250 dynamic_cast<TGLPerspectiveCamera*>(&(
viewerGL()->RefCamera(TGLViewer::kCameraPerspXOY)));
257 m_lego->ElementChanged(kTRUE, kTRUE);