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