]>
Commit | Line | Data |
---|---|---|
3aff0c2e | 1 | void geom_gentle_transparent(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->SetMainTransparency(80); | |
32 | k++; | |
33 | ||
34 | TEveGeoShape* its2 = (TEveGeoShape*) *k; | |
35 | its2->SetRnrSelf(kTRUE); | |
36 | its2->SetMainTransparency(80); | |
37 | k++; | |
38 | ||
39 | TEveGeoShape* its3 = (TEveGeoShape*) *k; | |
40 | its3->SetRnrSelf(kTRUE); | |
41 | its3->SetMainTransparency(80); | |
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(80); | |
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(80); | |
67 | m++; | |
68 | ||
69 | TEveGeoShape* tpc2 = (TEveGeoShape*) *m; | |
70 | tpc2->SetMainColor(kGray); | |
71 | tpc2->SetMainTransparency(80); | |
72 | m++; | |
73 | ||
74 | TEveGeoShape* tpc3 = (TEveGeoShape*) *m; | |
75 | tpc3->SetRnrSelf(kTRUE); | |
76 | tpc3->SetMainTransparency(80); | |
77 | m++; | |
78 | ||
79 | //TRD+TOF | |
80 | ||
81 | i++; | |
82 | ||
83 | TEveGeoShape* lvl1 = (TEveGeoShape*) *i; | |
84 | lvl1->SetRnrSelf(kFALSE); | |
85 | ||
86 | for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++) | |
87 | { | |
88 | TEveGeoShape* lvl2 = (TEveGeoShape*) *j; | |
89 | lvl2->SetRnrSelf(kTRUE); | |
90 | lvl2->SetMainTransparency(80); | |
91 | ||
92 | } | |
93 | ||
94 | //PHOS | |
95 | ||
96 | i++; | |
97 | ||
98 | TEveGeoShape* lvl1 = (TEveGeoShape*) *i; | |
99 | lvl1->SetRnrSelf(kFALSE); | |
100 | ||
101 | for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++) | |
102 | { | |
103 | TEveGeoShape* lvl2 = (TEveGeoShape*) *j; | |
104 | lvl2->SetRnrSelf(kTRUE); | |
105 | lvl2->SetMainTransparency(80); | |
106 | } | |
107 | ||
108 | //HMPID | |
109 | ||
110 | i++; | |
111 | ||
112 | TEveGeoShape* lvl1 = (TEveGeoShape*) *i; | |
113 | lvl1->SetRnrSelf(kFALSE); | |
114 | ||
115 | for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++) | |
116 | { | |
117 | TEveGeoShape* lvl2 = (TEveGeoShape*) *j; | |
118 | lvl2->SetRnrSelf(kTRUE); | |
119 | lvl2->SetMainTransparency(80); | |
120 | } | |
121 | ||
122 | ||
123 | TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root"); | |
124 | TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle"); | |
125 | TEveGeoShape* gsre2 = TEveGeoShape::ImportShapeExtract(gse); | |
126 | f.Close(); | |
127 | ||
128 | TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root"); | |
129 | TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle"); | |
130 | TEveGeoShape* gsre3 = TEveGeoShape::ImportShapeExtract(gse); | |
131 | f.Close(); | |
132 | ||
133 | TEveElement* top = gEve->GetCurrentEvent(); | |
134 | ||
135 | AliEveMultiView *mv = AliEveMultiView::Instance(); | |
136 | ||
137 | mv->InitGeomGentle(gsre1, gsre2, gsre3); | |
138 | ||
139 | gEve->FullRedraw3D(kTRUE, kTRUE); | |
140 | ||
141 | } | |
142 |