1 #if !defined(__CINT__) || defined(__MAKECINT__)
4 #include <TEveManager.h>
5 #include <TEveElement.h>
6 #include <TEveGeoShape.h>
7 #include <TEveGeoShapeExtract.h>
9 #include <AliEveEventManager.h>
10 #include <AliEveMultiView.h>
13 void geom_gentle_notransparency(Bool_t register_as_global=kTRUE)
20 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
21 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
22 gsre1 = TEveGeoShape::ImportShapeExtract(gse);
25 if (register_as_global)
27 gEve->AddGlobalElement(gsre1);
30 // Fix visibility, color and transparency
32 gsre1->SetRnrSelf(kFALSE);
33 TEveElement::List_i i = gsre1->BeginChildren();
37 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
38 lvl1->SetRnrSelf(kFALSE);
39 TEveElement::List_i j = lvl1->BeginChildren();
41 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
42 lvl2->SetRnrSelf(kFALSE);
43 TEveElement::List_i k = lvl2->BeginChildren();
45 TEveGeoShape* its1 = (TEveGeoShape*) *k;
46 its1->SetRnrSelf(kTRUE);
47 its1->SetMainTransparency(5);
50 TEveGeoShape* its2 = (TEveGeoShape*) *k;
51 its2->SetRnrSelf(kTRUE);
52 its2->SetMainTransparency(5);
55 TEveGeoShape* its3 = (TEveGeoShape*) *k;
56 its3->SetRnrSelf(kTRUE);
57 its3->SetMainTransparency(5);
63 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
64 lvl1->SetRnrSelf(kFALSE);
65 TEveElement::List_i j = lvl1->BeginChildren();
67 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
68 lvl2->SetRnrSelf(kFALSE);
69 TEveElement::List_i k = lvl2->BeginChildren();
71 TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
72 lvl3->SetRnrSelf(kTRUE);
73 lvl3->SetMainTransparency(5);
74 TEveElement::List_i l = lvl3->BeginChildren();
76 TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
77 lvl4->SetRnrSelf(kFALSE);
78 TEveElement::List_i m = lvl4->BeginChildren();
80 TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
81 tpc1->SetRnrSelf(kTRUE);
82 tpc1->SetMainTransparency(5);
85 TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
86 tpc2->SetMainColor(kGray);
87 tpc2->SetMainTransparency(5);
90 TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
91 tpc3->SetRnrSelf(kTRUE);
92 tpc3->SetMainTransparency(5);
100 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
101 lvl1->SetRnrSelf(kFALSE);
102 TEveElement::List_i j = lvl1->BeginChildren();
104 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
105 lvl2->SetRnrSelf(kTRUE);
106 lvl2->SetMainTransparency(5);
109 TEveGeoShape* lvl3 = (TEveGeoShape*) *j;
110 lvl3->SetRnrSelf(kTRUE);
111 lvl3->SetMainTransparency(5);
119 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
120 lvl1->SetRnrSelf(kFALSE);
122 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
124 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
125 lvl2->SetRnrSelf(kTRUE);
126 lvl2->SetMainTransparency(5);
134 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
135 lvl1->SetRnrSelf(kFALSE);
137 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
139 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
140 lvl2->SetRnrSelf(kTRUE);
141 lvl2->SetMainTransparency(5);
147 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
148 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
149 gsre2 = TEveGeoShape::ImportShapeExtract(gse);
154 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
155 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
156 gsre3 = TEveGeoShape::ImportShapeExtract(gse);
160 TEveElement* top = gEve->GetCurrentEvent();
162 AliEveMultiView *mv = AliEveMultiView::Instance();
164 mv->InitGeomGentle(gsre1, gsre2, gsre3, 0);
166 gEve->FullRedraw3D(kTRUE, kTRUE);