]>
Commit | Line | Data |
---|---|---|
fe4da5cc | 1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // // | |
3 | // Inner Traking System version 1 // | |
4 | // // | |
5 | //Begin_Html | |
6 | /* | |
7 | <img src="gif/AliITSv1Class.gif"> | |
8 | </pre> | |
9 | <br clear=left> | |
10 | <font size=+2 color=red> | |
11 | <p>The responsible person for this module is | |
12 | <a href="mailto:roberto.barbera@ct.infn.it">Roberto Barbera</a>. | |
13 | </font> | |
14 | <pre> | |
15 | */ | |
16 | //End_Html | |
17 | // // | |
18 | /////////////////////////////////////////////////////////////////////////////// | |
19 | ||
20 | #include <TMath.h> | |
21 | #include <TRandom.h> | |
22 | #include <TVector.h> | |
23 | #include "AliITSv1.h" | |
24 | #include "AliRun.h" | |
25 | ||
26 | #include "AliMC.h" | |
27 | #include "AliConst.h" | |
28 | ||
29 | ClassImp(AliITSv1) | |
30 | ||
31 | //_____________________________________________________________________________ | |
32 | AliITSv1::AliITSv1() : AliITS() | |
33 | { | |
34 | // | |
35 | // Default constructor for the ITS | |
36 | // | |
37 | } | |
38 | ||
39 | //_____________________________________________________________________________ | |
40 | AliITSv1::AliITSv1(const char *name, const char *title) | |
41 | : AliITS(name, title) | |
42 | { | |
43 | // | |
44 | // Standard constructor for the ITS | |
45 | // | |
46 | } | |
47 | ||
48 | //_____________________________________________________________________________ | |
49 | void AliITSv1::CreateGeometry() | |
50 | { | |
51 | // | |
52 | // Create geometry for version 1 of the ITS | |
53 | // | |
54 | // | |
55 | // Create Geometry for ITS version 0 | |
56 | // | |
57 | //Begin_Html | |
58 | /* | |
59 | <img src="gif/AliITSv1Tree.gif"> | |
60 | */ | |
61 | //End_Html | |
62 | //Begin_Html | |
63 | /* | |
64 | <img src="gif/AliITSv1.gif"> | |
65 | */ | |
66 | //End_Html | |
67 | ||
68 | ||
69 | AliMC* pMC = AliMC::GetMC(); | |
70 | ||
71 | Float_t drcer[6] = { 0.,0.,.08,.08,0.,0. }; //CERAMICS THICKNESS | |
72 | Float_t drepx[6] = { 0.,0.,0.,0.,.5357,.5357 }; //EPOXY THICKNESS | |
73 | Float_t drpla[6] = { 0.,0.,0.,0.,.1786,.1786 }; //PLASTIC THICKNESS | |
74 | Float_t dzb[6] = { 0.,0.,15.,15.,4.,4. }; //LENGTH OF BOXES | |
75 | Float_t dphi[6] = { 72.,72.,72.,72.,50.6,45. }; //COVERED PHI-RANGE FOR LAYERS 1-6 | |
76 | Float_t rl[6] = { 3.9,7.6,14.,24.,40.,45. }; //SILICON LAYERS INNER RADIUS | |
77 | Float_t drl[6] = { .755,.755,.809,.809,.7,.7 }; //THICKNESS OF LAYERS (in % radiation length) | |
78 | Float_t dzl[6] = { 12.67,16.91,20.85,29.15,45.11,50.975 };//HALF LENGTH OF LAYERS | |
79 | Float_t drpcb[6] = { 0.,0.,.06,.06,0.,0. }; //PCB THICKNESS | |
80 | Float_t drcu[6] = { 0.,0.,.0504,.0504,.0357,.0357 }; //COPPER THICKNESS | |
81 | Float_t drsi[6] = { 0.,0.,.006,.006,.3571,.3571 }; //SILICON THICKNESS | |
82 | ||
83 | Float_t drca = 0, dzfc; | |
84 | Int_t i, nsec; | |
85 | Float_t rend, drca_tpc, dzco, zend, dits[3], rlim, drsu, zmax; | |
86 | Float_t zpos, dzco1, dzco2; | |
87 | Float_t drcac[6], acone, dphii; | |
88 | Float_t pcits[15], xltpc; | |
89 | Float_t rzcone, rstep, r0, z0, acable, fp, dz, zi, ri; | |
90 | Int_t idrotm[399]; | |
91 | Float_t dgh[15]; | |
92 | ||
93 | Int_t *idtmed = gAlice->Idtmed(); | |
94 | ||
95 | // CONVERT INTO CM (RL(SI)=9.36 CM) | |
96 | for (i = 0; i < 6; ++i) { | |
97 | drl[i] = drl[i] / 100. * 9.36; | |
98 | } | |
99 | ||
100 | // SUPPORT ENDPLANE THICKNESS | |
101 | drsu = 2.*0.06+1./20; // 1./20. is 1 cm of honeycomb (1/20 carbon density); | |
102 | ||
103 | // CONE BELOW TPC | |
104 | ||
105 | drca_tpc = 1.2/4.; | |
106 | ||
107 | // CABLE THICKNESS (CONICAL CABLES CONNECTING THE LAYERS) | |
108 | ||
109 | ||
110 | // ITS CONE ANGLE | |
111 | ||
112 | acone = 45.; | |
113 | acone *= kDegrad; | |
114 | ||
115 | // CONE RADIUS AT 1ST LAYER | |
116 | ||
117 | rzcone = 30.; | |
118 | ||
119 | // FIELD CAGE HALF LENGTH | |
120 | ||
121 | dzfc = 64.5; | |
122 | rlim = 48.; | |
123 | zmax = 80.; | |
124 | xltpc = 275.; | |
125 | ||
126 | ||
127 | // PARAMETERS FOR SMALL (1/2) ITS | |
128 | ||
129 | for (i = 0; i < 6; ++i) { | |
130 | dzl[i] /= 2.; | |
131 | dzb[i] /= 2.; | |
132 | } | |
133 | drca /= 2.; | |
134 | acone /= 2.; | |
135 | drca_tpc /= 2.; | |
136 | rzcone /= 2.; | |
137 | dzfc /= 2.; | |
138 | zmax /= 2.; | |
139 | xltpc /= 2.; | |
140 | acable = 15.; | |
141 | ||
142 | ||
143 | ||
144 | // EQUAL DISTRIBUTION INTO THE 6 LAYERS | |
145 | rstep = drca_tpc / 6.; | |
146 | for (i = 0; i < 6; ++i) { | |
147 | drcac[i] = (i+1) * rstep; | |
148 | } | |
149 | ||
150 | // NUMBER OF PHI SECTORS | |
151 | ||
152 | nsec = 5; | |
153 | ||
154 | // PACK IN PHI AS MUCH AS POSSIBLE | |
155 | // NOW PACK USING THICKNESS | |
156 | ||
157 | for (i = 0; i < 6; ++i) { | |
158 | ||
159 | // PACKING FACTOR | |
160 | fp = rl[5] / rl[i]; | |
161 | ||
162 | // PHI-PACKING NOT SUFFICIENT ? | |
163 | ||
164 | if (dphi[i]/45 < fp) { | |
165 | drcac[i] = drcac[i] * fp * 45/dphi[i]; | |
166 | } | |
167 | } | |
168 | ||
169 | ||
170 | // --- Define ghost volume containing the six layers and fill it with air | |
171 | ||
172 | dgh[0] = 3.5; | |
173 | dgh[1] = 50.; | |
174 | dgh[2] = zmax; | |
175 | pMC->Gsvolu("ITSV", "TUBE", idtmed[275], dgh, 3); | |
176 | ||
177 | // --- Place the ghost volume in its mother volume (ALIC) and make it | |
178 | // invisible | |
179 | ||
180 | pMC->Gspos("ITSV", 1, "ALIC", 0., 0., 0., 0, "ONLY"); | |
181 | pMC->Gsatt("ITSV", "SEEN", 0); | |
182 | ||
183 | // ITS LAYERS (SILICON) | |
184 | ||
185 | dits[0] = rl[0]; | |
186 | dits[1] = rl[0] + drl[0]; | |
187 | dits[2] = dzl[0]; | |
188 | pMC->Gsvolu("ITS1", "TUBE", idtmed[199], dits, 3); | |
189 | pMC->Gspos("ITS1", 1, "ITSV", 0., 0., 0., 0, "ONLY"); | |
190 | ||
191 | dits[0] = rl[1]; | |
192 | dits[1] = rl[1] + drl[1]; | |
193 | dits[2] = dzl[1]; | |
194 | pMC->Gsvolu("ITS2", "TUBE", idtmed[199], dits, 3); | |
195 | pMC->Gspos("ITS2", 1, "ITSV", 0., 0., 0., 0, "ONLY"); | |
196 | ||
197 | dits[0] = rl[2]; | |
198 | dits[1] = rl[2] + drl[2]; | |
199 | dits[2] = dzl[2]; | |
200 | pMC->Gsvolu("ITS3", "TUBE", idtmed[224], dits, 3); | |
201 | pMC->Gspos("ITS3", 1, "ITSV", 0., 0., 0., 0, "ONLY"); | |
202 | ||
203 | dits[0] = rl[3]; | |
204 | dits[1] = rl[3] + drl[3]; | |
205 | dits[2] = dzl[3]; | |
206 | pMC->Gsvolu("ITS4", "TUBE", idtmed[224], dits, 3); | |
207 | pMC->Gspos("ITS4", 1, "ITSV", 0., 0., 0., 0, "ONLY"); | |
208 | ||
209 | dits[0] = rl[4]; | |
210 | dits[1] = rl[4] + drl[4]; | |
211 | dits[2] = dzl[4]; | |
212 | pMC->Gsvolu("ITS5", "TUBE", idtmed[249], dits, 3); | |
213 | pMC->Gspos("ITS5", 1, "ITSV", 0., 0., 0., 0, "ONLY"); | |
214 | ||
215 | dits[0] = rl[5]; | |
216 | dits[1] = rl[5] + drl[5]; | |
217 | dits[2] = dzl[5]; | |
218 | pMC->Gsvolu("ITS6", "TUBE", idtmed[249], dits, 3); | |
219 | pMC->Gspos("ITS6", 1, "ITSV", 0., 0., 0., 0, "ONLY"); | |
220 | ||
221 | // ELECTRONICS BOXES | |
222 | ||
223 | // PCB (layer #3 and #4) | |
224 | ||
225 | pMC->Gsvolu("IPCB", "TUBE", idtmed[233], dits, 0); | |
226 | for (i = 2; i < 4; ++i) { | |
227 | dits[0] = rl[i]; | |
228 | dits[1] = dits[0] + drpcb[i]; | |
229 | dits[2] = dzb[i] / 2.; | |
230 | zpos = dzl[i] + dits[2]; | |
231 | pMC->Gsposp("IPCB", i-1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3); | |
232 | pMC->Gsposp("IPCB", i+1, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3); | |
233 | } | |
234 | ||
235 | // COPPER (layer #3 and #4) | |
236 | ||
237 | pMC->Gsvolu("ICO2", "TUBE", idtmed[234], dits, 0); | |
238 | for (i = 2; i < 4; ++i) { | |
239 | dits[0] = rl[i] + drpcb[i]; | |
240 | dits[1] = dits[0] + drcu[i]; | |
241 | dits[2] = dzb[i] / 2.; | |
242 | zpos = dzl[i] + dits[2]; | |
243 | pMC->Gsposp("ICO2", i-1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3); | |
244 | pMC->Gsposp("ICO2", i+1, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3); | |
245 | } | |
246 | ||
247 | // CERAMICS (layer #3 and #4) | |
248 | ||
249 | pMC->Gsvolu("ICER", "TUBE", idtmed[235], dits, 0); | |
250 | for (i = 2; i < 4; ++i) { | |
251 | dits[0] = rl[i] + drpcb[i] + drcu[i]; | |
252 | dits[1] = dits[0] + drcer[i]; | |
253 | dits[2] = dzb[i] / 2.; | |
254 | zpos = dzl[i] + dits[2]; | |
255 | pMC->Gsposp("ICER", i-1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3); | |
256 | pMC->Gsposp("ICER", i+1, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3); | |
257 | } | |
258 | ||
259 | // SILICON (layer #3 and #4) | |
260 | ||
261 | pMC->Gsvolu("ISI2", "TUBE", idtmed[226], dits, 0); | |
262 | for (i = 2; i < 4; ++i) { | |
263 | dits[0] = rl[i] + drpcb[i] + drcu[i] + drcer[i]; | |
264 | dits[1] = dits[0] + drsi[i]; | |
265 | dits[2] = dzb[i] / 2.; | |
266 | zpos = dzl[i] + dits[2]; | |
267 | pMC->Gsposp("ISI2", i-1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3); | |
268 | pMC->Gsposp("ISI2", i+1, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3); | |
269 | } | |
270 | ||
271 | // PLASTIC (G10FR4) (layer #5 and #6) | |
272 | ||
273 | pMC->Gsvolu("IPLA", "TUBE", idtmed[262], dits, 0); | |
274 | for (i = 4; i < 6; ++i) { | |
275 | dits[0] = rl[i]; | |
276 | dits[1] = dits[0] + drpla[i]; | |
277 | dits[2] = dzb[i] / 2.; | |
278 | zpos = dzl[i] + dits[2]; | |
279 | pMC->Gsposp("IPLA", i-1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3); | |
280 | pMC->Gsposp("IPLA", i+1, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3); | |
281 | } | |
282 | ||
283 | // COPPER (layer #5 and #6) | |
284 | ||
285 | pMC->Gsvolu("ICO3", "TUBE", idtmed[259], dits, 0); | |
286 | for (i = 4; i < 6; ++i) { | |
287 | dits[0] = rl[i] + drpla[i]; | |
288 | dits[1] = dits[0] + drcu[i]; | |
289 | dits[2] = dzb[i] / 2.; | |
290 | zpos = dzl[i] + dits[2]; | |
291 | pMC->Gsposp("ICO3", i-1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3); | |
292 | pMC->Gsposp("ICO3", i+1, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3); | |
293 | } | |
294 | ||
295 | // EPOXY (layer #5 and #6) | |
296 | ||
297 | pMC->Gsvolu("IEPX", "TUBE", idtmed[262], dits, 0); | |
298 | for (i = 4; i < 6; ++i) { | |
299 | dits[0] = rl[i] + drpla[i] + drcu[i]; | |
300 | dits[1] = dits[0] + drepx[i]; | |
301 | dits[2] = dzb[i] / 2.; | |
302 | zpos = dzl[i] + dits[2]; | |
303 | pMC->Gsposp("IEPX", i-1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3); | |
304 | pMC->Gsposp("IEPX", i+1, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3); | |
305 | } | |
306 | ||
307 | // SILICON (layer #5 and #6) | |
308 | ||
309 | pMC->Gsvolu("ISI3", "TUBE", idtmed[251], dits, 0); | |
310 | for (i = 4; i < 6; ++i) { | |
311 | dits[0] = rl[i] + drpla[i] + drcu[i] + drepx[i]; | |
312 | dits[1] = dits[0] + drsi[i]; | |
313 | dits[2] = dzb[i] / 2.; | |
314 | zpos = dzl[i] + dits[2]; | |
315 | pMC->Gsposp("ISI3", i-1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3); | |
316 | pMC->Gsposp("ISI3", i+1, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3); | |
317 | } | |
318 | ||
319 | // SUPPORT | |
320 | ||
321 | pMC->Gsvolu("ISUP", "TUBE", idtmed[274], dits, 0); | |
322 | for (i = 0; i < 6; ++i) { | |
323 | dits[0] = rl[i]; | |
324 | if (i < 5) dits[1] = rl[i]; | |
325 | else dits[1] = rlim; | |
326 | dits[2] = drsu / 2.; | |
327 | zpos = dzl[i] + dzb[i] + dits[2]; | |
328 | pMC->Gsposp("ISUP", i+1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3); | |
329 | pMC->Gsposp("ISUP", i+7, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3); | |
330 | } | |
331 | ||
332 | // CABLES (HORIZONTAL) | |
333 | ||
334 | pMC->Gsvolu("ICHO", "TUBE", idtmed[278], dits, 0); | |
335 | for (i = 0; i < 6; ++i) { | |
336 | dits[0] = rl[i]; | |
337 | dits[1] = dits[0] + drca; | |
338 | dits[2] = (rzcone + TMath::Tan(acone) * (rl[i] - rl[0]) - (dzl[i]+ dzb[i] + drsu)) / 2.; | |
339 | zpos = dzl[i - 1] + dzb[i] + drsu + dits[2]; | |
340 | pMC->Gsposp("ICHO", i+1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3); | |
341 | pMC->Gsposp("ICHO", i+7, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3); | |
342 | } | |
343 | // DEFINE A CONICAL GHOST VOLUME FOR THE PHI SEGMENTATION | |
344 | pcits[0] = 0.; | |
345 | pcits[1] = 360.; | |
346 | pcits[2] = 2.; | |
347 | pcits[3] = rzcone; | |
348 | pcits[4] = 3.5; | |
349 | pcits[5] = rl[0]; | |
350 | pcits[6] = pcits[3] + TMath::Tan(acone) * (rlim - rl[0]); | |
351 | pcits[7] = rlim - rl[0] + 3.5; | |
352 | pcits[8] = rlim; | |
353 | pMC->Gsvolu("ICMO", "PCON", idtmed[275], pcits, 9); | |
354 | AliMatrix(idrotm[200], 90., 0., 90., 90., 180., 0.); | |
355 | pMC->Gspos("ICMO", 1, "ITSV", 0., 0., 0., 0, "ONLY"); | |
356 | pMC->Gspos("ICMO", 2, "ITSV", 0., 0., 0., idrotm[200], "ONLY"); | |
357 | ||
358 | // DIVIDE INTO NSEC PHI-SECTIONS | |
359 | ||
360 | pMC->Gsdvn("ICMD", "ICMO", nsec, 2); | |
361 | pMC->Gsatt("ICMO", "SEEN", 0); | |
362 | pMC->Gsatt("ICMD", "SEEN", 0); | |
363 | ||
364 | // CONICAL CABLES | |
365 | ||
366 | pcits[2] = 2.; | |
367 | pMC->Gsvolu("ICCO", "PCON", idtmed[278], pcits, 0); | |
368 | for (i = 1; i < 6; ++i) { | |
369 | pcits[0] = -dphi[i] / 2.; | |
370 | pcits[1] = dphi[i]; | |
371 | if (i < 5) { | |
372 | dzco = TMath::Tan(acone) * (rl[i+1] - rl[i]); | |
373 | } else { | |
374 | dzco1 = zmax - (rzcone + TMath::Tan(acone) * (rl[5] - rl[0])) -2.; | |
375 | dzco2 = (rlim - rl[5]) * TMath::Tan(acone); | |
376 | if (rl[5] + dzco1 / TMath::Tan(acone) < rlim) { | |
377 | dzco = dzco1; | |
378 | } else { | |
379 | dzco = dzco2; | |
380 | } | |
381 | } | |
382 | pcits[3] = rzcone + TMath::Tan(acone) * (rl[i] - rl[0]); | |
383 | pcits[4] = rl[i] - drcac[i] / TMath::Sin(acone); | |
384 | pcits[5] = rl[i]; | |
385 | pcits[6] = pcits[3] + dzco; | |
386 | pcits[7] = rl[i] + dzco / TMath::Tan(acone) - drcac[i] / TMath::Sin(acone); | |
387 | pcits[8] = rl[i] + dzco / TMath::Tan(acone); | |
388 | ||
389 | pMC->Gsposp("ICCO", i, "ICMD", 0., 0., 0., 0, "ONLY", pcits, 9); | |
390 | ||
391 | } | |
392 | zend = pcits[6]; | |
393 | rend = pcits[8]; | |
394 | ||
395 | // CONICAL CABLES BELOW TPC | |
396 | ||
397 | // DEFINE A CONICAL GHOST VOLUME FOR THE PHI SEGMENTATION | |
398 | pcits[0] = 0.; | |
399 | pcits[1] = 360.; | |
400 | pcits[2] = 2.; | |
401 | pcits[3] = zend; | |
402 | pcits[5] = rend; | |
403 | pcits[4] = pcits[5] - drca_tpc; | |
404 | pcits[6] = xltpc; | |
405 | pcits[8] = pcits[4] + (pcits[6] - pcits[3]) * TMath::Tan(acable * kDegrad); | |
406 | pcits[7] = pcits[8] - drca_tpc; | |
407 | AliMatrix(idrotm[200], 90., 0., 90., 90., 180., 0.); | |
408 | pMC->Gsvolu("ICCM", "PCON", idtmed[275], pcits, 9); | |
409 | pMC->Gspos("ICCM", 1, "ALIC", 0., 0., 0., 0, "ONLY"); | |
410 | pMC->Gspos("ICCM", 2, "ALIC", 0., 0., 0., idrotm[200], "ONLY"); | |
411 | pMC->Gsdvn("ITMD", "ICCM", nsec, 2); | |
412 | pMC->Gsatt("ITMD", "SEEN", 0); | |
413 | pMC->Gsatt("ICCM", "SEEN", 0); | |
414 | ||
415 | // NOW PLACE SEGMENTS WITH DECREASING PHI SEGMENTS INTO THE | |
416 | // GHOST-VOLUME | |
417 | ||
418 | pcits[2] = 2.; | |
419 | pMC->Gsvolu("ITTT", "PCON", idtmed[278], pcits, 0); | |
420 | r0 = rend; | |
421 | z0 = zend; | |
422 | dz = (xltpc - zend) / 9.; | |
423 | for (i = 0; i < 9; ++i) { | |
424 | zi = z0 + i*dz + dz / 2.; | |
425 | ri = r0 + (zi - z0) * TMath::Tan(acable * kDegrad); | |
426 | dphii = dphi[5] * r0 / ri; | |
427 | pcits[0] = -dphii / 2.; | |
428 | pcits[1] = dphii; | |
429 | pcits[3] = zi - dz / 2.; | |
430 | pcits[5] = r0 + (pcits[3] - z0) * TMath::Tan(acable * kDegrad); | |
431 | pcits[4] = pcits[5] - drca_tpc; | |
432 | pcits[6] = zi + dz / 2.; | |
433 | pcits[8] = r0 + (pcits[6] - z0) * TMath::Tan(acable * kDegrad); | |
434 | pcits[7] = pcits[8] - drca_tpc; | |
435 | ||
436 | pMC->Gsposp("ITTT", i+1, "ITMD", 0., 0., 0., 0, "ONLY", pcits, 9); | |
437 | } | |
438 | ||
439 | // --- Outputs the geometry tree in the EUCLID/CAD format | |
440 | ||
441 | if (fEuclidOut) { | |
442 | pMC->WriteEuclid("ITSgeometry", "ITSV", 1, 5); | |
443 | } | |
444 | } | |
445 | ||
446 | //_____________________________________________________________________________ | |
447 | void AliITSv1::CreateMaterials() | |
448 | { | |
449 | // | |
450 | // Create the materials for ITS | |
451 | // | |
452 | AliITS::CreateMaterials(); | |
453 | } | |
454 | ||
455 | //_____________________________________________________________________________ | |
456 | void AliITSv1::Init() | |
457 | { | |
458 | // | |
459 | // Initialise the ITS after it has been built | |
460 | // | |
461 | AliITS::Init(); | |
462 | } | |
463 | ||
464 | //_____________________________________________________________________________ | |
2cb30c3a | 465 | void AliITSv1::DrawModule() |
fe4da5cc | 466 | { |
467 | // | |
468 | // Draw a shaded view of the FMD version 1 | |
469 | // | |
470 | ||
471 | AliMC* pMC = AliMC::GetMC(); | |
472 | ||
473 | // Set everything unseen | |
474 | pMC->Gsatt("*", "seen", -1); | |
475 | // | |
476 | // Set ALIC mother visible | |
477 | pMC->Gsatt("ALIC","SEEN",0); | |
478 | // | |
479 | // Set the volumes visible | |
480 | pMC->Gsatt("ITSV","SEEN",0); | |
481 | pMC->Gsatt("ITS1","SEEN",1); | |
482 | pMC->Gsatt("ITS2","SEEN",1); | |
483 | pMC->Gsatt("ITS3","SEEN",1); | |
484 | pMC->Gsatt("ITS4","SEEN",1); | |
485 | pMC->Gsatt("ITS5","SEEN",1); | |
486 | pMC->Gsatt("ITS6","SEEN",1); | |
487 | ||
488 | pMC->Gsatt("IPCB","SEEN",1); | |
489 | pMC->Gsatt("ICO2","SEEN",1); | |
490 | pMC->Gsatt("ICER","SEEN",0); | |
491 | pMC->Gsatt("ISI2","SEEN",0); | |
492 | pMC->Gsatt("IPLA","SEEN",0); | |
493 | pMC->Gsatt("ICO3","SEEN",0); | |
494 | pMC->Gsatt("IEPX","SEEN",0); | |
495 | pMC->Gsatt("ISI3","SEEN",1); | |
496 | pMC->Gsatt("ISUP","SEEN",0); | |
497 | pMC->Gsatt("ICHO","SEEN",0); | |
498 | pMC->Gsatt("ICMO","SEEN",0); | |
499 | pMC->Gsatt("ICMD","SEEN",0); | |
500 | pMC->Gsatt("ICCO","SEEN",1); | |
501 | pMC->Gsatt("ICCM","SEEN",0); | |
502 | pMC->Gsatt("ITMD","SEEN",0); | |
503 | pMC->Gsatt("ITTT","SEEN",1); | |
504 | ||
505 | // | |
506 | pMC->Gdopt("hide", "on"); | |
507 | pMC->Gdopt("shad", "on"); | |
508 | pMC->Gsatt("*", "fill", 7); | |
509 | pMC->SetClipBox("."); | |
510 | pMC->SetClipBox("*", 0, 300, -300, 300, -300, 300); | |
511 | pMC->DefaultRange(); | |
512 | pMC->Gdraw("alic", 40, 30, 0, 11, 10, .07, .07); | |
513 | pMC->Gdhead(1111, "Inner Tracking System Version 1"); | |
514 | pMC->Gdman(17, 6, "MAN"); | |
515 | } | |
516 | ||
517 | //_____________________________________________________________________________ | |
518 | void AliITSv1::StepManager() | |
519 | { | |
520 | // | |
521 | // Called at every step in the ITS | |
522 | // | |
523 | Int_t copy, id; | |
524 | Float_t hits[7]; | |
525 | Int_t vol[3]; | |
526 | Float_t position[3]; | |
527 | Float_t momentum[4]; | |
528 | TClonesArray &lhits = *fHits; | |
529 | AliMC* pMC = AliMC::GetMC(); | |
530 | // | |
531 | if(pMC->TrackCharge() && pMC->Edep()) { | |
532 | // | |
533 | // Only entering charged tracks | |
534 | if((id=pMC->CurrentVol(0,copy))==fIdSens1) { | |
535 | vol[0]=1; | |
536 | id=pMC->CurrentVolOff(1,0,copy); | |
537 | vol[1]=copy; | |
538 | id=pMC->CurrentVolOff(2,0,copy); | |
539 | vol[2]=copy; | |
540 | } else if(id==fIdSens2) { | |
541 | vol[0]=2; | |
542 | id=pMC->CurrentVolOff(1,0,copy); | |
543 | vol[1]=copy; | |
544 | id=pMC->CurrentVolOff(2,0,copy); | |
545 | vol[2]=copy; | |
546 | } else if(id==fIdSens3) { | |
547 | vol[0]=3; | |
548 | vol[1]=copy; | |
549 | id=pMC->CurrentVolOff(1,0,copy); | |
550 | vol[2]=copy; | |
551 | } else if(id==fIdSens4) { | |
552 | vol[0]=4; | |
553 | vol[1]=copy; | |
554 | id=pMC->CurrentVolOff(1,0,copy); | |
555 | vol[2]=copy; | |
556 | } else if(id==fIdSens5) { | |
557 | vol[0]=5; | |
558 | vol[1]=copy; | |
559 | id=pMC->CurrentVolOff(1,0,copy); | |
560 | vol[2]=copy; | |
561 | } else if(id==fIdSens6) { | |
562 | vol[0]=6; | |
563 | vol[1]=copy; | |
564 | id=pMC->CurrentVolOff(1,0,copy); | |
565 | vol[2]=copy; | |
566 | } else return; | |
567 | pMC->TrackPosition(position); | |
568 | pMC->TrackMomentum(momentum); | |
569 | hits[0]=position[0]; | |
570 | hits[1]=position[1]; | |
571 | hits[2]=position[2]; | |
572 | hits[3]=momentum[0]*momentum[3]; | |
573 | hits[4]=momentum[1]*momentum[3]; | |
574 | hits[5]=momentum[2]*momentum[3]; | |
575 | hits[6]=pMC->Edep(); | |
576 | new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->CurrentTrack(),vol,hits); | |
577 | } | |
578 | } |