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