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