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