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