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