]>
Commit | Line | Data |
---|---|---|
20dae051 | 1 | // $Id$ |
c2c4b7a2 | 2 | // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 |
3 | ||
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 | **************************************************************************/ | |
9 | ||
10 | void its_common_foos() | |
11 | {} | |
12 | ||
a4135a45 | 13 | AliEveITSModule* its_make_module(Int_t i, TEveElement* parent, |
14 | AliEveITSDigitsInfo* di, | |
15 | AliEveDigitScaleInfo* si, | |
4516a822 | 16 | Bool_t check_empty, |
17 | Bool_t scaled_modules) | |
a4135a45 | 18 | { |
19 | AliEveITSModule* m = 0; | |
20 | ||
21 | Int_t det_id = 0; | |
22 | if (i > 239 && i < 500) det_id = 1; | |
23 | else if (i >= 500) det_id = 2; | |
24 | ||
25 | if (!check_empty || (di->GetDigits(i, det_id) && di->GetDigits(i, det_id)->GetEntriesFast() > 0)) | |
26 | { | |
27 | if (scaled_modules) | |
28 | m = new AliEveITSScaledModule(i, di, si); | |
29 | else | |
30 | m = new AliEveITSModule(i, di); | |
31 | if (parent) | |
32 | parent->AddElement(m); | |
33 | } | |
34 | ||
35 | return m; | |
36 | } | |
37 | ||
38 | void its_display_raw_digits(AliEveITSDigitsInfo* di, Int_t mode, | |
39 | Bool_t check_empty = kTRUE, | |
40 | Bool_t scaled_modules = kFALSE) | |
c2c4b7a2 | 41 | { |
4516a822 | 42 | const TString bsSector = "Sector"; |
43 | const TString bsStave = "Stave"; | |
44 | const TString bsLadder = "Ladder"; | |
c2c4b7a2 | 45 | TString sSector; |
c2c4b7a2 | 46 | TString sStave; |
c2c4b7a2 | 47 | TString sLadder; |
c2c4b7a2 | 48 | |
4516a822 | 49 | Int_t i=0; |
50 | Long_t nsec, nstave, nlad, nMod; | |
c2c4b7a2 | 51 | |
52 | gEve->DisableRedraw(); | |
53 | ||
a4135a45 | 54 | AliEveDigitScaleInfo* si = 0; |
55 | if (scaled_modules) | |
4516a822 | 56 | { |
a4135a45 | 57 | si = new AliEveDigitScaleInfo; |
4516a822 | 58 | } |
a4135a45 | 59 | |
4516a822 | 60 | if (mode & 1) |
61 | { | |
c2c4b7a2 | 62 | TEveElementList* l = new TEveElementList("SPD0"); |
63 | l->SetTitle("SPDs' first layer"); | |
4516a822 | 64 | l->SetMainColor(kRed); |
c2c4b7a2 | 65 | gEve->AddElement(l); |
4516a822 | 66 | |
67 | for (nsec=0; nsec<10; nsec++) | |
68 | { | |
69 | TEveElementList* relSector = new TEveElementList(bsSector + nsec); | |
70 | relSector->SetMainColor(kRed); | |
71 | l->AddElement(relSector); | |
72 | ||
73 | for (nstave=0; nstave<2; nstave++) | |
74 | { | |
75 | TEveElementList* relStave = new TEveElementList(bsStave + nstave); | |
76 | relStave->SetMainColor(kRed); | |
77 | relSector->AddElement(relStave); | |
78 | ||
a4135a45 | 79 | for (nMod=0; nMod<4; ++nMod, ++i) |
c2c4b7a2 | 80 | { |
a4135a45 | 81 | its_make_module(i, relStave, di, si, check_empty, scaled_modules); |
c2c4b7a2 | 82 | } |
83 | } | |
84 | } | |
4516a822 | 85 | } |
86 | else | |
87 | { | |
c2c4b7a2 | 88 | i += 10*2*4; |
89 | } | |
90 | ||
4516a822 | 91 | if (mode & 2) |
92 | { | |
c2c4b7a2 | 93 | TEveElementList* l = new TEveElementList("SPD1"); |
94 | l->SetTitle("SPDs' second layer"); | |
4516a822 | 95 | l->SetMainColor(kRed); |
c2c4b7a2 | 96 | gEve->AddElement(l); |
97 | ||
4516a822 | 98 | for (nsec=0; nsec<10; nsec++) |
99 | { | |
100 | TEveElementList* relSector = new TEveElementList(bsSector + nsec); | |
101 | relSector->SetMainColor(kRed); | |
102 | l->AddElement(relSector); | |
103 | ||
104 | for (nstave=0; nstave<4; nstave++) | |
105 | { | |
106 | TEveElementList* relStave = new TEveElementList(bsStave + nstave); | |
107 | relStave->SetMainColor(kRed); | |
108 | relSector->AddElement(relStave); | |
109 | ||
a4135a45 | 110 | for (nMod=0; nMod<4; ++nMod, ++i) |
c2c4b7a2 | 111 | { |
a4135a45 | 112 | its_make_module(i, relStave, di, si, check_empty, scaled_modules); |
c2c4b7a2 | 113 | } |
114 | } | |
115 | } | |
4516a822 | 116 | } |
117 | else | |
118 | { | |
c2c4b7a2 | 119 | i += 10*4*4; |
120 | } | |
121 | ||
4516a822 | 122 | if (mode & 4) |
123 | { | |
c2c4b7a2 | 124 | TEveElementList* l = new TEveElementList("SDD2"); |
125 | l->SetTitle("SDDs' first layer"); | |
4516a822 | 126 | l->SetMainColor(kBlue); |
c2c4b7a2 | 127 | gEve->AddElement(l); |
128 | ||
4516a822 | 129 | for (nlad=0; nlad<14; nlad++) |
130 | { | |
131 | TEveElementList* relLadder = new TEveElementList(bsLadder + nlad); | |
132 | relLadder->SetMainColor(kBlue); | |
133 | l->AddElement(relLadder); | |
a4135a45 | 134 | for (nMod=0; nMod<6; ++nMod, ++i) |
135 | { | |
136 | its_make_module(i, relLadder, di, si, check_empty, scaled_modules); | |
c2c4b7a2 | 137 | } |
138 | } | |
4516a822 | 139 | } |
140 | else | |
141 | { | |
c2c4b7a2 | 142 | i += 14*6; |
143 | } | |
144 | ||
4516a822 | 145 | if (mode & 8) |
146 | { | |
c2c4b7a2 | 147 | TEveElementList* l = new TEveElementList("SDD3"); |
148 | l->SetTitle("SDDs' second layer"); | |
4516a822 | 149 | l->SetMainColor(kBlue); |
c2c4b7a2 | 150 | gEve->AddElement(l); |
4516a822 | 151 | |
152 | for (nlad=0; nlad<22; nlad++) | |
153 | { | |
154 | TEveElementList* relLadder = new TEveElementList(bsLadder + nlad); | |
155 | relLadder->SetMainColor(kBlue); | |
156 | l->AddElement(relLadder); | |
a4135a45 | 157 | for (nMod=0; nMod<8; ++nMod, ++i) |
158 | { | |
159 | its_make_module(i, relLadder, di, si, check_empty, scaled_modules); | |
c2c4b7a2 | 160 | } |
161 | } | |
4516a822 | 162 | } |
163 | else | |
164 | { | |
c2c4b7a2 | 165 | i += 22*8; |
166 | } | |
167 | ||
4516a822 | 168 | if (mode & 16) |
169 | { | |
c2c4b7a2 | 170 | TEveElementList* l = new TEveElementList("SSD4"); |
171 | l->SetTitle("SSDs' first layer"); | |
4516a822 | 172 | l->SetMainColor(kGreen); |
c2c4b7a2 | 173 | gEve->AddElement(l); |
4516a822 | 174 | |
175 | for (nlad=0; nlad<34; nlad++) | |
176 | { | |
177 | TEveElementList* relLadder = new TEveElementList(bsLadder + nlad); | |
178 | relLadder->SetMainColor(kGreen); | |
179 | l->AddElement(relLadder); | |
a4135a45 | 180 | for (nMod=0; nMod<22; ++nMod, ++i) |
181 | { | |
182 | its_make_module(i, relLadder, di, si, check_empty, scaled_modules); | |
c2c4b7a2 | 183 | } |
184 | } | |
4516a822 | 185 | } |
186 | else | |
187 | { | |
c2c4b7a2 | 188 | i += 34*22; |
189 | } | |
190 | ||
4516a822 | 191 | if (mode & 32) |
192 | { | |
c2c4b7a2 | 193 | TEveElementList* l = new TEveElementList("SSD5"); |
194 | l->SetTitle("SSDs' second layer"); | |
4516a822 | 195 | l->SetMainColor(kGreen); |
c2c4b7a2 | 196 | gEve->AddElement(l); |
4516a822 | 197 | |
198 | for (nlad=0; nlad<38; nlad++) | |
199 | { | |
200 | TEveElementList* relLadder = new TEveElementList(bsLadder + nlad); | |
201 | relLadder->SetMainColor(kGreen); | |
202 | l->AddElement(relLadder); | |
a4135a45 | 203 | for (nMod=0; nMod<25; ++nMod, ++i) |
204 | { | |
205 | its_make_module(i, relLadder, di, si, check_empty, scaled_modules); | |
c2c4b7a2 | 206 | } |
207 | } | |
4516a822 | 208 | } |
209 | else | |
210 | { | |
c2c4b7a2 | 211 | i += 38*25; |
212 | } | |
213 | ||
214 | gEve->EnableRedraw(); | |
215 | } |