]>
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$ | |
4ed5dced | 18 | Revision 1.28 2001/06/12 07:07:41 kowal2 |
19 | New files for folder and stack | |
20 | ||
13a8c8d7 | 21 | Revision 1.27 2001/05/08 16:03:06 kowal2 |
22 | Geometry update according to the latest technical spec. | |
23 | ||
cea9b4f7 | 24 | Revision 1.26 2001/04/27 15:23:07 kowal2 |
25 | Correct materian in the central part of the inner containment vessel | |
26 | ||
90222263 | 27 | Revision 1.25 2001/04/26 06:15:12 kowal2 |
28 | Corrected bug in the inner containment vessel (cones) | |
29 | ||
f4900c61 | 30 | Revision 1.24 2001/04/24 11:22:01 kowal2 |
31 | Protection against too small betagamma | |
32 | ||
7b562732 | 33 | Revision 1.23 2001/04/24 11:17:33 kowal2 |
34 | New TPC geometry. | |
35 | ||
79575d04 | 36 | Revision 1.22 2001/03/13 13:07:34 kowal2 |
37 | Corrected bug in the TPC mother volume geometry. | |
38 | Thanks to A. Morsch | |
39 | ||
7ab50f40 | 40 | Revision 1.21 2000/11/30 11:48:50 kowal2 |
41 | TLorentzVector.h adde to satisfy the latest changes by Federico | |
42 | ||
a383b30d | 43 | Revision 1.20 2000/11/14 10:48:57 kowal2 |
44 | Correct material used for TSA4. Thanks to J. Barbosa. | |
45 | ||
2c668420 | 46 | Revision 1.19 2000/11/06 17:24:10 kowal2 |
47 | Corrected bug in the outer containment vessel and | |
48 | the outer field cage geometry. | |
49 | Thanks to J. Barbosa. | |
50 | ||
720b23b8 | 51 | Revision 1.18 2000/11/02 16:55:24 kowal2 |
52 | Corrected bug in the inner containment vessel geometry. | |
53 | Thanks to J. Belikov | |
54 | ||
08db548a | 55 | Revision 1.17 2000/11/02 07:24:11 kowal2 |
56 | Correction in the TPC geometry. | |
57 | Changes due to the new hit structure. | |
58 | ||
6a905708 | 59 | Revision 1.16 2000/10/02 21:28:18 fca |
60 | Removal of useless dependecies via forward declarations | |
61 | ||
94de3818 | 62 | Revision 1.15 2000/07/10 20:57:39 hristov |
63 | Update of TPC code and macros by M.Kowalski | |
64 | ||
37831078 | 65 | Revision 1.14 2000/06/30 12:07:50 kowal2 |
66 | Updated from the TPC-PreRelease branch | |
67 | ||
73042f01 | 68 | Revision 1.13.2.4 2000/06/26 07:39:42 kowal2 |
69 | Changes to obey the coding rules | |
70 | ||
71 | Revision 1.13.2.3 2000/06/25 08:38:41 kowal2 | |
72 | Splitted from AliTPCtracking | |
73 | ||
74 | Revision 1.13.2.2 2000/06/16 12:58:13 kowal2 | |
75 | Changed parameter settings | |
76 | ||
77 | Revision 1.13.2.1 2000/06/09 07:15:07 kowal2 | |
78 | ||
79 | Defaults loaded automatically (hard-wired) | |
80 | Optional parameters can be set via macro called in the constructor | |
81 | ||
82 | Revision 1.13 2000/05/15 10:00:30 kowal2 | |
83 | Corrected bug in the TPC geometry, thanks to Ivana Hrivnacova | |
84 | ||
e94dd9ca | 85 | Revision 1.12 2000/04/17 09:37:33 kowal2 |
86 | removed obsolete AliTPCDigitsDisplay.C | |
87 | ||
cc80f89e | 88 | Revision 1.11.8.2 2000/04/10 08:36:12 kowal2 |
89 | ||
90 | Updated readout chambers | |
91 | Some modifications to StepManager by M. Kowalski | |
92 | ||
93 | Revision 1.11.8.1 2000/04/10 07:56:53 kowal2 | |
94 | Not used anymore - removed | |
95 | ||
96 | Revision 1.11 1999/11/04 17:28:07 fca | |
97 | Correct barrel part of HV Degrader | |
98 | ||
a5371c42 | 99 | Revision 1.10 1999/10/14 16:52:08 fca |
100 | Only use PDG codes and not GEANT ones | |
101 | ||
69e40cce | 102 | Revision 1.9 1999/10/08 06:27:23 fca |
103 | Corrected bug in the HV degrader geometry, thanks to G.Tabary | |
104 | ||
d183a600 | 105 | Revision 1.8 1999/10/04 13:39:55 fca |
106 | Correct array index problem | |
107 | ||
cdde5b1e | 108 | Revision 1.7 1999/09/29 09:24:34 fca |
109 | Introduction of the Copyright and cvs Log | |
110 | ||
4c039060 | 111 | */ |
112 | ||
73042f01 | 113 | // |
4b0fdcad | 114 | /////////////////////////////////////////////////////////////////////////////// |
115 | // // | |
116 | // Time Projection Chamber version 3 -- detailed TPC and slow simulation // | |
37831078 | 117 | // |
4b0fdcad | 118 | //Begin_Html |
119 | /* | |
120 | <img src="picts/AliTPCv3Class.gif"> | |
121 | */ | |
122 | //End_Html | |
123 | // // | |
124 | // // | |
125 | /////////////////////////////////////////////////////////////////////////////// | |
126 | ||
127 | #include <stdlib.h> | |
128 | #include <TMath.h> | |
4b0fdcad | 129 | #include "AliTPCv3.h" |
130 | #include "AliRun.h" | |
94de3818 | 131 | #include "AliMC.h" |
4b0fdcad | 132 | #include "AliConst.h" |
cc80f89e | 133 | #include "AliTPCDigitsArray.h" |
134 | #include"AliTPCParam.h" | |
73042f01 | 135 | #include"AliTPCParamSR.h" |
69e40cce | 136 | #include "AliPDG.h" |
73042f01 | 137 | #include <TInterpreter.h> |
a383b30d | 138 | #include "TLorentzVector.h" |
4ed5dced | 139 | #include "AliTPCTrackHitsV2.h" |
4b0fdcad | 140 | |
141 | ClassImp(AliTPCv3) | |
79575d04 | 142 | //_____________________________________________________________________________ |
143 | ||
144 | AliTPCv3::AliTPCv3(){ | |
145 | ||
146 | fHitType = 1; | |
147 | ||
148 | } | |
149 | ||
4b0fdcad | 150 | //_____________________________________________________________________________ |
151 | AliTPCv3::AliTPCv3(const char *name, const char *title) : | |
152 | AliTPC(name, title) | |
153 | { | |
154 | // | |
cc80f89e | 155 | // Standard constructor for Time Projection Chamber version 3 |
4b0fdcad | 156 | // |
157 | ||
158 | SetBufferSize(128000); | |
37831078 | 159 | fIdSens=0; |
73042f01 | 160 | |
161 | SetGasMixt(2,20,10,-1,0.9,0.1,0.); | |
162 | ||
163 | if (fTPCParam) | |
164 | fTPCParam->Write(fTPCParam->GetTitle()); | |
79575d04 | 165 | |
166 | fHitType =1; | |
4b0fdcad | 167 | } |
168 | ||
169 | //_____________________________________________________________________________ | |
170 | void AliTPCv3::CreateGeometry() | |
171 | { | |
172 | // | |
cc80f89e | 173 | // Creation of the TPC coarse geometry (version 3) |
37831078 | 174 | // The whole drift volume is sensitive |
cc80f89e | 175 | // Origin Marek Kowalski Cracow |
4b0fdcad | 176 | // |
177 | //Begin_Html | |
178 | /* | |
37831078 | 179 | <img src="picts/AliTPCgif"> |
4b0fdcad | 180 | */ |
181 | //End_Html | |
182 | //Begin_Html | |
183 | /* | |
37831078 | 184 | <img src="picts/AliTPCv3Tree.gif"> |
4b0fdcad | 185 | */ |
186 | //End_Html | |
37831078 | 187 | Float_t dm[50]; |
4b0fdcad | 188 | |
37831078 | 189 | Int_t *idtmed = fIdtmed->GetArray(); // TPC media |
1283eee5 | 190 | |
37831078 | 191 | Int_t idrotm[120]; // rotation matrices |
1283eee5 | 192 | |
37831078 | 193 | Int_t nRotMat = 0; // actual number of rotation matrices |
1283eee5 | 194 | |
195 | ||
37831078 | 196 | // |
197 | // Mother volume (Air) - all volumes will be positioned in it | |
198 | // | |
199 | ||
200 | dm[0]=0.; | |
201 | dm[1]=360.; | |
79575d04 | 202 | dm[2]=8.; |
4b0fdcad | 203 | |
37831078 | 204 | // |
1283eee5 | 205 | |
79575d04 | 206 | dm[3]=-283.7; |
207 | dm[4]=65.6; | |
208 | dm[5]=278.; | |
4b0fdcad | 209 | |
37831078 | 210 | // |
1283eee5 | 211 | |
79575d04 | 212 | dm[6]=-253.6; |
213 | dm[7]=65.6; | |
214 | dm[8]=278.; | |
1283eee5 | 215 | |
37831078 | 216 | // |
1283eee5 | 217 | |
79575d04 | 218 | dm[9]=-73.3; |
219 | dm[10]=60.9; | |
220 | dm[11]=278.; | |
1283eee5 | 221 | |
37831078 | 222 | // |
1283eee5 | 223 | |
79575d04 | 224 | dm[12]=-73.3; |
225 | dm[13]=56.9; | |
226 | dm[14]=278.; | |
1283eee5 | 227 | |
37831078 | 228 | // |
1283eee5 | 229 | |
79575d04 | 230 | dm[15]=73.3; |
231 | dm[16]=56.9; | |
232 | dm[17]=278.; | |
1283eee5 | 233 | |
37831078 | 234 | // |
1283eee5 | 235 | |
79575d04 | 236 | dm[18]=73.3; |
237 | dm[19]=60.9; | |
238 | dm[20]=278.; | |
1283eee5 | 239 | |
37831078 | 240 | // |
1283eee5 | 241 | |
79575d04 | 242 | dm[21]=253.6; |
243 | dm[22]=65.6; | |
244 | dm[23]=278.; | |
1283eee5 | 245 | |
37831078 | 246 | // |
1283eee5 | 247 | |
79575d04 | 248 | dm[24]=283.7; |
249 | dm[25]=65.6; | |
250 | dm[26]=278.; | |
251 | ||
252 | gMC->Gsvolu("TPC ","PCON",idtmed[0],dm,27); | |
1283eee5 | 253 | |
79575d04 | 254 | // outer part |
1283eee5 | 255 | |
37831078 | 256 | //------------------------------------------------------------------- |
79575d04 | 257 | // Tpc Outer INsulator (CO2) - contains cont. vessel and field cage |
37831078 | 258 | //------------------------------------------------------------------- |
1283eee5 | 259 | |
37831078 | 260 | dm[0]= 0.; |
261 | dm[1]= 360.; | |
262 | dm[2]= 6.; | |
1283eee5 | 263 | |
37831078 | 264 | // |
1283eee5 | 265 | |
79575d04 | 266 | dm[3]=-253.6; |
267 | dm[4]=258.; | |
268 | dm[5]=275.5; | |
1283eee5 | 269 | |
37831078 | 270 | // |
1283eee5 | 271 | |
79575d04 | 272 | dm[6]=-250.6; |
273 | dm[7]=258.; | |
274 | dm[8]=275.5; | |
1283eee5 | 275 | |
37831078 | 276 | // |
1283eee5 | 277 | |
79575d04 | 278 | dm[9]=-250.6; |
279 | dm[10]=258.; | |
280 | dm[11]=278.; | |
cc80f89e | 281 | |
79575d04 | 282 | // |
1283eee5 | 283 | |
79575d04 | 284 | dm[12]=253.6; |
285 | dm[13]=258.; | |
286 | dm[14]=278.; | |
1283eee5 | 287 | |
37831078 | 288 | // |
1283eee5 | 289 | |
79575d04 | 290 | dm[15]=253.6; |
291 | dm[16]=264.8; | |
292 | dm[17]=278.; | |
1283eee5 | 293 | |
37831078 | 294 | // |
1283eee5 | 295 | |
79575d04 | 296 | dm[18]=256.6; |
297 | dm[19]=264.8; | |
298 | dm[20]=278.; | |
1283eee5 | 299 | |
79575d04 | 300 | gMC->Gsvolu("TOIN","PCON",idtmed[3],dm,21); |
1283eee5 | 301 | |
37831078 | 302 | //---------------------------------------------------------------- |
303 | // Tpc Outer Contaiment Vessel | |
304 | // mother volume - Al, daughters - composite (sandwich) | |
305 | //---------------------------------------------------------------- | |
79575d04 | 306 | |
307 | dm[0]=0.; | |
308 | dm[1]=360.; | |
720b23b8 | 309 | dm[2]=6.; |
1283eee5 | 310 | |
37831078 | 311 | // |
1283eee5 | 312 | |
79575d04 | 313 | dm[3]=-250.6; |
314 | dm[4]=270.4; | |
315 | dm[5]=278.; | |
1283eee5 | 316 | |
37831078 | 317 | // |
1283eee5 | 318 | |
79575d04 | 319 | dm[6]=-247.6; |
320 | dm[7]=270.4; | |
321 | dm[8]=278.; | |
1283eee5 | 322 | |
37831078 | 323 | // |
1283eee5 | 324 | |
79575d04 | 325 | dm[9]=-247.6; |
cea9b4f7 | 326 | dm[10]=274.8124; |
79575d04 | 327 | dm[11]=278.; |
1283eee5 | 328 | |
37831078 | 329 | // |
1283eee5 | 330 | |
79575d04 | 331 | dm[12]=253.6; |
cea9b4f7 | 332 | dm[13]=274.8124; |
79575d04 | 333 | dm[14]=278.; |
1283eee5 | 334 | |
720b23b8 | 335 | // |
37831078 | 336 | |
79575d04 | 337 | dm[15]=253.6; |
338 | dm[16]=264.8; | |
339 | dm[17]=278.; | |
1283eee5 | 340 | |
79575d04 | 341 | // |
720b23b8 | 342 | |
79575d04 | 343 | dm[18]=256.6; |
344 | dm[19]=264.8; | |
345 | dm[20]=278.; | |
720b23b8 | 346 | |
347 | gMC->Gsvolu("TOCV","PCON",idtmed[4],dm,21); | |
1283eee5 | 348 | |
79575d04 | 349 | // Daughter volumes - sandwich |
37831078 | 350 | |
351 | // Tpc SAndwich 1 - Al | |
79575d04 | 352 | |
cea9b4f7 | 353 | dm[0]=274.8124; |
79575d04 | 354 | dm[1]=278.; |
355 | dm[2]=252.1; | |
1283eee5 | 356 | |
37831078 | 357 | gMC->Gsvolu("TSA1","TUBE",idtmed[4],dm,3); |
1283eee5 | 358 | |
79575d04 | 359 | // Tpc SAndwich 2 - epoxy glue (I use Lexan) |
1283eee5 | 360 | |
37831078 | 361 | dm[0] += 5.e-3; |
362 | dm[1] -= 5.e-3; | |
79575d04 | 363 | |
364 | gMC->Gsvolu("TSA2","TUBE",idtmed[14],dm,3); | |
365 | ||
366 | // Tpc SAndwich 3 - Tedlar | |
367 | ||
368 | dm[0] += 0.01; | |
369 | dm[1] -= 0.01; | |
37831078 | 370 | |
79575d04 | 371 | gMC->Gsvolu("TSA3","TUBE",idtmed[9],dm,3); |
37831078 | 372 | |
37831078 | 373 | |
79575d04 | 374 | // Tpc SAndwich 4 - fiber glass (G10) |
37831078 | 375 | |
cea9b4f7 | 376 | dm[0] += 3.8e-3; |
377 | dm[1] -= 3.8e-3; | |
37831078 | 378 | |
79575d04 | 379 | gMC->Gsvolu("TSA4","TUBE",idtmed[12],dm,3); |
37831078 | 380 | |
79575d04 | 381 | // Tpc SAndwich 5 - NOMEX honeycomb |
37831078 | 382 | |
79575d04 | 383 | dm[0] += 0.075; |
384 | dm[1] -= 0.075; | |
37831078 | 385 | |
79575d04 | 386 | gMC->Gsvolu("TSA5","TUBE",idtmed[6],dm,3); |
387 | ||
388 | // 5->4->3->2->1->TCOV | |
389 | ||
37831078 | 390 | |
79575d04 | 391 | gMC->Gspos("TSA5",1,"TSA4",0.,0.,0.,0,"ONLY"); |
37831078 | 392 | gMC->Gspos("TSA4",1,"TSA3",0.,0.,0.,0,"ONLY"); |
393 | gMC->Gspos("TSA3",1,"TSA2",0.,0.,0.,0,"ONLY"); | |
79575d04 | 394 | gMC->Gspos("TSA2",1,"TSA1",0.,0.,0.,0,"ONLY"); |
37831078 | 395 | |
79575d04 | 396 | gMC->Gspos("TSA1",1,"TOCV",0.,0.,3.,0,"ONLY"); |
37831078 | 397 | |
398 | // TCOV-> TOIN | |
399 | ||
400 | gMC->Gspos("TOCV",1,"TOIN",0.,0.,0.,0,"ONLY"); | |
401 | ||
402 | //------------------------------------------------------- | |
403 | // Tpc Outer Field Cage | |
404 | // mother volume - Al, daughters - composite (sandwich) | |
405 | //------------------------------------------------------- | |
1283eee5 | 406 | |
37831078 | 407 | dm[0]=0.; |
408 | dm[1]=360.; | |
409 | dm[2]=6.; | |
1283eee5 | 410 | |
79575d04 | 411 | // |
412 | ||
413 | dm[3]=-253.6; | |
414 | dm[4]=258.; | |
415 | dm[5]=275.5; | |
1283eee5 | 416 | |
37831078 | 417 | // |
418 | ||
79575d04 | 419 | dm[6]=-250.6; |
420 | dm[7]=258.; | |
421 | dm[8]=275.5; | |
1283eee5 | 422 | |
423 | // | |
79575d04 | 424 | |
425 | dm[9]=-250.6; | |
426 | dm[10]=258.; | |
cea9b4f7 | 427 | dm[11]=260.0476; |
37831078 | 428 | |
1283eee5 | 429 | // |
430 | ||
79575d04 | 431 | dm[12]=250.6; |
432 | dm[13]=258.; | |
cea9b4f7 | 433 | dm[14]=260.0476; |
1283eee5 | 434 | |
37831078 | 435 | // |
1283eee5 | 436 | |
79575d04 | 437 | dm[15]=250.6; |
438 | dm[16]=258.; | |
439 | dm[17]=275.5; | |
1283eee5 | 440 | |
37831078 | 441 | // |
1283eee5 | 442 | |
79575d04 | 443 | dm[18]=253.6; |
444 | dm[19]=258.; | |
445 | dm[20]=275.5; | |
37831078 | 446 | |
79575d04 | 447 | gMC->Gsvolu("TOFC","PCON",idtmed[4],dm,21); |
37831078 | 448 | |
449 | // Daughter volumes | |
450 | ||
79575d04 | 451 | // Tpc SAndwich 6 - Tedlar |
37831078 | 452 | |
453 | dm[0]= 258.; | |
cea9b4f7 | 454 | dm[1]= 260.0476; |
79575d04 | 455 | dm[2]= 252.1; |
37831078 | 456 | |
79575d04 | 457 | gMC->Gsvolu("TSA6","TUBE",idtmed[9],dm,3); |
37831078 | 458 | |
79575d04 | 459 | // Tpc SAndwich 7 - fiber glass |
37831078 | 460 | |
cea9b4f7 | 461 | dm[0] += 3.8e-3; |
462 | dm[1] -= 3.8e-3; | |
37831078 | 463 | |
79575d04 | 464 | gMC->Gsvolu("TSA7","TUBE",idtmed[12],dm,3); |
1283eee5 | 465 | |
1283eee5 | 466 | |
79575d04 | 467 | // Tpc SAndwich 8 - NOMEX |
37831078 | 468 | |
469 | dm[0] += 0.02; | |
470 | dm[1] -= 0.02; | |
471 | ||
79575d04 | 472 | gMC->Gsvolu("TSA8","TUBE",idtmed[6],dm,3); |
37831078 | 473 | |
79575d04 | 474 | // 8->7->6->TOFC |
37831078 | 475 | |
79575d04 | 476 | gMC->Gspos("TSA8",1,"TSA7",0.,0.,0.,0,"ONLY"); |
477 | gMC->Gspos("TSA7",1,"TSA6",0.,0.,0.,0,"ONLY"); | |
478 | gMC->Gspos("TSA6",1,"TOFC",0.,0.,0.,0,"ONLY"); | |
37831078 | 479 | |
480 | // TOFC->TOIN | |
481 | ||
79575d04 | 482 | gMC->Gspos("TOFC",1,"TOIN",0.,0.,0.,0,"ONLY"); |
37831078 | 483 | |
484 | // TOIN->TPC | |
485 | ||
486 | gMC->Gspos("TOIN",1,"TPC ",0.,0.,0.,0,"ONLY"); | |
487 | ||
79575d04 | 488 | // inner part |
37831078 | 489 | |
79575d04 | 490 | //-------------------------------------------------------------------- |
491 | // Tpc Inner INsulator (CO2) - inner f.c. will be placed there | |
492 | // Inner containment vessel will be placed directly in the TPC | |
493 | //-------------------------------------------------------------------- | |
37831078 | 494 | |
495 | dm[0]=0.; | |
79575d04 | 496 | dm[1]=360.; |
497 | dm[2]=4.; | |
1283eee5 | 498 | |
79575d04 | 499 | // |
1283eee5 | 500 | |
79575d04 | 501 | dm[3]=-253.6; |
502 | dm[4]=65.9; | |
503 | dm[5]=79.2; | |
1283eee5 | 504 | |
37831078 | 505 | // |
1283eee5 | 506 | |
79575d04 | 507 | dm[6]=-73.3; |
508 | dm[7]=61.2; | |
509 | dm[8]=79.2; | |
1283eee5 | 510 | |
37831078 | 511 | // |
1283eee5 | 512 | |
79575d04 | 513 | dm[9]=73.3; |
514 | dm[10]=61.2; | |
515 | dm[11]=79.2; | |
1283eee5 | 516 | |
37831078 | 517 | // |
1283eee5 | 518 | |
79575d04 | 519 | dm[12]=253.6; |
520 | dm[13]=65.9; | |
521 | dm[14]=79.2; | |
1283eee5 | 522 | |
79575d04 | 523 | gMC->Gsvolu("TIIN","PCON",idtmed[3],dm,15); |
1283eee5 | 524 | |
79575d04 | 525 | // the middle part of the F.C. is thinner - carve out the strip - Ne-CO2 |
1283eee5 | 526 | |
79575d04 | 527 | dm[0]=79.16; |
528 | dm[1]=79.2; | |
529 | dm[2]=88.; | |
1283eee5 | 530 | |
79575d04 | 531 | gMC->Gsvolu("TII1","TUBE",idtmed[1],dm,3); |
1283eee5 | 532 | |
79575d04 | 533 | gMC->Gspos("TII1",1,"TIIN",0.,0.,0.,0,"ONLY"); |
1283eee5 | 534 | |
79575d04 | 535 | //----------------------------------------------------- |
536 | // Tpc Inner Field Cage | |
537 | // mother volume - Al, daughters - composite (sandwich) | |
538 | //------------------------------------------------------ | |
1283eee5 | 539 | |
79575d04 | 540 | dm[0]=0.; |
541 | dm[1]=360.; | |
542 | dm[2]=10.; | |
1283eee5 | 543 | |
37831078 | 544 | // |
1283eee5 | 545 | |
79575d04 | 546 | dm[3]=-253.6; |
547 | dm[4]=70.3; | |
548 | dm[5]=79.2; | |
1283eee5 | 549 | |
37831078 | 550 | // |
1283eee5 | 551 | |
79575d04 | 552 | dm[6]=-250.6; |
553 | dm[7]=70.3; | |
554 | dm[8]=79.2; | |
1283eee5 | 555 | |
37831078 | 556 | // |
1283eee5 | 557 | |
79575d04 | 558 | dm[9]=-250.6; |
cea9b4f7 | 559 | dm[10]=77.0524; |
79575d04 | 560 | dm[11]=79.2; |
1283eee5 | 561 | |
37831078 | 562 | // |
1283eee5 | 563 | |
79575d04 | 564 | dm[12]=-88.; |
cea9b4f7 | 565 | dm[13]=77.0524; |
79575d04 | 566 | dm[14]=79.2; |
1283eee5 | 567 | |
37831078 | 568 | // |
1283eee5 | 569 | |
79575d04 | 570 | dm[15]=-88.; |
cea9b4f7 | 571 | dm[16]=77.0924; |
79575d04 | 572 | dm[17]=79.16; |
4b0fdcad | 573 | |
37831078 | 574 | // |
1283eee5 | 575 | |
79575d04 | 576 | dm[18]=88.; |
cea9b4f7 | 577 | dm[19]=77.0924; |
79575d04 | 578 | dm[20]=79.16; |
1283eee5 | 579 | |
37831078 | 580 | // |
1283eee5 | 581 | |
79575d04 | 582 | dm[21]=88.; |
cea9b4f7 | 583 | dm[22]=77.0524; |
79575d04 | 584 | dm[23]=79.2; |
1283eee5 | 585 | |
586 | // | |
587 | ||
79575d04 | 588 | dm[24]=250.6; |
cea9b4f7 | 589 | dm[25]=77.0524; |
79575d04 | 590 | dm[26]=79.2; |
1283eee5 | 591 | |
37831078 | 592 | // |
1283eee5 | 593 | |
79575d04 | 594 | dm[27]=250.6; |
595 | dm[28]=70.3; | |
596 | dm[29]=79.2; | |
1283eee5 | 597 | |
37831078 | 598 | // |
1283eee5 | 599 | |
79575d04 | 600 | dm[30]=253.6; |
601 | dm[31]=70.3; | |
602 | dm[32]=79.2; | |
1283eee5 | 603 | |
79575d04 | 604 | gMC->Gsvolu("TIFC","PCON",idtmed[4],dm,33); |
1283eee5 | 605 | |
79575d04 | 606 | // daughter volumes - central part |
1283eee5 | 607 | |
79575d04 | 608 | // Tpc Sandwich 9 -Tedlar |
1283eee5 | 609 | |
cea9b4f7 | 610 | dm[0]=77.0924; |
79575d04 | 611 | dm[1]=79.16; |
612 | dm[2]=88.; | |
1283eee5 | 613 | |
79575d04 | 614 | gMC->Gsvolu("TSA9","TUBE",idtmed[9],dm,3); |
1283eee5 | 615 | |
79575d04 | 616 | // Tpc Sandwich 10 - fiber glass (G10) |
1283eee5 | 617 | |
cea9b4f7 | 618 | dm[0] += 3.8e-3; |
619 | dm[1] -= 3.8e-3; | |
1283eee5 | 620 | |
79575d04 | 621 | gMC->Gsvolu("TS10","TUBE",idtmed[12],dm,3); |
1283eee5 | 622 | |
79575d04 | 623 | // Tpc Sandwich 11 - NOMEX |
1283eee5 | 624 | |
79575d04 | 625 | dm[0] += 0.03; |
626 | dm[1] -= 0.03; | |
1283eee5 | 627 | |
79575d04 | 628 | gMC->Gsvolu("TS11","TUBE",idtmed[6],dm,3); |
1283eee5 | 629 | |
79575d04 | 630 | // 11->10->9->TIFC |
1283eee5 | 631 | |
79575d04 | 632 | gMC->Gspos("TS11",1,"TS10",0.,0.,0.,0,"ONLY"); |
633 | gMC->Gspos("TS10",1,"TSA9",0.,0.,0.,0,"ONLY"); | |
1283eee5 | 634 | |
79575d04 | 635 | gMC->Gspos("TSA9",1,"TIFC",0.,0.,0.,0,"ONLY"); |
1283eee5 | 636 | |
79575d04 | 637 | // daughter volumes - outer parts (reinforced) |
1283eee5 | 638 | |
79575d04 | 639 | // Tpc Sandwich 12 -Tedlar |
1283eee5 | 640 | |
cea9b4f7 | 641 | dm[0]=77.0524; |
79575d04 | 642 | dm[1]=79.2; |
643 | dm[2]=82.05; | |
1283eee5 | 644 | |
79575d04 | 645 | gMC->Gsvolu("TS12","TUBE",idtmed[9],dm,3); |
1283eee5 | 646 | |
79575d04 | 647 | // Tpc Sandwich 13 - fiber glass (G10) |
1283eee5 | 648 | |
cea9b4f7 | 649 | dm[0] += 3.8e-3; |
650 | dm[1] -= 3.8e-3; | |
1283eee5 | 651 | |
79575d04 | 652 | gMC->Gsvolu("TS13","TUBE",idtmed[12],dm,3); |
1283eee5 | 653 | |
79575d04 | 654 | // Tpc Sandwich 14 - NOMEX |
1283eee5 | 655 | |
79575d04 | 656 | dm[0] += 0.07; |
657 | dm[1] -= 0.07; | |
1283eee5 | 658 | |
79575d04 | 659 | gMC->Gsvolu("TS14","TUBE",idtmed[6],dm,3); |
1283eee5 | 660 | |
79575d04 | 661 | // 14->13->12->TIFC |
1283eee5 | 662 | |
79575d04 | 663 | gMC->Gspos("TS14",1,"TS13",0.,0.,0.,0,"ONLY"); |
664 | gMC->Gspos("TS13",1,"TS12",0.,0.,0.,0,"ONLY"); | |
1283eee5 | 665 | |
79575d04 | 666 | gMC->Gspos("TS12",1,"TIFC",0.,0.,170.05,0,"ONLY"); |
667 | gMC->Gspos("TS12",2,"TIFC",0.,0.,-170.05,0,"ONLY"); | |
1283eee5 | 668 | |
79575d04 | 669 | // place this inside the inner insulator |
1283eee5 | 670 | |
79575d04 | 671 | gMC->Gspos("TIFC",1,"TIIN",0.,0.,0.,0,"ONLY"); |
1283eee5 | 672 | |
79575d04 | 673 | // and now in the TPC... |
1283eee5 | 674 | |
79575d04 | 675 | gMC->Gspos("TIIN",1,"TPC ",0.,0.,0.,0,"ONLY"); |
1283eee5 | 676 | |
79575d04 | 677 | //--------------------------------------------------------- |
678 | // Tpc Inner Containment vessel - Cones | |
679 | //--------------------------------------------------------- | |
1283eee5 | 680 | |
79575d04 | 681 | dm[0]=0.; |
682 | dm[1]=360.; | |
37831078 | 683 | dm[2]=8.; |
1283eee5 | 684 | |
37831078 | 685 | // |
1283eee5 | 686 | |
79575d04 | 687 | dm[3]=71.8; |
688 | dm[4]=56.9; | |
689 | dm[5]=59.4; | |
1283eee5 | 690 | |
37831078 | 691 | // |
1283eee5 | 692 | |
79575d04 | 693 | dm[6]=73.; |
694 | dm[7]=56.9; | |
695 | dm[8]=59.4; | |
1283eee5 | 696 | |
37831078 | 697 | // |
1283eee5 | 698 | |
79575d04 | 699 | dm[9]=73.; |
700 | dm[10]=56.9; | |
701 | dm[11]=61.2; | |
1283eee5 | 702 | |
37831078 | 703 | // |
1283eee5 | 704 | |
79575d04 | 705 | dm[12]=73.3; |
706 | dm[13]=56.9; | |
707 | dm[14]=61.2; | |
1283eee5 | 708 | |
37831078 | 709 | // |
79575d04 | 710 | |
711 | dm[15]=73.3; | |
712 | dm[16]=60.9; | |
713 | dm[17]=61.2; | |
1283eee5 | 714 | |
79575d04 | 715 | // |
4b0fdcad | 716 | |
79575d04 | 717 | dm[18]=253.6; |
718 | dm[19]=65.6; | |
719 | dm[20]=65.9; | |
4b0fdcad | 720 | |
4b0fdcad | 721 | // |
37831078 | 722 | |
79575d04 | 723 | dm[21]=253.6; |
724 | dm[22]=65.6; | |
f4900c61 | 725 | dm[23]=74.6; |
37831078 | 726 | |
4b0fdcad | 727 | // |
4b0fdcad | 728 | |
f4900c61 | 729 | dm[24]=256.6; |
79575d04 | 730 | dm[25]=65.6; |
f4900c61 | 731 | dm[26]=74.6; |
37831078 | 732 | |
79575d04 | 733 | gMC->Gsvolu("TICC","PCON",idtmed[4],dm,27); |
37831078 | 734 | |
79575d04 | 735 | Float_t phi1,phi2,phi3,theta1,theta2,theta3; // rotation angles |
37831078 | 736 | |
79575d04 | 737 | // reflection matrix |
738 | ||
739 | theta1 = 90.; | |
740 | phi1 = 0.; | |
741 | theta2 = 90.; | |
742 | phi2 = 270.; | |
743 | theta3 = 180.; | |
744 | phi3 = 0.; | |
4b0fdcad | 745 | |
79575d04 | 746 | AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3); |
4b0fdcad | 747 | |
79575d04 | 748 | gMC->Gspos("TICC",1,"TPC ",0.,0.,0.,0,"ONLY"); |
749 | gMC->Gspos("TICC",2,"TPC ",0.,0.,0.,idrotm[nRotMat],"ONLY"); | |
37831078 | 750 | |
37831078 | 751 | |
79575d04 | 752 | //--------------------------------------------------------- |
753 | // Tpc Inner Containment vessel - Middle part -Al | |
754 | //--------------------------------------------------------- | |
37831078 | 755 | |
79575d04 | 756 | dm[0]=0.; |
757 | dm[1]=360.; | |
758 | dm[2]=6.; | |
37831078 | 759 | |
4b0fdcad | 760 | // |
4b0fdcad | 761 | |
79575d04 | 762 | dm[3]=-71.6; |
763 | dm[4]=60.2; | |
764 | dm[5]=61.2; | |
37831078 | 765 | |
4b0fdcad | 766 | // |
37831078 | 767 | |
79575d04 | 768 | dm[6]=-69.1; |
769 | dm[7]=60.2; | |
770 | dm[8]=61.2; | |
37831078 | 771 | |
4b0fdcad | 772 | // |
37831078 | 773 | |
79575d04 | 774 | dm[9]=-69.1; |
cea9b4f7 | 775 | dm[10]=60.6224; |
79575d04 | 776 | dm[11]=61.2; |
37831078 | 777 | |
778 | // | |
779 | ||
79575d04 | 780 | dm[12]=69.1; |
cea9b4f7 | 781 | dm[13]=60.6224; |
79575d04 | 782 | dm[14]=61.2; |
37831078 | 783 | |
784 | // | |
785 | ||
79575d04 | 786 | dm[15]=69.1; |
787 | dm[16]=60.2; | |
788 | dm[17]=61.2; | |
37831078 | 789 | |
790 | // | |
791 | ||
79575d04 | 792 | dm[18]=71.6; |
793 | dm[19]=60.2; | |
794 | dm[20]=61.2; | |
37831078 | 795 | |
79575d04 | 796 | gMC->Gsvolu("TICM","PCON",idtmed[4],dm,21); |
37831078 | 797 | |
79575d04 | 798 | // Tpc Sandwich 15 - Al |
37831078 | 799 | |
cea9b4f7 | 800 | dm[0]=60.6224; |
79575d04 | 801 | dm[1]=61.2; |
802 | dm[2]=70.1; | |
37831078 | 803 | |
79575d04 | 804 | gMC->Gsvolu("TS15","TUBE",idtmed[4],dm,3); |
37831078 | 805 | |
79575d04 | 806 | // Tpc Sandwich 16 - epoxy glue |
37831078 | 807 | |
79575d04 | 808 | dm[0] += 5.e-3; |
809 | dm[1] -= 5.e-3; | |
37831078 | 810 | |
79575d04 | 811 | gMC->Gsvolu("TS16","TUBE",idtmed[14],dm,3); |
37831078 | 812 | |
6a905708 | 813 | // Tpc Sandwich 17 - Tedlar |
37831078 | 814 | |
79575d04 | 815 | dm[0] += 0.01; |
816 | dm[1] -= 0.01; | |
37831078 | 817 | |
6a905708 | 818 | gMC->Gsvolu("TS17","TUBE",idtmed[9],dm,3); |
37831078 | 819 | |
cea9b4f7 | 820 | // Tpc Sandwich 18 - carbon fiber |
37831078 | 821 | |
cea9b4f7 | 822 | dm[0] += 3.8e-3; |
823 | dm[1] -= 3.8e-3; | |
37831078 | 824 | |
cea9b4f7 | 825 | gMC->Gsvolu("TS18","TUBE",idtmed[15],dm,3); |
37831078 | 826 | |
79575d04 | 827 | // Tpc Sandwich 19 - Nomex |
37831078 | 828 | |
cea9b4f7 | 829 | dm[0] += 0.02; |
830 | dm[1] -= 0.02; | |
37831078 | 831 | |
90222263 | 832 | gMC->Gsvolu("TS19","TUBE",idtmed[6],dm,3); |
37831078 | 833 | |
79575d04 | 834 | // 19->18->17->16->15-> TICM |
37831078 | 835 | |
79575d04 | 836 | gMC->Gspos("TS19",1,"TS18",0.,0.,0.,0,"ONLY"); |
37831078 | 837 | gMC->Gspos("TS18",1,"TS17",0.,0.,0.,0,"ONLY"); |
79575d04 | 838 | gMC->Gspos("TS17",1,"TS16",0.,0.,0.,0,"ONLY"); |
839 | gMC->Gspos("TS16",1,"TS15",0.,0.,0.,0,"ONLY"); | |
37831078 | 840 | |
79575d04 | 841 | gMC->Gspos("TS15",1,"TICM ",0.,0.,0.,0,"ONLY"); |
842 | ||
37831078 | 843 | |
79575d04 | 844 | // TPc inner cont. vessel Joints |
37831078 | 845 | |
79575d04 | 846 | dm[0]=60.2; |
847 | dm[1]=61.2; | |
848 | dm[2]=0.5; | |
37831078 | 849 | |
79575d04 | 850 | gMC->Gsvolu("TPJ1","TUBE",idtmed[4],dm,3); |
37831078 | 851 | |
79575d04 | 852 | gMC->Gspos("TPJ1",1,"TPC ",0.,0.,72.3,0,"ONLY"); |
853 | gMC->Gspos("TPJ1",2,"TPC ",0.,0.,-72.3,0,"ONLY"); | |
37831078 | 854 | |
79575d04 | 855 | // |
37831078 | 856 | |
79575d04 | 857 | dm[0]=0.; |
858 | dm[1]=360.; | |
859 | dm[2]=4.; | |
37831078 | 860 | |
79575d04 | 861 | // |
37831078 | 862 | |
79575d04 | 863 | dm[3]=70.8; |
864 | dm[4]=58.4; | |
865 | dm[5]=60.1; | |
37831078 | 866 | |
79575d04 | 867 | // |
37831078 | 868 | |
79575d04 | 869 | dm[6]=71.2; |
870 | dm[7]=58.4; | |
871 | dm[8]=60.1; | |
37831078 | 872 | |
79575d04 | 873 | // |
37831078 | 874 | |
79575d04 | 875 | dm[9]=71.2; |
876 | dm[10]=58.4; | |
877 | dm[11]=59.4; | |
37831078 | 878 | |
79575d04 | 879 | // |
37831078 | 880 | |
79575d04 | 881 | dm[12]=71.6; |
882 | dm[13]=58.4; | |
883 | dm[14]=59.4; | |
37831078 | 884 | |
79575d04 | 885 | gMC->Gsvolu("TPJ2","PCON",idtmed[4],dm,15); |
37831078 | 886 | |
79575d04 | 887 | gMC->Gspos("TPJ2",1,"TPC ",0.,0.,0.,0,"ONLY"); |
888 | gMC->Gspos("TPJ2",2,"TPC ",0.,0.,0.,idrotm[nRotMat],"ONLY"); | |
37831078 | 889 | |
37831078 | 890 | |
37831078 | 891 | |
79575d04 | 892 | // Tpc Inner Containment vessel Seal (Viton, I use Lexan for a time being) |
37831078 | 893 | |
79575d04 | 894 | dm[0]=58.4; |
895 | dm[1]=61.2; | |
896 | dm[2]=0.1; | |
37831078 | 897 | |
79575d04 | 898 | gMC->Gsvolu("TICS","TUBE",idtmed[14],dm,3); |
37831078 | 899 | |
79575d04 | 900 | gMC->Gspos("TICS",1,"TPC ",0.,0.,71.7,0,"ONLY"); |
901 | gMC->Gspos("TICS",2,"TPC ",0.,0.,-71.7,0,"ONLY"); | |
37831078 | 902 | |
79575d04 | 903 | // TICM -> TPC |
37831078 | 904 | |
79575d04 | 905 | gMC->Gspos("TICM",1,"TPC ",0.,0.,0.,0,"ONLY"); |
37831078 | 906 | |
79575d04 | 907 | // |
37831078 | 908 | |
79575d04 | 909 | nRotMat++; // prepare for the next rotation matrix |
37831078 | 910 | |
911 | //--------------------------------------------------------- | |
912 | // Tpc Dift Gas volume Nonsensitive (Ne-CO2 90/10) | |
913 | // and its daughters (HV membrane, rods, readout chambers) | |
914 | //--------------------------------------------------------- | |
915 | ||
916 | dm[0]= 79.2; | |
917 | dm[1]= 258.0; | |
918 | dm[2]= 253.6; | |
919 | ||
79575d04 | 920 | gMC->Gsvolu("TDGS","TUBE",idtmed[2],dm,3); |
37831078 | 921 | |
922 | // sector opening angles | |
923 | ||
924 | Float_t innerOpenAngle = fTPCParam->GetInnerAngle(); | |
925 | ||
926 | // sector angle shift | |
927 | ||
928 | Float_t innerAngleShift = fTPCParam->GetInnerAngleShift(); | |
929 | ||
930 | // number of sectors | |
931 | ||
932 | Int_t nInnerSector = fTPCParam->GetNInnerSector()/2; | |
933 | Int_t nOuterSector = fTPCParam->GetNOuterSector()/2; | |
934 | ||
935 | // All above parameters are identical for inner and outer | |
936 | // sectors. The distinction is kept for the historical reasons | |
937 | // and eventually will disappear. | |
938 | ||
939 | Float_t tanAlpha = TMath::Tan(0.5*innerOpenAngle); | |
940 | Float_t cosAlpha = TMath::Sqrt(1.+tanAlpha*tanAlpha); | |
941 | Float_t space; | |
942 | ||
943 | //------------------------------------------------------------------------- | |
944 | // Tpc Inner Readout Chambers | |
945 | //------------------------------------------------------------------------- | |
946 | ||
947 | dm[0]= 14.483; | |
948 | dm[1]= 23.3345; | |
949 | dm[2]= 1.6; // thickness | |
950 | dm[3]= 25.1; | |
951 | ||
952 | gMC->Gsvolu("TIRC","TRD1",idtmed[4],dm,4); | |
953 | ||
954 | // this volume will be positioned in the empty space | |
955 | // of the end-cap to avoid overlaps | |
956 | ||
957 | dm[0]= 13.7305; | |
958 | dm[1]= 21.1895; | |
959 | dm[2]= 2.25; | |
960 | dm[3]= 21.15; | |
961 | ||
962 | gMC->Gsvolu("TIC1","TRD1",idtmed[4],dm,4); | |
963 | ||
964 | ||
965 | //------------------------------------------------ | |
966 | // Tpc Inner readout chamber Pad Plane | |
967 | //------------------------------------------------ | |
968 | ||
969 | dm[0]= 14.483; | |
970 | dm[1]= 23.3345; | |
971 | dm[2]= 0.5; | |
972 | dm[3]= 25.1; | |
973 | ||
974 | gMC->Gsvolu("TIPP","TRD1",idtmed[12],dm,4); | |
975 | ||
976 | // | |
977 | ||
978 | dm[0] -= 1.218511934; | |
979 | dm[1] -= 1.218511934; | |
980 | dm[2] = 0.35; | |
981 | ||
79575d04 | 982 | gMC->Gsvolu("TIC3","TRD1",idtmed[1],dm,4); |
37831078 | 983 | |
984 | gMC->Gspos("TIC3",1,"TIPP",0.,0.15,0.,0,"ONLY"); | |
985 | ||
986 | gMC->Gspos("TIPP",1,"TIRC",0.,1.1,0.,0,"ONLY"); | |
987 | ||
988 | ||
989 | //---------------------------------------------- | |
990 | // Tpc Readout Chambers Empty spaces - for both | |
991 | // inner and outer sectors | |
992 | //---------------------------------------------- | |
993 | ||
994 | gMC->Gsvolu("TRCE","TRD1",idtmed[0],dm,0); | |
995 | ||
996 | // Inner sector - 4 spaces | |
997 | ||
998 | ||
999 | dm[3] = 4.7625; | |
1000 | dm[0] = 12.472; | |
1001 | ||
1002 | Float_t rr = 90.52; | |
1003 | Float_t zz; | |
1004 | ||
1005 | zz= -12.7875; | |
1006 | ||
1007 | space = rr*tanAlpha-dm[0]; | |
1008 | ||
1009 | for(Int_t nsLow=0;nsLow<4;nsLow++){ | |
1010 | ||
1011 | rr += 9.525; | |
1012 | dm[1]= rr*tanAlpha - space; | |
1013 | ||
1014 | dm[2]=0.8; | |
1015 | ||
1016 | gMC->Gsposp("TRCE",nsLow+1,"TIRC",0.,-0.8,zz,0,"ONLY",dm,4); | |
1017 | ||
1018 | // | |
1019 | ||
79575d04 | 1020 | dm[2] = 1.2; |
37831078 | 1021 | |
1022 | gMC->Gsposp("TRCE",nsLow+5,"TIC1",0.,1.05,zz-2.1,0,"ONLY",dm,4); | |
1023 | ||
1024 | rr += 0.4; | |
1025 | dm[0] = rr*tanAlpha - space; | |
1026 | zz += (0.4+9.525); | |
1027 | ||
1028 | } | |
1029 | ||
1030 | dm[0]= 12.472; | |
1031 | // dm[1] - this is the dm[1] from the previous TRCE | |
1032 | dm[2]= 1.05; | |
1033 | dm[3]= 19.65; | |
1034 | ||
79575d04 | 1035 | gMC->Gsposp("TRCE",9,"TIC1",0.,-1.2,0.,0,"ONLY",dm,4); |
37831078 | 1036 | |
1037 | // | |
1038 | // TPc Space for Connectors | |
1039 | // | |
1040 | ||
1041 | dm[0]= .3; | |
1042 | dm[1]= .3; | |
1043 | dm[2]= 4.5; | |
1044 | ||
1045 | gMC->Gsvolu("TPSC","BOX ",idtmed[0],dm,3); | |
1046 | ||
1047 | // TPC Connectors | |
1048 | ||
1049 | dm[0]= .25; | |
1050 | dm[1]= .15; | |
1051 | dm[2]= 3.75; | |
1052 | ||
1053 | gMC->Gsvolu("TPCC","BOX ",idtmed[13],dm,3); | |
1054 | ||
1055 | gMC->Gspos("TPCC",1,"TPSC",0.,0.15,0.,0,"ONLY"); | |
1056 | ||
1057 | zz = -12.7875; | |
1058 | ||
1059 | ||
1060 | Float_t alpha; | |
1061 | Float_t astep; | |
1062 | ||
37831078 | 1063 | // inner part of the inner sector - 2 x 20 holes |
1064 | ||
1065 | astep = 20.00096874/19.; | |
1066 | ||
1067 | alpha = 10.00048437-astep; | |
1068 | ||
1069 | Float_t x1,x2; | |
1070 | ||
1071 | x1 = 13.31175725; | |
1072 | x1 -= 0.996357832; | |
1073 | ||
1074 | x2 = 15.06180253; | |
1075 | x2 -= 1.163028812; | |
1076 | ||
1077 | Int_t ncon; | |
1078 | ||
1079 | for(ncon=0;ncon<20;ncon++){ | |
1080 | ||
1081 | phi1 = 0.; | |
1082 | theta1 = 90.+alpha; | |
1083 | phi2=90.; | |
1084 | theta2 = 90.; | |
1085 | phi3 = (alpha>0) ? 0. : 180.; | |
1086 | theta3 = TMath::Abs(alpha); | |
1087 | ||
1088 | AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3); | |
1089 | ||
1090 | ||
1091 | ||
1092 | gMC->Gspos("TPSC",ncon+1,"TIRC",x1,0.3,-12.7875,idrotm[nRotMat],"ONLY"); | |
1093 | gMC->Gspos("TPSC",ncon+21,"TIRC",x2,0.3,-2.8625,idrotm[nRotMat],"ONLY"); | |
1094 | ||
1095 | ||
1096 | x1 -= 1.296357833; | |
1097 | x2 -= 1.463028812; | |
1098 | ||
1099 | alpha -= astep; | |
1100 | nRotMat++; | |
1101 | ||
1102 | } | |
1103 | ||
1104 | // outer part of the inner sector - 2 x 25 holes | |
1105 | ||
1106 | astep = 20.00096874/24.; | |
1107 | alpha = 10.00048437-astep; | |
1108 | ||
1109 | x1 = 16.81184781; | |
1110 | x1 -= 1.016295986; | |
1111 | ||
1112 | x2 = 18.5618931; | |
1113 | x2 -= 1.150914854; | |
1114 | ||
1115 | for(ncon=0;ncon<25;ncon++){ | |
1116 | ||
1117 | phi1 = 0.; | |
1118 | theta1 = 90.+alpha; | |
1119 | phi2=90.; | |
1120 | theta2 = 90.; | |
1121 | phi3 = (alpha>0) ? 0. : 180.; | |
1122 | theta3 = TMath::Abs(alpha); | |
1123 | ||
1124 | AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3); | |
1125 | ||
1126 | ||
1127 | ||
1128 | gMC->Gspos("TPSC",ncon+41,"TIRC",x1,0.3,7.0625,idrotm[nRotMat],"ONLY"); | |
1129 | gMC->Gspos("TPSC",ncon+66,"TIRC",x2,0.3,16.9875,idrotm[nRotMat],"ONLY"); | |
1130 | ||
1131 | ||
1132 | x1 -= 1.316295986; | |
1133 | x2 -= 1.450914854; | |
1134 | ||
1135 | alpha -= astep; | |
1136 | nRotMat++; | |
1137 | ||
1138 | } | |
1139 | ||
1140 | //-------------------------------------------------------------------------- | |
1141 | // TPC Outer Readout Chambers | |
1142 | // this is NOT a final design | |
1143 | //-------------------------------------------------------------------------- | |
1144 | ||
1145 | dm[0]= 23.3875; | |
1146 | dm[1]= 43.524; | |
1147 | dm[2]= 1.5; //thickness | |
1148 | dm[3]= 57.1; | |
1149 | ||
1150 | gMC->Gsvolu("TORC","TRD1",idtmed[4],dm,4); | |
1151 | ||
1152 | //------------------------------------------------ | |
79575d04 | 1153 | // Tpc Outer readout chamber Pad Plane |
37831078 | 1154 | //------------------------------------------------ |
1155 | ||
1156 | dm[2]= 0.5; | |
1157 | ||
1158 | gMC->Gsvolu("TOPP","TRD1",idtmed[12],dm,4); | |
1159 | ||
1160 | dm[0] -= 1.218511934; | |
1161 | dm[1] -= 1.218511934; | |
1162 | dm[2] = 0.35; | |
1163 | ||
79575d04 | 1164 | gMC->Gsvolu("TOC3","TRD1",idtmed[1],dm,4); |
37831078 | 1165 | |
1166 | gMC->Gspos("TOC3",1,"TOPP",0.,0.15,0.,0,"ONLY"); | |
1167 | ||
1168 | gMC->Gspos("TOPP",1,"TORC",0.,1.0,0.,0,"ONLY"); | |
1169 | ||
1170 | // empty space | |
1171 | ||
37831078 | 1172 | dm[0]= 21.035; |
1173 | dm[1]= 38.7205; | |
1174 | dm[2]= 0.7; | |
1175 | dm[3]= 50.15; | |
1176 | ||
1177 | gMC->Gsposp("TRCE",10,"TORC",0.,-0.8,-2.15,0,"ONLY",dm,4); | |
1178 | ||
1179 | dm[0]= 22.2935; | |
1180 | dm[1]= 40.5085; | |
1181 | dm[2]= 2.25; | |
1182 | dm[3]= 51.65; | |
1183 | ||
1184 | gMC->Gsvolu("TOC1","TRD1",idtmed[4],dm,4); | |
1185 | ||
37831078 | 1186 | dm[0]= 21.35; |
1187 | dm[1]= 38.7205; | |
1188 | dm[2]= 2.25; | |
1189 | dm[3]= 50.15; | |
1190 | ||
79575d04 | 1191 | gMC->Gsposp("TRCE",11,"TOC1",0.,0.,0.,0,"ONLY",dm,4); |
37831078 | 1192 | |
1193 | //----------------------------------------------- | |
1194 | // Tpc Services Support Wheel | |
1195 | //----------------------------------------------- | |
1196 | ||
1197 | dm[0]=0.; | |
1198 | dm[1]=360.; | |
1199 | dm[2]=18.; | |
1200 | dm[3]=2.; | |
1201 | ||
1202 | dm[4]= -5.; | |
1203 | dm[5]= 77.017; | |
1204 | dm[6]= 255.267; | |
1205 | ||
1206 | dm[7]= 5.; | |
1207 | dm[8]= dm[5]; | |
1208 | dm[9]= dm[6]; | |
1209 | ||
1210 | gMC->Gsvolu("TSSW","PGON",idtmed[4],dm,10); | |
1211 | ||
1212 | // Tpc Services Wheel Cover | |
1213 | ||
1214 | dm[4]= -0.5; | |
1215 | dm[7]= 0.5; | |
1216 | ||
1217 | gMC->Gsvolu("TSWC","PGON",idtmed[4],dm,10); | |
1218 | ||
1219 | // Tpc Service wheel Cover Empty space | |
1220 | ||
1221 | dm[0]= 10.99; | |
1222 | dm[1]= 39.599; | |
1223 | dm[2]= .5; | |
1224 | dm[3]= 81.125; | |
1225 | ||
1226 | gMC->Gsvolu("TSCE","TRD1",idtmed[0],dm,4); | |
1227 | ||
1228 | // Tpc services Wheel Empty Spaces | |
1229 | ||
1230 | dm[0]= 13.18017507; | |
1231 | dm[1]= 44.61045938; | |
1232 | dm[2]= 4.; | |
1233 | dm[3]= 89.125; | |
1234 | ||
1235 | gMC->Gsvolu("TWES","TRD1",idtmed[0],dm,4); | |
1236 | ||
1237 | // Tpc Services Wheel Bars | |
1238 | ||
1239 | gMC->Gsvolu("TSWB","TRD1",idtmed[4],dm,0); | |
1240 | ||
1241 | // bars-> TWES | |
1242 | ||
1243 | dm[2]= 4.; | |
1244 | dm[3]= .4; | |
1245 | ||
1246 | dm[0]= 13.8149522; | |
1247 | dm[1]= 13.95601379; | |
1248 | ||
1249 | gMC->Gsposp("TSWB",1,"TWES",0.,0.,-85.125,0,"ONLY",dm,4); | |
1250 | ||
1251 | dm[0]= 43.83462067; | |
1252 | dm[1]= 43.97568225; | |
1253 | ||
1254 | gMC->Gsposp("TSWB",2,"TWES",0.,0.,85.125,0,"ONLY",dm,4); | |
1255 | ||
1256 | // TPc ELectronics - right now 30% X0 Si | |
1257 | ||
1258 | dm[0]= 14.03813696; | |
1259 | dm[1]= 43.3524075; | |
1260 | dm[2]= 1.404; | |
1261 | dm[3]= 83.125; | |
1262 | ||
1263 | gMC->Gsvolu("TPEL","TRD1",idtmed[11],dm,4); | |
1264 | gMC->Gspos("TPEL",1,"TWES",0.,0.,0.,0,"ONLY"); | |
1265 | ||
37831078 | 1266 | //-------------------------------------------------------------------------- |
1267 | // End caps | |
1268 | //-------------------------------------------------------------------------- | |
1269 | ||
1270 | // TPc Main Wheel - Al | |
1271 | ||
79575d04 | 1272 | dm[0]= 74.9; |
1273 | dm[1]= 264.4; | |
37831078 | 1274 | dm[2]= 3.0; |
1275 | ||
1276 | gMC->Gsvolu("TPMW","TUBE",idtmed[4],dm,3); | |
1277 | ||
37831078 | 1278 | //-------------------------------------------------------------------------- |
1279 | // Tpc Empty Space for the Readout chambers | |
1280 | //-------------------------------------------------------------------------- | |
1281 | ||
1282 | Float_t rLow= 86.2; | |
1283 | Float_t rUp= 243.5; | |
1284 | Float_t dR = 0.5*(rUp-rLow); | |
1285 | ||
79575d04 | 1286 | space= 1.5/cosAlpha; // wheel ribs are 3.0 cm wide |
37831078 | 1287 | |
1288 | dm[0]= rLow*tanAlpha-space; | |
1289 | dm[1]= rUp*tanAlpha-space; | |
79575d04 | 1290 | dm[2] = 3.0; |
37831078 | 1291 | dm[3]= dR; |
1292 | ||
1293 | gMC->Gsvolu("TESR","TRD1",idtmed[0],dm,4); | |
1294 | ||
1295 | // TIC1->TESR | |
1296 | ||
37831078 | 1297 | gMC->Gspos("TIC1",1,"TESR",0.,0.75,-dR+23.97,0,"ONLY"); |
1298 | ||
37831078 | 1299 | // TOC1->TESR |
1300 | ||
1301 | gMC->Gspos("TOC1",1,"TESR",0.,0.75,dR-55.02,0,"ONLY"); | |
1302 | ||
1303 | // Tpc Empty Space Bars - Al (daughters of TESR) | |
1304 | ||
1305 | Float_t zBar; | |
1306 | ||
1307 | gMC->Gsvolu("TESB","TRD1",idtmed[4],dm,0); | |
1308 | ||
1309 | // lower bar | |
1310 | ||
1311 | dm[0]= rLow*tanAlpha-space; | |
1312 | dm[1]= 88.7*tanAlpha-space; | |
79575d04 | 1313 | dm[2]= 2.25; |
37831078 | 1314 | dm[3]= 1.275; |
1315 | ||
1316 | zBar = -dR+dm[3]; | |
1317 | ||
79575d04 | 1318 | gMC->Gsposp("TESB",1,"TESR",0.,0.75,zBar,0,"ONLY",dm,4); |
37831078 | 1319 | |
1320 | // middle bar | |
1321 | ||
1322 | dm[0]= 131.65*tanAlpha-space; | |
1323 | dm[1]= 136.5*tanAlpha-space; | |
1324 | dm[3]= 2.425; | |
1325 | ||
1326 | zBar = -dR +131.65+dm[3]-rLow; | |
1327 | ||
79575d04 | 1328 | gMC->Gsposp("TESB",2,"TESR",0.,0.75,zBar,0,"ONLY",dm,4); |
37831078 | 1329 | |
1330 | // upper bar | |
1331 | ||
1332 | dm[0]= 240.4*tanAlpha-space; | |
1333 | dm[1]= rUp*tanAlpha-space; | |
1334 | dm[3]= 1.55; | |
1335 | ||
1336 | zBar = dR-dm[3]; | |
1337 | ||
79575d04 | 1338 | gMC->Gsposp("TESB",3,"TESR",0.,0.75,zBar,0,"ONLY",dm,4); |
37831078 | 1339 | |
1340 | // positioning of the empty spaces into the main wheel | |
1341 | ||
1342 | Float_t rCenter,xc,yc; | |
1343 | Float_t rInner,rOuter; // center of the inner and outer chamber | |
1344 | ||
1345 | rCenter = rLow+dR; | |
1346 | ||
1347 | rInner = 108.07; | |
1348 | rOuter = 190.68; | |
1349 | ||
79575d04 | 1350 | |
37831078 | 1351 | for(Int_t ns=0; ns<nInnerSector;ns++){ |
1352 | ||
1353 | phi1 = ns * innerOpenAngle + innerAngleShift; | |
1354 | phi1 *= kRaddeg; // in degrees | |
1355 | ||
1356 | phi1 = (Float_t)TMath::Nint(phi1) + 270.; | |
1357 | ||
1358 | if (phi1 > 360.) phi1 -= 360.; | |
1359 | ||
1360 | theta1 = 90.; | |
1361 | phi2 = 90.; | |
1362 | theta2 = 180.; | |
1363 | phi3 = ns * innerOpenAngle + innerAngleShift; | |
1364 | phi3 *= kRaddeg; // in degrees | |
1365 | ||
1366 | phi3 = (Float_t)TMath::Nint(phi3); | |
1367 | ||
1368 | if(phi3 > 360.) phi3 -= 360.; | |
1369 | ||
1370 | theta3 = 90.; | |
1371 | ||
1372 | // "holes"->End plate | |
1373 | ||
1374 | xc = rCenter*TMath::Cos(phi3*kDegrad); | |
1375 | yc = rCenter*TMath::Sin(phi3*kDegrad); | |
1376 | ||
1377 | AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3); | |
1378 | ||
1379 | gMC->Gspos("TESR",ns+1,"TPMW",xc,yc,0.,idrotm[nRotMat],"ONLY"); | |
1380 | ||
1381 | // TSCE->TSWC (services wheel volumes) | |
1382 | ||
1383 | xc = 166.142*TMath::Cos(phi3*kDegrad); | |
1384 | yc = 166.142*TMath::Sin(phi3*kDegrad); | |
1385 | ||
1386 | gMC->Gspos("TSCE",ns+1,"TSWC",xc,yc,0.,idrotm[nRotMat],"ONLY"); | |
1387 | gMC->Gspos("TWES",ns+1,"TSSW",xc,yc,0.,idrotm[nRotMat],"ONLY"); | |
1388 | ||
1389 | ||
1390 | // readout chambers->TDGS (drift gas) | |
1391 | ||
1392 | xc = rInner*TMath::Cos(phi3*kDegrad); | |
1393 | yc = rInner*TMath::Sin(phi3*kDegrad); | |
1394 | ||
1395 | gMC->Gspos("TIRC",ns+1,"TDGS",xc,yc,252.,idrotm[nRotMat],"ONLY"); | |
1396 | ||
1397 | xc = rOuter*TMath::Cos(phi3*kDegrad); | |
1398 | yc = rOuter*TMath::Sin(phi3*kDegrad); | |
1399 | ||
1400 | gMC->Gspos("TORC",ns+1,"TDGS",xc,yc,252.1,idrotm[nRotMat],"ONLY"); | |
1401 | ||
1402 | nRotMat++; | |
1403 | ||
1404 | theta2 = 0.; // reflection | |
1405 | ||
1406 | AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3); | |
1407 | ||
1408 | xc = rInner*TMath::Cos(phi3*kDegrad); | |
1409 | yc = rInner*TMath::Sin(phi3*kDegrad); | |
1410 | ||
1411 | gMC->Gspos("TIRC",ns+nInnerSector+1,"TDGS",xc,yc,-252.,idrotm[nRotMat],"ONLY"); | |
1412 | ||
1413 | xc = rOuter*TMath::Cos(phi3*kDegrad); | |
1414 | yc = rOuter*TMath::Sin(phi3*kDegrad); | |
1415 | ||
1416 | gMC->Gspos("TORC",ns+nOuterSector+1,"TDGS",xc,yc,-252.1,idrotm[nRotMat],"ONLY"); | |
1417 | ||
1418 | nRotMat++; | |
1419 | ||
37831078 | 1420 | } |
37831078 | 1421 | // TPMW->TPC |
1422 | ||
1423 | gMC->Gspos("TPMW",1,"TPC ",0.,0.,256.6,0,"ONLY"); | |
79575d04 | 1424 | gMC->Gspos("TPMW",2,"TPC ",0.,0.,-256.6,idrotm[0],"ONLY"); |
1425 | ||
1426 | //--------------------------------------------------------- | |
1427 | // Tpc High Voltage Membrane - 100 microns of mylar | |
1428 | //--------------------------------------------------------- | |
37831078 | 1429 | |
79575d04 | 1430 | dm[0]=82.8; |
1431 | dm[1]=252.; | |
1432 | dm[2]=0.005; | |
37831078 | 1433 | |
79575d04 | 1434 | gMC->Gsvolu("THVM","TUBE",idtmed[8],dm,3); |
37831078 | 1435 | |
79575d04 | 1436 | gMC->Gspos("THVM",1,"TDGS",0.,0.,0.,0,"ONLY"); |
37831078 | 1437 | |
79575d04 | 1438 | // Tpc High Voltage membrane Holders |
37831078 | 1439 | |
79575d04 | 1440 | gMC->Gsvolu("THVH","TUBE",idtmed[4],dm,0); |
37831078 | 1441 | |
79575d04 | 1442 | |
37831078 | 1443 | |
79575d04 | 1444 | // inner |
37831078 | 1445 | |
79575d04 | 1446 | dm[0]=79.3; |
1447 | dm[1]=82.8; | |
1448 | dm[2]=0.2; | |
37831078 | 1449 | |
79575d04 | 1450 | gMC->Gsposp("THVH",1,"TDGS",0.,0.,0.,0,"ONLY",dm,3); |
1451 | ||
1452 | // outer | |
37831078 | 1453 | |
79575d04 | 1454 | dm[0]= 252.; |
1455 | dm[1]= 257.9; | |
1456 | dm[2]= 0.4; | |
1457 | ||
1458 | gMC->Gsposp("THVH",2,"TDGS",0.,0.,0.,0,"ONLY",dm,3); | |
37831078 | 1459 | |
1460 | //---------------------------------------------------------- | |
1461 | // TPc Support Rods - MAKROLON | |
1462 | //---------------------------------------------------------- | |
1463 | ||
1464 | dm[0]= 0.9; | |
1465 | dm[1]= 1.2; | |
37831078 | 1466 | |
79575d04 | 1467 | gMC->Gsvolu("TPSR","TUBE",idtmed[7],dm,0); // inner and outer rods differ |
37831078 | 1468 | |
79575d04 | 1469 | |
1470 | for(Int_t nrod=0;nrod<18;nrod++){ | |
37831078 | 1471 | Float_t angle=innerOpenAngle*(Float_t)nrod; |
1472 | ||
79575d04 | 1473 | xc=81.5*TMath::Cos(angle); |
1474 | yc=81.5*TMath::Sin(angle); | |
37831078 | 1475 | |
79575d04 | 1476 | dm[2]=126.7; |
37831078 | 1477 | |
79575d04 | 1478 | gMC->Gsposp("TPSR",nrod+1,"TDGS",xc,yc,126.9,0,"ONLY",dm,3); |
1479 | gMC->Gsposp("TPSR",nrod+19,"TDGS",xc,yc,-126.9,0,"ONLY",dm,3); | |
37831078 | 1480 | |
79575d04 | 1481 | dm[2]=126.6; |
37831078 | 1482 | |
79575d04 | 1483 | xc=254.25*TMath::Cos(angle); |
1484 | yc=254.25*TMath::Sin(angle); | |
1485 | ||
1486 | // rod number 54 contans the HV cable | |
1487 | ||
1488 | if(nrod<17) { | |
1489 | gMC->Gsposp("TPSR",nrod+37,"TDGS",xc,yc,127.,0,"ONLY",dm,3); | |
1490 | gMC->Gsposp("TPSR",nrod+54,"TDGS",xc,yc,-127.,0,"ONLY",dm,3); | |
1491 | } | |
1492 | ||
37831078 | 1493 | } |
1494 | ||
1495 | //---------------------------------------------------------- | |
79575d04 | 1496 | // Tpc High Voltage Rod - MAKROLON + Copper cable |
37831078 | 1497 | //---------------------------------------------------------- |
1498 | ||
1499 | // rod with cable (Left) | |
1500 | ||
1501 | dm[0]=0.; | |
1502 | dm[1]=2.25; | |
79575d04 | 1503 | dm[2]=126.6; |
37831078 | 1504 | |
1505 | gMC->Gsvolu("THVL","TUBE",idtmed[7],dm,3); | |
1506 | ||
1507 | // HV cable | |
1508 | ||
1509 | dm[0]=0.; | |
1510 | dm[1]=0.3; | |
79575d04 | 1511 | dm[2]=126.6; |
37831078 | 1512 | |
79575d04 | 1513 | gMC->Gsvolu("THVC","TUBE",idtmed[10],dm,3); |
37831078 | 1514 | |
1515 | // empty space | |
1516 | ||
1517 | dm[0]=0.3; | |
1518 | dm[1]=1.; | |
79575d04 | 1519 | dm[2]=126.6; |
37831078 | 1520 | |
1521 | gMC->Gsvolu("THVE","TUBE",idtmed[1],dm,3); | |
1522 | ||
1523 | gMC->Gspos("THVC",1,"THVL",0.,0.,0.,0,"ONLY"); | |
1524 | gMC->Gspos("THVE",1,"THVL",0.,0.,0.,0,"ONLY"); | |
1525 | ||
1526 | // rod without cable | |
1527 | ||
1528 | dm[0]=1.8; | |
1529 | dm[1]=2.25; | |
79575d04 | 1530 | dm[2]=126.6; |
37831078 | 1531 | |
1532 | gMC->Gsvolu("THVR","TUBE",idtmed[7],dm,3); | |
1533 | ||
79575d04 | 1534 | gMC->Gspos("THVL",1,"TDGS",xc,yc,-127.,0,"ONLY"); |
1535 | gMC->Gspos("THVR",1,"TDGS",xc,yc,127.,0,"ONLY"); | |
37831078 | 1536 | |
1537 | gMC->Gspos("TDGS",1,"TPC ",0.,0.,0.,0,"ONLY"); | |
79575d04 | 1538 | |
37831078 | 1539 | // services wheel cover -> wheel |
1540 | ||
1541 | ||
1542 | gMC->Gspos("TSWC",1,"TSSW",0.,0.,4.5,0,"ONLY"); | |
1543 | gMC->Gspos("TSWC",2,"TSSW",0.,0.,-4.5,0,"ONLY"); | |
1544 | ||
1545 | ||
1546 | // put the wheel into the TPC | |
1547 | ||
1548 | gMC->Gspos("TSSW",1,"TPC ",0.,0.,278.7,0,"ONLY"); | |
1549 | gMC->Gspos("TSSW",2,"TPC ",0.,0.,-278.7,0,"ONLY"); | |
1550 | ||
79575d04 | 1551 | // |
1552 | ||
37831078 | 1553 | gMC->Gsord("TPMW",6); |
1554 | gMC->Gsord("TSSW",6); | |
1555 | gMC->Gsord("TSWC",6); | |
1556 | ||
1557 | // put the TPC into ALIC (main mother volume) | |
1558 | ||
1559 | gMC->Gspos("TPC ",1,"ALIC",0.,0.,0.,0,"ONLY"); | |
1560 | ||
1561 | ||
1562 | } // end of function | |
37831078 | 1563 | |
1564 | //_____________________________________________________________________________ | |
1565 | void AliTPCv3::DrawDetector() | |
1566 | { | |
1567 | // | |
79575d04 | 1568 | // Draw a shaded view of the Time Projection Chamber version 3 |
37831078 | 1569 | // |
1570 | ||
1571 | ||
1572 | // Set everything unseen | |
1573 | gMC->Gsatt("*", "seen", -1); | |
1574 | // | |
1575 | // Set ALIC mother transparent | |
1576 | gMC->Gsatt("ALIC","SEEN",0); | |
1577 | // | |
1578 | // Set the volumes visible | |
1579 | // | |
1580 | ||
1581 | gMC->Gsatt("TPC ","SEEN",0); | |
1582 | gMC->Gsatt("TOIN","SEEN",1); | |
1583 | gMC->Gsatt("TOIN","COLO",7); | |
37831078 | 1584 | gMC->Gsatt("TOCV","SEEN",1); |
1585 | gMC->Gsatt("TOCV","COLO",4); | |
1586 | gMC->Gsatt("TSA1","SEEN",0); | |
1587 | gMC->Gsatt("TSA2","SEEN",0); | |
1588 | gMC->Gsatt("TSA3","SEEN",0); | |
79575d04 | 1589 | gMC->Gsatt("TSA4","SEEN",0); |
1590 | gMC->Gsatt("TSA5","SEEN",0); | |
37831078 | 1591 | gMC->Gsatt("TOFC","SEEN",1); |
1592 | gMC->Gsatt("TOFC","COLO",4); | |
37831078 | 1593 | gMC->Gsatt("TSA6","SEEN",0); |
1594 | gMC->Gsatt("TSA7","SEEN",0); | |
79575d04 | 1595 | gMC->Gsatt("TSA8","SEEN",0); |
37831078 | 1596 | gMC->Gsatt("TIIN","SEEN",1); |
79575d04 | 1597 | gMC->Gsatt("TIIN","COLO",7); |
1598 | gMC->Gsatt("TII1","SEEN",0); | |
1599 | gMC->Gsatt("TIFC","SEEN",1); | |
1600 | gMC->Gsatt("TIFC","COLO",4); | |
1601 | gMC->Gsatt("TSA9","SEEN",0); | |
37831078 | 1602 | gMC->Gsatt("TS10","SEEN",0); |
1603 | gMC->Gsatt("TS11","SEEN",0); | |
1604 | gMC->Gsatt("TS12","SEEN",0); | |
37831078 | 1605 | gMC->Gsatt("TS13","SEEN",0); |
1606 | gMC->Gsatt("TS14","SEEN",0); | |
79575d04 | 1607 | gMC->Gsatt("TICC","SEEN",0); |
1608 | gMC->Gsatt("TICM","SEEN",0); | |
37831078 | 1609 | gMC->Gsatt("TS15","SEEN",0); |
1610 | gMC->Gsatt("TS16","SEEN",0); | |
37831078 | 1611 | gMC->Gsatt("TS17","SEEN",0); |
79575d04 | 1612 | gMC->Gsatt("TS18","SEEN",0); |
1613 | gMC->Gsatt("TS19","SEEN",0); | |
1614 | gMC->Gsatt("TPJ1","SEEN",0); | |
1615 | gMC->Gsatt("TPJ2","SEEN",0); | |
1616 | gMC->Gsatt("TICS","SEEN",0); | |
1617 | gMC->Gsatt("TDGS","SEEN",0); | |
37831078 | 1618 | gMC->Gsatt("TIRC","SEEN",0); |
1619 | gMC->Gsatt("TIC1","SEEN",1); | |
1620 | gMC->Gsatt("TIPP","SEEN",0); | |
1621 | gMC->Gsatt("TIC3","SEEN",0); | |
1622 | gMC->Gsatt("TRCE","SEEN",0); | |
1623 | gMC->Gsatt("TPSC","SEEN",0); | |
79575d04 | 1624 | gMC->Gsatt("TPCC","SEEN",0); |
37831078 | 1625 | gMC->Gsatt("TORC","SEEN",0); |
1626 | gMC->Gsatt("TOPP","SEEN",0); | |
1627 | gMC->Gsatt("TOC3","SEEN",0); | |
1628 | gMC->Gsatt("TOC1","SEEN",1); | |
1629 | gMC->Gsatt("TSSW","SEEN",1); | |
1630 | gMC->Gsatt("TSWC","SEEN",1); | |
37831078 | 1631 | gMC->Gsatt("TSSW","COLO",3); |
1632 | gMC->Gsatt("TSWC","COLO",3); | |
1633 | gMC->Gsatt("TSCE","COLO",6); | |
79575d04 | 1634 | gMC->Gsatt("TSCE","SEEN",1); |
37831078 | 1635 | gMC->Gsatt("TWES","SEEN",0); |
1636 | gMC->Gsatt("TSWB","SEEN",0); | |
1637 | gMC->Gsatt("TPEL","SEEN",0); | |
1638 | gMC->Gsatt("TPMW","SEEN",1); | |
37831078 | 1639 | gMC->Gsatt("TESR","SEEN",1); |
1640 | gMC->Gsatt("TPMW","COLO",12); | |
37831078 | 1641 | gMC->Gsatt("TIC1","COLO",5); |
79575d04 | 1642 | gMC->Gsatt("TOC1","COLO",5); |
37831078 | 1643 | gMC->Gsatt("TESB","SEEN",0); |
37831078 | 1644 | gMC->Gsatt("THVM","SEEN",1); |
1645 | gMC->Gsatt("THVM","COLO",11); | |
79575d04 | 1646 | gMC->Gsatt("THVH","SEEN",0); |
1647 | gMC->Gsatt("TPSR","SEEN",0); | |
37831078 | 1648 | gMC->Gsatt("THVL","SEEN",0); |
79575d04 | 1649 | gMC->Gsatt("THVC","SEEN",0); |
37831078 | 1650 | gMC->Gsatt("THVE","SEEN",0); |
1651 | gMC->Gsatt("THVR","SEEN",0); | |
1652 | ||
1653 | // | |
1654 | gMC->Gdopt("hide", "on"); | |
1655 | gMC->Gdopt("shad", "on"); | |
1656 | gMC->Gsatt("*", "fill", 7); | |
1657 | gMC->SetClipBox("."); | |
1658 | gMC->SetClipBox("TPMW",-300,300,-300,300,254.,270.); | |
1659 | gMC->SetClipBox("TESR",-300,300,-300,300,254.,270.); | |
1660 | gMC->SetClipBox("TSSW",-300,300,-300,300,283.,284.); | |
1661 | gMC->SetClipBox("TSWC",-300,300,-300,300,283.,284.); | |
1662 | gMC->SetClipBox("*", 0, 300, -300, 300, -290, 290); | |
1663 | gMC->DefaultRange(); | |
1664 | gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .025, .025); | |
1665 | gMC->Gdhead(1111, "Time Projection Chamber"); | |
1666 | gMC->Gdman(18, 4, "MAN"); | |
1667 | gMC->Gdopt("hide","off"); | |
1668 | } | |
1669 | ||
1670 | //_____________________________________________________________________________ | |
1671 | void AliTPCv3::CreateMaterials() | |
1672 | { | |
1673 | // | |
1674 | // Define materials for version 2 of the Time Projection Chamber | |
1675 | // | |
1676 | ||
1677 | ||
1678 | // | |
1679 | AliTPC::CreateMaterials(); | |
1680 | } | |
1681 | ||
1682 | //_____________________________________________________________________________ | |
1683 | void AliTPCv3::Init() | |
1684 | { | |
1685 | // | |
1686 | // Initialises version 3 of the TPC after that it has been built | |
1687 | // | |
1688 | Int_t *idtmed = fIdtmed->GetArray(); | |
4b0fdcad | 1689 | |
1690 | AliTPC::Init(); | |
1691 | ||
37831078 | 1692 | fIdSens=gMC->VolId("TDGS"); // drift gas as a sensitive volume |
4b0fdcad | 1693 | |
1694 | gMC->SetMaxNStep(30000); // max. number of steps increased | |
1695 | ||
37831078 | 1696 | gMC->Gstpar(idtmed[2],"LOSS",5); |
4b0fdcad | 1697 | |
13a8c8d7 | 1698 | printf("%s: *** TPC version 3 initialized***\n",ClassName()); |
1699 | ||
1700 | printf("%s: Maximum number of steps = %d\n",ClassName(),gMC->GetMaxNStep()); | |
1701 | ||
1702 | // printf("*** TPC version 3 initialized ***\n"); | |
1703 | // printf("Maximum number of steps = %d\n",gMC->GetMaxNStep()); | |
4b0fdcad | 1704 | |
1705 | // | |
1706 | ||
1707 | } | |
1708 | ||
1709 | //_____________________________________________________________________________ | |
1710 | void AliTPCv3::StepManager() | |
1711 | { | |
1712 | // | |
1713 | // Called for every step in the Time Projection Chamber | |
1714 | // | |
1715 | ||
1716 | // | |
1717 | // parameters used for the energy loss calculations | |
1718 | // | |
73042f01 | 1719 | const Float_t kprim = 14.35; // number of primary collisions per 1 cm |
1720 | const Float_t kpoti = 20.77e-9; // first ionization potential for Ne/CO2 | |
1721 | const Float_t kwIon = 35.97e-9; // energy for the ion-electron pair creation | |
4b0fdcad | 1722 | |
1723 | ||
73042f01 | 1724 | const Float_t kbig = 1.e10; |
4b0fdcad | 1725 | |
1726 | Int_t id,copy; | |
1727 | TLorentzVector pos; | |
1728 | Float_t hits[4]; | |
1729 | Int_t vol[2]; | |
4b0fdcad | 1730 | |
1731 | vol[1]=0; | |
1732 | vol[0]=0; | |
1733 | ||
1734 | // | |
1735 | ||
73042f01 | 1736 | gMC->SetMaxStep(kbig); |
4b0fdcad | 1737 | |
1738 | if(!gMC->IsTrackAlive()) return; // particle has disappeared | |
1739 | ||
1740 | Float_t charge = gMC->TrackCharge(); | |
1741 | ||
1742 | if(TMath::Abs(charge)<=0.) return; // take only charged particles | |
1743 | ||
1744 | ||
1745 | id=gMC->CurrentVolID(copy); | |
1746 | ||
1747 | // Check the sensitive volume | |
1748 | ||
37831078 | 1749 | if (id != fIdSens) return; |
4b0fdcad | 1750 | |
1751 | // | |
1752 | // charged particle is in the sensitive volume | |
1753 | // | |
1754 | ||
1755 | if(gMC->TrackStep() > 0) { | |
1756 | ||
1757 | ||
73042f01 | 1758 | Int_t nel = (Int_t)(((gMC->Edep())-kpoti)/kwIon) + 1; |
4b0fdcad | 1759 | nel=TMath::Min(nel,300); // 300 electrons corresponds to 10 keV |
1760 | ||
1761 | gMC->TrackPosition(pos); | |
1762 | hits[0]=pos[0]; | |
1763 | hits[1]=pos[1]; | |
1764 | hits[2]=pos[2]; | |
1765 | ||
1766 | // | |
1767 | // check the selected side of the TPC | |
1768 | // | |
1769 | ||
1770 | if(fSide && fSide*hits[2]<=0.) return; | |
1771 | ||
1772 | hits[3]=(Float_t)nel; | |
1773 | ||
1774 | // Add this hit | |
1775 | ||
79575d04 | 1776 | AddHit(gAlice->CurrentTrack(), vol,hits); //MI change |
4b0fdcad | 1777 | |
1778 | } | |
1779 | ||
1780 | // Stemax calculation for the next step | |
1781 | ||
1782 | Float_t pp; | |
1783 | TLorentzVector mom; | |
1784 | gMC->TrackMomentum(mom); | |
1785 | Float_t ptot=mom.Rho(); | |
73042f01 | 1786 | Float_t betaGamma = ptot/gMC->TrackMass(); |
4b0fdcad | 1787 | |
69e40cce | 1788 | Int_t pid=gMC->TrackPid(); |
cc80f89e | 1789 | if((pid==kElectron || pid==kPositron) && ptot > 0.002) |
4b0fdcad | 1790 | { |
73042f01 | 1791 | pp = kprim*1.58; // electrons above 20 MeV/c are on the plateau! |
4b0fdcad | 1792 | } |
1793 | else | |
1794 | { | |
7b562732 | 1795 | betaGamma = TMath::Max(betaGamma,(Float_t)7.e-3); |
73042f01 | 1796 | pp=kprim*BetheBloch(betaGamma); |
4b0fdcad | 1797 | if(TMath::Abs(charge) > 1.) pp *= (charge*charge); |
1798 | } | |
1799 | ||
1800 | Float_t random[1]; | |
1801 | gMC->Rndm(random,1); // good, old GRNDM from Geant3 | |
1802 | ||
1803 | Double_t rnd = (Double_t)random[0]; | |
1804 | ||
1805 | gMC->SetMaxStep(-TMath::Log(rnd)/pp); | |
1806 | ||
1807 | } | |
1808 | ||
1809 | //_____________________________________________________________________________ | |
1810 | Float_t AliTPCv3::BetheBloch(Float_t bg) | |
1811 | { | |
1812 | // | |
1813 | // Bethe-Bloch energy loss formula | |
1814 | // | |
73042f01 | 1815 | const Double_t kp1=0.76176e-1; |
1816 | const Double_t kp2=10.632; | |
1817 | const Double_t kp3=0.13279e-4; | |
1818 | const Double_t kp4=1.8631; | |
1819 | const Double_t kp5=1.9479; | |
4b0fdcad | 1820 | |
1821 | Double_t dbg = (Double_t) bg; | |
1822 | ||
1823 | Double_t beta = dbg/TMath::Sqrt(1.+dbg*dbg); | |
1824 | ||
73042f01 | 1825 | Double_t aa = TMath::Power(beta,kp4); |
1826 | Double_t bb = TMath::Power(1./dbg,kp5); | |
4b0fdcad | 1827 | |
73042f01 | 1828 | bb=TMath::Log(kp3+bb); |
4b0fdcad | 1829 | |
73042f01 | 1830 | return ((Float_t)((kp2-aa-bb)*kp1/aa)); |
4b0fdcad | 1831 | } |