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