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