]>
Commit | Line | Data |
---|---|---|
4c039060 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* | |
17 | $Log$ | |
cc80f89e | 18 | Revision 1.15.8.2 2000/04/10 08:29:48 kowal2 |
19 | ||
20 | Different pad geometry for different sectors | |
21 | Updated readouch chambers geometry | |
22 | ||
23 | Revision 1.15.8.1 2000/04/10 07:56:53 kowal2 | |
24 | Not used anymore - removed | |
25 | ||
26 | Revision 1.15 1999/11/04 17:28:07 fca | |
27 | Correct barrel part of HV Degrader | |
28 | ||
a5371c42 | 29 | Revision 1.14 1999/10/08 06:27:23 fca |
30 | Corrected bug in the HV degrader geometry, thanks to G.Tabary | |
31 | ||
d183a600 | 32 | Revision 1.13 1999/10/04 13:39:54 fca |
33 | Correct array index problem | |
34 | ||
cdde5b1e | 35 | Revision 1.12 1999/09/29 09:24:34 fca |
36 | Introduction of the Copyright and cvs Log | |
37 | ||
4c039060 | 38 | */ |
39 | ||
fe4da5cc | 40 | /////////////////////////////////////////////////////////////////////////////// |
41 | // // | |
42 | // Time Projection Chamber version 1 -- detailed TPC and fast simulation // | |
43 | // // | |
44 | //Begin_Html | |
45 | /* | |
1439f98e | 46 | <img src="picts/AliTPCv1Class.gif"> |
fe4da5cc | 47 | */ |
48 | //End_Html | |
49 | // // | |
50 | // // | |
51 | /////////////////////////////////////////////////////////////////////////////// | |
52 | ||
53 | #include <TMath.h> | |
54 | #include <TGeometry.h> | |
55 | #include <TNode.h> | |
56 | #include <TBRIK.h> | |
57 | #include <TTUBE.h> | |
58 | #include "AliTPCv1.h" | |
59 | #include "AliRun.h" | |
60 | #include <iostream.h> | |
61 | #include <fstream.h> | |
62 | ||
63 | #include "AliMC.h" | |
64 | #include "AliConst.h" | |
65 | ||
8c555625 | 66 | #include "AliTPCParam.h" |
cc80f89e | 67 | #include "AliTPCDigitsArray.h" |
8c555625 | 68 | |
fe4da5cc | 69 | ClassImp(AliTPCv1) |
70 | ||
71 | //_____________________________________________________________________________ | |
72 | AliTPCv1::AliTPCv1(const char *name, const char *title) | |
73 | :AliTPC(name, title) { | |
74 | // | |
75 | // Standard constructor for Time Projection Chamber | |
76 | // | |
77 | fIdSens1=fIdSens2=0; | |
78 | } | |
79 | ||
80 | //_____________________________________________________________________________ | |
81 | void AliTPCv1::CreateGeometry() | |
82 | { | |
83 | // | |
84 | // Creates geometry for Time Projection Chamber version 1 | |
85 | // Detailed geometry -- Fast simulation | |
86 | // Origin M.Kowalski | |
87 | // | |
88 | //Begin_Html | |
89 | /* | |
1439f98e | 90 | <img src="picts/AliTPCv1.gif"> |
fe4da5cc | 91 | */ |
92 | //End_Html | |
93 | //Begin_Html | |
94 | /* | |
1439f98e | 95 | <img src="picts/AliTPCv1Tree.gif"> |
fe4da5cc | 96 | */ |
97 | //End_Html | |
98 | ||
8c555625 | 99 | |
1283eee5 | 100 | Int_t *idtmed = fIdtmed->GetArray(); |
8c555625 | 101 | |
1283eee5 | 102 | Float_t dm[21]; |
62a73ee5 | 103 | Int_t idrotm[120]; |
1283eee5 | 104 | |
105 | Int_t nRotMat = 0; | |
106 | ||
107 | ||
fe4da5cc | 108 | // ---------------------------------------------------- |
1283eee5 | 109 | // FIELD CAGE WITH ENDCAPS - G10 |
fe4da5cc | 110 | // THIS IS ALSO A TPC MOTHER VOLUME |
111 | // ---------------------------------------------------- | |
1283eee5 | 112 | |
fe4da5cc | 113 | dm[0] = 76.; |
114 | dm[1] = 278.; | |
115 | dm[2] = 275.; | |
1283eee5 | 116 | |
117 | gMC->Gsvolu("TPC ", "TUBE", idtmed[8], dm, 3); | |
118 | ||
119 | //----------------------------------------------------- | |
120 | // Endcap cover c-fibre 0.86% X0 | |
121 | //----------------------------------------------------- | |
122 | ||
123 | dm[0] = 78.; | |
124 | dm[1] = 258.; | |
125 | dm[2] = 0.95; | |
126 | ||
127 | gMC->Gsvolu("TPEC","TUBE",idtmed[10],dm,3); | |
128 | ||
129 | //----------------------------------------------------- | |
130 | // Drift gas , leave 2 cm at the outer radius | |
131 | // and inner raddius | |
132 | //----------------------------------------------------- | |
133 | ||
134 | dm[0] = 78.; | |
135 | dm[1] = 258.; | |
fe4da5cc | 136 | dm[2] = 250.; |
fe4da5cc | 137 | |
1283eee5 | 138 | gMC->Gsvolu("TGAS", "TUBE", idtmed[3], dm, 3); |
139 | ||
140 | ||
141 | //------------------------------------------------------ | |
142 | // membrane holder - carbon fiber | |
143 | //------------------------------------------------------ | |
144 | ||
145 | ||
146 | gMC->Gsvolu("TPMH","TUBE",idtmed[6],dm,0); | |
147 | ||
148 | dm[0] = 252.; | |
149 | dm[1] = 258.; | |
150 | dm[2] = 0.2; | |
151 | ||
152 | gMC->Gsposp("TPMH",1,"TGAS",0.,0.,0.,0,"ONLY",dm,3); | |
153 | ||
154 | dm[0] = 78.; | |
cdde5b1e | 155 | dm[1] = 82.; |
1283eee5 | 156 | dm[2] = 0.1; |
157 | ||
158 | gMC->Gsposp("TPMH",2,"TGAS",0.,0.,0.,0,"ONLY",dm,3); | |
159 | ||
160 | //---------------------------------------------------------- | |
161 | // HV membrane - 25 microns of mylar | |
162 | //---------------------------------------------------------- | |
163 | ||
164 | dm[0] = 82.; | |
165 | dm[1] = 252.; | |
166 | dm[2] = 0.00125; | |
167 | ||
168 | gMC->Gsvolu("TPHV","TUBE",idtmed[5],dm,3); | |
169 | ||
170 | gMC->Gspos("TPHV",1,"TGAS",0.,0.,0.,0,"ONLY"); | |
171 | ||
172 | gMC->Gspos("TGAS",1,"TPC ",0.,0.,0.,0,"ONLY"); | |
173 | ||
174 | //---------------------------------------------------------- | |
175 | // "side" gas volume, the same as the drift gas | |
176 | // the readout chambers are placed there. | |
177 | //---------------------------------------------------------- | |
178 | ||
179 | dm[0] = 78.; | |
180 | dm[1] = 258.; | |
181 | dm[2] = 0.5*(275. - 250.); | |
182 | ||
183 | gMC->Gsvolu("TPSG", "TUBE", idtmed[2], dm, 3); | |
184 | ||
185 | Float_t z_side = dm[2]; // 1/2 of the side gas thickness | |
186 | ||
187 | //----------------------------------------------------------- | |
188 | // Readout chambers , 25% of X0, I use Al as the material | |
189 | //----------------------------------------------------------- | |
190 | ||
191 | Float_t InnerOpenAngle = fTPCParam->GetInnerAngle(); | |
192 | Float_t OuterOpenAngle = fTPCParam->GetOuterAngle(); | |
193 | ||
194 | Float_t InnerAngleShift = fTPCParam->GetInnerAngleShift(); | |
195 | Float_t OuterAngleShift = fTPCParam->GetOuterAngleShift(); | |
196 | ||
197 | ||
198 | Int_t nInnerSector = fTPCParam->GetNInnerSector()/2; | |
199 | Int_t nOuterSector = fTPCParam->GetNOuterSector()/2; | |
200 | ||
201 | ||
cc80f89e | 202 | Float_t InSecLowEdge = fTPCParam->GetInnerRadiusLow(); |
203 | Float_t InSecUpEdge = fTPCParam->GetInnerRadiusUp(); | |
1283eee5 | 204 | |
cc80f89e | 205 | Float_t OuSecLowEdge = fTPCParam->GetOuterRadiusLow(); |
206 | Float_t OuSecUpEdge = fTPCParam->GetOuterRadiusUp(); | |
1283eee5 | 207 | |
208 | Float_t SecThick = 2.225; // Al | |
209 | ||
1283eee5 | 210 | // S (Inner) sectors |
211 | ||
cc80f89e | 212 | Float_t LowEdge = fTPCParam->GetInnerFrameSpace(); |
213 | ||
214 | dm[0] = InSecLowEdge*TMath::Tan(0.5*InnerOpenAngle)-LowEdge; | |
215 | dm[1] = InSecUpEdge*TMath::Tan(0.5*InnerOpenAngle)-LowEdge; | |
1283eee5 | 216 | dm[2] = 0.5*SecThick; |
217 | dm[3] = 0.5*(InSecUpEdge-InSecLowEdge); | |
218 | ||
219 | Float_t xCenterS = InSecLowEdge+dm[3]; | |
220 | ||
221 | gMC->Gsvolu("TRCS", "TRD1", idtmed[0], dm, 4); | |
222 | ||
223 | // L (Outer) sectors | |
224 | ||
cc80f89e | 225 | Float_t UpEdge = fTPCParam->GetOuterFrameSpace(); |
226 | ||
227 | dm[0] = OuSecLowEdge*TMath::Tan(0.5*OuterOpenAngle)-UpEdge; | |
228 | dm[1] = OuSecUpEdge*TMath::Tan(0.5*OuterOpenAngle)-UpEdge; | |
1283eee5 | 229 | dm[2] = 0.5*SecThick; |
230 | dm[3] = 0.5*(OuSecUpEdge-OuSecLowEdge); | |
231 | ||
232 | Float_t xCenterL = OuSecLowEdge+dm[3]; | |
233 | ||
234 | gMC->Gsvolu("TRCL", "TRD1", idtmed[0], dm, 4); | |
235 | ||
236 | Float_t z1 = -z_side + SecThick*0.5; | |
237 | ||
238 | //------------------------------------------------------------------ | |
239 | // S sectors - "gas sectors" (TRD1) | |
240 | //------------------------------------------------------------------ | |
241 | ||
242 | dm[0] = InSecLowEdge*TMath::Tan(0.5*InnerOpenAngle)-0.01; | |
243 | dm[1] = InSecUpEdge*TMath::Tan(0.5*InnerOpenAngle)-0.01; | |
244 | dm[2] = 0.5*(250. - 0.001); | |
245 | dm[3] = 0.5*(InSecUpEdge-InSecLowEdge); | |
246 | ||
247 | gMC->Gsvolu("TSGA", "TRD1", idtmed[3], dm, 4); // nonsensitive | |
248 | ||
249 | //------------------------------------------------------------------ | |
250 | // sensitive strips - "pad rows" | |
251 | //------------------------------------------------------------------ | |
252 | ||
253 | Int_t ns; | |
254 | Float_t r1,r2,zz; | |
255 | ||
256 | Float_t StripThick = 0.01; // 100 microns | |
cc80f89e | 257 | Float_t dead; |
1283eee5 | 258 | |
259 | gMC->Gsvolu("TSST", "TRD1", idtmed[4], dm, 0); | |
260 | ||
261 | dm[2] = 0.5*(250. - 0.002); | |
262 | dm[3] = 0.5 * StripThick; | |
263 | ||
8c555625 | 264 | |
1283eee5 | 265 | // S-sector |
8c555625 | 266 | |
cc80f89e | 267 | dead = fTPCParam->GetInnerWireMount(); |
268 | ||
1283eee5 | 269 | for (ns = 0; ns < fTPCParam->GetNRowLow(); ns++) { |
270 | ||
271 | r1 = fTPCParam->GetPadRowRadiiLow(ns); | |
272 | r2 = r1 + StripThick; | |
273 | dm[0] = r1 * TMath::Tan(0.5*InnerOpenAngle) - dead; | |
274 | dm[1] = r2 * TMath::Tan(0.5*InnerOpenAngle) - dead; | |
275 | ||
276 | zz = -InSecLowEdge -0.5*(InSecUpEdge-InSecLowEdge); | |
277 | zz += r1; | |
278 | zz += dm[3]; | |
279 | ||
280 | gMC->Gsposp("TSST", ns+1, "TSGA", 0., 0., zz, 0, "ONLY", dm, 4); | |
281 | ||
8c555625 | 282 | |
fe4da5cc | 283 | } |
8c555625 | 284 | |
1283eee5 | 285 | //----------------------------------------------------------------- |
286 | // L sectors - "gas sectors" (PGON to avoid overlaps) | |
287 | //----------------------------------------------------------------- | |
288 | ||
289 | dm[0] = 360.*kDegrad - 0.5*OuterOpenAngle; | |
290 | dm[0] *= kRaddeg; | |
291 | dm[0] = (Float_t)TMath::Nint(dm[0]); | |
292 | ||
293 | dm[1] = OuterOpenAngle*kRaddeg; | |
294 | dm[1] = (Float_t)TMath::Nint(dm[1]); | |
295 | ||
296 | dm[2] = 1.; | |
297 | dm[3] = 4.; | |
298 | ||
299 | dm[4] = 0.002; | |
300 | dm[5] = OuSecLowEdge; | |
301 | dm[6] = 252.*TMath::Cos(0.5*OuterOpenAngle)-0.002; | |
302 | ||
303 | dm[7] = dm[4]+0.2; | |
304 | dm[8] = dm[5]; | |
305 | dm[9] = dm[6]; | |
306 | ||
307 | dm[10] = dm[7]; | |
308 | dm[11] = OuSecLowEdge; | |
309 | dm[12] = OuSecUpEdge; | |
310 | ||
311 | dm[13] = 250.; | |
312 | dm[14] = dm[11]; | |
313 | dm[15] = dm[12]; | |
314 | ||
315 | gMC->Gsvolu("TLGA","PGON",idtmed[3],dm,16); | |
316 | ||
317 | //------------------------------------------------------------------ | |
318 | // sensitive strips - "pad rows" | |
319 | //------------------------------------------------------------------ | |
320 | ||
321 | Float_t rmax = dm[6]; | |
322 | ||
323 | // L-sectors | |
324 | ||
325 | gMC->Gsvolu("TLST", "PGON", idtmed[4], dm, 0); | |
326 | ||
327 | dm[0] = 360.*kDegrad - 0.5*OuterOpenAngle; | |
328 | dm[0] *= kRaddeg; | |
329 | dm[0] = (Float_t)TMath::Nint(dm[0]); | |
330 | ||
331 | dm[1] = OuterOpenAngle*kRaddeg; | |
332 | dm[1] = (Float_t)TMath::Nint(dm[1]); | |
333 | ||
334 | dm[2] = 1.; | |
335 | dm[3] = 2.; | |
336 | ||
337 | dm[7] = 250.; | |
338 | ||
cc80f89e | 339 | dead = fTPCParam->GetOuterWireMount(); |
340 | ||
1283eee5 | 341 | Float_t xx = dead/TMath::Tan(0.5*OuterOpenAngle); |
342 | ||
343 | for(ns=0;ns<fTPCParam->GetNRowUp();ns++){ | |
344 | ||
345 | r1 = fTPCParam->GetPadRowRadiiUp(ns)-xx; | |
346 | r2 = r1 + StripThick; | |
8c555625 | 347 | |
1283eee5 | 348 | dm[5] = r1; |
349 | dm[6] = r2; | |
350 | ||
351 | dm[8] = r1; | |
352 | dm[9] = r2; | |
353 | ||
354 | if(r2+xx < rmax){ | |
355 | dm[4] = 0.002; | |
356 | } | |
357 | else{ | |
358 | dm[4] = 0.202; | |
359 | } | |
360 | ||
361 | gMC->Gsposp("TLST",ns+1,"TLGA",xx,0.,0.,0,"ONLY",dm,10); | |
8c555625 | 362 | |
fe4da5cc | 363 | } |
fe4da5cc | 364 | |
1283eee5 | 365 | //------------------------------------------------------------------ |
366 | // Positioning of the S-sector readout chambers | |
367 | //------------------------------------------------------------------ | |
368 | ||
369 | Float_t zs = 0.5*(250.+0.002); | |
370 | ||
371 | Float_t theta1,theta2,theta3; | |
372 | Float_t phi1,phi2,phi3; | |
373 | Float_t alpha; | |
374 | Float_t x,y; | |
375 | ||
376 | for(ns=0;ns<nInnerSector;ns++){ | |
377 | ||
378 | phi1 = ns * InnerOpenAngle + 270.*kDegrad + InnerAngleShift; | |
379 | phi1 *= kRaddeg; // in degrees | |
380 | ||
381 | phi1 = (Float_t)TMath::Nint(phi1); | |
382 | ||
383 | if (phi1 > 360.) phi1 -= 360.; | |
62a73ee5 | 384 | |
1283eee5 | 385 | |
fe4da5cc | 386 | theta1 = 90.; |
387 | phi2 = 90.; | |
388 | theta2 = 180.; | |
1283eee5 | 389 | phi3 = ns * InnerOpenAngle + InnerAngleShift; |
390 | phi3 *= kRaddeg; // in degrees | |
391 | ||
392 | phi3 = (Float_t)TMath::Nint(phi3); | |
393 | ||
394 | if(phi3 > 360.) phi3 -= 360.; | |
395 | ||
fe4da5cc | 396 | theta3 = 90.; |
1283eee5 | 397 | |
398 | alpha = phi3*kDegrad; | |
399 | ||
400 | x = xCenterS * TMath::Cos(alpha); | |
401 | y = xCenterS * TMath::Sin(alpha); | |
402 | ||
403 | AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3); | |
404 | ||
405 | gMC->Gspos("TRCS", ns+1, "TPSG", x, y, z1, idrotm[nRotMat], "ONLY"); | |
406 | ||
407 | gMC->Gspos("TSGA",ns+1,"TGAS",x,y,zs,idrotm[nRotMat], "ONLY"); | |
408 | gMC->Gspos("TSGA",ns+1+nInnerSector,"TGAS",x,y,-zs,idrotm[nRotMat], "ONLY"); | |
409 | ||
410 | nRotMat++; | |
411 | ||
412 | } | |
fe4da5cc | 413 | |
1283eee5 | 414 | //------------------------------------------------------------------- |
415 | // Positioning of the L-sectors readout chambers | |
416 | //------------------------------------------------------------------- | |
fe4da5cc | 417 | |
1283eee5 | 418 | for(ns=0;ns<nOuterSector;ns++){ |
419 | phi1 = ns * OuterOpenAngle + 270.*kDegrad + OuterAngleShift; | |
420 | phi1 *= kRaddeg; // in degrees | |
fe4da5cc | 421 | |
1283eee5 | 422 | phi1 = (Float_t)TMath::Nint(phi1); |
fe4da5cc | 423 | |
1283eee5 | 424 | |
425 | if (phi1 > 360.) phi1 -= 360.; | |
426 | ||
fe4da5cc | 427 | theta1 = 90.; |
428 | phi2 = 90.; | |
429 | theta2 = 180.; | |
1283eee5 | 430 | phi3 = ns * OuterOpenAngle+OuterAngleShift; |
431 | phi3 *= kRaddeg; // in degrees | |
432 | ||
433 | phi3 = (Float_t)TMath::Nint(phi3); | |
434 | ||
435 | ||
436 | if(phi3 > 360.) phi3 -= 360.; | |
437 | ||
fe4da5cc | 438 | theta3 = 90.; |
1283eee5 | 439 | |
440 | alpha = phi3*kDegrad; | |
441 | ||
442 | x = xCenterL * TMath::Cos(alpha); | |
443 | y = xCenterL * TMath::Sin(alpha); | |
444 | ||
445 | AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3); | |
446 | ||
447 | ||
448 | gMC->Gspos("TRCL", ns+1, "TPSG", x, y, z1, idrotm[nRotMat], "ONLY"); | |
449 | ||
450 | nRotMat++; | |
451 | ||
fe4da5cc | 452 | } |
fe4da5cc | 453 | |
1283eee5 | 454 | //------------------------------------------------------------------- |
455 | // Positioning of the L-sectors (gas sectors) | |
456 | //------------------------------------------------------------------- | |
457 | ||
458 | for(ns=0;ns<nOuterSector;ns++){ | |
459 | ||
460 | phi1 = ns*OuterOpenAngle + OuterAngleShift; | |
461 | phi1 *= kRaddeg; | |
462 | ||
463 | phi1 = (Float_t)TMath::Nint(phi1); | |
464 | if(phi1>360.) phi1 -= 360.; | |
465 | ||
466 | theta1 = 90.; | |
467 | ||
468 | phi2 = 90. + phi1; | |
469 | if(phi2>360.) phi2 -= 360.; | |
470 | ||
471 | theta2 = 90.; | |
472 | ||
473 | phi3 = 0.; | |
474 | theta3 = 0.; | |
475 | ||
476 | alpha = phi1*kDegrad; | |
477 | ||
478 | ||
479 | AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3); | |
480 | ||
481 | ||
482 | gMC->Gspos("TLGA",ns+1,"TGAS" ,0.,0.,0.,idrotm[nRotMat],"ONLY"); | |
483 | ||
484 | nRotMat++; | |
485 | ||
486 | // reflection !! | |
487 | ||
488 | phi3 = 0.; | |
489 | theta3 = 180.; | |
490 | ||
491 | AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3); | |
492 | ||
493 | gMC->Gspos("TLGA",ns+1+nOuterSector,"TGAS" ,0.,0.,0.,idrotm[nRotMat],"ONLY"); | |
494 | ||
495 | nRotMat++; | |
496 | } | |
fe4da5cc | 497 | |
1283eee5 | 498 | Float_t z0 = z_side - 0.95; |
499 | ||
500 | gMC->Gspos("TPEC",1,"TPSG",0.,0.,z0,0,"ONLY"); | |
501 | ||
fe4da5cc | 502 | // ========================================================== |
503 | // wheels | |
504 | // ========================================================== | |
1283eee5 | 505 | |
506 | // | |
507 | // auxilary structures | |
508 | // | |
509 | ||
510 | ||
511 | gMC->Gsvolu("TPWI","TUBE",idtmed[24],dm,0); // "air" | |
512 | ||
fe4da5cc | 513 | // ---------------------------------------------------------- |
514 | // Large wheel -> positioned in the TPC | |
515 | // ---------------------------------------------------------- | |
1283eee5 | 516 | |
517 | ||
518 | z0 = 263.5; // TPC length - 1/2 spoke wheel width | |
519 | ||
520 | dm[0] = 258.; | |
fe4da5cc | 521 | dm[1] = 278.; |
522 | dm[2] = 11.5; | |
fe4da5cc | 523 | |
1283eee5 | 524 | gMC->Gsvolu("TPWL", "TUBE", idtmed[0], dm, 3); |
525 | ||
526 | dm[0] = dm[0]+2.; | |
527 | dm[1] = 278.; | |
528 | dm[2] = dm[2]-2.; | |
529 | ||
530 | gMC->Gsposp("TPWI",1,"TPWL",0.,0.,0.,0,"ONLY",dm,3); | |
531 | ||
532 | gMC->Gspos("TPWL", 1, "TPC ", 0, 0, z0, 0, "ONLY"); | |
533 | gMC->Gspos("TPWL", 2, "TPC ", 0, 0, -z0, 0, "ONLY"); | |
534 | ||
535 | // | |
536 | // Outer vessel + CO2 HV degrader | |
537 | // | |
538 | ||
539 | dm[0] = 260.; | |
540 | dm[1] = 278.; | |
541 | dm[2] = 252.; | |
542 | ||
543 | gMC->Gsvolu("TPCO","TUBE",idtmed[12],dm,3); | |
544 | ||
545 | dm[0] = 275.; | |
fe4da5cc | 546 | dm[1] = 278.; |
fe4da5cc | 547 | |
1283eee5 | 548 | gMC->Gsvolu("TPOV","TUBE",idtmed[10],dm,3); |
549 | ||
550 | gMC->Gspos("TPOV",1,"TPCO",0.,0.,0.,0,"ONLY"); | |
551 | ||
552 | ||
553 | // G10 plugs | |
554 | ||
555 | dm[0] = 258.; | |
556 | dm[1] = 260.; | |
557 | dm[2] = 1.; | |
558 | ||
559 | gMC->Gsvolu("TPG1","TUBE",idtmed[8],dm,3); | |
560 | gMC->Gspos("TPG1",1,"TPCO",0.,0.,251.,0,"ONLY"); | |
561 | gMC->Gspos("TPG1",2,"TPCO",0.,0.,-251.,0,"ONLY"); | |
562 | ||
563 | gMC->Gspos("TPCO",1,"TPC ",0.,0.,0.,0,"ONLY"); | |
564 | ||
565 | ||
566 | //---------------------------------------------------------- | |
567 | // Small wheel -> positioned in "side gas | |
568 | //---------------------------------------------------------- | |
569 | ||
570 | dm[0] = 78.; | |
fe4da5cc | 571 | dm[1] = 82.; |
572 | dm[2] = 11.5; | |
1283eee5 | 573 | |
574 | gMC->Gsvolu("TPWS", "TUBE", idtmed[0], dm, 3); | |
575 | ||
576 | dm[0] = 78.; | |
577 | dm[1] = dm[1]-2; | |
578 | dm[2] = dm[2]-2.; | |
579 | ||
580 | gMC->Gsvolu("TPW1", "TUBE", idtmed[2], dm, 3); | |
fe4da5cc | 581 | |
1283eee5 | 582 | gMC->Gspos("TPW1", 1, "TPWS", 0., 0., 0., 0, "ONLY"); |
583 | ||
584 | z0 = 1.; // spoke wheel is shifted w.r.t. center of the "side gas" | |
585 | ||
586 | gMC->Gspos("TPWS", 1, "TPSG", 0, 0, z0, 0, "ONLY"); | |
587 | ||
588 | ||
589 | // to avoid overlaps | |
590 | ||
591 | dm[0] = 76.; | |
592 | dm[1] = 78.; | |
593 | dm[2] = 11.5; | |
594 | ||
595 | gMC->Gsvolu("TPS1","TUBE",idtmed[0],dm,3); | |
596 | ||
fe4da5cc | 597 | dm[2] = 9.5; |
1283eee5 | 598 | |
599 | gMC->Gsvolu("TPS2","TUBE",idtmed[24],dm,3); | |
600 | ||
601 | gMC->Gspos("TPS2",1,"TPS1",0.,0.,0.,0,"ONLY"); | |
602 | ||
603 | z0= 263.5; | |
fe4da5cc | 604 | |
1283eee5 | 605 | gMC->Gspos("TPS1",1,"TPC ",0.,0.,z0,0,"ONLY"); |
606 | gMC->Gspos("TPS1",2,"TPC ",0.,0.,-z0,0,"ONLY"); | |
607 | ||
608 | // G10 plug | |
609 | ||
610 | dm[0] = 76.; | |
7d7bb9e5 | 611 | dm[1] = 78.; |
612 | dm[2] = 1.; | |
1283eee5 | 613 | |
614 | gMC->Gsvolu("TPG2","TUBE",idtmed[8],dm,3); | |
615 | ||
616 | z0 = 251.; | |
617 | ||
618 | gMC->Gspos("TPG2",1,"TPC ",0.,0.,z0,0,"ONLY"); | |
619 | gMC->Gspos("TPG2",2,"TPC ",0.,0.,-z0,0,"ONLY"); | |
620 | ||
621 | ||
622 | //--------------------------------------------------------- | |
623 | // central wheel 6 (radial direction) x 4 (along z) cm2 | |
624 | //--------------------------------------------------------- | |
625 | ||
626 | dm[0] = 140.; | |
627 | dm[1] = 146.; | |
fe4da5cc | 628 | dm[2] = 2.; |
1283eee5 | 629 | |
630 | gMC->Gsvolu("TPWC","TUBE",idtmed[0],dm,3); | |
631 | ||
632 | dm[0] = dm[0] + 2.; | |
633 | dm[1] = dm[1] - 2.; | |
634 | dm[2] = dm[2] - 1.; | |
635 | ||
636 | gMC->Gsposp("TPWI",2,"TPWC",0.,0.,0.,0,"ONLY",dm,3); | |
637 | ||
638 | z0 = z_side - 1.9 - 2.; | |
639 | ||
640 | gMC->Gspos("TPWC",1,"TPSG",0.,0.,z0,0,"ONLY"); | |
641 | ||
642 | // | |
643 | ||
644 | gMC->Gsvolu("TPSE","BOX ",idtmed[24],dm,0); // "empty" part of the spoke | |
645 | ||
646 | ||
647 | //--------------------------------------------------------- | |
648 | // inner spokes (nSectorInner) | |
649 | //--------------------------------------------------------- | |
650 | ||
651 | dm[0] = 0.5*(139.9-82.1); | |
fe4da5cc | 652 | dm[1] = 3.; |
653 | dm[2] = 2.; | |
1283eee5 | 654 | |
655 | Float_t x1 = dm[0]+82.; | |
656 | ||
657 | gMC->Gsvolu("TPSI","BOX",idtmed[0],dm,3); | |
658 | ||
659 | dm[1] = dm[1]-1.; | |
660 | dm[2] = dm[2]-1.; | |
661 | ||
662 | gMC->Gsposp("TPSE",1,"TPSI",0.,0.,0.,0,"ONLY",dm,3); | |
663 | ||
664 | for(ns=0;ns<nInnerSector;ns++){ | |
665 | ||
666 | phi1 = 0.5*InnerOpenAngle + ns*InnerOpenAngle + InnerAngleShift; | |
667 | theta1=90.; | |
668 | phi1 *=kRaddeg; | |
669 | ||
670 | phi1 = (Float_t)TMath::Nint(phi1); | |
671 | if(phi1>360.) phi1 -= 360.; | |
672 | ||
673 | phi2 = phi1+90.; | |
674 | if(phi2>360.) phi2 -= 360.; | |
675 | theta2=90.; | |
676 | phi3=0.; | |
677 | theta3=0.; | |
678 | ||
fe4da5cc | 679 | alpha = phi1 * kDegrad; |
680 | x = x1 * TMath::Cos(alpha); | |
1283eee5 | 681 | y = x1 * TMath::Sin(alpha); |
682 | ||
683 | AliMatrix(idrotm[nRotMat],theta1,phi1,theta2,phi2,theta3,phi3); | |
684 | ||
685 | gMC->Gspos("TPSI",ns+1,"TPSG",x,y,z0,idrotm[nRotMat],"ONLY"); | |
686 | ||
687 | nRotMat++; | |
688 | ||
fe4da5cc | 689 | } |
1283eee5 | 690 | |
691 | //------------------------------------------------------------- | |
692 | // outer spokes (nSectorOuter) | |
693 | //------------------------------------------------------------- | |
694 | ||
695 | dm[0] = 0.5*(257.9-146.1); | |
696 | dm[1] = 3.; | |
697 | dm[2] = 2.; | |
698 | ||
699 | x1 = dm[0] + 146.; | |
700 | ||
701 | gMC->Gsvolu("TPSO","BOX ",idtmed[0],dm,3); | |
702 | ||
703 | dm[1] = dm[1] - 1.; | |
704 | dm[2] = dm[2] - 1.; | |
705 | ||
706 | gMC->Gsposp("TPSE",2,"TPSO",0.,0.,0.,0,"ONLY",dm,3); | |
707 | ||
708 | for(ns=0;ns<nOuterSector;ns++){ | |
709 | ||
710 | phi1 = 0.5*OuterOpenAngle + ns*OuterOpenAngle + OuterAngleShift; | |
711 | theta1=90.; | |
712 | phi1 *=kRaddeg; | |
713 | ||
714 | phi1 = (Float_t)TMath::Nint(phi1); | |
715 | if(phi1>360.) phi1 -= 360.; | |
716 | ||
717 | phi2 = phi1+90.; | |
718 | if(phi2>360.) phi2 -= 360.; | |
719 | theta2=90.; | |
720 | phi3=0.; | |
721 | theta3=0.; | |
722 | ||
fe4da5cc | 723 | alpha = phi1 * kDegrad; |
1283eee5 | 724 | x = x1 * TMath::Cos(alpha); |
725 | y = x1 * TMath::Sin(alpha); | |
726 | ||
727 | AliMatrix(idrotm[nRotMat],theta1,phi1,theta2,phi2,theta3,phi3); | |
728 | ||
729 | gMC->Gspos("TPSO",ns+1,"TPSG",x,y,z0,idrotm[nRotMat],"ONLY"); | |
730 | ||
731 | nRotMat++; | |
732 | ||
733 | } | |
fe4da5cc | 734 | |
1283eee5 | 735 | |
fe4da5cc | 736 | |
fe4da5cc | 737 | // -------------------------------------------------------- |
738 | // put the readout chambers into the TPC | |
739 | // -------------------------------------------------------- | |
1283eee5 | 740 | |
fe4da5cc | 741 | theta1 = 90.; |
742 | phi1 = 0.; | |
743 | theta2 = 90.; | |
744 | phi2 = 270.; | |
745 | theta3 = 180.; | |
746 | phi3 = 0.; | |
747 | ||
1283eee5 | 748 | AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3); |
fe4da5cc | 749 | |
750 | z0 = z_side + 250.; | |
751 | ||
cfce8870 | 752 | gMC->Gspos("TPSG", 1, "TPC ", 0, 0, z0, 0, "ONLY"); |
1283eee5 | 753 | gMC->Gspos("TPSG", 2, "TPC ", 0, 0, -z0, idrotm[nRotMat], "ONLY"); |
fe4da5cc | 754 | |
cfce8870 | 755 | gMC->Gspos("TPC ", 1, "ALIC", 0, 0, 0, 0, "ONLY"); |
fe4da5cc | 756 | |
1283eee5 | 757 | //---------------------------------------------------- |
758 | // Inner vessel and HV degrader | |
759 | //---------------------------------------------------- | |
fe4da5cc | 760 | |
fe4da5cc | 761 | dm[0] = 0.; |
762 | dm[1] = 360.; | |
763 | dm[2] = 4.; | |
764 | ||
765 | dm[3] = -250.; | |
1283eee5 | 766 | dm[4] = 74.4; |
fe4da5cc | 767 | dm[5] = 76.; |
1283eee5 | 768 | |
fe4da5cc | 769 | dm[6] = -64.5; |
770 | dm[7] = 50.; | |
771 | dm[8] = 76.; | |
1283eee5 | 772 | |
d183a600 | 773 | dm[9] = 64.5; |
fe4da5cc | 774 | dm[10] = 50.; |
775 | dm[11] = 76.; | |
1283eee5 | 776 | |
fe4da5cc | 777 | dm[12] = 250.; |
1283eee5 | 778 | dm[13] = 74.4; |
fe4da5cc | 779 | dm[14] = 76.; |
1283eee5 | 780 | |
781 | gMC->Gsvolu("TPVD", "PCON", idtmed[12], dm, 15); // CO2 | |
782 | ||
783 | // cone parts | |
fe4da5cc | 784 | |
785 | dm[0] = 0.; | |
786 | dm[1] = 360.; | |
1283eee5 | 787 | dm[2] = 2.; |
788 | ||
789 | dm[3] = 64.5; | |
790 | dm[4] = 50.; | |
791 | dm[5] = 51.6; | |
792 | ||
793 | dm[6] = 250.; | |
794 | dm[7] = 74.4; | |
795 | dm[8] = 76.; | |
796 | ||
797 | ||
798 | gMC->Gsvolu("TIVC","PCON",idtmed[11],dm,9); // C-fibre | |
799 | ||
800 | gMC->Gspos("TIVC",1,"TPVD",0.,0.,0.,0,"ONLY"); | |
801 | gMC->Gspos("TIVC",2,"TPVD",0.,0.,0.,idrotm[nRotMat],"ONLY"); | |
802 | ||
803 | // barrel part | |
804 | ||
805 | dm[0] = 50.; | |
806 | dm[1] = 50.5; | |
a5371c42 | 807 | dm[2] = 64.5; |
1283eee5 | 808 | |
809 | gMC->Gsvolu("TIVB","TUBE",idtmed[9],dm,3); | |
810 | ||
811 | gMC->Gspos("TIVB",1,"TPVD",0.,0.,0.,0,"ONLY"); | |
812 | ||
813 | gMC->Gspos("TPVD",1,"ALIC",0.,0.,0.,0,"ONLY"); | |
814 | ||
fe4da5cc | 815 | |
1283eee5 | 816 | |
fe4da5cc | 817 | |
1283eee5 | 818 | |
fe4da5cc | 819 | // --------------------------------------------------- |
820 | // volumes ordering | |
821 | // --------------------------------------------------- | |
cfce8870 | 822 | gMC->Gsord("TGAS", 6); |
823 | gMC->Gsord("TPSG", 6); | |
824 | gMC->Gsord("TSGA", 3); | |
8022212f | 825 | gMC->Gsord("TLGA", 4); |
1283eee5 | 826 | |
827 | } // end of function | |
828 | ||
fe4da5cc | 829 | |
830 | //_____________________________________________________________________________ | |
8c555625 | 831 | void AliTPCv1::DrawDetector() |
fe4da5cc | 832 | { |
833 | // | |
834 | // Draw a shaded view of the Time Projection Chamber version 1 | |
835 | // | |
836 | ||
fe4da5cc | 837 | // Set everything unseen |
cfce8870 | 838 | gMC->Gsatt("*", "seen", -1); |
fe4da5cc | 839 | // |
840 | // Set ALIC mother transparent | |
cfce8870 | 841 | gMC->Gsatt("ALIC","SEEN",0); |
fe4da5cc | 842 | // |
843 | // Set the volumes visible | |
cfce8870 | 844 | gMC->Gsatt("TPC","SEEN",0); |
845 | gMC->Gsatt("TGAS","SEEN",0); | |
846 | gMC->Gsatt("TPSG","SEEN",0); | |
847 | gMC->Gsatt("TPHV","SEEN",1); | |
1283eee5 | 848 | gMC->Gsatt("TPMH","SEEN",1); |
849 | gMC->Gsatt("TPEC","SEEN",0); | |
cfce8870 | 850 | gMC->Gsatt("TRCS","SEEN",1); |
851 | gMC->Gsatt("TRCL","SEEN",1); | |
1283eee5 | 852 | gMC->Gsatt("TPWL","SEEN",1); |
853 | gMC->Gsatt("TPWI","SEEN",1); | |
854 | gMC->Gsatt("TPWS","SEEN",1); | |
cfce8870 | 855 | gMC->Gsatt("TPW1","SEEN",1); |
1283eee5 | 856 | gMC->Gsatt("TPS1","SEEN",1); |
857 | gMC->Gsatt("TPS2","SEEN",1); | |
858 | gMC->Gsatt("TPG1","SEEN",1); | |
859 | gMC->Gsatt("TPG2","SEEN",1); | |
860 | gMC->Gsatt("TPWC","SEEN",1); | |
861 | gMC->Gsatt("TPSI","SEEN",1); | |
862 | gMC->Gsatt("TPSO","SEEN",1); | |
863 | gMC->Gsatt("TPCO","SEEN",1); | |
864 | gMC->Gsatt("TPOV","SEEN",1); | |
cfce8870 | 865 | gMC->Gsatt("TPVD","SEEN",1); |
cc80f89e | 866 | |
cfce8870 | 867 | gMC->Gdopt("hide", "on"); |
868 | gMC->Gdopt("shad", "on"); | |
869 | gMC->Gsatt("*", "fill", 7); | |
870 | gMC->SetClipBox("."); | |
871 | gMC->SetClipBox("*", 0, 1000, -1000, 1000, -1000, 1000); | |
872 | gMC->DefaultRange(); | |
873 | gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .025, .025); | |
874 | gMC->Gdhead(1111, "Time Projection Chamber"); | |
875 | gMC->Gdman(18, 4, "MAN"); | |
876 | gMC->Gdopt("hide","off"); | |
fe4da5cc | 877 | } |
878 | ||
879 | //_____________________________________________________________________________ | |
880 | void AliTPCv1::CreateMaterials() | |
881 | { | |
882 | // | |
883 | // Define materials for Time Projection Chamber | |
884 | // | |
885 | AliTPC::CreateMaterials(); | |
886 | } | |
887 | ||
888 | //_____________________________________________________________________________ | |
889 | void AliTPCv1::Init() | |
890 | { | |
891 | // | |
892 | // Initialises TPC detector after it has been created | |
893 | // | |
cfce8870 | 894 | |
1283eee5 | 895 | fIdSens1=gMC->VolId("TLST"); // L-sector |
896 | fIdSens2=gMC->VolId("TSST"); // S-sector | |
fe4da5cc | 897 | |
898 | printf("TPC version 1 initialized\n"); | |
899 | } | |
900 | ||
901 | //_____________________________________________________________________________ | |
902 | void AliTPCv1::StepManager() | |
903 | { | |
904 | // | |
905 | // Called at every step in the Time Projection Chamber | |
906 | // | |
0a6d8768 | 907 | Int_t copy, id, i; |
fe4da5cc | 908 | Float_t hits[4]; |
909 | Int_t vol[2]; | |
0a6d8768 | 910 | TLorentzVector p; |
fe4da5cc | 911 | TClonesArray &lhits = *fHits; |
1283eee5 | 912 | |
fe4da5cc | 913 | // |
1283eee5 | 914 | |
0a6d8768 | 915 | if(gMC->TrackCharge() && gMC->IsTrackEntering()) { |
fe4da5cc | 916 | // |
917 | // Only entering charged tracks | |
1283eee5 | 918 | // |
0a6d8768 | 919 | if((id=gMC->CurrentVolID(copy))==fIdSens1) { |
1283eee5 | 920 | |
921 | // L | |
922 | ||
923 | vol[1]=copy-1; // row | |
0a6d8768 | 924 | id=gMC->CurrentVolOffID(1,copy); |
1283eee5 | 925 | vol[0]=copy+fTPCParam->GetNInnerSector()-1; // sector |
cc80f89e | 926 | |
927 | //I.Belikov's modification | |
928 | if (vol[1]==0) { | |
929 | gMC->TrackMomentum(p); | |
930 | hits[0]=p[0]; | |
931 | hits[1]=p[1]; | |
932 | hits[2]=p[2]; | |
933 | hits[3]=0.; // this hit has no energy loss | |
934 | new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits); | |
935 | ||
936 | gMC->TrackPosition(p); | |
937 | hits[0]=p[0]; | |
938 | hits[1]=p[1]; | |
939 | hits[2]=p[2]; | |
940 | hits[3]=0.; // this hit has no energy loss | |
941 | new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits); | |
942 | } | |
943 | //end of I.Belikov's modification | |
fe4da5cc | 944 | } else if(id==fIdSens2) { |
1283eee5 | 945 | |
946 | // S | |
947 | ||
948 | vol[1]=copy-1; // row | |
949 | id=gMC->CurrentVolOffID(1,copy); // sector | |
950 | vol[0]=copy-1; | |
cc80f89e | 951 | |
952 | //I.Belikov's modification | |
953 | if (vol[1]==0) { | |
954 | gMC->TrackMomentum(p); | |
955 | hits[0]=p[0]; | |
956 | hits[1]=p[1]; | |
957 | hits[2]=p[2]; | |
958 | hits[3]=0.; // this hit has no energy loss | |
959 | new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits); | |
960 | ||
961 | gMC->TrackPosition(p); | |
962 | hits[0]=p[0]; | |
963 | hits[1]=p[1]; | |
964 | hits[2]=p[2]; | |
965 | hits[3]=0.; // this hit has no energy loss | |
966 | new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits); | |
967 | } | |
968 | //end of I.Belikov's modification | |
969 | ||
fe4da5cc | 970 | } else return; |
1283eee5 | 971 | |
0a6d8768 | 972 | gMC->TrackPosition(p); |
973 | for(i=0;i<3;++i) hits[i]=p[i]; | |
cc80f89e | 974 | hits[3]=1; //I'd like to have something positive here (I.Belikov) |
fe4da5cc | 975 | new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits); |
976 | } | |
977 | } | |
1283eee5 | 978 | |
979 | ||
980 |