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