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