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