Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
geom_alias.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_eve
3/// Demonstrates usage of geometry aliases - merge ALICE ITS with ATLAS MUON.
4///
5/// \image html eve_geom_alias.png
6/// \macro_code
7///
8/// \author Matevz Tadel
9
10void geom_alias()
11{
13
14 gEve->RegisterGeometryAlias("ALICE", "http://root.cern/files/alice.root");
15 gEve->RegisterGeometryAlias("ATLAS", "http://root.cern/files/atlas.root");
16
17 gGeoManager = gEve->GetGeometryByAlias("ALICE");
18
19 auto node1 = gGeoManager->GetTopVolume()->FindNode("ITSV_1");
20 auto its = new TEveGeoTopNode(gGeoManager, node1);
21 gEve->AddGlobalElement(its);
22
23 gGeoManager = gEve->GetGeometryByAlias("ATLAS");
24
25 auto node2 = gGeoManager->GetTopVolume()->FindNode("OUTE_1");
26 auto atlas = new TEveGeoTopNode(gGeoManager, node2);
27 gEve->AddGlobalElement(atlas);
28
29 gEve->FullRedraw3D(kTRUE);
30
31 // EClipType not exported to CINT (see TGLUtil.h):
32 // 0 - no clip, 1 - clip plane, 2 - clip box
33 auto v = gEve->GetDefaultGLViewer();
34 v->GetClipSet()->SetClipType(TGLClip::EType(2));
35 v->RefreshPadEditor(v);
36
37 v->CurrentCamera().RotateRad(-0.5, -2.4);
38 v->DoDraw();
39}
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
externTEveManager * gEve
externTGeoManager * gGeoManager
A wrapper over a TGeoNode, possibly displaced with a global trasformation stored in TEveElement.
Definition TEveGeoNode.h:90
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.