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>
14 void geom_gentle_transparentlight(Bool_t register_as_global=kTRUE)
21 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
22 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
23 gsre1 = TEveGeoShape::ImportShapeExtract(gse);
26 if (register_as_global)
28 gEve->AddGlobalElement(gsre1);
31 // Fix visibility, color and transparency
33 gsre1->SetRnrSelf(kFALSE);
34 TEveElement::List_i i = gsre1->BeginChildren();
38 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
39 lvl1->SetRnrSelf(kFALSE);
40 TEveElement::List_i j = lvl1->BeginChildren();
42 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
43 lvl2->SetRnrSelf(kFALSE);
44 TEveElement::List_i k = lvl2->BeginChildren();
46 TEveGeoShape* its1 = (TEveGeoShape*) *k;
47 its1->SetRnrSelf(kTRUE);
48 its1->SetMainColor(1);
49 its1->SetMainTransparency(80);
52 TEveGeoShape* its2 = (TEveGeoShape*) *k;
53 its2->SetRnrSelf(kTRUE);
54 its2->SetMainColor(1);
55 its2->SetMainTransparency(80);
58 TEveGeoShape* its3 = (TEveGeoShape*) *k;
59 its3->SetRnrSelf(kTRUE);
60 its3->SetMainColor(1);
61 its3->SetMainTransparency(80);
67 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
68 lvl1->SetRnrSelf(kFALSE);
69 TEveElement::List_i j = lvl1->BeginChildren();
71 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
72 lvl2->SetRnrSelf(kFALSE);
73 TEveElement::List_i k = lvl2->BeginChildren();
75 TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
76 lvl3->SetRnrSelf(kFALSE);
77 lvl3->SetMainColor(1);
78 lvl3->SetMainTransparency(80);
79 TEveElement::List_i l = lvl3->BeginChildren();
81 TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
82 lvl4->SetRnrSelf(kFALSE);
83 TEveElement::List_i m = lvl4->BeginChildren();
85 TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
86 tpc1->SetRnrSelf(kTRUE);
87 tpc1->SetMainColor(1);
88 tpc1->SetMainTransparency(80);
91 TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
92 tpc2->SetRnrSelf(kTRUE);
93 tpc2->SetMainColor(1);
94 tpc2->SetMainTransparency(80);
97 TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
98 tpc3->SetRnrSelf(kTRUE);
99 tpc3->SetMainColor(1);
100 tpc3->SetMainTransparency(80);
107 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
108 lvl1->SetRnrSelf(kFALSE);
109 TEveElement::List_i j = lvl1->BeginChildren();
111 TEveGeoShape* trd1 = (TEveGeoShape*) *j;
112 trd1->SetRnrSelf(kTRUE);
113 trd1->SetMainColor(1);
114 trd1->SetMainTransparency(80);
117 TEveGeoShape* tof1 = (TEveGeoShape*) *j;
118 tof1->SetRnrSelf(kTRUE);
119 tof1->SetMainColor(1);
120 tof1->SetMainTransparency(80);
126 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
127 lvl1->SetRnrSelf(kFALSE);
129 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
131 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
132 lvl2->SetRnrSelf(kTRUE);
133 lvl2->SetMainColor(1);
134 lvl2->SetMainTransparency(80);
141 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
142 lvl1->SetRnrSelf(kFALSE);
144 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
146 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
147 lvl2->SetRnrSelf(kTRUE);
148 lvl2->SetMainColor(1);
149 lvl2->SetMainTransparency(80);
156 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
157 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
158 gsre2 = TEveGeoShape::ImportShapeExtract(gse);
161 // Fix visibility, color and transparency
163 gsre2->SetRnrSelf(kFALSE);
164 TEveElement::List_i i = gsre2->BeginChildren();
168 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
169 lvl1->SetRnrSelf(kFALSE);
170 TEveElement::List_i j = lvl1->BeginChildren();
172 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
173 lvl2->SetRnrSelf(kFALSE);
174 TEveElement::List_i k = lvl2->BeginChildren();
176 TEveGeoShape* its1 = (TEveGeoShape*) *k;
177 its1->SetRnrSelf(kTRUE);
178 its1->SetMainColor(1);
179 its1->SetMainTransparency(80);
183 TEveGeoShape* its2 = (TEveGeoShape*) *k;
184 its2->SetRnrSelf(kTRUE);
185 its2->SetMainColor(1);
186 its2->SetMainTransparency(80);
189 TEveGeoShape* its3 = (TEveGeoShape*) *k;
190 its3->SetRnrSelf(kTRUE);
191 its3->SetMainColor(1);
192 its3->SetMainTransparency(80);
198 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
199 lvl1->SetRnrSelf(kFALSE);
201 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
203 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
204 lvl2->SetRnrSelf(kTRUE);
205 lvl2->SetMainColor(1);
206 lvl2->SetMainTransparency(80);
215 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
216 lvl1->SetRnrSelf(kFALSE);
218 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
220 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
221 lvl2->SetRnrSelf(kTRUE);
222 lvl2->SetMainColor(1);
223 lvl2->SetMainTransparency(80);
232 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
233 lvl1->SetRnrSelf(kFALSE);
235 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
237 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
238 lvl2->SetRnrSelf(kTRUE);
239 lvl2->SetMainColor(1);
240 lvl2->SetMainTransparency(80);
247 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
248 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
249 gsre3 = TEveGeoShape::ImportShapeExtract(gse);
252 // Fix visibility, color and transparency
254 gsre3->SetRnrSelf(kFALSE);
255 TEveElement::List_i i = gsre3->BeginChildren();
259 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
260 lvl1->SetRnrSelf(kFALSE);
261 TEveElement::List_i j = lvl1->BeginChildren();
263 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
264 lvl2->SetRnrSelf(kFALSE);
265 TEveElement::List_i k = lvl2->BeginChildren();
267 TEveGeoShape* its1 = (TEveGeoShape*) *k;
268 its1->SetRnrSelf(kTRUE);
269 its1->SetMainColor(1);
272 TEveGeoShape* its2 = (TEveGeoShape*) *k;
273 its2->SetRnrSelf(kTRUE);
274 its2->SetMainColor(1);
277 TEveGeoShape* its3 = (TEveGeoShape*) *k;
278 its3->SetRnrSelf(kTRUE);
279 its3->SetMainColor(1);
286 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
287 lvl1->SetRnrSelf(kFALSE);
289 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
291 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
292 lvl2->SetRnrSelf(kTRUE);
293 lvl2->SetMainColor(1);
294 lvl2->SetMainTransparency(80);
303 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
304 lvl1->SetRnrSelf(kFALSE);
306 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
308 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
309 lvl2->SetRnrSelf(kTRUE);
310 lvl2->SetMainColor(1);
311 lvl2->SetMainTransparency(80);
319 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
320 lvl1->SetRnrSelf(kFALSE);
322 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
324 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
325 lvl2->SetRnrSelf(kTRUE);
326 lvl2->SetMainColor(1);
327 lvl2->SetMainTransparency(80);
332 //fix all the viewers
334 TEveElement* top = gEve->GetCurrentEvent();
336 AliEveMultiView *mv = AliEveMultiView::Instance();
338 mv->InitGeomGentle(gsre1, gsre2, gsre3, 0);
340 gEve->FullRedraw3D(kTRUE, kTRUE);