2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
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 **************************************************************************/
10 void geom_gentle_transparentdark(Bool_t register_as_global=kTRUE)
13 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
14 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
15 TEveGeoShape* gsre1 = TEveGeoShape::ImportShapeExtract(gse);
18 if (register_as_global)
20 gEve->AddGlobalElement(gsre1);
23 //======================================
25 // Fix visibility, color and transparency
27 gsre1->SetRnrSelf(kFALSE);
28 TEveElement::List_i i = gsre1->BeginChildren();
32 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
33 lvl1->SetRnrSelf(kFALSE);
34 TEveElement::List_i j = lvl1->BeginChildren();
36 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
37 lvl2->SetRnrSelf(kFALSE);
38 TEveElement::List_i k = lvl2->BeginChildren();
40 TEveGeoShape* its1 = (TEveGeoShape*) *k;
41 its1->SetRnrSelf(kTRUE);
42 its1->SetMainColor(0);
43 its1->SetMainTransparency(80);
46 TEveGeoShape* its2 = (TEveGeoShape*) *k;
47 its2->SetRnrSelf(kTRUE);
48 its2->SetMainColor(0);
49 its2->SetMainTransparency(80);
52 TEveGeoShape* its3 = (TEveGeoShape*) *k;
53 its3->SetRnrSelf(kTRUE);
54 its3->SetMainColor(0);
55 its3->SetMainTransparency(80);
61 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
62 lvl1->SetRnrSelf(kFALSE);
63 TEveElement::List_i j = lvl1->BeginChildren();
65 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
66 lvl2->SetRnrSelf(kFALSE);
67 TEveElement::List_i k = lvl2->BeginChildren();
69 TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
70 lvl3->SetRnrSelf(kTRUE);
71 lvl3->SetMainColor(0);
72 lvl3->SetMainTransparency(80);
73 TEveElement::List_i l = lvl3->BeginChildren();
75 TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
76 lvl4->SetRnrSelf(kFALSE);
77 TEveElement::List_i m = lvl4->BeginChildren();
79 TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
80 tpc1->SetRnrSelf(kTRUE);
81 tpc1->SetMainColor(0);
82 tpc1->SetMainTransparency(80);
85 TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
86 tpc2->SetMainColor(kGray);
87 tpc2->SetMainColor(0);
88 tpc2->SetMainTransparency(80);
91 TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
92 tpc3->SetRnrSelf(kTRUE);
93 tpc3->SetMainColor(0);
94 tpc3->SetMainTransparency(80);
101 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
102 lvl1->SetRnrSelf(kFALSE);
103 TEveElement::List_i j = lvl1->BeginChildren();
105 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
106 lvl2->SetRnrSelf(kTRUE);
107 lvl2->SetMainColor(0);
108 lvl2->SetMainTransparency(80);
111 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
112 lvl2->SetRnrSelf(kTRUE);
113 lvl2->SetMainColor(0);
114 lvl2->SetMainTransparency(80);
120 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
121 lvl1->SetRnrSelf(kFALSE);
122 // TEveElement::List_i j = lvl1->BeginChildren();
124 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
126 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
127 lvl2->SetRnrSelf(kTRUE);
128 lvl2->SetMainColor(0);
129 lvl2->SetMainTransparency(80);
136 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
137 lvl1->SetRnrSelf(kFALSE);
138 // TEveElement::List_i j = lvl1->BeginChildren();
140 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
142 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
143 lvl2->SetRnrSelf(kTRUE);
144 lvl2->SetMainColor(0);
145 lvl2->SetMainTransparency(80);
148 //======================================
150 // The resulting geometry is NOT added into the global scene!
152 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
153 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
154 TEveGeoShape* gsre2 = TEveGeoShape::ImportShapeExtract(gse);
157 // Fix visibility, color and transparency
159 gsre2->SetRnrSelf(kFALSE);
160 TEveElement::List_i i = gsre2->BeginChildren();
164 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
165 lvl1->SetRnrSelf(kFALSE);
166 TEveElement::List_i j = lvl1->BeginChildren();
168 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
169 lvl2->SetRnrSelf(kFALSE);
170 TEveElement::List_i k = lvl2->BeginChildren();
172 TEveGeoShape* its1 = (TEveGeoShape*) *k;
173 its1->SetRnrSelf(kTRUE);
174 its1->SetMainColor(0);
175 its1->SetMainTransparency(80);
179 TEveGeoShape* its2 = (TEveGeoShape*) *k;
180 its2->SetRnrSelf(kTRUE);
181 its2->SetMainColor(0);
182 its2->SetMainTransparency(80);
185 TEveGeoShape* its3 = (TEveGeoShape*) *k;
186 its3->SetRnrSelf(kTRUE);
187 its3->SetMainColor(0);
188 its3->SetMainTransparency(80);
194 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
195 lvl1->SetRnrSelf(kFALSE);
196 // TEveElement::List_i j = lvl1->BeginChildren();
198 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
200 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
201 lvl2->SetRnrSelf(kTRUE);
202 lvl2->SetMainColor(0);
203 lvl2->SetMainTransparency(80);
211 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
212 lvl1->SetRnrSelf(kFALSE);
213 // TEveElement::List_i j = lvl1->BeginChildren();
215 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
217 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
218 lvl2->SetRnrSelf(kTRUE);
219 lvl2->SetMainColor(0);
220 lvl2->SetMainTransparency(80);
228 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
229 lvl1->SetRnrSelf(kFALSE);
230 // TEveElement::List_i j = lvl1->BeginChildren();
232 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
234 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
235 lvl2->SetRnrSelf(kTRUE);
236 lvl2->SetMainColor(0);
237 lvl2->SetMainTransparency(80);
240 //======================================
242 // The resulting geometry is NOT added into the global scene!
244 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
245 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
246 TEveGeoShape* gsre3 = TEveGeoShape::ImportShapeExtract(gse);
249 // Fix visibility, color and transparency
251 gsre3->SetRnrSelf(kFALSE);
252 TEveElement::List_i i = gsre3->BeginChildren();
256 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
257 lvl1->SetRnrSelf(kFALSE);
258 TEveElement::List_i j = lvl1->BeginChildren();
260 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
261 lvl2->SetRnrSelf(kFALSE);
262 TEveElement::List_i k = lvl2->BeginChildren();
264 TEveGeoShape* its1 = (TEveGeoShape*) *k;
265 its1->SetRnrSelf(kTRUE);
266 its1->SetMainColor(0);
269 TEveGeoShape* its2 = (TEveGeoShape*) *k;
270 its2->SetRnrSelf(kTRUE);
271 its2->SetMainColor(0);
274 TEveGeoShape* its3 = (TEveGeoShape*) *k;
275 its3->SetRnrSelf(kTRUE);
276 its3->SetMainColor(0);
282 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
283 lvl1->SetRnrSelf(kFALSE);
284 // TEveElement::List_i j = lvl1->BeginChildren();
286 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
288 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
289 lvl2->SetRnrSelf(kTRUE);
290 lvl2->SetMainColor(0);
291 lvl2->SetMainTransparency(80);
300 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
301 lvl1->SetRnrSelf(kFALSE);
302 // TEveElement::List_i j = lvl1->BeginChildren();
304 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
306 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
307 lvl2->SetRnrSelf(kTRUE);
308 lvl2->SetMainColor(0);
309 lvl2->SetMainTransparency(80);
316 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
317 lvl1->SetRnrSelf(kFALSE);
318 // TEveElement::List_i j = lvl1->BeginChildren();
320 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
322 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
323 lvl2->SetRnrSelf(kTRUE);
324 lvl2->SetMainColor(0);
325 lvl2->SetMainTransparency(80);
328 TEveElement* top = gEve->GetCurrentEvent();
330 AliEveMultiView *mv = AliEveMultiView::Instance();
332 mv->InitGeomGentle(gsre1, gsre2, gsre3);
334 gEve->FullRedraw3D(kTRUE, kTRUE);