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