Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 
10 void geom_alias()
11 {
12  TEveManager::Create();
13 
14  gEve->RegisterGeometryAlias("ALICE", "http://root.cern.ch/files/alice.root");
15  gEve->RegisterGeometryAlias("ATLAS", "http://root.cern.ch/files/atlas.root");
16 
17 
18  gGeoManager = gEve->GetGeometryByAlias("ALICE");
19 
20  auto node1 = gGeoManager->GetTopVolume()->FindNode("ITSV_1");
21  auto its = new TEveGeoTopNode(gGeoManager, node1);
22  gEve->AddGlobalElement(its);
23 
24  gGeoManager = gEve->GetGeometryByAlias("ATLAS");
25 
26  auto node2 = gGeoManager->GetTopVolume()->FindNode("OUTE_1");
27  auto atlas = new TEveGeoTopNode(gGeoManager, node2);
28  gEve->AddGlobalElement(atlas);
29 
30  gEve->FullRedraw3D(kTRUE);
31 
32  // EClipType not exported to CINT (see TGLUtil.h):
33  // 0 - no clip, 1 - clip plane, 2 - clip box
34  auto v = gEve->GetDefaultGLViewer();
35  v->GetClipSet()->SetClipType(TGLClip::EType(2));
36  v->RefreshPadEditor(v);
37 
38  v->CurrentCamera().RotateRad(-0.5, -2.4);
39  v->DoDraw();
40 }