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