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.29 2001/05/08 16:03:06 kowal2
19 Geometry update according to the latest technical spec.
21 Revision 1.28 2001/04/27 15:23:07 kowal2
22 Correct materian in the central part of the inner containment vessel
24 Revision 1.27 2001/04/26 06:15:12 kowal2
25 Corrected bug in the inner containment vessel (cones)
27 Revision 1.26 2001/04/24 11:17:33 kowal2
30 Revision 1.25 2001/03/13 13:07:34 kowal2
31 Corrected bug in the TPC mother volume geometry.
34 Revision 1.24 2000/11/30 11:48:50 kowal2
35 TLorentzVector.h adde to satisfy the latest changes by Federico
37 Revision 1.23 2000/11/14 10:48:57 kowal2
38 Correct material used for TSA4. Thanks to J. Barbosa.
40 Revision 1.22 2000/11/06 17:24:10 kowal2
41 Corrected bug in the outer containment vessel and
42 the outer field cage geometry.
45 Revision 1.21 2000/11/02 16:55:24 kowal2
46 Corrected bug in the inner containment vessel geometry.
49 Revision 1.20 2000/11/02 07:24:11 kowal2
50 Correction in the TPC geometry.
51 Changes due to the new hit structure.
53 Revision 1.19 2000/07/10 20:57:39 hristov
54 Update of TPC code and macros by M.Kowalski
56 Revision 1.18 2000/06/30 12:07:50 kowal2
57 Updated from the TPC-PreRelease branch
59 Revision 1.17.2.4 2000/06/26 07:39:42 kowal2
60 Changes to obey the coding rules
62 Revision 1.17.2.3 2000/06/25 08:38:41 kowal2
63 Splitted from AliTPCtracking
65 Revision 1.17.2.2 2000/06/16 12:58:13 kowal2
66 Changed parameter settings
68 Revision 1.17.2.1 2000/06/09 07:15:07 kowal2
70 Defaults loaded automatically (hard-wired)
71 Optional parameters can be set via macro called in the constructor
73 Revision 1.17 2000/05/15 10:00:30 kowal2
74 Corrected bug in the TPC geometry, thanks to Ivana Hrivnacova
76 Revision 1.16 2000/04/17 09:37:33 kowal2
77 removed obsolete AliTPCDigitsDisplay.C
79 Revision 1.15.8.2 2000/04/10 08:29:48 kowal2
81 Different pad geometry for different sectors
82 Updated readouch chambers geometry
84 Revision 1.15.8.1 2000/04/10 07:56:53 kowal2
85 Not used anymore - removed
87 Revision 1.15 1999/11/04 17:28:07 fca
88 Correct barrel part of HV Degrader
90 Revision 1.14 1999/10/08 06:27:23 fca
91 Corrected bug in the HV degrader geometry, thanks to G.Tabary
93 Revision 1.13 1999/10/04 13:39:54 fca
94 Correct array index problem
96 Revision 1.12 1999/09/29 09:24:34 fca
97 Introduction of the Copyright and cvs Log
102 ///////////////////////////////////////////////////////////////////////////////
104 // Time Projection Chamber version 1 -- detailed TPC and fast simulation //
108 <img src="picts/AliTPCv1Class.gif">
113 ///////////////////////////////////////////////////////////////////////////////
116 #include <TGeometry.h>
120 #include "AliTPCv1.h"
122 #include <iostream.h>
124 #include "TLorentzVector.h"
127 #include "AliConst.h"
129 #include "AliTPCParam.h"
130 #include "AliTPCParamSR.h"
131 #include "AliTPCDigitsArray.h"
132 #include <TInterpreter.h>
136 //_____________________________________________________________________________
138 AliTPCv1::AliTPCv1(){
144 //_____________________________________________________________________________
145 AliTPCv1::AliTPCv1(const char *name, const char *title)
146 :AliTPC(name, title) {
148 // Standard constructor for Time Projection Chamber
150 fIdSens=fIdLSec=fIdUSec=0;
152 SetGasMixt(2,20,10,-1,0.9,0.1,0.);
155 fTPCParam->Write(fTPCParam->GetTitle());
160 //_____________________________________________________________________________
161 void AliTPCv1::CreateGeometry()
163 //-------------------------------------------------------------
164 // Creates geometry for Time Projection Chamber version 1
165 // Detailed geometry -- Fast simulation - space points
166 // at the pad-rows centers
167 // Origin M.Kowalski, INP Cracow, Marek.Kowalski@ifj.edu.pl
168 //-----------------------------------------------------------
172 <img src="picts/AliTPC.gif">
177 <img src="picts/AliTPCv1Tree.gif">
182 Int_t *idtmed = fIdtmed->GetArray(); // TPC media
184 Int_t idrotm[120]; // rotation matrices
186 Int_t nRotMat = 0; // actual number of rotation matrices
189 // Mother volume TPC (Air) - all volumes will be positioned in it
244 gMC->Gsvolu("TPC ","PCON",idtmed[0],dm,27);
248 //-------------------------------------------------------------------
249 // Tpc Outer INsulator (CO2) - contains cont. vessel and field cage
250 //-------------------------------------------------------------------
292 gMC->Gsvolu("TOIN","PCON",idtmed[3],dm,21);
294 //----------------------------------------------------------------
295 // Tpc Outer Contaiment Vessel
296 // mother volume - Al, daughters - composite (sandwich)
297 //----------------------------------------------------------------
339 gMC->Gsvolu("TOCV","PCON",idtmed[4],dm,21);
341 // Daughter volumes - sandwich
343 // Tpc SAndwich 1 - Al
349 gMC->Gsvolu("TSA1","TUBE",idtmed[4],dm,3);
351 // Tpc SAndwich 2 - epoxy glue (I use Lexan)
356 gMC->Gsvolu("TSA2","TUBE",idtmed[14],dm,3);
358 // Tpc SAndwich 3 - Tedlar
363 gMC->Gsvolu("TSA3","TUBE",idtmed[9],dm,3);
366 // Tpc SAndwich 4 - fiber glass (G10)
371 gMC->Gsvolu("TSA4","TUBE",idtmed[12],dm,3);
373 // Tpc SAndwich 5 - NOMEX honeycomb
378 gMC->Gsvolu("TSA5","TUBE",idtmed[6],dm,3);
380 // 5->4->3->2->1->TCOV
383 gMC->Gspos("TSA5",1,"TSA4",0.,0.,0.,0,"ONLY");
384 gMC->Gspos("TSA4",1,"TSA3",0.,0.,0.,0,"ONLY");
385 gMC->Gspos("TSA3",1,"TSA2",0.,0.,0.,0,"ONLY");
386 gMC->Gspos("TSA2",1,"TSA1",0.,0.,0.,0,"ONLY");
388 gMC->Gspos("TSA1",1,"TOCV",0.,0.,3.,0,"ONLY");
392 gMC->Gspos("TOCV",1,"TOIN",0.,0.,0.,0,"ONLY");
394 //-------------------------------------------------------
395 // Tpc Outer Field Cage
396 // mother volume - Al, daughters - composite (sandwich)
397 //-------------------------------------------------------
439 gMC->Gsvolu("TOFC","PCON",idtmed[4],dm,21);
443 // Tpc SAndwich 6 - Tedlar
449 gMC->Gsvolu("TSA6","TUBE",idtmed[9],dm,3);
451 // Tpc SAndwich 7 - fiber glass
456 gMC->Gsvolu("TSA7","TUBE",idtmed[12],dm,3);
459 // Tpc SAndwich 8 - NOMEX
464 gMC->Gsvolu("TSA8","TUBE",idtmed[6],dm,3);
468 gMC->Gspos("TSA8",1,"TSA7",0.,0.,0.,0,"ONLY");
469 gMC->Gspos("TSA7",1,"TSA6",0.,0.,0.,0,"ONLY");
470 gMC->Gspos("TSA6",1,"TOFC",0.,0.,0.,0,"ONLY");
474 gMC->Gspos("TOFC",1,"TOIN",0.,0.,0.,0,"ONLY");
478 gMC->Gspos("TOIN",1,"TPC ",0.,0.,0.,0,"ONLY");
482 //--------------------------------------------------------------------
483 // Tpc Inner INsulator (CO2) - inner f.c. will be placed there
484 // Inner containment vessel will be placed directly in the TPC
485 //--------------------------------------------------------------------
515 gMC->Gsvolu("TIIN","PCON",idtmed[3],dm,15);
517 // the middle part of the F.C. is thinner - carve out the strip - Ne-CO2
523 gMC->Gsvolu("TII1","TUBE",idtmed[1],dm,3);
525 gMC->Gspos("TII1",1,"TIIN",0.,0.,0.,0,"ONLY");
527 //-----------------------------------------------------
528 // Tpc Inner Field Cage
529 // mother volume - Al, daughters - composite (sandwich)
530 //------------------------------------------------------
596 gMC->Gsvolu("TIFC","PCON",idtmed[4],dm,33);
598 // daughter volumes - central part
600 // Tpc Sandwich 9 -Tedlar
606 gMC->Gsvolu("TSA9","TUBE",idtmed[9],dm,3);
608 // Tpc Sandwich 10 - fiber glass (G10)
613 gMC->Gsvolu("TS10","TUBE",idtmed[12],dm,3);
615 // Tpc Sandwich 11 - NOMEX
620 gMC->Gsvolu("TS11","TUBE",idtmed[6],dm,3);
624 gMC->Gspos("TS11",1,"TS10",0.,0.,0.,0,"ONLY");
625 gMC->Gspos("TS10",1,"TSA9",0.,0.,0.,0,"ONLY");
627 gMC->Gspos("TSA9",1,"TIFC",0.,0.,0.,0,"ONLY");
629 // daughter volumes - outer parts (reinforced)
631 // Tpc Sandwich 12 -Tedlar
637 gMC->Gsvolu("TS12","TUBE",idtmed[9],dm,3);
639 // Tpc Sandwich 13 - fiber glass (G10)
644 gMC->Gsvolu("TS13","TUBE",idtmed[12],dm,3);
646 // Tpc Sandwich 14 - NOMEX
651 gMC->Gsvolu("TS14","TUBE",idtmed[6],dm,3);
655 gMC->Gspos("TS14",1,"TS13",0.,0.,0.,0,"ONLY");
656 gMC->Gspos("TS13",1,"TS12",0.,0.,0.,0,"ONLY");
658 gMC->Gspos("TS12",1,"TIFC",0.,0.,170.05,0,"ONLY");
659 gMC->Gspos("TS12",2,"TIFC",0.,0.,-170.05,0,"ONLY");
661 // place this inside the inner insulator
663 gMC->Gspos("TIFC",1,"TIIN",0.,0.,0.,0,"ONLY");
665 // and now in the TPC...
667 gMC->Gspos("TIIN",1,"TPC ",0.,0.,0.,0,"ONLY");
669 //---------------------------------------------------------
670 // Tpc Inner Containment vessel - Cones
671 //---------------------------------------------------------
725 gMC->Gsvolu("TICC","PCON",idtmed[4],dm,27);
727 Float_t phi1,phi2,phi3,theta1,theta2,theta3; // rotation angles
738 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
740 gMC->Gspos("TICC",1,"TPC ",0.,0.,0.,0,"ONLY");
741 gMC->Gspos("TICC",2,"TPC ",0.,0.,0.,idrotm[nRotMat],"ONLY");
744 //---------------------------------------------------------
745 // Tpc Inner Containment vessel - Middle part -Al
746 //---------------------------------------------------------
788 gMC->Gsvolu("TICM","PCON",idtmed[4],dm,21);
790 // Tpc Sandwich 15 - Al
796 gMC->Gsvolu("TS15","TUBE",idtmed[4],dm,3);
798 // Tpc Sandwich 16 - epoxy glue
803 gMC->Gsvolu("TS16","TUBE",idtmed[14],dm,3);
805 // Tpc Sandwich 17 - Tedlar
810 gMC->Gsvolu("TS17","TUBE",idtmed[9],dm,3);
812 // Tpc Sandwich 18 - carbon fiber
817 gMC->Gsvolu("TS18","TUBE",idtmed[15],dm,3);
819 // Tpc Sandwich 19 - Nomex
824 gMC->Gsvolu("TS19","TUBE",idtmed[6],dm,3);
826 // 19->18->17->16->15-> TICM
828 gMC->Gspos("TS19",1,"TS18",0.,0.,0.,0,"ONLY");
829 gMC->Gspos("TS18",1,"TS17",0.,0.,0.,0,"ONLY");
830 gMC->Gspos("TS17",1,"TS16",0.,0.,0.,0,"ONLY");
831 gMC->Gspos("TS16",1,"TS15",0.,0.,0.,0,"ONLY");
833 gMC->Gspos("TS15",1,"TICM ",0.,0.,0.,0,"ONLY");
836 // TPc inner cont. vessel Joints
842 gMC->Gsvolu("TPJ1","TUBE",idtmed[4],dm,3);
844 gMC->Gspos("TPJ1",1,"TPC ",0.,0.,72.3,0,"ONLY");
845 gMC->Gspos("TPJ1",2,"TPC ",0.,0.,-72.3,0,"ONLY");
877 gMC->Gsvolu("TPJ2","PCON",idtmed[4],dm,15);
879 gMC->Gspos("TPJ2",1,"TPC ",0.,0.,0.,0,"ONLY");
880 gMC->Gspos("TPJ2",2,"TPC ",0.,0.,0.,idrotm[nRotMat],"ONLY");
884 // Tpc Inner Containment vessel Seal (Viton, I use Lexan for a time being)
890 gMC->Gsvolu("TICS","TUBE",idtmed[14],dm,3);
892 gMC->Gspos("TICS",1,"TPC ",0.,0.,71.7,0,"ONLY");
893 gMC->Gspos("TICS",2,"TPC ",0.,0.,-71.7,0,"ONLY");
897 gMC->Gspos("TICM",1,"TPC ",0.,0.,0.,0,"ONLY");
901 nRotMat++; // prepare for the next rotation matrix
903 //---------------------------------------------------------
904 // Tpc Dift Gas volume Nonsensitive (Ne-CO2 90/10)
905 // and its daughters (HV membrane, rods, readout chambers)
906 //---------------------------------------------------------
912 gMC->Gsvolu("TDGN","TUBE",idtmed[1],dm,3);
914 // sector opening angles
916 Float_t innerOpenAngle = fTPCParam->GetInnerAngle();
917 Float_t outerOpenAngle = fTPCParam->GetOuterAngle();
919 // sector angle shift
921 Float_t innerAngleShift = fTPCParam->GetInnerAngleShift();
925 Int_t nInnerSector = fTPCParam->GetNInnerSector()/2;
926 Int_t nOuterSector = fTPCParam->GetNOuterSector()/2;
928 // All above parameters are identical for inner and outer
929 // sectors. The distinction is kept for the historical reasons
930 // and eventually will disappear.
932 Float_t tanAlpha = TMath::Tan(0.5*innerOpenAngle);
933 Float_t cosAlpha = TMath::Sqrt(1.+tanAlpha*tanAlpha);
936 //-------------------------------------------------------------------------
937 // Tpc Inner Readout Chambers
938 //-------------------------------------------------------------------------
942 dm[2]= 1.6; // thickness
945 gMC->Gsvolu("TIRC","TRD1",idtmed[4],dm,4);
947 // this volume will be positioned in the empty space
948 // of the end-cap to avoid overlaps
955 gMC->Gsvolu("TIC1","TRD1",idtmed[4],dm,4);
958 //------------------------------------------------
959 // Tpc Inner readout chamber Pad Plane
960 //------------------------------------------------
967 gMC->Gsvolu("TIPP","TRD1",idtmed[12],dm,4);
971 dm[0] -= 1.218511934;
972 dm[1] -= 1.218511934;
975 gMC->Gsvolu("TIC3","TRD1",idtmed[1],dm,4);
977 gMC->Gspos("TIC3",1,"TIPP",0.,0.15,0.,0,"ONLY");
979 gMC->Gspos("TIPP",1,"TIRC",0.,1.1,0.,0,"ONLY");
982 //----------------------------------------------
983 // Tpc Readout Chambers Empty spaces - for both
984 // inner and outer sectors
985 //----------------------------------------------
987 gMC->Gsvolu("TRCE","TRD1",idtmed[0],dm,0);
989 // Inner sector - 4 spaces
1000 space = rr*tanAlpha-dm[0];
1002 for(Int_t nsLow=0;nsLow<4;nsLow++){
1005 dm[1]= rr*tanAlpha - space;
1009 gMC->Gsposp("TRCE",nsLow+1,"TIRC",0.,-0.8,zz,0,"ONLY",dm,4);
1015 gMC->Gsposp("TRCE",nsLow+5,"TIC1",0.,1.05,zz-2.1,0,"ONLY",dm,4);
1018 dm[0] = rr*tanAlpha - space;
1024 // dm[1] - this is the dm[1] from the previous TRCE
1028 gMC->Gsposp("TRCE",9,"TIC1",0.,-1.2,0.,0,"ONLY",dm,4);
1031 // TPc Space for Connectors
1038 gMC->Gsvolu("TPSC","BOX ",idtmed[0],dm,3);
1046 gMC->Gsvolu("TPCC","BOX ",idtmed[13],dm,3);
1048 gMC->Gspos("TPCC",1,"TPSC",0.,0.15,0.,0,"ONLY");
1056 // inner part of the inner sector - 2 x 20 holes
1058 astep = 20.00096874/19.;
1060 alpha = 10.00048437-astep;
1072 for(ncon=0;ncon<20;ncon++){
1078 phi3 = (alpha>0) ? 0. : 180.;
1079 theta3 = TMath::Abs(alpha);
1081 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1085 gMC->Gspos("TPSC",ncon+1,"TIRC",x1,0.3,-12.7875,idrotm[nRotMat],"ONLY");
1086 gMC->Gspos("TPSC",ncon+21,"TIRC",x2,0.3,-2.8625,idrotm[nRotMat],"ONLY");
1097 // outer part of the inner sector - 2 x 25 holes
1099 astep = 20.00096874/24.;
1100 alpha = 10.00048437-astep;
1108 for(ncon=0;ncon<25;ncon++){
1114 phi3 = (alpha>0) ? 0. : 180.;
1115 theta3 = TMath::Abs(alpha);
1117 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1121 gMC->Gspos("TPSC",ncon+41,"TIRC",x1,0.3,7.0625,idrotm[nRotMat],"ONLY");
1122 gMC->Gspos("TPSC",ncon+66,"TIRC",x2,0.3,16.9875,idrotm[nRotMat],"ONLY");
1133 //--------------------------------------------------------------------------
1134 // TPC Outer Readout Chambers
1135 // this is NOT a final design
1136 //--------------------------------------------------------------------------
1140 dm[2]= 1.5; //thickness
1143 gMC->Gsvolu("TORC","TRD1",idtmed[4],dm,4);
1145 //------------------------------------------------
1146 // Tpc Outer readout chamber Pad Plane
1147 //------------------------------------------------
1151 gMC->Gsvolu("TOPP","TRD1",idtmed[12],dm,4);
1153 dm[0] -= 1.218511934;
1154 dm[1] -= 1.218511934;
1157 gMC->Gsvolu("TOC3","TRD1",idtmed[1],dm,4);
1159 gMC->Gspos("TOC3",1,"TOPP",0.,0.15,0.,0,"ONLY");
1161 gMC->Gspos("TOPP",1,"TORC",0.,1.0,0.,0,"ONLY");
1170 gMC->Gsposp("TRCE",10,"TORC",0.,-0.8,-2.15,0,"ONLY",dm,4);
1177 gMC->Gsvolu("TOC1","TRD1",idtmed[4],dm,4);
1184 gMC->Gsposp("TRCE",11,"TOC1",0.,0.,0.,0,"ONLY",dm,4);
1186 //-----------------------------------------------
1187 // Tpc Services Support Wheel
1188 //-----------------------------------------------
1203 gMC->Gsvolu("TSSW","PGON",idtmed[4],dm,10);
1205 // Tpc Services Wheel Cover
1210 gMC->Gsvolu("TSWC","PGON",idtmed[4],dm,10);
1212 // Tpc Service wheel Cover Empty space
1219 gMC->Gsvolu("TSCE","TRD1",idtmed[0],dm,4);
1221 // Tpc services Wheel Empty Spaces
1228 gMC->Gsvolu("TWES","TRD1",idtmed[0],dm,4);
1230 // Tpc Services Wheel Bars
1232 gMC->Gsvolu("TSWB","TRD1",idtmed[4],dm,0);
1242 gMC->Gsposp("TSWB",1,"TWES",0.,0.,-85.125,0,"ONLY",dm,4);
1247 gMC->Gsposp("TSWB",2,"TWES",0.,0.,85.125,0,"ONLY",dm,4);
1249 // TPc ELectronics - right now 30% X0 Si
1256 gMC->Gsvolu("TPEL","TRD1",idtmed[11],dm,4);
1257 gMC->Gspos("TPEL",1,"TWES",0.,0.,0.,0,"ONLY");
1259 //--------------------------------------------------------------------------
1261 //--------------------------------------------------------------------------
1263 // TPc Main Wheel - Al
1269 gMC->Gsvolu("TPMW","TUBE",idtmed[4],dm,3);
1271 //--------------------------------------------------------------------------
1272 // Tpc Empty Space for the Readout chambers
1273 //--------------------------------------------------------------------------
1277 Float_t dR = 0.5*(rUp-rLow);
1279 space= 1.5/cosAlpha; // wheel ribs are 3.0 cm wide
1281 dm[0]= rLow*tanAlpha-space;
1282 dm[1]= rUp*tanAlpha-space;
1286 gMC->Gsvolu("TESR","TRD1",idtmed[0],dm,4);
1290 gMC->Gspos("TIC1",1,"TESR",0.,0.75,-dR+23.97,0,"ONLY");
1294 gMC->Gspos("TOC1",1,"TESR",0.,0.75,dR-55.02,0,"ONLY");
1296 // Tpc Empty Space Bars - Al (daughters of TESR)
1300 gMC->Gsvolu("TESB","TRD1",idtmed[4],dm,0);
1304 dm[0]= rLow*tanAlpha-space;
1305 dm[1]= 88.7*tanAlpha-space;
1311 gMC->Gsposp("TESB",1,"TESR",0.,0.75,zBar,0,"ONLY",dm,4);
1315 dm[0]= 131.65*tanAlpha-space;
1316 dm[1]= 136.5*tanAlpha-space;
1319 zBar = -dR +131.65+dm[3]-rLow;
1321 gMC->Gsposp("TESB",2,"TESR",0.,0.75,zBar,0,"ONLY",dm,4);
1325 dm[0]= 240.4*tanAlpha-space;
1326 dm[1]= rUp*tanAlpha-space;
1331 gMC->Gsposp("TESB",3,"TESR",0.,0.75,zBar,0,"ONLY",dm,4);
1334 //------------------------------------------------------
1335 // TPc Lower "S" Sectors
1336 //------------------------------------------------------
1341 Float_t inSecLowEdge = fTPCParam->GetInnerRadiusLow();
1342 Float_t inSecUpEdge = fTPCParam->GetInnerRadiusUp();
1344 dm[0] = inSecLowEdge*TMath::Tan(0.5*innerOpenAngle)-0.01;
1345 dm[1] = inSecUpEdge*TMath::Tan(0.5*innerOpenAngle)-0.01;
1346 dm[2] = 0.5*(250. - 5.e-3);
1347 dm[3] = 0.5*(inSecUpEdge-inSecLowEdge);
1349 gMC->Gsvolu("TPLS", "TRD1", idtmed[1], dm, 4); // nonsensitive
1351 //----------------------------------------------------------
1352 // TPc Upper Sectors
1353 //----------------------------------------------------------
1355 Float_t ouSecLowEdge = fTPCParam->GetOuterRadiusLow();
1356 Float_t ouSecUpEdge = fTPCParam->GetOuterRadiusUp();
1358 dm[0] = ouSecLowEdge*TMath::Tan(0.5*outerOpenAngle)-0.01;
1359 dm[1] = ouSecUpEdge*TMath::Tan(0.5*outerOpenAngle)-0.01;
1360 dm[2] = 0.5*(250. - 5.e-3);
1361 dm[3] = 0.5*(ouSecUpEdge-ouSecLowEdge);
1363 gMC->Gsvolu("TPUS", "TRD1", idtmed[1], dm, 4); // nonsensitive
1365 //--------------------------------------------------------
1366 // TPc Sensitive Strips, the same for S and L sectors
1367 //--------------------------------------------------------
1369 gMC->Gsvolu("TPSS","TRD1",idtmed[2],dm,0); // sensitive
1371 Int_t nofStrips,nstr;
1373 Float_t stripThick = 0.01; // 100 microns
1377 nofStrips = fTPCParam->GetNRowLow();
1378 deadSpace = fTPCParam->GetInnerWireMount();
1380 dm[2] = 0.5*(250. - 5.e-3);
1381 dm[3] = 0.5 * stripThick;
1383 for(nstr=0;nstr<nofStrips;nstr++){
1385 r1 = fTPCParam->GetPadRowRadiiLow(nstr);
1386 r2 = r1 + stripThick;
1387 dm[0] = r1 * TMath::Tan(0.5*innerOpenAngle) - deadSpace;
1388 dm[1] = r2 * TMath::Tan(0.5*innerOpenAngle) - deadSpace;
1389 zs = -inSecLowEdge -0.5*(inSecUpEdge-inSecLowEdge);
1393 gMC->Gsposp("TPSS", nstr+1, "TPLS", 0., 0., zs, 0, "ONLY", dm, 4);
1397 Int_t nsSave = nofStrips;
1401 nofStrips = fTPCParam->GetNRowUp();
1402 deadSpace = fTPCParam->GetOuterWireMount();
1404 dm[2] = 0.5*(250. - 5.e-3);
1405 dm[3] = 0.5 * stripThick;
1407 for(nstr=0;nstr<nofStrips;nstr++){
1409 r1 = fTPCParam->GetPadRowRadiiUp(nstr);
1410 r2 = r1 + stripThick;
1411 dm[0] = r1 * TMath::Tan(0.5*outerOpenAngle) - deadSpace;
1412 dm[1] = r2 * TMath::Tan(0.5*outerOpenAngle) - deadSpace;
1413 zs = -ouSecLowEdge -0.5*(ouSecUpEdge-ouSecLowEdge);
1417 gMC->Gsposp("TPSS", nstr+1+nsSave, "TPUS", 0., 0., zs, 0, "ONLY", dm, 4);
1421 //-------------------------------------------------------
1422 // positioning of the empty spaces into the main wheel
1423 // and readout chambers and sectors into the drift gas
1424 //-------------------------------------------------------
1427 Float_t rCenter,xc,yc;
1428 Float_t rInner,rOuter; // center of the inner and outer chamber
1436 for(Int_t ns=0; ns<nInnerSector;ns++){
1438 phi1 = ns * innerOpenAngle + innerAngleShift;
1439 phi1 *= kRaddeg; // in degrees
1441 phi1 = (Float_t)TMath::Nint(phi1) + 270.;
1443 if (phi1 > 360.) phi1 -= 360.;
1448 phi3 = ns * innerOpenAngle + innerAngleShift;
1449 phi3 *= kRaddeg; // in degrees
1451 phi3 = (Float_t)TMath::Nint(phi3);
1453 if(phi3 > 360.) phi3 -= 360.;
1457 // "holes"->End plate
1459 xc = rCenter*TMath::Cos(phi3*kDegrad);
1460 yc = rCenter*TMath::Sin(phi3*kDegrad);
1462 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1464 gMC->Gspos("TESR",ns+1,"TPMW",xc,yc,0.,idrotm[nRotMat],"ONLY");
1466 // TSCE->TSWC (services wheel volumes)
1468 xc = 166.142*TMath::Cos(phi3*kDegrad);
1469 yc = 166.142*TMath::Sin(phi3*kDegrad);
1471 gMC->Gspos("TSCE",ns+1,"TSWC",xc,yc,0.,idrotm[nRotMat],"ONLY");
1472 gMC->Gspos("TWES",ns+1,"TSSW",xc,yc,0.,idrotm[nRotMat],"ONLY");
1475 // readout chambers->TDGN (drift gas)
1477 xc = rInner*TMath::Cos(phi3*kDegrad);
1478 yc = rInner*TMath::Sin(phi3*kDegrad);
1480 gMC->Gspos("TIRC",ns+1,"TDGN",xc,yc,252.,idrotm[nRotMat],"ONLY");
1482 // here lower sectors
1484 gMC->Gspos("TPLS",ns+1,"TDGN",xc,yc,125.0025,idrotm[nRotMat],"ONLY");
1485 gMC->Gspos("TPLS",ns+nInnerSector+1,"TDGN",xc,yc,-125.0025,idrotm[nRotMat],"ONLY");
1489 xc = rOuter*TMath::Cos(phi3*kDegrad);
1490 yc = rOuter*TMath::Sin(phi3*kDegrad);
1492 gMC->Gspos("TORC",ns+1,"TDGN",xc,yc,252.1,idrotm[nRotMat],"ONLY");
1494 // here upper sectors
1496 gMC->Gspos("TPUS",ns+1,"TDGN",xc,yc,125.0025,idrotm[nRotMat],"ONLY");
1497 gMC->Gspos("TPUS",ns+nOuterSector+1,"TDGN",xc,yc,-125.0025,idrotm[nRotMat],"ONLY");
1502 theta2 = 0.; // reflection
1504 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1506 xc = rInner*TMath::Cos(phi3*kDegrad);
1507 yc = rInner*TMath::Sin(phi3*kDegrad);
1509 gMC->Gspos("TIRC",ns+nInnerSector+1,"TDGN",xc,yc,-252.,idrotm[nRotMat],"ONLY");
1511 xc = rOuter*TMath::Cos(phi3*kDegrad);
1512 yc = rOuter*TMath::Sin(phi3*kDegrad);
1514 gMC->Gspos("TORC",ns+nOuterSector+1,"TDGN",xc,yc,-252.1,idrotm[nRotMat],"ONLY");
1521 gMC->Gspos("TPMW",1,"TPC ",0.,0.,256.6,0,"ONLY");
1522 gMC->Gspos("TPMW",2,"TPC ",0.,0.,-256.6,idrotm[0],"ONLY");
1524 //---------------------------------------------------------
1525 // Tpc High Voltage Membrane - 100 microns of mylar
1526 //---------------------------------------------------------
1532 gMC->Gsvolu("THVM","TUBE",idtmed[8],dm,3);
1534 gMC->Gspos("THVM",1,"TDGN",0.,0.,0.,0,"ONLY");
1536 // Tpc High Voltage membrane Holders
1538 gMC->Gsvolu("THVH","TUBE",idtmed[4],dm,0);
1548 gMC->Gsposp("THVH",1,"TDGN",0.,0.,0.,0,"ONLY",dm,3);
1556 gMC->Gsposp("THVH",2,"TDGN",0.,0.,0.,0,"ONLY",dm,3);
1558 //----------------------------------------------------------
1559 // TPc Support Rods - MAKROLON
1560 //----------------------------------------------------------
1565 gMC->Gsvolu("TPSR","TUBE",idtmed[7],dm,0); // inner and outer rods differ
1568 for(Int_t nrod=0;nrod<18;nrod++){
1569 Float_t angle=innerOpenAngle*(Float_t)nrod;
1571 xc=81.5*TMath::Cos(angle);
1572 yc=81.5*TMath::Sin(angle);
1576 gMC->Gsposp("TPSR",nrod+1,"TDGN",xc,yc,126.9,0,"ONLY",dm,3);
1577 gMC->Gsposp("TPSR",nrod+19,"TDGN",xc,yc,-126.9,0,"ONLY",dm,3);
1581 xc=254.25*TMath::Cos(angle);
1582 yc=254.25*TMath::Sin(angle);
1584 // rod number 54 contans the HV cable
1587 gMC->Gsposp("TPSR",nrod+37,"TDGN",xc,yc,127.,0,"ONLY",dm,3);
1588 gMC->Gsposp("TPSR",nrod+54,"TDGN",xc,yc,-127.,0,"ONLY",dm,3);
1593 //----------------------------------------------------------
1594 // Tpc High Voltage Rod - MAKROLON + Copper cable
1595 //----------------------------------------------------------
1597 // rod with cable (Left)
1603 gMC->Gsvolu("THVL","TUBE",idtmed[7],dm,3);
1611 gMC->Gsvolu("THVC","TUBE",idtmed[10],dm,3);
1619 gMC->Gsvolu("THVE","TUBE",idtmed[1],dm,3);
1621 gMC->Gspos("THVC",1,"THVL",0.,0.,0.,0,"ONLY");
1622 gMC->Gspos("THVE",1,"THVL",0.,0.,0.,0,"ONLY");
1624 // rod without cable
1630 gMC->Gsvolu("THVR","TUBE",idtmed[7],dm,3);
1632 gMC->Gspos("THVL",1,"TDGN",xc,yc,-127.,0,"ONLY");
1633 gMC->Gspos("THVR",1,"TDGN",xc,yc,127.,0,"ONLY");
1635 gMC->Gspos("TDGN",1,"TPC ",0.,0.,0.,0,"ONLY");
1637 // services wheel cover -> wheel
1640 gMC->Gspos("TSWC",1,"TSSW",0.,0.,4.5,0,"ONLY");
1641 gMC->Gspos("TSWC",2,"TSSW",0.,0.,-4.5,0,"ONLY");
1644 // put the wheel into the TPC
1646 gMC->Gspos("TSSW",1,"TPC ",0.,0.,278.7,0,"ONLY");
1647 gMC->Gspos("TSSW",2,"TPC ",0.,0.,-278.7,0,"ONLY");
1651 gMC->Gsord("TPMW",6);
1652 gMC->Gsord("TSSW",6);
1653 gMC->Gsord("TSWC",6);
1654 gMC->Gsord("TPLS",3);
1655 gMC->Gsord("TPUS",3);
1656 gMC->Gsord("TDGN",6);
1659 // put the TPC into ALIC (main mother volume)
1661 gMC->Gspos("TPC ",1,"ALIC",0.,0.,0.,0,"ONLY");
1665 } // end of function
1667 //_____________________________________________________________________________
1668 void AliTPCv1::DrawDetector()
1671 // Draw a shaded view of the Time Projection Chamber version 1
1674 // Set everything unseen
1675 gMC->Gsatt("*", "seen", -1);
1677 // Set ALIC mother transparent
1678 gMC->Gsatt("ALIC","SEEN",0);
1680 // Set the volumes visible
1681 gMC->Gsatt("TPC ","SEEN",0);
1682 gMC->Gsatt("TOIN","SEEN",1);
1683 gMC->Gsatt("TOIN","COLO",7);
1684 gMC->Gsatt("TOCV","SEEN",1);
1685 gMC->Gsatt("TOCV","COLO",4);
1686 gMC->Gsatt("TSA1","SEEN",0);
1687 gMC->Gsatt("TSA2","SEEN",0);
1688 gMC->Gsatt("TSA3","SEEN",0);
1689 gMC->Gsatt("TSA4","SEEN",0);
1690 gMC->Gsatt("TSA5","SEEN",0);
1691 gMC->Gsatt("TOFC","SEEN",1);
1692 gMC->Gsatt("TOFC","COLO",4);
1693 gMC->Gsatt("TSA6","SEEN",0);
1694 gMC->Gsatt("TSA7","SEEN",0);
1695 gMC->Gsatt("TSA8","SEEN",0);
1696 gMC->Gsatt("TIIN","SEEN",1);
1697 gMC->Gsatt("TIIN","COLO",7);
1698 gMC->Gsatt("TII1","SEEN",0);
1699 gMC->Gsatt("TIFC","SEEN",1);
1700 gMC->Gsatt("TIFC","COLO",4);
1701 gMC->Gsatt("TSA9","SEEN",0);
1702 gMC->Gsatt("TS10","SEEN",0);
1703 gMC->Gsatt("TS11","SEEN",0);
1704 gMC->Gsatt("TS12","SEEN",0);
1705 gMC->Gsatt("TS13","SEEN",0);
1706 gMC->Gsatt("TS14","SEEN",0);
1707 gMC->Gsatt("TICC","SEEN",0);
1708 gMC->Gsatt("TICM","SEEN",0);
1709 gMC->Gsatt("TS15","SEEN",0);
1710 gMC->Gsatt("TS16","SEEN",0);
1711 gMC->Gsatt("TS17","SEEN",0);
1712 gMC->Gsatt("TS18","SEEN",0);
1713 gMC->Gsatt("TS19","SEEN",0);
1714 gMC->Gsatt("TPJ1","SEEN",0);
1715 gMC->Gsatt("TPJ2","SEEN",0);
1716 gMC->Gsatt("TICS","SEEN",0);
1717 gMC->Gsatt("TDGN","SEEN",0);
1718 gMC->Gsatt("TIRC","SEEN",0);
1719 gMC->Gsatt("TIC1","SEEN",1);
1720 gMC->Gsatt("TIPP","SEEN",0);
1721 gMC->Gsatt("TIC3","SEEN",0);
1722 gMC->Gsatt("TRCE","SEEN",0);
1723 gMC->Gsatt("TPSC","SEEN",0);
1724 gMC->Gsatt("TPCC","SEEN",0);
1725 gMC->Gsatt("TORC","SEEN",0);
1726 gMC->Gsatt("TOPP","SEEN",0);
1727 gMC->Gsatt("TOC3","SEEN",0);
1728 gMC->Gsatt("TOC1","SEEN",1);
1729 gMC->Gsatt("TSSW","SEEN",1);
1730 gMC->Gsatt("TSWC","SEEN",1);
1731 gMC->Gsatt("TSSW","COLO",3);
1732 gMC->Gsatt("TSWC","COLO",3);
1733 gMC->Gsatt("TSCE","COLO",6);
1734 gMC->Gsatt("TSCE","SEEN",1);
1735 gMC->Gsatt("TWES","SEEN",0);
1736 gMC->Gsatt("TSWB","SEEN",0);
1737 gMC->Gsatt("TPEL","SEEN",0);
1738 gMC->Gsatt("TPMW","SEEN",1);
1739 gMC->Gsatt("TESR","SEEN",1);
1740 gMC->Gsatt("TPMW","COLO",12);
1741 gMC->Gsatt("TIC1","COLO",5);
1742 gMC->Gsatt("TOC1","COLO",5);
1743 gMC->Gsatt("TESB","SEEN",0);
1744 gMC->Gsatt("THVM","SEEN",1);
1745 gMC->Gsatt("THVM","COLO",11);
1746 gMC->Gsatt("THVH","SEEN",0);
1747 gMC->Gsatt("TPSR","SEEN",0);
1748 gMC->Gsatt("THVL","SEEN",0);
1749 gMC->Gsatt("THVC","SEEN",0);
1750 gMC->Gsatt("THVE","SEEN",0);
1751 gMC->Gsatt("THVR","SEEN",0);
1752 gMC->Gsatt("TPSS","SEEN",0);
1753 gMC->Gsatt("TPUS","SEEN",0);
1754 gMC->Gsatt("TPLS","SEEN",0);
1757 gMC->Gdopt("hide", "on");
1758 gMC->Gdopt("shad", "on");
1759 gMC->Gsatt("*", "fill", 7);
1760 gMC->SetClipBox(".");
1761 gMC->SetClipBox("TPMW",-300,300,-300,300,254.,270.);
1762 gMC->SetClipBox("TESR",-300,300,-300,300,254.,270.);
1763 gMC->SetClipBox("TSSW",-300,300,-300,300,283.,284.);
1764 gMC->SetClipBox("TSWC",-300,300,-300,300,283.,284.);
1765 gMC->SetClipBox("*", 0, 300, -300, 300, -290, 290);
1766 gMC->DefaultRange();
1767 gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .025, .025);
1768 gMC->Gdhead(1111, "Time Projection Chamber");
1769 gMC->Gdman(18, 4, "MAN");
1770 gMC->Gdopt("hide","off");
1773 //_____________________________________________________________________________
1774 void AliTPCv1::CreateMaterials()
1777 // Define materials for Time Projection Chamber
1779 AliTPC::CreateMaterials();
1782 //_____________________________________________________________________________
1783 void AliTPCv1::Init()
1786 // Initialises TPC detector after it has been created
1789 fIdSens=gMC->VolId("TPSS"); // sensitive strip
1790 fIdLSec=gMC->VolId("TPLS"); // lower sector
1791 fIdUSec=gMC->VolId("TPUS"); // upper sector
1793 printf("%s: *** TPC version 1 initialized***\n",ClassName());
1795 // printf("TPC version 1 initialized\n");
1798 //_____________________________________________________________________________
1799 void AliTPCv1::StepManager()
1802 // Called at every step in the Time Projection Chamber
1810 if(gMC->TrackCharge() && gMC->IsTrackEntering()) {
1813 // Only charged tracks entering the sensitive volume
1816 id = gMC->CurrentVolID(copy);
1820 // sensitive volume (strip)
1822 vol[1]= copy-1; // row number (absolute)
1826 id = gMC->CurrentVolOffID(1,copy);
1832 vol[0] = copy-1; // sector number
1839 vol[0] = copy-1+fTPCParam->GetNInnerSector(); // sector number
1840 vol[1] -= fTPCParam->GetNRowLow(); // row number
1846 // because Jouri wants to have this
1848 gMC->TrackMomentum(p);
1852 hits[3]=0.; // this hit has no energy loss
1853 // new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
1855 AddHit(gAlice->CurrentTrack(), vol,hits); // M.I.
1857 gMC->TrackPosition(p);
1861 hits[3]=0.; // this hit has no energy loss
1862 // new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
1864 AddHit(gAlice->CurrentTrack(), vol,hits); // M.I.
1868 gMC->TrackPosition(p);
1869 for(i=0;i<3;++i) hits[i]=p[i];
1870 hits[3]=1; //I'd like to have something positive here (I.Belikov)
1871 // new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
1873 AddHit(gAlice->CurrentTrack(), vol,hits); // M.I.
1880 //_____________________________________________________________________________