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