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