]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/alice-macros/geom_gentle_notransparency.C
clusterizer,reconstructor + many fixes (Magnus,Stefan)
[u/mrichter/AliRoot.git] / EVE / alice-macros / geom_gentle_notransparency.C
CommitLineData
ba978640 1#if !defined(__CINT__) || defined(__MAKECINT__)
2#include <TFile.h>
3#include <TGLViewer.h>
4#include <TEveManager.h>
5#include <TEveElement.h>
6#include <TEveGeoShape.h>
7#include <TEveGeoShapeExtract.h>
8
6c49a8e1 9#include <AliEveEventManager.h>
10#include <AliEveMultiView.h>
ba978640 11#endif
12
a13d7c88 13void geom_gentle_notransparency(Bool_t register_as_global=kTRUE)
14{
ba978640 15 TEveGeoShape* gsre1;
16 TEveGeoShape* gsre2;
17 TEveGeoShape* gsre3;
18
19{
20 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
21 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
22 gsre1 = TEveGeoShape::ImportShapeExtract(gse);
23 f.Close();
a13d7c88 24
ba978640 25 if (register_as_global)
26 {
27 gEve->AddGlobalElement(gsre1);
28 }
a13d7c88 29
ba978640 30 // Fix visibility, color and transparency
a13d7c88 31
ba978640 32 gsre1->SetRnrSelf(kFALSE);
33 TEveElement::List_i i = gsre1->BeginChildren();
a13d7c88 34
ba978640 35 //ITS
36 {
37 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
38 lvl1->SetRnrSelf(kFALSE);
39 TEveElement::List_i j = lvl1->BeginChildren();
a13d7c88 40
ba978640 41 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
42 lvl2->SetRnrSelf(kFALSE);
43 TEveElement::List_i k = lvl2->BeginChildren();
44
45 TEveGeoShape* its1 = (TEveGeoShape*) *k;
46 its1->SetRnrSelf(kTRUE);
47 its1->SetMainTransparency(5);
48 k++;
49
50 TEveGeoShape* its2 = (TEveGeoShape*) *k;
51 its2->SetRnrSelf(kTRUE);
52 its2->SetMainTransparency(5);
53 k++;
54
55 TEveGeoShape* its3 = (TEveGeoShape*) *k;
56 its3->SetRnrSelf(kTRUE);
57 its3->SetMainTransparency(5);
58 }
59 //TPC
a13d7c88 60
ba978640 61 i++;
a13d7c88 62 {
ba978640 63 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
64 lvl1->SetRnrSelf(kFALSE);
65 TEveElement::List_i j = lvl1->BeginChildren();
66
a13d7c88 67 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
ba978640 68 lvl2->SetRnrSelf(kFALSE);
69 TEveElement::List_i k = lvl2->BeginChildren();
70
71 TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
72 lvl3->SetRnrSelf(kTRUE);
73 lvl3->SetMainTransparency(5);
74 TEveElement::List_i l = lvl3->BeginChildren();
75
76 TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
77 lvl4->SetRnrSelf(kFALSE);
78 TEveElement::List_i m = lvl4->BeginChildren();
79
80 TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
81 tpc1->SetRnrSelf(kTRUE);
82 tpc1->SetMainTransparency(5);
83 m++;
84
85 TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
86 tpc2->SetMainColor(kGray);
87 tpc2->SetMainTransparency(5);
88 m++;
89
90 TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
91 tpc3->SetRnrSelf(kTRUE);
92 tpc3->SetMainTransparency(5);
93 m++;
a13d7c88 94 }
95
ba978640 96 //TRD+TOF
a13d7c88 97
ba978640 98 i++;
99 {
100 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
101 lvl1->SetRnrSelf(kFALSE);
102 TEveElement::List_i j = lvl1->BeginChildren();
103
104 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
105 lvl2->SetRnrSelf(kTRUE);
106 lvl2->SetMainTransparency(5);
107 j++;
108
109 TEveGeoShape* lvl3 = (TEveGeoShape*) *j;
110 lvl3->SetRnrSelf(kTRUE);
111 lvl3->SetMainTransparency(5);
112 j++;
113 }
a13d7c88 114
ba978640 115 //PHOS
a13d7c88 116
ba978640 117 i++;
a13d7c88 118 {
ba978640 119 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
120 lvl1->SetRnrSelf(kFALSE);
121
122 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
123 {
124 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
125 lvl2->SetRnrSelf(kTRUE);
126 lvl2->SetMainTransparency(5);
127 }
a13d7c88 128 }
ba978640 129
130 //HMPID
a13d7c88 131
ba978640 132 i++;
133 {
134 TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
135 lvl1->SetRnrSelf(kFALSE);
136
137 for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
138 {
139 TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
140 lvl2->SetRnrSelf(kTRUE);
141 lvl2->SetMainTransparency(5);
142 }
143 }
144}
a13d7c88 145
ba978640 146{
a13d7c88 147 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
148 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
ba978640 149 gsre2 = TEveGeoShape::ImportShapeExtract(gse);
a13d7c88 150 f.Close();
ba978640 151}
a13d7c88 152
ba978640 153{
a13d7c88 154 TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
155 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
ba978640 156 gsre3 = TEveGeoShape::ImportShapeExtract(gse);
a13d7c88 157 f.Close();
ba978640 158}
a13d7c88 159
160 TEveElement* top = gEve->GetCurrentEvent();
161
162 AliEveMultiView *mv = AliEveMultiView::Instance();
163
ba978640 164 mv->InitGeomGentle(gsre1, gsre2, gsre3, 0);
a13d7c88 165
166 gEve->FullRedraw3D(kTRUE, kTRUE);
167
168}
169