]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/alice-macros/geom_gentle_projector.C
addressing coverity warnings: now checking return value of fscanf
[u/mrichter/AliRoot.git] / EVE / alice-macros / geom_gentle_projector.C
CommitLineData
95fb6e56 1void geom_gentle_projector(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 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
20 lvl1->SetRnrSelf(kFALSE);
21 TEveElement::List_i j = lvl1->BeginChildren();
22
23 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
24 lvl2->SetRnrSelf(kFALSE);
25 TEveElement::List_i k = lvl2->BeginChildren();
26
27 TEveGeoShape* its1 = (TEveGeoShape*) *k;
28 its1->SetRnrSelf(kTRUE);
29 its1->SetMainColor(kBlue-6);
30 its1->SetMainTransparency(50);
31 k++;
32
33 TEveGeoShape* its2 = (TEveGeoShape*) *k;
34 its2->SetRnrSelf(kTRUE);
35 its2->SetMainTransparency(50);
36 k++;
37
38 TEveGeoShape* its3 = (TEveGeoShape*) *k;
39 its3->SetRnrSelf(kTRUE);
40 its1->SetMainColor(kGreen-10);
41 its3->SetMainTransparency(50);
42
43//TPC
44
45 i++;
46
47 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
48 lvl1->SetRnrSelf(kFALSE);
49 TEveElement::List_i j = lvl1->BeginChildren();
50
51 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
52 lvl2->SetRnrSelf(kFALSE);
53 TEveElement::List_i k = lvl2->BeginChildren();
54
55 TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
56 lvl3->SetRnrSelf(kTRUE);
57 lvl3->SetMainTransparency(50);
58 TEveElement::List_i l = lvl3->BeginChildren();
59
60 TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
61 lvl4->SetRnrSelf(kFALSE);
62 TEveElement::List_i m = lvl4->BeginChildren();
63
64 TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
65 tpc1->SetRnrSelf(kTRUE);
66 tpc1->SetMainTransparency(50);
67 m++;
68
69 TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
70 tpc2->SetMainColor(kGray);
71 tpc2->SetMainTransparency(50);
72 m++;
73
74 TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
75 tpc3->SetRnrSelf(kTRUE);
76 tpc3->SetMainTransparency(50);
77 m++;
78
79//TRD+TOF
80
81 i++;
82
83 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
84 lvl1->SetRnrSelf(kFALSE);
85 TEveElement::List_i j = lvl1->BeginChildren();
86
87 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
88 lvl2->SetRnrSelf(kTRUE);
89 lvl2->SetMainTransparency(50);
90 j++;
91
92 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
93 lvl2->SetRnrSelf(kTRUE);
94 lvl2->SetMainTransparency(50);
95 j++;
96
97//PHOS
98
99 i++;
100
101 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
102 lvl1->SetRnrSelf(kFALSE);
103
104 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
105 {
106 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
107 lvl2->SetRnrSelf(kTRUE);
108 lvl2->SetMainTransparency(50);
109 }
110
111//HMPID
112
113 i++;
114
115 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
116 lvl1->SetRnrSelf(kFALSE);
117
118 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
119 {
120 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
121 lvl2->SetRnrSelf(kTRUE);
122 lvl2->SetMainTransparency(50);
123 }
124
125
126 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
127 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
128 TEveGeoShape* gsre2 = TEveGeoShape::ImportShapeExtract(gse);
129 f.Close();
130
131 // Fix visibility, color and transparency
132
133 gsre2->SetRnrSelf(kFALSE);
134 TEveElement::List_i i = gsre2->BeginChildren();
135
136//ITS
137
138 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
139 lvl1->SetRnrSelf(kFALSE);
140 TEveElement::List_i j = lvl1->BeginChildren();
141
142 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
143 lvl2->SetRnrSelf(kFALSE);
144 TEveElement::List_i k = lvl2->BeginChildren();
145
146 TEveGeoShape* its1 = (TEveGeoShape*) *k;
147 its1->SetRnrSelf(kTRUE);
148 its1->SetMainColor(kGreen-10);
149 its1->SetMainTransparency(70);
150 k++;
151
152 TEveGeoShape* its2 = (TEveGeoShape*) *k;
153 its2->SetRnrSelf(kTRUE);
154 its2->SetMainTransparency(70);
155 k++;
156
157 TEveGeoShape* its3 = (TEveGeoShape*) *k;
158 its3->SetRnrSelf(kTRUE);
159 its3->SetMainColor(kBlue-6);
160 its3->SetMainTransparency(70);
161
162
163 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
164 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
165 TEveGeoShape* gsre3 = TEveGeoShape::ImportShapeExtract(gse);
166 f.Close();
167
168 gsre3->SetRnrSelf(kFALSE);
169 TEveElement::List_i i = gsre3->BeginChildren();
170
171//ITS
172
173 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
174 lvl1->SetRnrSelf(kFALSE);
175 TEveElement::List_i j = lvl1->BeginChildren();
176
177 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
178 lvl2->SetRnrSelf(kFALSE);
179 TEveElement::List_i k = lvl2->BeginChildren();
180
181 TEveGeoShape* its1 = (TEveGeoShape*) *k;
182 its1->SetRnrSelf(kTRUE);
183 its1->SetMainTransparency(70);
184 its1->SetMainColor(kGreen-10);
185 k++;
186
187 TEveGeoShape* its2 = (TEveGeoShape*) *k;
188 its2->SetRnrSelf(kTRUE);
189 its2->SetMainTransparency(70);
190// its2->SetMainColor(kRed+2);
191 k++;
192
193 TEveGeoShape* its3 = (TEveGeoShape*) *k;
194 its3->SetRnrSelf(kTRUE);
195 its3->SetMainColor(kBlue-6);
196 its3->SetMainTransparency(70);
197
198
199 TEveElement* top = gEve->GetCurrentEvent();
200
201 AliEveMultiView *mv = AliEveMultiView::Instance();
202
203 mv->InitGeomGentle(gsre1, gsre2, gsre3);
204
205 gEve->FullRedraw3D(kTRUE, kTRUE);
206
207}
208