1 #if !defined(__CINT__) || defined(__MAKECINT__)
3 #include <TEveManager.h>
4 #include <TEveElement.h>
5 #include <TEveGeoShape.h>
6 #include <TEveGeoShapeExtract.h>
8 #include <AliEveEventManager.h>
9 #include <AliEveMultiView.h>
12 void geom_gentle_green(Bool_t register_as_global=kTRUE)
18 {TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
19 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
20 gsre1 = TEveGeoShape::ImportShapeExtract(gse);
23 if (register_as_global)
25 gEve->AddGlobalElement(gsre1);
28 // Fix visibility, color and transparency
30 gsre1->SetRnrSelf(kFALSE);
31 TEveElement::List_i i = gsre1->BeginChildren();
35 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
36 lvl1->SetRnrSelf(kFALSE);
37 TEveElement::List_i j = lvl1->BeginChildren();
39 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
40 lvl2->SetRnrSelf(kFALSE);
41 TEveElement::List_i k = lvl2->BeginChildren();
43 TEveGeoShape* its1 = (TEveGeoShape*) *k;
44 its1->SetRnrSelf(kTRUE);
45 its1->SetMainColor(kMagenta-5);
46 its1->SetMainTransparency(60);
49 TEveGeoShape* its2 = (TEveGeoShape*) *k;
50 its2->SetRnrSelf(kTRUE);
51 its2->SetMainColor(kCyan-5);
52 its2->SetMainTransparency(60);
55 TEveGeoShape* its3 = (TEveGeoShape*) *k;
56 its3->SetRnrSelf(kTRUE);
57 its3->SetMainColor(kGreen-5);
58 its3->SetMainTransparency(60);
64 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
65 lvl1->SetRnrSelf(kFALSE);
66 TEveElement::List_i j = lvl1->BeginChildren();
68 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
69 lvl2->SetRnrSelf(kFALSE);
70 TEveElement::List_i k = lvl2->BeginChildren();
72 TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
73 lvl3->SetRnrSelf(kFALSE);
74 lvl3->SetMainColor(1);
75 lvl3->SetMainTransparency(70);
76 TEveElement::List_i l = lvl3->BeginChildren();
78 TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
79 lvl4->SetRnrSelf(kFALSE);
80 TEveElement::List_i m = lvl4->BeginChildren();
82 TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
83 tpc1->SetRnrSelf(kTRUE);
84 tpc1->SetMainColor(1);
85 tpc1->SetMainTransparency(70);
88 TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
89 tpc2->SetRnrSelf(kTRUE);
90 tpc2->SetMainColor(1);
91 tpc2->SetMainTransparency(70);
94 TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
95 tpc3->SetRnrSelf(kTRUE);
96 tpc3->SetMainColor(1);
97 tpc3->SetMainTransparency(70);
104 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
105 lvl1->SetRnrSelf(kFALSE);
106 TEveElement::List_i j = lvl1->BeginChildren();
108 TEveGeoShape* trd1 = (TEveGeoShape*) *j;
109 trd1->SetRnrSelf(kTRUE);
110 trd1->SetMainColor(kMagenta-8);
111 trd1->SetMainTransparency(80);
114 TEveGeoShape* tof1 = (TEveGeoShape*) *j;
115 tof1->SetRnrSelf(kTRUE);
116 tof1->SetMainColor(kMagenta-1);
117 tof1->SetMainTransparency(80);
123 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
124 lvl1->SetRnrSelf(kFALSE);
126 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
128 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
129 lvl2->SetRnrSelf(kTRUE);
130 lvl2->SetMainColor(kGreen-8);
131 lvl2->SetMainTransparency(20);
138 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
139 lvl1->SetRnrSelf(kFALSE);
141 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
143 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
144 lvl2->SetRnrSelf(kTRUE);
145 lvl2->SetMainColor(kBlue-5);
146 lvl2->SetMainTransparency(20);
151 {TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
152 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
153 gsre2 = TEveGeoShape::ImportShapeExtract(gse);
156 // Fix visibility, color and transparency
158 gsre2->SetRnrSelf(kFALSE);
159 TEveElement::List_i i = gsre2->BeginChildren();
163 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
164 lvl1->SetRnrSelf(kFALSE);
165 TEveElement::List_i j = lvl1->BeginChildren();
167 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
168 lvl2->SetRnrSelf(kFALSE);
169 TEveElement::List_i k = lvl2->BeginChildren();
171 TEveGeoShape* its1 = (TEveGeoShape*) *k;
172 its1->SetRnrSelf(kTRUE);
173 its1->SetMainColor(1);
174 its1->SetMainTransparency(80);
178 TEveGeoShape* its2 = (TEveGeoShape*) *k;
179 its2->SetRnrSelf(kTRUE);
180 its2->SetMainColor(1);
181 its2->SetMainTransparency(80);
184 TEveGeoShape* its3 = (TEveGeoShape*) *k;
185 its3->SetRnrSelf(kTRUE);
186 its3->SetMainColor(1);
187 its3->SetMainTransparency(80);
193 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
194 lvl1->SetRnrSelf(kFALSE);
196 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
198 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
199 lvl2->SetRnrSelf(kTRUE);
200 lvl2->SetMainColor(1);
201 lvl2->SetMainTransparency(80);
209 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
210 lvl1->SetRnrSelf(kFALSE);
212 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
214 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
215 lvl2->SetRnrSelf(kTRUE);
216 lvl2->SetMainColor(1);
217 lvl2->SetMainTransparency(80);
225 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
226 lvl1->SetRnrSelf(kFALSE);
228 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
230 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
231 lvl2->SetRnrSelf(kTRUE);
232 lvl2->SetMainColor(1);
233 lvl2->SetMainTransparency(80);
238 { TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
239 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
240 gsre3 = TEveGeoShape::ImportShapeExtract(gse);
243 // Fix visibility, color and transparency
245 gsre3->SetRnrSelf(kFALSE);
246 TEveElement::List_i i = gsre3->BeginChildren();
250 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
251 lvl1->SetRnrSelf(kFALSE);
252 TEveElement::List_i j = lvl1->BeginChildren();
254 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
255 lvl2->SetRnrSelf(kFALSE);
256 TEveElement::List_i k = lvl2->BeginChildren();
258 TEveGeoShape* its1 = (TEveGeoShape*) *k;
259 its1->SetRnrSelf(kTRUE);
260 its1->SetMainColor(1);
263 TEveGeoShape* its2 = (TEveGeoShape*) *k;
264 its2->SetRnrSelf(kTRUE);
265 its2->SetMainColor(1);
268 TEveGeoShape* its3 = (TEveGeoShape*) *k;
269 its3->SetRnrSelf(kTRUE);
270 its3->SetMainColor(1);
276 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
277 lvl1->SetRnrSelf(kFALSE);
279 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
281 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
282 lvl2->SetRnrSelf(kTRUE);
283 lvl2->SetMainColor(1);
284 lvl2->SetMainTransparency(80);
293 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
294 lvl1->SetRnrSelf(kFALSE);
296 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
298 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
299 lvl2->SetRnrSelf(kTRUE);
300 lvl2->SetMainColor(1);
301 lvl2->SetMainTransparency(80);
308 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
309 lvl1->SetRnrSelf(kFALSE);
311 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
313 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
314 lvl2->SetRnrSelf(kTRUE);
315 lvl2->SetMainColor(1);
316 lvl2->SetMainTransparency(80);
322 //fix all the viewers
324 TEveElement* top = gEve->GetCurrentEvent();
326 AliEveMultiView *mv = AliEveMultiView::Instance();
328 mv->InitGeomGentle(gsre1, gsre2, gsre3, 0);
330 gEve->FullRedraw3D(kTRUE, kTRUE);