Demonstrates usage of EVE calorimetry classes.
"http://root.cern/files/cms_calo_hist.root";
{
auto ecalHist = (
TH2F*)hf->Get(
"ecalLego");
auto hcalHist = (
TH2F*)hf->Get(
"hcalLego");
data->AddHistogram(ecalHist);
data->RefSliceInfo(0).Setup(
"ECAL", 0.3,
kBlue);
data->AddHistogram(hcalHist);
data->RefSliceInfo(1).Setup(
"HCAL", 0.1,
kRed);
data->GetEtaBins()->SetTitleFont(120);
data->GetEtaBins()->SetTitle(
"h");
data->GetPhiBins()->SetTitleFont(120);
data->GetPhiBins()->SetTitle(
"f");
auto lego = MakeCaloLego(
data,
nullptr);
auto packH = slot->MakePack();
packH->SetElementName("Projections");
packH->SetHorizontal();
packH->SetShowTitleBar(
kFALSE);
slot = packH->NewSlot();
auto pack0 = slot->MakePack();
pack0->SetShowTitleBar(
kFALSE);
auto slotLeftTop = pack0->NewSlot();
auto slotLeftBottom = pack0->NewSlot();
slot = packH->NewSlot();
auto pack1 = slot->MakePack();
pack1->SetShowTitleBar(
kFALSE);
auto slotRightTop = pack1->NewSlot();
auto slotRightBottom = pack1->NewSlot();
auto calo3d = MakeCalo3D(
data, slotRightTop);
lego = MakeCaloLego(
data, slotRightBottom);
}
{
if (slot) {
MakeViewerScene(slot,
v, s);
} else {
}
auto glv =
v->GetGLViewer();
glv->AddOverlayElement(overlay);
glv->SetEventHandler
}
{
MakeViewerScene(slot,
v, s);
v->SetElementName(
"Viewer - 3D");
calo3d->SetBarrelRadius(129.00);
calo3d->SetEndCapPos(268.36);
add_jet(calo3d,
"JetCone Lojz", 1.4, 1.0, 0.4, 0.2);
add_jet(calo3d,
"JetCone Mici", -2.0, -2.1, 0.2, 0.4);
return calo3d;
}
{
MakeViewerScene(slot,
v, s);
v->SetElementName(
"Viewer - 2D");
mng->SetProjection(t);
return calo2d;
}
{
}
{
jet->SetMainTransparency(60);
jet->SetCylinder(129 - 10, 268.36 - 10);
jet->AddEllipticCone(eta, phi, deta, dphi);
jet->SetHighlightFrame(
kFALSE);
}
R__EXTERN TEveManager * gEve
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
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.
TEveViewerList * GetViewers() const
TEveViewer * GetDefaultViewer() const
Returns the default viewer - the first one in the fViewers list.
TEveBrowser * GetBrowser() const
TEveGedEditor * GetEditor() const
Returns main object editor.
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
TGListTreeItem * AddToListTree(TEveElement *re, Bool_t open, TGListTree *lt=nullptr)
void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
TEveScene * SpawnNewScene(const char *name, const char *title="")
Create a new scene.
TEveScene * GetEventScene() const
Axes for non-linear projections.
Manager class for steering of projections and managing projected objects.
Eve representation of TGLScene.
void AddElement(TEveElement *el) override
Call base-class implementation.
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.
virtual Bool_t SetTab(Int_t tabIndex, Bool_t emit=kTRUE)
Brings the composite frame with the index tabIndex to the front and generate the following event if t...
2-D histogram with a float per channel (see TH1 documentation)
TGTab * GetTabRight() const
void add_jet(REveElement *parent, const char *name, Float_t eta, Float_t phi, Float_t deta, Float_t dphi)
constexpr Double_t TwoPi()