2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
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 **************************************************************************/
10 void geom_gentle_yellow(Bool_t register_as_global=kTRUE)
13 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
14 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
15 TEveGeoShape* gsre1 = TEveGeoShape::ImportShapeExtract(gse);
18 if (register_as_global)
20 gEve->AddGlobalElement(gsre1);
23 // Fix visibility, color and transparency
25 gsre1->SetRnrSelf(kFALSE);
26 TEveElement::List_i i = gsre1->BeginChildren();
30 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
31 lvl1->SetRnrSelf(kFALSE);
32 TEveElement::List_i j = lvl1->BeginChildren();
34 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
35 lvl2->SetRnrSelf(kFALSE);
36 TEveElement::List_i k = lvl2->BeginChildren();
38 TEveGeoShape* its1 = (TEveGeoShape*) *k;
39 its1->SetRnrSelf(kTRUE);
40 its1->SetMainColor(kYellow-4);
41 its1->SetMainTransparency(50);
44 TEveGeoShape* its2 = (TEveGeoShape*) *k;
45 its2->SetRnrSelf(kTRUE);
46 its2->SetMainColor(kYellow-7);
47 its2->SetMainTransparency(50);
50 TEveGeoShape* its3 = (TEveGeoShape*) *k;
51 its3->SetRnrSelf(kTRUE);
52 its3->SetMainColor(kYellow-9);
53 its3->SetMainTransparency(50);
59 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
60 lvl1->SetRnrSelf(kFALSE);
61 TEveElement::List_i j = lvl1->BeginChildren();
63 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
64 lvl2->SetRnrSelf(kFALSE);
65 TEveElement::List_i k = lvl2->BeginChildren();
67 TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
68 lvl3->SetRnrSelf(kTRUE);
69 lvl3->SetMainColor(kGray);
70 lvl3->SetMainTransparency(80);
71 TEveElement::List_i l = lvl3->BeginChildren();
73 TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
74 lvl4->SetRnrSelf(kFALSE);
75 TEveElement::List_i m = lvl4->BeginChildren();
77 TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
78 tpc1->SetRnrSelf(kTRUE);
79 tpc1->SetMainColor(kGray+2);
80 tpc1->SetMainTransparency(80);
83 TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
84 tpc2->SetMainColor(kGray);
85 tpc2->SetMainColor(kGray+2);
86 tpc2->SetMainTransparency(80);
89 TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
90 tpc3->SetRnrSelf(kTRUE);
91 tpc3->SetMainColor(kGray+2);
92 tpc3->SetMainTransparency(80);
99 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
100 lvl1->SetRnrSelf(kFALSE);
102 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
104 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
105 lvl2->SetRnrSelf(kFALSE);
106 lvl2->SetMainColor(0);
107 lvl2->SetMainTransparency(80);
115 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
116 lvl1->SetRnrSelf(kFALSE);
118 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
120 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
121 lvl2->SetRnrSelf(kTRUE);
122 lvl2->SetMainTransparency(30);
129 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
130 lvl1->SetRnrSelf(kFALSE);
132 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
134 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
135 lvl2->SetRnrSelf(kTRUE);
136 lvl2->SetMainTransparency(30);
139 // The resulting geometry is NOT added into the global scene!
141 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
142 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
143 TEveGeoShape* gsre2 = TEveGeoShape::ImportShapeExtract(gse);
146 // Fix visibility, color and transparency
148 gsre2->SetRnrSelf(kFALSE);
149 TEveElement::List_i i = gsre2->BeginChildren();
153 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
154 lvl1->SetRnrSelf(kFALSE);
155 TEveElement::List_i j = lvl1->BeginChildren();
157 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
158 lvl2->SetRnrSelf(kFALSE);
159 TEveElement::List_i k = lvl2->BeginChildren();
161 TEveGeoShape* its1 = (TEveGeoShape*) *k;
162 its1->SetRnrSelf(kTRUE);
163 its1->SetMainColor(kYellow-4);
164 its1->SetMainTransparency(50);
168 TEveGeoShape* its2 = (TEveGeoShape*) *k;
169 its2->SetRnrSelf(kTRUE);
170 its2->SetMainColor(kYellow-7);
171 its2->SetMainTransparency(50);
174 TEveGeoShape* its3 = (TEveGeoShape*) *k;
175 its3->SetRnrSelf(kTRUE);
176 its3->SetMainColor(kYellow-9);
177 its3->SetMainTransparency(50);
183 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
184 lvl1->SetRnrSelf(kFALSE);
186 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
188 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
189 lvl2->SetRnrSelf(kTRUE);
190 lvl2->SetMainColor(kGray);
191 lvl2->SetMainTransparency(80);
199 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
200 lvl1->SetRnrSelf(kFALSE);
202 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
204 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
205 lvl2->SetRnrSelf(kTRUE);
206 lvl2->SetMainTransparency(30);
214 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
215 lvl1->SetRnrSelf(kFALSE);
217 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
219 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
220 lvl2->SetRnrSelf(kTRUE);
221 lvl2->SetMainTransparency(30);
224 // The resulting geometry is NOT added into the global scene!
226 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
227 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
228 TEveGeoShape* gsre3 = TEveGeoShape::ImportShapeExtract(gse);
231 // Fix visibility, color and transparency
233 gsre3->SetRnrSelf(kFALSE);
234 TEveElement::List_i i = gsre3->BeginChildren();
238 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
239 lvl1->SetRnrSelf(kFALSE);
240 TEveElement::List_i j = lvl1->BeginChildren();
242 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
243 lvl2->SetRnrSelf(kFALSE);
244 TEveElement::List_i k = lvl2->BeginChildren();
246 TEveGeoShape* its1 = (TEveGeoShape*) *k;
247 its1->SetRnrSelf(kTRUE);
248 its1->SetMainColor(kYellow-4);
251 TEveGeoShape* its2 = (TEveGeoShape*) *k;
252 its2->SetRnrSelf(kTRUE);
253 its2->SetMainColor(kYellow-7);
256 TEveGeoShape* its3 = (TEveGeoShape*) *k;
257 its3->SetRnrSelf(kTRUE);
258 its3->SetMainColor(kYellow-9);
264 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
265 lvl1->SetRnrSelf(kFALSE);
267 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
269 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
270 lvl2->SetRnrSelf(kTRUE);
271 lvl2->SetMainColor(kGray);
272 lvl2->SetMainTransparency(80);
281 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
282 lvl1->SetRnrSelf(kFALSE);
284 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
286 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
287 lvl2->SetRnrSelf(kTRUE);
288 lvl2->SetMainTransparency(30);
295 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
296 lvl1->SetRnrSelf(kFALSE);
298 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
300 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
301 lvl2->SetRnrSelf(kTRUE);
302 lvl2->SetMainTransparency(30);
305 TEveElement* top = gEve->GetCurrentEvent();
307 AliEveMultiView *mv = AliEveMultiView::Instance();
309 mv->InitGeomGentle(gsre1, gsre2, gsre3);
311 gEve->FullRedraw3D(kTRUE, kTRUE);