1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 Revision 1.26 2001/05/08 16:03:06 kowal2
19 Geometry update according to the latest technical spec.
21 Revision 1.25 2001/04/27 15:23:06 kowal2
22 Correct materian in the central part of the inner containment vessel
24 Revision 1.24 2001/04/26 06:15:11 kowal2
25 Corrected bug in the inner containment vessel (cones)
27 Revision 1.23 2001/04/24 11:17:33 kowal2
30 Revision 1.22 2001/03/13 13:07:33 kowal2
31 Corrected bug in the TPC mother volume geometry.
34 Revision 1.21 2000/11/14 10:48:57 kowal2
35 Correct material used for TSA4. Thanks to J. Barbosa.
37 Revision 1.20 2000/11/06 17:24:10 kowal2
38 Corrected bug in the outer containment vessel and
39 the outer field cage geometry.
42 Revision 1.19 2000/11/02 16:55:24 kowal2
43 Corrected bug in the inner containment vessel geometry.
46 Revision 1.18 2000/11/02 07:24:11 kowal2
47 Correction in the TPC geometry.
48 Changes due to the new hit structure.
50 Revision 1.17 2000/07/10 20:57:39 hristov
51 Update of TPC code and macros by M.Kowalski
53 Revision 1.16 2000/06/30 12:07:50 kowal2
54 Updated from the TPC-PreRelease branch
56 Revision 1.15.2.4 2000/06/26 07:39:42 kowal2
57 Changes to obey the coding rules
59 Revision 1.15.2.3 2000/06/25 08:38:41 kowal2
60 Splitted from AliTPCtracking
62 Revision 1.15.2.2 2000/06/16 12:58:13 kowal2
63 Changed parameter settings
65 Revision 1.15.2.1 2000/06/09 07:15:07 kowal2
67 Defaults loaded automatically (hard-wired)
68 Optional parameters can be set via macro called in the constructor
70 Revision 1.15 2000/05/15 10:00:30 kowal2
71 Corrected bug in the TPC geometry, thanks to Ivana Hrivnacova
73 Revision 1.14 2000/04/17 09:37:33 kowal2
74 removed obsolete AliTPCDigitsDisplay.C
76 Revision 1.13.8.2 2000/04/10 08:33:44 kowal2
78 Updated readout chambers
80 Revision 1.13.8.1 2000/04/10 07:56:53 kowal2
81 Not used anymore - removed
83 Revision 1.13 1999/11/04 17:28:06 fca
84 Correct barrel part of HV Degrader
86 Revision 1.12 1999/10/08 06:27:23 fca
87 Corrected bug in the HV degrader geometry, thanks to G.Tabary
89 Revision 1.11 1999/10/04 13:39:54 fca
90 Correct array index problem
92 Revision 1.10 1999/09/29 09:24:34 fca
93 Introduction of the Copyright and cvs Log
98 ///////////////////////////////////////////////////////////////////////////////
100 // Time Projection Chamber version 0 -- "coarse" TPC //
104 <img src="picts/AliTPCv0Class.gif">
109 ///////////////////////////////////////////////////////////////////////////////
112 #include <TGeometry.h>
115 #include "AliTPCv0.h"
117 #include <iostream.h>
120 #include "AliConst.h"
122 #include "AliTPCParamSR.h"
123 #include "AliTPCDigitsArray.h"
127 //_____________________________________________________________________________
128 AliTPCv0::AliTPCv0(const char *name, const char *title)
132 // Standard creator for TPC version 0
135 SetGasMixt(2,20,10,-1,0.9,0.1,0.);
138 fTPCParam->Write(fTPCParam->GetTitle());
141 //_____________________________________________________________________________
142 void AliTPCv0::CreateGeometry()
146 // Creation of the TPC version 0, i.e. no sensitive volumes,
147 // only the material distribution
151 <img src="picts/AliTPC.gif">
156 <img src="picts/AliTPCv0Tree.gif">
160 //---------------------------------------------------------------
163 // Origin: Marek Kowalski, INP Cracow
164 // Marek.Kowalski@ifj.edu.pl
165 //---------------------------------------------------------------
168 Int_t *idtmed = fIdtmed->GetArray(); // TPC media
170 Int_t idrotm[120]; // rotation matrices
172 Int_t nRotMat = 0; // actual number of rotation matrices
176 // Mother volume TPC (Air) - all volumes will be positioned in it
231 gMC->Gsvolu("TPC ","PCON",idtmed[0],dm,27);
235 //-------------------------------------------------------------------
236 // Tpc Outer INsulator (CO2) - contains cont. vessel and field cage
237 //-------------------------------------------------------------------
279 gMC->Gsvolu("TOIN","PCON",idtmed[3],dm,21);
281 //----------------------------------------------------------------
282 // Tpc Outer Contaiment Vessel
283 // mother volume - Al, daughters - composite (sandwich)
284 //----------------------------------------------------------------
326 gMC->Gsvolu("TOCV","PCON",idtmed[4],dm,21);
328 // Daughter volumes - sandwich
330 // Tpc SAndwich 1 - Al
336 gMC->Gsvolu("TSA1","TUBE",idtmed[4],dm,3);
338 // Tpc SAndwich 2 - epoxy glue (I use Lexan)
343 gMC->Gsvolu("TSA2","TUBE",idtmed[14],dm,3);
345 // Tpc SAndwich 3 - Tedlar
350 gMC->Gsvolu("TSA3","TUBE",idtmed[9],dm,3);
353 // Tpc SAndwich 4 - fiber glass (G10)
358 gMC->Gsvolu("TSA4","TUBE",idtmed[12],dm,3);
360 // Tpc SAndwich 5 - NOMEX honeycomb
365 gMC->Gsvolu("TSA5","TUBE",idtmed[6],dm,3);
367 // 5->4->3->2->1->TCOV
370 gMC->Gspos("TSA5",1,"TSA4",0.,0.,0.,0,"ONLY");
371 gMC->Gspos("TSA4",1,"TSA3",0.,0.,0.,0,"ONLY");
372 gMC->Gspos("TSA3",1,"TSA2",0.,0.,0.,0,"ONLY");
373 gMC->Gspos("TSA2",1,"TSA1",0.,0.,0.,0,"ONLY");
375 gMC->Gspos("TSA1",1,"TOCV",0.,0.,3.,0,"ONLY");
379 gMC->Gspos("TOCV",1,"TOIN",0.,0.,0.,0,"ONLY");
381 //-------------------------------------------------------
382 // Tpc Outer Field Cage
383 // mother volume - Al, daughters - composite (sandwich)
384 //-------------------------------------------------------
426 gMC->Gsvolu("TOFC","PCON",idtmed[4],dm,21);
430 // Tpc SAndwich 6 - Tedlar
436 gMC->Gsvolu("TSA6","TUBE",idtmed[9],dm,3);
438 // Tpc SAndwich 7 - fiber glass
443 gMC->Gsvolu("TSA7","TUBE",idtmed[12],dm,3);
446 // Tpc SAndwich 8 - NOMEX
451 gMC->Gsvolu("TSA8","TUBE",idtmed[6],dm,3);
455 gMC->Gspos("TSA8",1,"TSA7",0.,0.,0.,0,"ONLY");
456 gMC->Gspos("TSA7",1,"TSA6",0.,0.,0.,0,"ONLY");
457 gMC->Gspos("TSA6",1,"TOFC",0.,0.,0.,0,"ONLY");
461 gMC->Gspos("TOFC",1,"TOIN",0.,0.,0.,0,"ONLY");
465 gMC->Gspos("TOIN",1,"TPC ",0.,0.,0.,0,"ONLY");
469 //--------------------------------------------------------------------
470 // Tpc Inner INsulator (CO2) - inner f.c. will be placed there
471 // Inner containment vessel will be placed directly in the TPC
472 //--------------------------------------------------------------------
502 gMC->Gsvolu("TIIN","PCON",idtmed[3],dm,15);
504 // the middle part of the F.C. is thinner - carve out the strip - Ne-CO2
510 gMC->Gsvolu("TII1","TUBE",idtmed[1],dm,3);
512 gMC->Gspos("TII1",1,"TIIN",0.,0.,0.,0,"ONLY");
514 //-----------------------------------------------------
515 // Tpc Inner Field Cage
516 // mother volume - Al, daughters - composite (sandwich)
517 //------------------------------------------------------
583 gMC->Gsvolu("TIFC","PCON",idtmed[4],dm,33);
585 // daughter volumes - central part
587 // Tpc Sandwich 9 -Tedlar
593 gMC->Gsvolu("TSA9","TUBE",idtmed[9],dm,3);
595 // Tpc Sandwich 10 - fiber glass (G10)
600 gMC->Gsvolu("TS10","TUBE",idtmed[12],dm,3);
602 // Tpc Sandwich 11 - NOMEX
607 gMC->Gsvolu("TS11","TUBE",idtmed[6],dm,3);
611 gMC->Gspos("TS11",1,"TS10",0.,0.,0.,0,"ONLY");
612 gMC->Gspos("TS10",1,"TSA9",0.,0.,0.,0,"ONLY");
614 gMC->Gspos("TSA9",1,"TIFC",0.,0.,0.,0,"ONLY");
616 // daughter volumes - outer parts (reinforced)
618 // Tpc Sandwich 12 -Tedlar
624 gMC->Gsvolu("TS12","TUBE",idtmed[9],dm,3);
626 // Tpc Sandwich 13 - fiber glass (G10)
631 gMC->Gsvolu("TS13","TUBE",idtmed[12],dm,3);
633 // Tpc Sandwich 14 - NOMEX
638 gMC->Gsvolu("TS14","TUBE",idtmed[6],dm,3);
642 gMC->Gspos("TS14",1,"TS13",0.,0.,0.,0,"ONLY");
643 gMC->Gspos("TS13",1,"TS12",0.,0.,0.,0,"ONLY");
645 gMC->Gspos("TS12",1,"TIFC",0.,0.,170.05,0,"ONLY");
646 gMC->Gspos("TS12",2,"TIFC",0.,0.,-170.05,0,"ONLY");
648 // place this inside the inner insulator
650 gMC->Gspos("TIFC",1,"TIIN",0.,0.,0.,0,"ONLY");
652 // and now in the TPC...
654 gMC->Gspos("TIIN",1,"TPC ",0.,0.,0.,0,"ONLY");
656 //---------------------------------------------------------
657 // Tpc Inner Containment vessel - Cones
658 //---------------------------------------------------------
712 gMC->Gsvolu("TICC","PCON",idtmed[4],dm,27);
714 Float_t phi1,phi2,phi3,theta1,theta2,theta3; // rotation angles
725 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
727 gMC->Gspos("TICC",1,"TPC ",0.,0.,0.,0,"ONLY");
728 gMC->Gspos("TICC",2,"TPC ",0.,0.,0.,idrotm[nRotMat],"ONLY");
731 //---------------------------------------------------------
732 // Tpc Inner Containment vessel - Middle part -Al
733 //---------------------------------------------------------
775 gMC->Gsvolu("TICM","PCON",idtmed[4],dm,21);
777 // Tpc Sandwich 15 - Al
783 gMC->Gsvolu("TS15","TUBE",idtmed[4],dm,3);
785 // Tpc Sandwich 16 - epoxy glue
790 gMC->Gsvolu("TS16","TUBE",idtmed[14],dm,3);
792 // Tpc Sandwich 17 - Tedlar
797 gMC->Gsvolu("TS17","TUBE",idtmed[9],dm,3);
799 // Tpc Sandwich 18 - carbon fiber
804 gMC->Gsvolu("TS18","TUBE",idtmed[15],dm,3);
806 // Tpc Sandwich 19 - Nomex
811 gMC->Gsvolu("TS19","TUBE",idtmed[6],dm,3);
813 // 19->18->17->16->15-> TICM
815 gMC->Gspos("TS19",1,"TS18",0.,0.,0.,0,"ONLY");
816 gMC->Gspos("TS18",1,"TS17",0.,0.,0.,0,"ONLY");
817 gMC->Gspos("TS17",1,"TS16",0.,0.,0.,0,"ONLY");
818 gMC->Gspos("TS16",1,"TS15",0.,0.,0.,0,"ONLY");
820 gMC->Gspos("TS15",1,"TICM ",0.,0.,0.,0,"ONLY");
823 // TPc inner cont. vessel Joints
829 gMC->Gsvolu("TPJ1","TUBE",idtmed[4],dm,3);
831 gMC->Gspos("TPJ1",1,"TPC ",0.,0.,72.3,0,"ONLY");
832 gMC->Gspos("TPJ1",2,"TPC ",0.,0.,-72.3,0,"ONLY");
864 gMC->Gsvolu("TPJ2","PCON",idtmed[4],dm,15);
866 gMC->Gspos("TPJ2",1,"TPC ",0.,0.,0.,0,"ONLY");
867 gMC->Gspos("TPJ2",2,"TPC ",0.,0.,0.,idrotm[nRotMat],"ONLY");
871 // Tpc Inner Containment vessel Seal (Viton, I use Lexan for a time being)
877 gMC->Gsvolu("TICS","TUBE",idtmed[14],dm,3);
879 gMC->Gspos("TICS",1,"TPC ",0.,0.,71.7,0,"ONLY");
880 gMC->Gspos("TICS",2,"TPC ",0.,0.,-71.7,0,"ONLY");
884 gMC->Gspos("TICM",1,"TPC ",0.,0.,0.,0,"ONLY");
888 nRotMat++; // prepare for the next rotation matrix
890 //---------------------------------------------------------
891 // Tpc Dift Gas volume Nonsensitive (Ne-CO2 90/10)
892 // and its daughters (HV membrane, rods, readout chambers)
893 //---------------------------------------------------------
899 gMC->Gsvolu("TDGN","TUBE",idtmed[1],dm,3);
901 // sector opening angles
903 Float_t innerOpenAngle = fTPCParam->GetInnerAngle();
905 // sector angle shift
907 Float_t innerAngleShift = fTPCParam->GetInnerAngleShift();
911 Int_t nInnerSector = fTPCParam->GetNInnerSector()/2;
912 Int_t nOuterSector = fTPCParam->GetNOuterSector()/2;
914 // All above parameters are identical for inner and outer
915 // sectors. The distinction is kept for the historical reasons
916 // and eventually will disappear.
918 Float_t tanAlpha = TMath::Tan(0.5*innerOpenAngle);
919 Float_t cosAlpha = TMath::Sqrt(1.+tanAlpha*tanAlpha);
922 //-------------------------------------------------------------------------
923 // Tpc Inner Readout Chambers
924 //-------------------------------------------------------------------------
928 dm[2]= 1.6; // thickness
931 gMC->Gsvolu("TIRC","TRD1",idtmed[4],dm,4);
933 // this volume will be positioned in the empty space
934 // of the end-cap to avoid overlaps
941 gMC->Gsvolu("TIC1","TRD1",idtmed[4],dm,4);
944 //------------------------------------------------
945 // Tpc Inner readout chamber Pad Plane
946 //------------------------------------------------
953 gMC->Gsvolu("TIPP","TRD1",idtmed[12],dm,4);
957 dm[0] -= 1.218511934;
958 dm[1] -= 1.218511934;
961 gMC->Gsvolu("TIC3","TRD1",idtmed[1],dm,4);
963 gMC->Gspos("TIC3",1,"TIPP",0.,0.15,0.,0,"ONLY");
965 gMC->Gspos("TIPP",1,"TIRC",0.,1.1,0.,0,"ONLY");
968 //----------------------------------------------
969 // Tpc Readout Chambers Empty spaces - for both
970 // inner and outer sectors
971 //----------------------------------------------
973 gMC->Gsvolu("TRCE","TRD1",idtmed[0],dm,0);
975 // Inner sector - 4 spaces
986 space = rr*tanAlpha-dm[0];
988 for(Int_t nsLow=0;nsLow<4;nsLow++){
991 dm[1]= rr*tanAlpha - space;
995 gMC->Gsposp("TRCE",nsLow+1,"TIRC",0.,-0.8,zz,0,"ONLY",dm,4);
1001 gMC->Gsposp("TRCE",nsLow+5,"TIC1",0.,1.05,zz-2.1,0,"ONLY",dm,4);
1004 dm[0] = rr*tanAlpha - space;
1010 // dm[1] - this is the dm[1] from the previous TRCE
1014 gMC->Gsposp("TRCE",9,"TIC1",0.,-1.2,0.,0,"ONLY",dm,4);
1017 // TPc Space for Connectors
1024 gMC->Gsvolu("TPSC","BOX ",idtmed[0],dm,3);
1032 gMC->Gsvolu("TPCC","BOX ",idtmed[13],dm,3);
1034 gMC->Gspos("TPCC",1,"TPSC",0.,0.15,0.,0,"ONLY");
1042 // inner part of the inner sector - 2 x 20 holes
1044 astep = 20.00096874/19.;
1046 alpha = 10.00048437-astep;
1058 for(ncon=0;ncon<20;ncon++){
1064 phi3 = (alpha>0) ? 0. : 180.;
1065 theta3 = TMath::Abs(alpha);
1067 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1071 gMC->Gspos("TPSC",ncon+1,"TIRC",x1,0.3,-12.7875,idrotm[nRotMat],"ONLY");
1072 gMC->Gspos("TPSC",ncon+21,"TIRC",x2,0.3,-2.8625,idrotm[nRotMat],"ONLY");
1083 // outer part of the inner sector - 2 x 25 holes
1085 astep = 20.00096874/24.;
1086 alpha = 10.00048437-astep;
1094 for(ncon=0;ncon<25;ncon++){
1100 phi3 = (alpha>0) ? 0. : 180.;
1101 theta3 = TMath::Abs(alpha);
1103 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1107 gMC->Gspos("TPSC",ncon+41,"TIRC",x1,0.3,7.0625,idrotm[nRotMat],"ONLY");
1108 gMC->Gspos("TPSC",ncon+66,"TIRC",x2,0.3,16.9875,idrotm[nRotMat],"ONLY");
1119 //--------------------------------------------------------------------------
1120 // TPC Outer Readout Chambers
1121 // this is NOT a final design
1122 //--------------------------------------------------------------------------
1126 dm[2]= 1.5; //thickness
1129 gMC->Gsvolu("TORC","TRD1",idtmed[4],dm,4);
1131 //------------------------------------------------
1132 // Tpc Outer readout chamber Pad Plane
1133 //------------------------------------------------
1137 gMC->Gsvolu("TOPP","TRD1",idtmed[12],dm,4);
1139 dm[0] -= 1.218511934;
1140 dm[1] -= 1.218511934;
1143 gMC->Gsvolu("TOC3","TRD1",idtmed[1],dm,4);
1145 gMC->Gspos("TOC3",1,"TOPP",0.,0.15,0.,0,"ONLY");
1147 gMC->Gspos("TOPP",1,"TORC",0.,1.0,0.,0,"ONLY");
1156 gMC->Gsposp("TRCE",10,"TORC",0.,-0.8,-2.15,0,"ONLY",dm,4);
1163 gMC->Gsvolu("TOC1","TRD1",idtmed[4],dm,4);
1170 gMC->Gsposp("TRCE",11,"TOC1",0.,0.,0.,0,"ONLY",dm,4);
1172 //-----------------------------------------------
1173 // Tpc Services Support Wheel
1174 //-----------------------------------------------
1189 gMC->Gsvolu("TSSW","PGON",idtmed[4],dm,10);
1191 // Tpc Services Wheel Cover
1196 gMC->Gsvolu("TSWC","PGON",idtmed[4],dm,10);
1198 // Tpc Service wheel Cover Empty space
1205 gMC->Gsvolu("TSCE","TRD1",idtmed[0],dm,4);
1207 // Tpc services Wheel Empty Spaces
1214 gMC->Gsvolu("TWES","TRD1",idtmed[0],dm,4);
1216 // Tpc Services Wheel Bars
1218 gMC->Gsvolu("TSWB","TRD1",idtmed[4],dm,0);
1228 gMC->Gsposp("TSWB",1,"TWES",0.,0.,-85.125,0,"ONLY",dm,4);
1233 gMC->Gsposp("TSWB",2,"TWES",0.,0.,85.125,0,"ONLY",dm,4);
1235 // TPc ELectronics - right now 30% X0 Si
1242 gMC->Gsvolu("TPEL","TRD1",idtmed[11],dm,4);
1243 gMC->Gspos("TPEL",1,"TWES",0.,0.,0.,0,"ONLY");
1245 //--------------------------------------------------------------------------
1247 //--------------------------------------------------------------------------
1249 // TPc Main Wheel - Al
1255 gMC->Gsvolu("TPMW","TUBE",idtmed[4],dm,3);
1257 //--------------------------------------------------------------------------
1258 // Tpc Empty Space for the Readout chambers
1259 //--------------------------------------------------------------------------
1263 Float_t dR = 0.5*(rUp-rLow);
1265 space= 1.5/cosAlpha; // wheel ribs are 3.0 cm wide
1267 dm[0]= rLow*tanAlpha-space;
1268 dm[1]= rUp*tanAlpha-space;
1272 gMC->Gsvolu("TESR","TRD1",idtmed[0],dm,4);
1276 gMC->Gspos("TIC1",1,"TESR",0.,0.75,-dR+23.97,0,"ONLY");
1280 gMC->Gspos("TOC1",1,"TESR",0.,0.75,dR-55.02,0,"ONLY");
1282 // Tpc Empty Space Bars - Al (daughters of TESR)
1286 gMC->Gsvolu("TESB","TRD1",idtmed[4],dm,0);
1290 dm[0]= rLow*tanAlpha-space;
1291 dm[1]= 88.7*tanAlpha-space;
1297 gMC->Gsposp("TESB",1,"TESR",0.,0.75,zBar,0,"ONLY",dm,4);
1301 dm[0]= 131.65*tanAlpha-space;
1302 dm[1]= 136.5*tanAlpha-space;
1305 zBar = -dR +131.65+dm[3]-rLow;
1307 gMC->Gsposp("TESB",2,"TESR",0.,0.75,zBar,0,"ONLY",dm,4);
1311 dm[0]= 240.4*tanAlpha-space;
1312 dm[1]= rUp*tanAlpha-space;
1317 gMC->Gsposp("TESB",3,"TESR",0.,0.75,zBar,0,"ONLY",dm,4);
1319 // positioning of the empty spaces into the main wheel
1321 Float_t rCenter,xc,yc;
1322 Float_t rInner,rOuter; // center of the inner and outer chamber
1330 for(Int_t ns=0; ns<nInnerSector;ns++){
1332 phi1 = ns * innerOpenAngle + innerAngleShift;
1333 phi1 *= kRaddeg; // in degrees
1335 phi1 = (Float_t)TMath::Nint(phi1) + 270.;
1337 if (phi1 > 360.) phi1 -= 360.;
1342 phi3 = ns * innerOpenAngle + innerAngleShift;
1343 phi3 *= kRaddeg; // in degrees
1345 phi3 = (Float_t)TMath::Nint(phi3);
1347 if(phi3 > 360.) phi3 -= 360.;
1351 // "holes"->End plate
1353 xc = rCenter*TMath::Cos(phi3*kDegrad);
1354 yc = rCenter*TMath::Sin(phi3*kDegrad);
1356 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1358 gMC->Gspos("TESR",ns+1,"TPMW",xc,yc,0.,idrotm[nRotMat],"ONLY");
1360 // TSCE->TSWC (services wheel volumes)
1362 xc = 166.142*TMath::Cos(phi3*kDegrad);
1363 yc = 166.142*TMath::Sin(phi3*kDegrad);
1365 gMC->Gspos("TSCE",ns+1,"TSWC",xc,yc,0.,idrotm[nRotMat],"ONLY");
1366 gMC->Gspos("TWES",ns+1,"TSSW",xc,yc,0.,idrotm[nRotMat],"ONLY");
1369 // readout chambers->TDGN (drift gas)
1371 xc = rInner*TMath::Cos(phi3*kDegrad);
1372 yc = rInner*TMath::Sin(phi3*kDegrad);
1374 gMC->Gspos("TIRC",ns+1,"TDGN",xc,yc,252.,idrotm[nRotMat],"ONLY");
1376 xc = rOuter*TMath::Cos(phi3*kDegrad);
1377 yc = rOuter*TMath::Sin(phi3*kDegrad);
1379 gMC->Gspos("TORC",ns+1,"TDGN",xc,yc,252.1,idrotm[nRotMat],"ONLY");
1383 theta2 = 0.; // reflection
1385 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1387 xc = rInner*TMath::Cos(phi3*kDegrad);
1388 yc = rInner*TMath::Sin(phi3*kDegrad);
1390 gMC->Gspos("TIRC",ns+nInnerSector+1,"TDGN",xc,yc,-252.,idrotm[nRotMat],"ONLY");
1392 xc = rOuter*TMath::Cos(phi3*kDegrad);
1393 yc = rOuter*TMath::Sin(phi3*kDegrad);
1395 gMC->Gspos("TORC",ns+nOuterSector+1,"TDGN",xc,yc,-252.1,idrotm[nRotMat],"ONLY");
1402 gMC->Gspos("TPMW",1,"TPC ",0.,0.,256.6,0,"ONLY");
1403 gMC->Gspos("TPMW",2,"TPC ",0.,0.,-256.6,idrotm[0],"ONLY");
1405 //---------------------------------------------------------
1406 // Tpc High Voltage Membrane - 100 microns of mylar
1407 //---------------------------------------------------------
1413 gMC->Gsvolu("THVM","TUBE",idtmed[8],dm,3);
1415 gMC->Gspos("THVM",1,"TDGN",0.,0.,0.,0,"ONLY");
1417 // Tpc High Voltage membrane Holders
1419 gMC->Gsvolu("THVH","TUBE",idtmed[4],dm,0);
1429 gMC->Gsposp("THVH",1,"TDGN",0.,0.,0.,0,"ONLY",dm,3);
1437 gMC->Gsposp("THVH",2,"TDGN",0.,0.,0.,0,"ONLY",dm,3);
1439 //----------------------------------------------------------
1440 // TPc Support Rods - MAKROLON
1441 //----------------------------------------------------------
1446 gMC->Gsvolu("TPSR","TUBE",idtmed[7],dm,0); // inner and outer rods differ
1449 for(Int_t nrod=0;nrod<18;nrod++){
1450 Float_t angle=innerOpenAngle*(Float_t)nrod;
1452 xc=81.5*TMath::Cos(angle);
1453 yc=81.5*TMath::Sin(angle);
1457 gMC->Gsposp("TPSR",nrod+1,"TDGN",xc,yc,126.9,0,"ONLY",dm,3);
1458 gMC->Gsposp("TPSR",nrod+19,"TDGN",xc,yc,-126.9,0,"ONLY",dm,3);
1462 xc=254.25*TMath::Cos(angle);
1463 yc=254.25*TMath::Sin(angle);
1465 // rod number 54 contans the HV cable
1468 gMC->Gsposp("TPSR",nrod+37,"TDGN",xc,yc,127.,0,"ONLY",dm,3);
1469 gMC->Gsposp("TPSR",nrod+54,"TDGN",xc,yc,-127.,0,"ONLY",dm,3);
1474 //----------------------------------------------------------
1475 // Tpc High Voltage Rod - MAKROLON + Copper cable
1476 //----------------------------------------------------------
1478 // rod with cable (Left)
1484 gMC->Gsvolu("THVL","TUBE",idtmed[7],dm,3);
1492 gMC->Gsvolu("THVC","TUBE",idtmed[10],dm,3);
1500 gMC->Gsvolu("THVE","TUBE",idtmed[1],dm,3);
1502 gMC->Gspos("THVC",1,"THVL",0.,0.,0.,0,"ONLY");
1503 gMC->Gspos("THVE",1,"THVL",0.,0.,0.,0,"ONLY");
1505 // rod without cable
1511 gMC->Gsvolu("THVR","TUBE",idtmed[7],dm,3);
1513 gMC->Gspos("THVL",1,"TDGN",xc,yc,-127.,0,"ONLY");
1514 gMC->Gspos("THVR",1,"TDGN",xc,yc,127.,0,"ONLY");
1516 gMC->Gspos("TDGN",1,"TPC ",0.,0.,0.,0,"ONLY");
1518 // services wheel cover -> wheel
1521 gMC->Gspos("TSWC",1,"TSSW",0.,0.,4.5,0,"ONLY");
1522 gMC->Gspos("TSWC",2,"TSSW",0.,0.,-4.5,0,"ONLY");
1525 // put the wheel into the TPC
1527 gMC->Gspos("TSSW",1,"TPC ",0.,0.,278.7,0,"ONLY");
1528 gMC->Gspos("TSSW",2,"TPC ",0.,0.,-278.7,0,"ONLY");
1532 gMC->Gsord("TPMW",6);
1533 gMC->Gsord("TSSW",6);
1534 gMC->Gsord("TSWC",6);
1536 // put the TPC into ALIC (main mother volume)
1538 gMC->Gspos("TPC ",1,"ALIC",0.,0.,0.,0,"ONLY");
1540 } // end of function
1543 //_____________________________________________________________________________
1544 void AliTPCv0::CreateMaterials()
1547 // Define materials for the TPC
1549 AliTPC::CreateMaterials();
1552 //_____________________________________________________________________________
1553 void AliTPCv0::DrawDetector()
1556 // Draw a shaded view of the Time Projection Chamber version 0
1559 // Set everything unseen
1560 gMC->Gsatt("*", "seen", -1);
1562 // Set ALIC mother transparent
1563 gMC->Gsatt("ALIC","SEEN",0);
1565 // Set the volumes visible
1566 gMC->Gsatt("TPC ","SEEN",0);
1567 gMC->Gsatt("TOIN","SEEN",1);
1568 gMC->Gsatt("TOIN","COLO",7);
1569 gMC->Gsatt("TOCV","SEEN",1);
1570 gMC->Gsatt("TOCV","COLO",4);
1571 gMC->Gsatt("TSA1","SEEN",0);
1572 gMC->Gsatt("TSA2","SEEN",0);
1573 gMC->Gsatt("TSA3","SEEN",0);
1574 gMC->Gsatt("TSA4","SEEN",0);
1575 gMC->Gsatt("TSA5","SEEN",0);
1576 gMC->Gsatt("TOFC","SEEN",1);
1577 gMC->Gsatt("TOFC","COLO",4);
1578 gMC->Gsatt("TSA6","SEEN",0);
1579 gMC->Gsatt("TSA7","SEEN",0);
1580 gMC->Gsatt("TSA8","SEEN",0);
1581 gMC->Gsatt("TIIN","SEEN",1);
1582 gMC->Gsatt("TIIN","COLO",7);
1583 gMC->Gsatt("TII1","SEEN",0);
1584 gMC->Gsatt("TIFC","SEEN",1);
1585 gMC->Gsatt("TIFC","COLO",4);
1586 gMC->Gsatt("TSA9","SEEN",0);
1587 gMC->Gsatt("TS10","SEEN",0);
1588 gMC->Gsatt("TS11","SEEN",0);
1589 gMC->Gsatt("TS12","SEEN",0);
1590 gMC->Gsatt("TS13","SEEN",0);
1591 gMC->Gsatt("TS14","SEEN",0);
1592 gMC->Gsatt("TICC","SEEN",0);
1593 gMC->Gsatt("TICM","SEEN",0);
1594 gMC->Gsatt("TS15","SEEN",0);
1595 gMC->Gsatt("TS16","SEEN",0);
1596 gMC->Gsatt("TS17","SEEN",0);
1597 gMC->Gsatt("TS18","SEEN",0);
1598 gMC->Gsatt("TS19","SEEN",0);
1599 gMC->Gsatt("TPJ1","SEEN",0);
1600 gMC->Gsatt("TPJ2","SEEN",0);
1601 gMC->Gsatt("TICS","SEEN",0);
1602 gMC->Gsatt("TDGN","SEEN",0);
1603 gMC->Gsatt("TIRC","SEEN",0);
1604 gMC->Gsatt("TIC1","SEEN",1);
1605 gMC->Gsatt("TIPP","SEEN",0);
1606 gMC->Gsatt("TIC3","SEEN",0);
1607 gMC->Gsatt("TRCE","SEEN",0);
1608 gMC->Gsatt("TPSC","SEEN",0);
1609 gMC->Gsatt("TPCC","SEEN",0);
1610 gMC->Gsatt("TORC","SEEN",0);
1611 gMC->Gsatt("TOPP","SEEN",0);
1612 gMC->Gsatt("TOC3","SEEN",0);
1613 gMC->Gsatt("TOC1","SEEN",1);
1614 gMC->Gsatt("TSSW","SEEN",1);
1615 gMC->Gsatt("TSWC","SEEN",1);
1616 gMC->Gsatt("TSSW","COLO",3);
1617 gMC->Gsatt("TSWC","COLO",3);
1618 gMC->Gsatt("TSCE","COLO",6);
1619 gMC->Gsatt("TSCE","SEEN",1);
1620 gMC->Gsatt("TWES","SEEN",0);
1621 gMC->Gsatt("TSWB","SEEN",0);
1622 gMC->Gsatt("TPEL","SEEN",0);
1623 gMC->Gsatt("TPMW","SEEN",1);
1624 gMC->Gsatt("TESR","SEEN",1);
1625 gMC->Gsatt("TPMW","COLO",12);
1626 gMC->Gsatt("TIC1","COLO",5);
1627 gMC->Gsatt("TOC1","COLO",5);
1628 gMC->Gsatt("TESB","SEEN",0);
1629 gMC->Gsatt("THVM","SEEN",1);
1630 gMC->Gsatt("THVM","COLO",11);
1631 gMC->Gsatt("THVH","SEEN",0);
1632 gMC->Gsatt("TPSR","SEEN",0);
1633 gMC->Gsatt("THVL","SEEN",0);
1634 gMC->Gsatt("THVC","SEEN",0);
1635 gMC->Gsatt("THVE","SEEN",0);
1636 gMC->Gsatt("THVR","SEEN",0);
1639 gMC->Gdopt("hide", "on");
1640 gMC->Gdopt("shad", "on");
1641 gMC->Gsatt("*", "fill", 7);
1642 gMC->SetClipBox(".");
1643 gMC->SetClipBox("TPMW",-300,300,-300,300,254.,270.);
1644 gMC->SetClipBox("TESR",-300,300,-300,300,254.,270.);
1645 gMC->SetClipBox("TSSW",-300,300,-300,300,283.,284.);
1646 gMC->SetClipBox("TSWC",-300,300,-300,300,283.,284.);
1647 gMC->SetClipBox("*", 0, 300, -300, 300, -290, 290);
1648 gMC->DefaultRange();
1649 gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .025, .025);
1650 gMC->Gdhead(1111, "Time Projection Chamber");
1651 gMC->Gdman(18, 4, "MAN");
1652 gMC->Gdopt("hide","off");
1655 //_____________________________________________________________________________
1656 void AliTPCv0::Init()
1659 // Initialise Time Projection Chamber version 0
1662 printf("%s: *** TPC version 0 initialized***\n",ClassName());
1664 // printf("TPC version 0 initialized\n");
1667 //_____________________________________________________________________________
1668 void AliTPCv0::StepManager()
1671 // Procedure called at each step in the TPC