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