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