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