]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/geom_vzero.C
Adding ALICE specific implementations of Eve
[u/mrichter/AliRoot.git] / EVE / alice-macros / geom_vzero.C
1 // $Id$
2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4 /**************************************************************************
5  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9
10 #if !defined(__CINT__) || defined(__MAKECINT__)
11 #include <TGeoManager.h>
12 #include <TGeoNode.h>
13 #include <TEveManager.h>
14 #include <TEveElement.h>
15 #include <TEveGeoNode.h>
16
17 #include <AliEveEventManager.h>
18 #endif
19
20 void geom_vzero()
21 {
22   static const TEveException kEH("geom_vzero() ");
23
24   AliEveEventManager::AssertGeometry();
25
26   TEveElementList* list = new TEveElementList("VZero");
27   gEve->AddGlobalElement(list);
28
29   TGeoNode* node = 0;
30   TEveGeoTopNode* re;
31
32   TGeoNode* mnode = gGeoManager->GetTopVolume()->FindNode("VZERO_1");
33   if (!mnode) {
34     Error(kEH, "mother node not found.");
35     return;
36   }
37
38   node = mnode->GetVolume()->FindNode("V0RI_1");
39   printf("opofoih %p\n", node);
40   if (!node) {
41     Error(kEH, "V0R not found.");
42     return;
43   }
44   re = new TEveGeoTopNode(gGeoManager, node);
45   re->UseNodeTrans();
46   gEve->AddGlobalElement(re, list);
47
48   node = mnode->GetVolume()->FindNode("V0LE_1");
49   if (!node) {
50     Error(kEH, "V0L not found.");
51     return;
52   }
53   re = new TEveGeoTopNode(gGeoManager, node);
54   re->UseNodeTrans();
55   gEve->AddGlobalElement(re, list);
56
57   gEve->Redraw3D();
58 }