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