]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/alice-macros/geom_gentle_transparentdark.C
Coverity
[u/mrichter/AliRoot.git] / EVE / alice-macros / geom_gentle_transparentdark.C
CommitLineData
3aff0c2e 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
10void geom_gentle_transparentdark(Bool_t register_as_global=kTRUE)
11{
12
13 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
14 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
15 TEveGeoShape* gsre1 = TEveGeoShape::ImportShapeExtract(gse);
16 f.Close();
17
18 if (register_as_global)
19 {
20 gEve->AddGlobalElement(gsre1);
21 }
22
23//======================================
24
25 // Fix visibility, color and transparency
26
27 gsre1->SetRnrSelf(kFALSE);
28 TEveElement::List_i i = gsre1->BeginChildren();
29
30//ITS
31
32 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
33 lvl1->SetRnrSelf(kFALSE);
34 TEveElement::List_i j = lvl1->BeginChildren();
35
36 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
37 lvl2->SetRnrSelf(kFALSE);
38 TEveElement::List_i k = lvl2->BeginChildren();
39
40 TEveGeoShape* its1 = (TEveGeoShape*) *k;
41 its1->SetRnrSelf(kTRUE);
42 its1->SetMainColor(0);
43 its1->SetMainTransparency(80);
44 k++;
45
46 TEveGeoShape* its2 = (TEveGeoShape*) *k;
47 its2->SetRnrSelf(kTRUE);
48 its2->SetMainColor(0);
49 its2->SetMainTransparency(80);
50 k++;
51
52 TEveGeoShape* its3 = (TEveGeoShape*) *k;
53 its3->SetRnrSelf(kTRUE);
54 its3->SetMainColor(0);
55 its3->SetMainTransparency(80);
56
57//TPC
58
59 i++;
60
61 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
62 lvl1->SetRnrSelf(kFALSE);
63 TEveElement::List_i j = lvl1->BeginChildren();
64
65 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
66 lvl2->SetRnrSelf(kFALSE);
67 TEveElement::List_i k = lvl2->BeginChildren();
68
69 TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
a13d7c88 70 lvl3->SetRnrSelf(kTRUE);
3aff0c2e 71 lvl3->SetMainColor(0);
72 lvl3->SetMainTransparency(80);
73 TEveElement::List_i l = lvl3->BeginChildren();
74
75 TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
76 lvl4->SetRnrSelf(kFALSE);
77 TEveElement::List_i m = lvl4->BeginChildren();
78
79 TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
80 tpc1->SetRnrSelf(kTRUE);
81 tpc1->SetMainColor(0);
82 tpc1->SetMainTransparency(80);
83 m++;
84
85 TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
86 tpc2->SetMainColor(kGray);
87 tpc2->SetMainColor(0);
88 tpc2->SetMainTransparency(80);
89 m++;
90
91 TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
92 tpc3->SetRnrSelf(kTRUE);
93 tpc3->SetMainColor(0);
94 tpc3->SetMainTransparency(80);
95 m++;
96
97//TRD+TOF
98
99 i++;
100
101 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
102 lvl1->SetRnrSelf(kFALSE);
a13d7c88 103 TEveElement::List_i j = lvl1->BeginChildren();
3aff0c2e 104
a13d7c88 105 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
106 lvl2->SetRnrSelf(kTRUE);
107 lvl2->SetMainColor(0);
108 lvl2->SetMainTransparency(80);
109 j++;
3aff0c2e 110
a13d7c88 111 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
112 lvl2->SetRnrSelf(kTRUE);
113 lvl2->SetMainColor(0);
114 lvl2->SetMainTransparency(80);
3aff0c2e 115
116//PHOS
117
118 i++;
119
120 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
121 lvl1->SetRnrSelf(kFALSE);
122// TEveElement::List_i j = lvl1->BeginChildren();
123
124 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
125 {
126 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
127 lvl2->SetRnrSelf(kTRUE);
128 lvl2->SetMainColor(0);
129 lvl2->SetMainTransparency(80);
130 }
131
132//HMPID
133
134 i++;
135
136 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
137 lvl1->SetRnrSelf(kFALSE);
138// TEveElement::List_i j = lvl1->BeginChildren();
139
140 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
141 {
142 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
143 lvl2->SetRnrSelf(kTRUE);
144 lvl2->SetMainColor(0);
145 lvl2->SetMainTransparency(80);
146 }
147
148//======================================
149
150 // The resulting geometry is NOT added into the global scene!
151
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);
155 f.Close();
156
157 // Fix visibility, color and transparency
158
159 gsre2->SetRnrSelf(kFALSE);
160 TEveElement::List_i i = gsre2->BeginChildren();
161
162//ITS
163
164 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
165 lvl1->SetRnrSelf(kFALSE);
166 TEveElement::List_i j = lvl1->BeginChildren();
167
168 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
169 lvl2->SetRnrSelf(kFALSE);
170 TEveElement::List_i k = lvl2->BeginChildren();
171
172 TEveGeoShape* its1 = (TEveGeoShape*) *k;
173 its1->SetRnrSelf(kTRUE);
174 its1->SetMainColor(0);
175 its1->SetMainTransparency(80);
176
177 k++;
178
179 TEveGeoShape* its2 = (TEveGeoShape*) *k;
180 its2->SetRnrSelf(kTRUE);
181 its2->SetMainColor(0);
182 its2->SetMainTransparency(80);
183 k++;
184
185 TEveGeoShape* its3 = (TEveGeoShape*) *k;
186 its3->SetRnrSelf(kTRUE);
187 its3->SetMainColor(0);
188 its3->SetMainTransparency(80);
189
190//TPC
191
192 i++;
3aff0c2e 193
194 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
195 lvl1->SetRnrSelf(kFALSE);
196// TEveElement::List_i j = lvl1->BeginChildren();
197
198 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
199 {
200 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
201 lvl2->SetRnrSelf(kTRUE);
202 lvl2->SetMainColor(0);
203 lvl2->SetMainTransparency(80);
204 }
205
206//PHOS
207
208 i++;
a13d7c88 209 i++;
3aff0c2e 210
211 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
212 lvl1->SetRnrSelf(kFALSE);
213// TEveElement::List_i j = lvl1->BeginChildren();
214
215 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
216 {
217 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
218 lvl2->SetRnrSelf(kTRUE);
219 lvl2->SetMainColor(0);
220 lvl2->SetMainTransparency(80);
221
222 }
223
224//HMPID
225
226 i++;
227
228 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
229 lvl1->SetRnrSelf(kFALSE);
230// TEveElement::List_i j = lvl1->BeginChildren();
231
232 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
233 {
234 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
235 lvl2->SetRnrSelf(kTRUE);
236 lvl2->SetMainColor(0);
237 lvl2->SetMainTransparency(80);
238 }
239
240//======================================
241
242 // The resulting geometry is NOT added into the global scene!
243
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);
247 f.Close();
248
249 // Fix visibility, color and transparency
250
251 gsre3->SetRnrSelf(kFALSE);
252 TEveElement::List_i i = gsre3->BeginChildren();
253
254//ITS
255
256 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
257 lvl1->SetRnrSelf(kFALSE);
258 TEveElement::List_i j = lvl1->BeginChildren();
259
260 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
261 lvl2->SetRnrSelf(kFALSE);
262 TEveElement::List_i k = lvl2->BeginChildren();
263
264 TEveGeoShape* its1 = (TEveGeoShape*) *k;
265 its1->SetRnrSelf(kTRUE);
266 its1->SetMainColor(0);
267 k++;
268
269 TEveGeoShape* its2 = (TEveGeoShape*) *k;
270 its2->SetRnrSelf(kTRUE);
271 its2->SetMainColor(0);
272 k++;
273
274 TEveGeoShape* its3 = (TEveGeoShape*) *k;
275 its3->SetRnrSelf(kTRUE);
276 its3->SetMainColor(0);
277
278//TPC
279
280 i++;
3aff0c2e 281
282 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
283 lvl1->SetRnrSelf(kFALSE);
284// TEveElement::List_i j = lvl1->BeginChildren();
285
286 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
287 {
288 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
289 lvl2->SetRnrSelf(kTRUE);
290 lvl2->SetMainColor(0);
291 lvl2->SetMainTransparency(80);
292
293 }
294
295//PHOS
296
297 i++;
a13d7c88 298 i++;
3aff0c2e 299
300 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
301 lvl1->SetRnrSelf(kFALSE);
302// TEveElement::List_i j = lvl1->BeginChildren();
303
304 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
305 {
306 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
307 lvl2->SetRnrSelf(kTRUE);
308 lvl2->SetMainColor(0);
309 lvl2->SetMainTransparency(80);
310 }
311
312//HMPID
313
314 i++;
315
316 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
317 lvl1->SetRnrSelf(kFALSE);
318// TEveElement::List_i j = lvl1->BeginChildren();
319
320 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
321 {
322 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
323 lvl2->SetRnrSelf(kTRUE);
324 lvl2->SetMainColor(0);
325 lvl2->SetMainTransparency(80);
326 }
327
3aff0c2e 328 TEveElement* top = gEve->GetCurrentEvent();
329
330 AliEveMultiView *mv = AliEveMultiView::Instance();
331
332 mv->InitGeomGentle(gsre1, gsre2, gsre3);
333
334 gEve->FullRedraw3D(kTRUE, kTRUE);
335
336}