32const char *
histFile =
"http://root.cern/files/cms_calo_hist.root";
49 auto ecalHist = (
TH2F *)hf->Get(
"ecalLego");
50 auto hcalHist = (
TH2F *)hf->Get(
"hcalLego");
52 data->AddHistogram(ecalHist);
53 data->RefSliceInfo(0).Setup(
"ECAL", 0.3,
kBlue);
54 data->AddHistogram(hcalHist);
55 data->RefSliceInfo(1).Setup(
"HCAL", 0.1,
kRed);
56 data->GetEtaBins()->SetTitleFont(120);
57 data->GetEtaBins()->SetTitle(
"h");
58 data->GetPhiBins()->SetTitleFont(120);
59 data->GetPhiBins()->SetTitle(
"f");
60 data->IncDenyDestroy();
64 auto lego = MakeCaloLego(data,
nullptr);
72 auto packH = slot->MakePack();
73 packH->SetElementName(
"Projections");
74 packH->SetHorizontal();
75 packH->SetShowTitleBar(
kFALSE);
77 slot = packH->NewSlot();
78 auto pack0 = slot->MakePack();
79 pack0->SetShowTitleBar(
kFALSE);
80 auto slotLeftTop = pack0->NewSlot();
81 auto slotLeftBottom = pack0->NewSlot();
83 slot = packH->NewSlot();
84 auto pack1 = slot->MakePack();
85 pack1->SetShowTitleBar(
kFALSE);
86 auto slotRightTop = pack1->NewSlot();
87 auto slotRightBottom = pack1->NewSlot();
90 auto calo3d = MakeCalo3D(data, slotRightTop);
93 lego = MakeCaloLego(data, slotRightBottom);
95 gEve->GetBrowser()->GetTabRight()->SetTab(1);
107 MakeViewerScene(slot,
v, s);
109 v =
gEve->GetDefaultViewer();
110 s =
gEve->GetEventScene();
112 v->SetElementName(
"Viewer - Lego");
121 lego->InitMainTrans();
125 auto glv =
v->GetGLViewer();
127 glv->AddOverlayElement(overlay);
145 MakeViewerScene(slot,
v, s);
146 v->SetElementName(
"Viewer - 3D");
150 calo3d->SetBarrelRadius(129.00);
151 calo3d->SetEndCapPos(268.36);
154 add_jet(calo3d,
"JetCone Lojz", 1.4, 1.0, 0.4, 0.2);
155 add_jet(calo3d,
"JetCone Mici", -2.0, -2.1, 0.2, 0.4);
167 MakeViewerScene(slot,
v, s);
168 v->SetElementName(
"Viewer - 2D");
172 mng->SetProjection(t);
193 v->SpawnGLViewer(
gEve->GetEditor());
195 gEve->GetViewers()->AddElement(
v);
196 s =
gEve->SpawnNewScene(
"Scene");
204 jet->SetMainTransparency(60);
205 jet->SetLineColor(
kRed);
206 jet->SetCylinder(129 - 10, 268.36 - 10);
207 jet->AddEllipticCone(eta, phi, deta, dphi);
208 jet->SetPickable(
kTRUE);
209 jet->SetHighlightFrame(
kFALSE);
float Float_t
Float 4 bytes (float).
Visualization of a calorimeter event data in 2D.
Visualization of a calorimeter event data in 3D.
A central manager for calorimeter data of an event written in TH2F.
A central manager for calorimeter event data.
GL-overlay control GUI for TEveCaloLego.
void SetCaloLego(TEveCaloLego *c)
Visualization of calorimeter data as eta/phi histogram.
void SetElementName(const char *name) override
Virtual function for setting of name of an element.
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
virtual void AddElement(TEveElement *el)
Add el to the list of children.
Draws a jet cone with leading particle is specified in (eta,phi) and cone radius is given.
A base class of TGLEventHandler.
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
Axes for non-linear projections.
Manager class for steering of projections and managing projected objects.
Eve representation of TGLScene.
Eve representation of TGLViewer.
Description of TEveWindowSlot.
void ReplaceWindow(TEveWindow *w)
Replace this window with the passed one.
static TEveWindowSlot * CreateWindowInTab(TGTab *tab, TEveWindow *eve_parent=nullptr)
Create a new tab in a given tab-widget and populate it with a default window-slot.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
static Bool_t SetCacheFileDir(std::string_view cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
Sets the directory where to locally stage/cache remote files.
2-D histogram with a float per channel (see TH1 documentation)
void add_jet(REveElement *parent, const char *name, Float_t eta, Float_t phi, Float_t deta, Float_t dphi)
constexpr Double_t TwoPi()