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