1 #if !defined(__CINT__) || defined(__MAKECINT__)
4 #include <TEveManager.h>
5 #include <TEveElement.h>
6 #include <TEveGeoShape.h>
7 #include <TEveGeoShapeExtract.h>
9 #include <AliEveEventManager.h>
10 #include <AliEveMultiView.h>
13 void geom_gentle_tpc(Bool_t register_as_global=kTRUE)
20 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
21 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
22 gsre1 = TEveGeoShape::ImportShapeExtract(gse);
25 if (register_as_global)
27 gEve->AddGlobalElement(gsre1);
31 // Fix visibility, color and transparency
33 gsre1->SetRnrSelf(kFALSE);
34 TEveElement::List_i i = gsre1->BeginChildren();
38 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
39 lvl1->SetRnrSelf(kFALSE);
40 TEveElement::List_i j = lvl1->BeginChildren();
42 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
43 lvl2->SetRnrSelf(kFALSE);
44 TEveElement::List_i k = lvl2->BeginChildren();
46 TEveGeoShape* its1 = (TEveGeoShape*) *k;
47 its1->SetRnrSelf(kTRUE);
48 its1->SetMainColor(kRed);
51 TEveGeoShape* its2 = (TEveGeoShape*) *k;
52 its2->SetRnrSelf(kTRUE);
53 its2->SetMainColor(kRed+2);
56 TEveGeoShape* its3 = (TEveGeoShape*) *k;
57 its3->SetRnrSelf(kTRUE);
58 its3->SetMainColor(kRed+4);
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(kTRUE);
74 lvl3->SetMainColor(kBlue);
75 TEveElement::List_i l = lvl3->BeginChildren();
77 TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
78 lvl4->SetRnrSelf(kFALSE);
79 TEveElement::List_i m = lvl4->BeginChildren();
81 TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
82 tpc1->SetRnrSelf(kTRUE);
83 tpc1->SetMainColor(kGray);
86 TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
87 tpc2->SetRnrSelf(kTRUE);
88 tpc2->SetMainColor(kGray);
91 TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
92 tpc3->SetRnrSelf(kTRUE);
93 tpc3->SetMainColor(kGray);
100 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
101 lvl1->SetRnrSelf(kFALSE);
103 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
105 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
106 lvl2->SetRnrSelf(kFALSE);
114 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
115 lvl1->SetRnrSelf(kFALSE);
117 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
119 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
120 lvl2->SetRnrSelf(kFALSE);
127 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
128 lvl1->SetRnrSelf(kFALSE);
130 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
132 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
133 lvl2->SetRnrSelf(kFALSE);
139 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
140 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
141 gsre2 = TEveGeoShape::ImportShapeExtract(gse);
144 // Fix visibility, color and transparency
146 gsre2->SetRnrSelf(kFALSE);
147 TEveElement::List_i i = gsre2->BeginChildren();
151 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
152 lvl1->SetRnrSelf(kFALSE);
153 TEveElement::List_i j = lvl1->BeginChildren();
155 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
156 lvl2->SetRnrSelf(kFALSE);
157 TEveElement::List_i k = lvl2->BeginChildren();
159 TEveGeoShape* its1 = (TEveGeoShape*) *k;
160 its1->SetRnrSelf(kTRUE);
161 its1->SetMainColor(kRed);
164 TEveGeoShape* its2 = (TEveGeoShape*) *k;
165 its2->SetRnrSelf(kTRUE);
166 its2->SetMainColor(kRed+2);
169 TEveGeoShape* its3 = (TEveGeoShape*) *k;
170 its3->SetRnrSelf(kTRUE);
171 its3->SetMainColor(kRed+4);
178 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
179 lvl1->SetRnrSelf(kFALSE);
181 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
183 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
184 lvl2->SetRnrSelf(kFALSE);
192 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
193 lvl1->SetRnrSelf(kFALSE);
195 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
197 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
198 lvl2->SetRnrSelf(kFALSE);
205 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
206 lvl1->SetRnrSelf(kFALSE);
208 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
210 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
211 lvl2->SetRnrSelf(kFALSE);
218 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
219 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
220 gsre3 = TEveGeoShape::ImportShapeExtract(gse);
223 // Fix visibility, color and transparency
225 gsre3->SetRnrSelf(kFALSE);
226 TEveElement::List_i i = gsre3->BeginChildren();
230 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
231 lvl1->SetRnrSelf(kFALSE);
232 TEveElement::List_i j = lvl1->BeginChildren();
234 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
235 lvl2->SetRnrSelf(kFALSE);
236 TEveElement::List_i k = lvl2->BeginChildren();
238 TEveGeoShape* its1 = (TEveGeoShape*) *k;
239 its1->SetRnrSelf(kTRUE);
240 its1->SetMainColor(kRed);
243 TEveGeoShape* its2 = (TEveGeoShape*) *k;
244 its2->SetRnrSelf(kTRUE);
245 its2->SetMainColor(kRed+2);
248 TEveGeoShape* its3 = (TEveGeoShape*) *k;
249 its3->SetRnrSelf(kTRUE);
250 its3->SetMainColor(kRed+4);
257 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
258 lvl1->SetRnrSelf(kFALSE);
260 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
262 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
263 lvl2->SetRnrSelf(kFALSE);
272 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
273 lvl1->SetRnrSelf(kFALSE);
275 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
277 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
278 lvl2->SetRnrSelf(kFALSE);
285 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
286 lvl1->SetRnrSelf(kFALSE);
288 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
290 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
291 lvl2->SetRnrSelf(kFALSE);
296 TEveElement* top = gEve->GetCurrentEvent();
298 AliEveMultiView *mv = AliEveMultiView::Instance();
300 mv->InitGeomGentle(gsre1, gsre2, gsre3, 0);
302 gEve->FullRedraw3D(kTRUE, kTRUE);