]>
Commit | Line | Data |
---|---|---|
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 | ||
10 | void 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; | |
70 | lvl3->SetRnrSelf(kFALSE); | |
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); | |
103 | // TEveElement::List_i j = lvl1->BeginChildren(); | |
104 | ||
105 | for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j) | |
106 | { | |
107 | TEveGeoShape* lvl2 = (TEveGeoShape*) *j; | |
108 | lvl2->SetRnrSelf(kTRUE); | |
109 | lvl2->SetMainColor(0); | |
110 | lvl2->SetMainTransparency(80); | |
111 | ||
112 | } | |
113 | ||
114 | //PHOS | |
115 | ||
116 | i++; | |
117 | ||
118 | TEveGeoShape* lvl1 = (TEveGeoShape*) *i; | |
119 | lvl1->SetRnrSelf(kFALSE); | |
120 | // TEveElement::List_i j = lvl1->BeginChildren(); | |
121 | ||
122 | for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j) | |
123 | { | |
124 | TEveGeoShape* lvl2 = (TEveGeoShape*) *j; | |
125 | lvl2->SetRnrSelf(kTRUE); | |
126 | lvl2->SetMainColor(0); | |
127 | lvl2->SetMainTransparency(80); | |
128 | } | |
129 | ||
130 | //HMPID | |
131 | ||
132 | i++; | |
133 | ||
134 | TEveGeoShape* lvl1 = (TEveGeoShape*) *i; | |
135 | lvl1->SetRnrSelf(kFALSE); | |
136 | // TEveElement::List_i j = lvl1->BeginChildren(); | |
137 | ||
138 | for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j) | |
139 | { | |
140 | TEveGeoShape* lvl2 = (TEveGeoShape*) *j; | |
141 | lvl2->SetRnrSelf(kTRUE); | |
142 | lvl2->SetMainColor(0); | |
143 | lvl2->SetMainTransparency(80); | |
144 | } | |
145 | ||
146 | //====================================== | |
147 | ||
148 | // The resulting geometry is NOT added into the global scene! | |
149 | ||
150 | TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root"); | |
151 | TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle"); | |
152 | TEveGeoShape* gsre2 = TEveGeoShape::ImportShapeExtract(gse); | |
153 | f.Close(); | |
154 | ||
155 | // Fix visibility, color and transparency | |
156 | ||
157 | gsre2->SetRnrSelf(kFALSE); | |
158 | TEveElement::List_i i = gsre2->BeginChildren(); | |
159 | ||
160 | //ITS | |
161 | ||
162 | TEveGeoShape* lvl1 = (TEveGeoShape*) *i; | |
163 | lvl1->SetRnrSelf(kFALSE); | |
164 | TEveElement::List_i j = lvl1->BeginChildren(); | |
165 | ||
166 | TEveGeoShape* lvl2 = (TEveGeoShape*) *j; | |
167 | lvl2->SetRnrSelf(kFALSE); | |
168 | TEveElement::List_i k = lvl2->BeginChildren(); | |
169 | ||
170 | TEveGeoShape* its1 = (TEveGeoShape*) *k; | |
171 | its1->SetRnrSelf(kTRUE); | |
172 | its1->SetMainColor(0); | |
173 | its1->SetMainTransparency(80); | |
174 | ||
175 | k++; | |
176 | ||
177 | TEveGeoShape* its2 = (TEveGeoShape*) *k; | |
178 | its2->SetRnrSelf(kTRUE); | |
179 | its2->SetMainColor(0); | |
180 | its2->SetMainTransparency(80); | |
181 | k++; | |
182 | ||
183 | TEveGeoShape* its3 = (TEveGeoShape*) *k; | |
184 | its3->SetRnrSelf(kTRUE); | |
185 | its3->SetMainColor(0); | |
186 | its3->SetMainTransparency(80); | |
187 | ||
188 | //TPC | |
189 | ||
190 | i++; | |
191 | i++; | |
192 | ||
193 | TEveGeoShape* lvl1 = (TEveGeoShape*) *i; | |
194 | lvl1->SetRnrSelf(kFALSE); | |
195 | // TEveElement::List_i j = lvl1->BeginChildren(); | |
196 | ||
197 | for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++) | |
198 | { | |
199 | TEveGeoShape* lvl2 = (TEveGeoShape*) *j; | |
200 | lvl2->SetRnrSelf(kTRUE); | |
201 | lvl2->SetMainColor(0); | |
202 | lvl2->SetMainTransparency(80); | |
203 | } | |
204 | ||
205 | //PHOS | |
206 | ||
207 | i++; | |
208 | ||
209 | TEveGeoShape* lvl1 = (TEveGeoShape*) *i; | |
210 | lvl1->SetRnrSelf(kFALSE); | |
211 | // TEveElement::List_i j = lvl1->BeginChildren(); | |
212 | ||
213 | for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++) | |
214 | { | |
215 | TEveGeoShape* lvl2 = (TEveGeoShape*) *j; | |
216 | lvl2->SetRnrSelf(kTRUE); | |
217 | lvl2->SetMainColor(0); | |
218 | lvl2->SetMainTransparency(80); | |
219 | ||
220 | } | |
221 | ||
222 | //HMPID | |
223 | ||
224 | i++; | |
225 | ||
226 | TEveGeoShape* lvl1 = (TEveGeoShape*) *i; | |
227 | lvl1->SetRnrSelf(kFALSE); | |
228 | // TEveElement::List_i j = lvl1->BeginChildren(); | |
229 | ||
230 | for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++) | |
231 | { | |
232 | TEveGeoShape* lvl2 = (TEveGeoShape*) *j; | |
233 | lvl2->SetRnrSelf(kTRUE); | |
234 | lvl2->SetMainColor(0); | |
235 | lvl2->SetMainTransparency(80); | |
236 | } | |
237 | ||
238 | //====================================== | |
239 | ||
240 | // The resulting geometry is NOT added into the global scene! | |
241 | ||
242 | TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root"); | |
243 | TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle"); | |
244 | TEveGeoShape* gsre3 = TEveGeoShape::ImportShapeExtract(gse); | |
245 | f.Close(); | |
246 | ||
247 | // Fix visibility, color and transparency | |
248 | ||
249 | gsre3->SetRnrSelf(kFALSE); | |
250 | TEveElement::List_i i = gsre3->BeginChildren(); | |
251 | ||
252 | //ITS | |
253 | ||
254 | TEveGeoShape* lvl1 = (TEveGeoShape*) *i; | |
255 | lvl1->SetRnrSelf(kFALSE); | |
256 | TEveElement::List_i j = lvl1->BeginChildren(); | |
257 | ||
258 | TEveGeoShape* lvl2 = (TEveGeoShape*) *j; | |
259 | lvl2->SetRnrSelf(kFALSE); | |
260 | TEveElement::List_i k = lvl2->BeginChildren(); | |
261 | ||
262 | TEveGeoShape* its1 = (TEveGeoShape*) *k; | |
263 | its1->SetRnrSelf(kTRUE); | |
264 | its1->SetMainColor(0); | |
265 | k++; | |
266 | ||
267 | TEveGeoShape* its2 = (TEveGeoShape*) *k; | |
268 | its2->SetRnrSelf(kTRUE); | |
269 | its2->SetMainColor(0); | |
270 | k++; | |
271 | ||
272 | TEveGeoShape* its3 = (TEveGeoShape*) *k; | |
273 | its3->SetRnrSelf(kTRUE); | |
274 | its3->SetMainColor(0); | |
275 | ||
276 | //TPC | |
277 | ||
278 | i++; | |
279 | i++; | |
280 | ||
281 | TEveGeoShape* lvl1 = (TEveGeoShape*) *i; | |
282 | lvl1->SetRnrSelf(kFALSE); | |
283 | // TEveElement::List_i j = lvl1->BeginChildren(); | |
284 | ||
285 | for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++) | |
286 | { | |
287 | TEveGeoShape* lvl2 = (TEveGeoShape*) *j; | |
288 | lvl2->SetRnrSelf(kTRUE); | |
289 | lvl2->SetMainColor(0); | |
290 | lvl2->SetMainTransparency(80); | |
291 | ||
292 | } | |
293 | ||
294 | //PHOS | |
295 | ||
296 | i++; | |
297 | ||
298 | TEveGeoShape* lvl1 = (TEveGeoShape*) *i; | |
299 | lvl1->SetRnrSelf(kFALSE); | |
300 | // TEveElement::List_i j = lvl1->BeginChildren(); | |
301 | ||
302 | for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++) | |
303 | { | |
304 | TEveGeoShape* lvl2 = (TEveGeoShape*) *j; | |
305 | lvl2->SetRnrSelf(kTRUE); | |
306 | lvl2->SetMainColor(0); | |
307 | lvl2->SetMainTransparency(80); | |
308 | } | |
309 | ||
310 | //HMPID | |
311 | ||
312 | i++; | |
313 | ||
314 | TEveGeoShape* lvl1 = (TEveGeoShape*) *i; | |
315 | lvl1->SetRnrSelf(kFALSE); | |
316 | // TEveElement::List_i j = lvl1->BeginChildren(); | |
317 | ||
318 | for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++) | |
319 | { | |
320 | TEveGeoShape* lvl2 = (TEveGeoShape*) *j; | |
321 | lvl2->SetRnrSelf(kTRUE); | |
322 | lvl2->SetMainColor(0); | |
323 | lvl2->SetMainTransparency(80); | |
324 | } | |
325 | ||
326 | //====================================== | |
327 | ||
328 | ||
329 | TEveElement* top = gEve->GetCurrentEvent(); | |
330 | ||
331 | AliEveMultiView *mv = AliEveMultiView::Instance(); | |
332 | ||
333 | mv->InitGeomGentle(gsre1, gsre2, gsre3); | |
334 | ||
335 | gEve->FullRedraw3D(kTRUE, kTRUE); | |
336 | ||
337 | } |