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/04/24 11:17:33 kowal2
21 Revision 1.25 2001/03/13 13:07:34 kowal2
22 Corrected bug in the TPC mother volume geometry.
25 Revision 1.24 2000/11/30 11:48:50 kowal2
26 TLorentzVector.h adde to satisfy the latest changes by Federico
28 Revision 1.23 2000/11/14 10:48:57 kowal2
29 Correct material used for TSA4. Thanks to J. Barbosa.
31 Revision 1.22 2000/11/06 17:24:10 kowal2
32 Corrected bug in the outer containment vessel and
33 the outer field cage geometry.
36 Revision 1.21 2000/11/02 16:55:24 kowal2
37 Corrected bug in the inner containment vessel geometry.
40 Revision 1.20 2000/11/02 07:24:11 kowal2
41 Correction in the TPC geometry.
42 Changes due to the new hit structure.
44 Revision 1.19 2000/07/10 20:57:39 hristov
45 Update of TPC code and macros by M.Kowalski
47 Revision 1.18 2000/06/30 12:07:50 kowal2
48 Updated from the TPC-PreRelease branch
50 Revision 1.17.2.4 2000/06/26 07:39:42 kowal2
51 Changes to obey the coding rules
53 Revision 1.17.2.3 2000/06/25 08:38:41 kowal2
54 Splitted from AliTPCtracking
56 Revision 1.17.2.2 2000/06/16 12:58:13 kowal2
57 Changed parameter settings
59 Revision 1.17.2.1 2000/06/09 07:15:07 kowal2
61 Defaults loaded automatically (hard-wired)
62 Optional parameters can be set via macro called in the constructor
64 Revision 1.17 2000/05/15 10:00:30 kowal2
65 Corrected bug in the TPC geometry, thanks to Ivana Hrivnacova
67 Revision 1.16 2000/04/17 09:37:33 kowal2
68 removed obsolete AliTPCDigitsDisplay.C
70 Revision 1.15.8.2 2000/04/10 08:29:48 kowal2
72 Different pad geometry for different sectors
73 Updated readouch chambers geometry
75 Revision 1.15.8.1 2000/04/10 07:56:53 kowal2
76 Not used anymore - removed
78 Revision 1.15 1999/11/04 17:28:07 fca
79 Correct barrel part of HV Degrader
81 Revision 1.14 1999/10/08 06:27:23 fca
82 Corrected bug in the HV degrader geometry, thanks to G.Tabary
84 Revision 1.13 1999/10/04 13:39:54 fca
85 Correct array index problem
87 Revision 1.12 1999/09/29 09:24:34 fca
88 Introduction of the Copyright and cvs Log
93 ///////////////////////////////////////////////////////////////////////////////
95 // Time Projection Chamber version 1 -- detailed TPC and fast simulation //
99 <img src="picts/AliTPCv1Class.gif">
104 ///////////////////////////////////////////////////////////////////////////////
107 #include <TGeometry.h>
111 #include "AliTPCv1.h"
113 #include <iostream.h>
115 #include "TLorentzVector.h"
118 #include "AliConst.h"
120 #include "AliTPCParam.h"
121 #include "AliTPCParamSR.h"
122 #include "AliTPCDigitsArray.h"
123 #include <TInterpreter.h>
127 //_____________________________________________________________________________
129 AliTPCv1::AliTPCv1(){
135 //_____________________________________________________________________________
136 AliTPCv1::AliTPCv1(const char *name, const char *title)
137 :AliTPC(name, title) {
139 // Standard constructor for Time Projection Chamber
141 fIdSens=fIdLSec=fIdUSec=0;
143 SetGasMixt(2,20,10,-1,0.9,0.1,0.);
146 fTPCParam->Write(fTPCParam->GetTitle());
151 //_____________________________________________________________________________
152 void AliTPCv1::CreateGeometry()
154 //-------------------------------------------------------------
155 // Creates geometry for Time Projection Chamber version 1
156 // Detailed geometry -- Fast simulation - space points
157 // at the pad-rows centers
158 // Origin M.Kowalski, INP Cracow, Marek.Kowalski@ifj.edu.pl
159 //-----------------------------------------------------------
163 <img src="picts/AliTPC.gif">
168 <img src="picts/AliTPCv1Tree.gif">
173 Int_t *idtmed = fIdtmed->GetArray(); // TPC media
175 Int_t idrotm[120]; // rotation matrices
177 Int_t nRotMat = 0; // actual number of rotation matrices
180 // Mother volume TPC (Air) - all volumes will be positioned in it
235 gMC->Gsvolu("TPC ","PCON",idtmed[0],dm,27);
239 //-------------------------------------------------------------------
240 // Tpc Outer INsulator (CO2) - contains cont. vessel and field cage
241 //-------------------------------------------------------------------
283 gMC->Gsvolu("TOIN","PCON",idtmed[3],dm,21);
285 //----------------------------------------------------------------
286 // Tpc Outer Contaiment Vessel
287 // mother volume - Al, daughters - composite (sandwich)
288 //----------------------------------------------------------------
330 gMC->Gsvolu("TOCV","PCON",idtmed[4],dm,21);
332 // Daughter volumes - sandwich
334 // Tpc SAndwich 1 - Al
340 gMC->Gsvolu("TSA1","TUBE",idtmed[4],dm,3);
342 // Tpc SAndwich 2 - epoxy glue (I use Lexan)
347 gMC->Gsvolu("TSA2","TUBE",idtmed[14],dm,3);
349 // Tpc SAndwich 3 - Tedlar
354 gMC->Gsvolu("TSA3","TUBE",idtmed[9],dm,3);
357 // Tpc SAndwich 4 - fiber glass (G10)
362 gMC->Gsvolu("TSA4","TUBE",idtmed[12],dm,3);
364 // Tpc SAndwich 5 - NOMEX honeycomb
369 gMC->Gsvolu("TSA5","TUBE",idtmed[6],dm,3);
371 // 5->4->3->2->1->TCOV
374 gMC->Gspos("TSA5",1,"TSA4",0.,0.,0.,0,"ONLY");
375 gMC->Gspos("TSA4",1,"TSA3",0.,0.,0.,0,"ONLY");
376 gMC->Gspos("TSA3",1,"TSA2",0.,0.,0.,0,"ONLY");
377 gMC->Gspos("TSA2",1,"TSA1",0.,0.,0.,0,"ONLY");
379 gMC->Gspos("TSA1",1,"TOCV",0.,0.,3.,0,"ONLY");
383 gMC->Gspos("TOCV",1,"TOIN",0.,0.,0.,0,"ONLY");
385 //-------------------------------------------------------
386 // Tpc Outer Field Cage
387 // mother volume - Al, daughters - composite (sandwich)
388 //-------------------------------------------------------
430 gMC->Gsvolu("TOFC","PCON",idtmed[4],dm,21);
434 // Tpc SAndwich 6 - Tedlar
440 gMC->Gsvolu("TSA6","TUBE",idtmed[9],dm,3);
442 // Tpc SAndwich 7 - fiber glass
447 gMC->Gsvolu("TSA7","TUBE",idtmed[12],dm,3);
450 // Tpc SAndwich 8 - NOMEX
455 gMC->Gsvolu("TSA8","TUBE",idtmed[6],dm,3);
459 gMC->Gspos("TSA8",1,"TSA7",0.,0.,0.,0,"ONLY");
460 gMC->Gspos("TSA7",1,"TSA6",0.,0.,0.,0,"ONLY");
461 gMC->Gspos("TSA6",1,"TOFC",0.,0.,0.,0,"ONLY");
465 gMC->Gspos("TOFC",1,"TOIN",0.,0.,0.,0,"ONLY");
469 gMC->Gspos("TOIN",1,"TPC ",0.,0.,0.,0,"ONLY");
473 //--------------------------------------------------------------------
474 // Tpc Inner INsulator (CO2) - inner f.c. will be placed there
475 // Inner containment vessel will be placed directly in the TPC
476 //--------------------------------------------------------------------
506 gMC->Gsvolu("TIIN","PCON",idtmed[3],dm,15);
508 // the middle part of the F.C. is thinner - carve out the strip - Ne-CO2
514 gMC->Gsvolu("TII1","TUBE",idtmed[1],dm,3);
516 gMC->Gspos("TII1",1,"TIIN",0.,0.,0.,0,"ONLY");
518 //-----------------------------------------------------
519 // Tpc Inner Field Cage
520 // mother volume - Al, daughters - composite (sandwich)
521 //------------------------------------------------------
587 gMC->Gsvolu("TIFC","PCON",idtmed[4],dm,33);
589 // daughter volumes - central part
591 // Tpc Sandwich 9 -Tedlar
597 gMC->Gsvolu("TSA9","TUBE",idtmed[9],dm,3);
599 // Tpc Sandwich 10 - fiber glass (G10)
604 gMC->Gsvolu("TS10","TUBE",idtmed[12],dm,3);
606 // Tpc Sandwich 11 - NOMEX
611 gMC->Gsvolu("TS11","TUBE",idtmed[6],dm,3);
615 gMC->Gspos("TS11",1,"TS10",0.,0.,0.,0,"ONLY");
616 gMC->Gspos("TS10",1,"TSA9",0.,0.,0.,0,"ONLY");
618 gMC->Gspos("TSA9",1,"TIFC",0.,0.,0.,0,"ONLY");
620 // daughter volumes - outer parts (reinforced)
622 // Tpc Sandwich 12 -Tedlar
628 gMC->Gsvolu("TS12","TUBE",idtmed[9],dm,3);
630 // Tpc Sandwich 13 - fiber glass (G10)
635 gMC->Gsvolu("TS13","TUBE",idtmed[12],dm,3);
637 // Tpc Sandwich 14 - NOMEX
642 gMC->Gsvolu("TS14","TUBE",idtmed[6],dm,3);
646 gMC->Gspos("TS14",1,"TS13",0.,0.,0.,0,"ONLY");
647 gMC->Gspos("TS13",1,"TS12",0.,0.,0.,0,"ONLY");
649 gMC->Gspos("TS12",1,"TIFC",0.,0.,170.05,0,"ONLY");
650 gMC->Gspos("TS12",2,"TIFC",0.,0.,-170.05,0,"ONLY");
652 // place this inside the inner insulator
654 gMC->Gspos("TIFC",1,"TIIN",0.,0.,0.,0,"ONLY");
656 // and now in the TPC...
658 gMC->Gspos("TIIN",1,"TPC ",0.,0.,0.,0,"ONLY");
660 //---------------------------------------------------------
661 // Tpc Inner Containment vessel - Cones
662 //---------------------------------------------------------
716 gMC->Gsvolu("TICC","PCON",idtmed[4],dm,27);
718 Float_t phi1,phi2,phi3,theta1,theta2,theta3; // rotation angles
729 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
731 gMC->Gspos("TICC",1,"TPC ",0.,0.,0.,0,"ONLY");
732 gMC->Gspos("TICC",2,"TPC ",0.,0.,0.,idrotm[nRotMat],"ONLY");
735 //---------------------------------------------------------
736 // Tpc Inner Containment vessel - Middle part -Al
737 //---------------------------------------------------------
779 gMC->Gsvolu("TICM","PCON",idtmed[4],dm,21);
781 // Tpc Sandwich 15 - Al
787 gMC->Gsvolu("TS15","TUBE",idtmed[4],dm,3);
789 // Tpc Sandwich 16 - epoxy glue
794 gMC->Gsvolu("TS16","TUBE",idtmed[14],dm,3);
796 // Tpc Sandwich 17 - Tedlar
801 gMC->Gsvolu("TS17","TUBE",idtmed[9],dm,3);
803 // Tpc Sandwich 18 - fiber glass
808 gMC->Gsvolu("TS18","TUBE",idtmed[12],dm,3);
810 // Tpc Sandwich 19 - Nomex
815 gMC->Gsvolu("TS19","TUBE",idtmed[12],dm,3);
817 // 19->18->17->16->15-> TICM
819 gMC->Gspos("TS19",1,"TS18",0.,0.,0.,0,"ONLY");
820 gMC->Gspos("TS18",1,"TS17",0.,0.,0.,0,"ONLY");
821 gMC->Gspos("TS17",1,"TS16",0.,0.,0.,0,"ONLY");
822 gMC->Gspos("TS16",1,"TS15",0.,0.,0.,0,"ONLY");
824 gMC->Gspos("TS15",1,"TICM ",0.,0.,0.,0,"ONLY");
827 // TPc inner cont. vessel Joints
833 gMC->Gsvolu("TPJ1","TUBE",idtmed[4],dm,3);
835 gMC->Gspos("TPJ1",1,"TPC ",0.,0.,72.3,0,"ONLY");
836 gMC->Gspos("TPJ1",2,"TPC ",0.,0.,-72.3,0,"ONLY");
868 gMC->Gsvolu("TPJ2","PCON",idtmed[4],dm,15);
870 gMC->Gspos("TPJ2",1,"TPC ",0.,0.,0.,0,"ONLY");
871 gMC->Gspos("TPJ2",2,"TPC ",0.,0.,0.,idrotm[nRotMat],"ONLY");
875 // Tpc Inner Containment vessel Seal (Viton, I use Lexan for a time being)
881 gMC->Gsvolu("TICS","TUBE",idtmed[14],dm,3);
883 gMC->Gspos("TICS",1,"TPC ",0.,0.,71.7,0,"ONLY");
884 gMC->Gspos("TICS",2,"TPC ",0.,0.,-71.7,0,"ONLY");
888 gMC->Gspos("TICM",1,"TPC ",0.,0.,0.,0,"ONLY");
892 nRotMat++; // prepare for the next rotation matrix
894 //---------------------------------------------------------
895 // Tpc Dift Gas volume Nonsensitive (Ne-CO2 90/10)
896 // and its daughters (HV membrane, rods, readout chambers)
897 //---------------------------------------------------------
903 gMC->Gsvolu("TDGN","TUBE",idtmed[1],dm,3);
905 // sector opening angles
907 Float_t innerOpenAngle = fTPCParam->GetInnerAngle();
908 Float_t outerOpenAngle = fTPCParam->GetOuterAngle();
910 // sector angle shift
912 Float_t innerAngleShift = fTPCParam->GetInnerAngleShift();
916 Int_t nInnerSector = fTPCParam->GetNInnerSector()/2;
917 Int_t nOuterSector = fTPCParam->GetNOuterSector()/2;
919 // All above parameters are identical for inner and outer
920 // sectors. The distinction is kept for the historical reasons
921 // and eventually will disappear.
923 Float_t tanAlpha = TMath::Tan(0.5*innerOpenAngle);
924 Float_t cosAlpha = TMath::Sqrt(1.+tanAlpha*tanAlpha);
927 //-------------------------------------------------------------------------
928 // Tpc Inner Readout Chambers
929 //-------------------------------------------------------------------------
933 dm[2]= 1.6; // thickness
936 gMC->Gsvolu("TIRC","TRD1",idtmed[4],dm,4);
938 // this volume will be positioned in the empty space
939 // of the end-cap to avoid overlaps
946 gMC->Gsvolu("TIC1","TRD1",idtmed[4],dm,4);
949 //------------------------------------------------
950 // Tpc Inner readout chamber Pad Plane
951 //------------------------------------------------
958 gMC->Gsvolu("TIPP","TRD1",idtmed[12],dm,4);
962 dm[0] -= 1.218511934;
963 dm[1] -= 1.218511934;
966 gMC->Gsvolu("TIC3","TRD1",idtmed[1],dm,4);
968 gMC->Gspos("TIC3",1,"TIPP",0.,0.15,0.,0,"ONLY");
970 gMC->Gspos("TIPP",1,"TIRC",0.,1.1,0.,0,"ONLY");
973 //----------------------------------------------
974 // Tpc Readout Chambers Empty spaces - for both
975 // inner and outer sectors
976 //----------------------------------------------
978 gMC->Gsvolu("TRCE","TRD1",idtmed[0],dm,0);
980 // Inner sector - 4 spaces
991 space = rr*tanAlpha-dm[0];
993 for(Int_t nsLow=0;nsLow<4;nsLow++){
996 dm[1]= rr*tanAlpha - space;
1000 gMC->Gsposp("TRCE",nsLow+1,"TIRC",0.,-0.8,zz,0,"ONLY",dm,4);
1006 gMC->Gsposp("TRCE",nsLow+5,"TIC1",0.,1.05,zz-2.1,0,"ONLY",dm,4);
1009 dm[0] = rr*tanAlpha - space;
1015 // dm[1] - this is the dm[1] from the previous TRCE
1019 gMC->Gsposp("TRCE",9,"TIC1",0.,-1.2,0.,0,"ONLY",dm,4);
1022 // TPc Space for Connectors
1029 gMC->Gsvolu("TPSC","BOX ",idtmed[0],dm,3);
1037 gMC->Gsvolu("TPCC","BOX ",idtmed[13],dm,3);
1039 gMC->Gspos("TPCC",1,"TPSC",0.,0.15,0.,0,"ONLY");
1047 // inner part of the inner sector - 2 x 20 holes
1049 astep = 20.00096874/19.;
1051 alpha = 10.00048437-astep;
1063 for(ncon=0;ncon<20;ncon++){
1069 phi3 = (alpha>0) ? 0. : 180.;
1070 theta3 = TMath::Abs(alpha);
1072 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1076 gMC->Gspos("TPSC",ncon+1,"TIRC",x1,0.3,-12.7875,idrotm[nRotMat],"ONLY");
1077 gMC->Gspos("TPSC",ncon+21,"TIRC",x2,0.3,-2.8625,idrotm[nRotMat],"ONLY");
1088 // outer part of the inner sector - 2 x 25 holes
1090 astep = 20.00096874/24.;
1091 alpha = 10.00048437-astep;
1099 for(ncon=0;ncon<25;ncon++){
1105 phi3 = (alpha>0) ? 0. : 180.;
1106 theta3 = TMath::Abs(alpha);
1108 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1112 gMC->Gspos("TPSC",ncon+41,"TIRC",x1,0.3,7.0625,idrotm[nRotMat],"ONLY");
1113 gMC->Gspos("TPSC",ncon+66,"TIRC",x2,0.3,16.9875,idrotm[nRotMat],"ONLY");
1124 //--------------------------------------------------------------------------
1125 // TPC Outer Readout Chambers
1126 // this is NOT a final design
1127 //--------------------------------------------------------------------------
1131 dm[2]= 1.5; //thickness
1134 gMC->Gsvolu("TORC","TRD1",idtmed[4],dm,4);
1136 //------------------------------------------------
1137 // Tpc Outer readout chamber Pad Plane
1138 //------------------------------------------------
1142 gMC->Gsvolu("TOPP","TRD1",idtmed[12],dm,4);
1144 dm[0] -= 1.218511934;
1145 dm[1] -= 1.218511934;
1148 gMC->Gsvolu("TOC3","TRD1",idtmed[1],dm,4);
1150 gMC->Gspos("TOC3",1,"TOPP",0.,0.15,0.,0,"ONLY");
1152 gMC->Gspos("TOPP",1,"TORC",0.,1.0,0.,0,"ONLY");
1161 gMC->Gsposp("TRCE",10,"TORC",0.,-0.8,-2.15,0,"ONLY",dm,4);
1168 gMC->Gsvolu("TOC1","TRD1",idtmed[4],dm,4);
1175 gMC->Gsposp("TRCE",11,"TOC1",0.,0.,0.,0,"ONLY",dm,4);
1177 //-----------------------------------------------
1178 // Tpc Services Support Wheel
1179 //-----------------------------------------------
1194 gMC->Gsvolu("TSSW","PGON",idtmed[4],dm,10);
1196 // Tpc Services Wheel Cover
1201 gMC->Gsvolu("TSWC","PGON",idtmed[4],dm,10);
1203 // Tpc Service wheel Cover Empty space
1210 gMC->Gsvolu("TSCE","TRD1",idtmed[0],dm,4);
1212 // Tpc services Wheel Empty Spaces
1219 gMC->Gsvolu("TWES","TRD1",idtmed[0],dm,4);
1221 // Tpc Services Wheel Bars
1223 gMC->Gsvolu("TSWB","TRD1",idtmed[4],dm,0);
1233 gMC->Gsposp("TSWB",1,"TWES",0.,0.,-85.125,0,"ONLY",dm,4);
1238 gMC->Gsposp("TSWB",2,"TWES",0.,0.,85.125,0,"ONLY",dm,4);
1240 // TPc ELectronics - right now 30% X0 Si
1247 gMC->Gsvolu("TPEL","TRD1",idtmed[11],dm,4);
1248 gMC->Gspos("TPEL",1,"TWES",0.,0.,0.,0,"ONLY");
1250 //--------------------------------------------------------------------------
1252 //--------------------------------------------------------------------------
1254 // TPc Main Wheel - Al
1260 gMC->Gsvolu("TPMW","TUBE",idtmed[4],dm,3);
1262 //--------------------------------------------------------------------------
1263 // Tpc Empty Space for the Readout chambers
1264 //--------------------------------------------------------------------------
1268 Float_t dR = 0.5*(rUp-rLow);
1270 space= 1.5/cosAlpha; // wheel ribs are 3.0 cm wide
1272 dm[0]= rLow*tanAlpha-space;
1273 dm[1]= rUp*tanAlpha-space;
1277 gMC->Gsvolu("TESR","TRD1",idtmed[0],dm,4);
1281 gMC->Gspos("TIC1",1,"TESR",0.,0.75,-dR+23.97,0,"ONLY");
1285 gMC->Gspos("TOC1",1,"TESR",0.,0.75,dR-55.02,0,"ONLY");
1287 // Tpc Empty Space Bars - Al (daughters of TESR)
1291 gMC->Gsvolu("TESB","TRD1",idtmed[4],dm,0);
1295 dm[0]= rLow*tanAlpha-space;
1296 dm[1]= 88.7*tanAlpha-space;
1302 gMC->Gsposp("TESB",1,"TESR",0.,0.75,zBar,0,"ONLY",dm,4);
1306 dm[0]= 131.65*tanAlpha-space;
1307 dm[1]= 136.5*tanAlpha-space;
1310 zBar = -dR +131.65+dm[3]-rLow;
1312 gMC->Gsposp("TESB",2,"TESR",0.,0.75,zBar,0,"ONLY",dm,4);
1316 dm[0]= 240.4*tanAlpha-space;
1317 dm[1]= rUp*tanAlpha-space;
1322 gMC->Gsposp("TESB",3,"TESR",0.,0.75,zBar,0,"ONLY",dm,4);
1325 //------------------------------------------------------
1326 // TPc Lower "S" Sectors
1327 //------------------------------------------------------
1332 Float_t inSecLowEdge = fTPCParam->GetInnerRadiusLow();
1333 Float_t inSecUpEdge = fTPCParam->GetInnerRadiusUp();
1335 dm[0] = inSecLowEdge*TMath::Tan(0.5*innerOpenAngle)-0.01;
1336 dm[1] = inSecUpEdge*TMath::Tan(0.5*innerOpenAngle)-0.01;
1337 dm[2] = 0.5*(250. - 5.e-3);
1338 dm[3] = 0.5*(inSecUpEdge-inSecLowEdge);
1340 gMC->Gsvolu("TPLS", "TRD1", idtmed[1], dm, 4); // nonsensitive
1342 //----------------------------------------------------------
1343 // TPc Upper Sectors
1344 //----------------------------------------------------------
1346 Float_t ouSecLowEdge = fTPCParam->GetOuterRadiusLow();
1347 Float_t ouSecUpEdge = fTPCParam->GetOuterRadiusUp();
1349 dm[0] = ouSecLowEdge*TMath::Tan(0.5*outerOpenAngle)-0.01;
1350 dm[1] = ouSecUpEdge*TMath::Tan(0.5*outerOpenAngle)-0.01;
1351 dm[2] = 0.5*(250. - 5.e-3);
1352 dm[3] = 0.5*(ouSecUpEdge-ouSecLowEdge);
1354 gMC->Gsvolu("TPUS", "TRD1", idtmed[1], dm, 4); // nonsensitive
1356 //--------------------------------------------------------
1357 // TPc Sensitive Strips, the same for S and L sectors
1358 //--------------------------------------------------------
1360 gMC->Gsvolu("TPSS","TRD1",idtmed[2],dm,0); // sensitive
1362 Int_t nofStrips,nstr;
1364 Float_t stripThick = 0.01; // 100 microns
1368 nofStrips = fTPCParam->GetNRowLow();
1369 deadSpace = fTPCParam->GetInnerWireMount();
1371 dm[2] = 0.5*(250. - 5.e-3);
1372 dm[3] = 0.5 * stripThick;
1374 for(nstr=0;nstr<nofStrips;nstr++){
1376 r1 = fTPCParam->GetPadRowRadiiLow(nstr);
1377 r2 = r1 + stripThick;
1378 dm[0] = r1 * TMath::Tan(0.5*innerOpenAngle) - deadSpace;
1379 dm[1] = r2 * TMath::Tan(0.5*innerOpenAngle) - deadSpace;
1380 zs = -inSecLowEdge -0.5*(inSecUpEdge-inSecLowEdge);
1384 gMC->Gsposp("TPSS", nstr+1, "TPLS", 0., 0., zs, 0, "ONLY", dm, 4);
1388 Int_t nsSave = nofStrips;
1392 nofStrips = fTPCParam->GetNRowUp();
1393 deadSpace = fTPCParam->GetOuterWireMount();
1395 dm[2] = 0.5*(250. - 5.e-3);
1396 dm[3] = 0.5 * stripThick;
1398 for(nstr=0;nstr<nofStrips;nstr++){
1400 r1 = fTPCParam->GetPadRowRadiiUp(nstr);
1401 r2 = r1 + stripThick;
1402 dm[0] = r1 * TMath::Tan(0.5*outerOpenAngle) - deadSpace;
1403 dm[1] = r2 * TMath::Tan(0.5*outerOpenAngle) - deadSpace;
1404 zs = -ouSecLowEdge -0.5*(ouSecUpEdge-ouSecLowEdge);
1408 gMC->Gsposp("TPSS", nstr+1+nsSave, "TPUS", 0., 0., zs, 0, "ONLY", dm, 4);
1412 //-------------------------------------------------------
1413 // positioning of the empty spaces into the main wheel
1414 // and readout chambers and sectors into the drift gas
1415 //-------------------------------------------------------
1418 Float_t rCenter,xc,yc;
1419 Float_t rInner,rOuter; // center of the inner and outer chamber
1427 for(Int_t ns=0; ns<nInnerSector;ns++){
1429 phi1 = ns * innerOpenAngle + innerAngleShift;
1430 phi1 *= kRaddeg; // in degrees
1432 phi1 = (Float_t)TMath::Nint(phi1) + 270.;
1434 if (phi1 > 360.) phi1 -= 360.;
1439 phi3 = ns * innerOpenAngle + innerAngleShift;
1440 phi3 *= kRaddeg; // in degrees
1442 phi3 = (Float_t)TMath::Nint(phi3);
1444 if(phi3 > 360.) phi3 -= 360.;
1448 // "holes"->End plate
1450 xc = rCenter*TMath::Cos(phi3*kDegrad);
1451 yc = rCenter*TMath::Sin(phi3*kDegrad);
1453 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1455 gMC->Gspos("TESR",ns+1,"TPMW",xc,yc,0.,idrotm[nRotMat],"ONLY");
1457 // TSCE->TSWC (services wheel volumes)
1459 xc = 166.142*TMath::Cos(phi3*kDegrad);
1460 yc = 166.142*TMath::Sin(phi3*kDegrad);
1462 gMC->Gspos("TSCE",ns+1,"TSWC",xc,yc,0.,idrotm[nRotMat],"ONLY");
1463 gMC->Gspos("TWES",ns+1,"TSSW",xc,yc,0.,idrotm[nRotMat],"ONLY");
1466 // readout chambers->TDGN (drift gas)
1468 xc = rInner*TMath::Cos(phi3*kDegrad);
1469 yc = rInner*TMath::Sin(phi3*kDegrad);
1471 gMC->Gspos("TIRC",ns+1,"TDGN",xc,yc,252.,idrotm[nRotMat],"ONLY");
1473 // here lower sectors
1475 gMC->Gspos("TPLS",ns+1,"TDGN",xc,yc,125.0025,idrotm[nRotMat],"ONLY");
1476 gMC->Gspos("TPLS",ns+nInnerSector+1,"TDGN",xc,yc,-125.0025,idrotm[nRotMat],"ONLY");
1480 xc = rOuter*TMath::Cos(phi3*kDegrad);
1481 yc = rOuter*TMath::Sin(phi3*kDegrad);
1483 gMC->Gspos("TORC",ns+1,"TDGN",xc,yc,252.1,idrotm[nRotMat],"ONLY");
1485 // here upper sectors
1487 gMC->Gspos("TPUS",ns+1,"TDGN",xc,yc,125.0025,idrotm[nRotMat],"ONLY");
1488 gMC->Gspos("TPUS",ns+nOuterSector+1,"TDGN",xc,yc,-125.0025,idrotm[nRotMat],"ONLY");
1493 theta2 = 0.; // reflection
1495 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1497 xc = rInner*TMath::Cos(phi3*kDegrad);
1498 yc = rInner*TMath::Sin(phi3*kDegrad);
1500 gMC->Gspos("TIRC",ns+nInnerSector+1,"TDGN",xc,yc,-252.,idrotm[nRotMat],"ONLY");
1502 xc = rOuter*TMath::Cos(phi3*kDegrad);
1503 yc = rOuter*TMath::Sin(phi3*kDegrad);
1505 gMC->Gspos("TORC",ns+nOuterSector+1,"TDGN",xc,yc,-252.1,idrotm[nRotMat],"ONLY");
1512 gMC->Gspos("TPMW",1,"TPC ",0.,0.,256.6,0,"ONLY");
1513 gMC->Gspos("TPMW",2,"TPC ",0.,0.,-256.6,idrotm[0],"ONLY");
1515 //---------------------------------------------------------
1516 // Tpc High Voltage Membrane - 100 microns of mylar
1517 //---------------------------------------------------------
1523 gMC->Gsvolu("THVM","TUBE",idtmed[8],dm,3);
1525 gMC->Gspos("THVM",1,"TDGN",0.,0.,0.,0,"ONLY");
1527 // Tpc High Voltage membrane Holders
1529 gMC->Gsvolu("THVH","TUBE",idtmed[4],dm,0);
1539 gMC->Gsposp("THVH",1,"TDGN",0.,0.,0.,0,"ONLY",dm,3);
1547 gMC->Gsposp("THVH",2,"TDGN",0.,0.,0.,0,"ONLY",dm,3);
1549 //----------------------------------------------------------
1550 // TPc Support Rods - MAKROLON
1551 //----------------------------------------------------------
1556 gMC->Gsvolu("TPSR","TUBE",idtmed[7],dm,0); // inner and outer rods differ
1559 for(Int_t nrod=0;nrod<18;nrod++){
1560 Float_t angle=innerOpenAngle*(Float_t)nrod;
1562 xc=81.5*TMath::Cos(angle);
1563 yc=81.5*TMath::Sin(angle);
1567 gMC->Gsposp("TPSR",nrod+1,"TDGN",xc,yc,126.9,0,"ONLY",dm,3);
1568 gMC->Gsposp("TPSR",nrod+19,"TDGN",xc,yc,-126.9,0,"ONLY",dm,3);
1572 xc=254.25*TMath::Cos(angle);
1573 yc=254.25*TMath::Sin(angle);
1575 // rod number 54 contans the HV cable
1578 gMC->Gsposp("TPSR",nrod+37,"TDGN",xc,yc,127.,0,"ONLY",dm,3);
1579 gMC->Gsposp("TPSR",nrod+54,"TDGN",xc,yc,-127.,0,"ONLY",dm,3);
1584 //----------------------------------------------------------
1585 // Tpc High Voltage Rod - MAKROLON + Copper cable
1586 //----------------------------------------------------------
1588 // rod with cable (Left)
1594 gMC->Gsvolu("THVL","TUBE",idtmed[7],dm,3);
1602 gMC->Gsvolu("THVC","TUBE",idtmed[10],dm,3);
1610 gMC->Gsvolu("THVE","TUBE",idtmed[1],dm,3);
1612 gMC->Gspos("THVC",1,"THVL",0.,0.,0.,0,"ONLY");
1613 gMC->Gspos("THVE",1,"THVL",0.,0.,0.,0,"ONLY");
1615 // rod without cable
1621 gMC->Gsvolu("THVR","TUBE",idtmed[7],dm,3);
1623 gMC->Gspos("THVL",1,"TDGN",xc,yc,-127.,0,"ONLY");
1624 gMC->Gspos("THVR",1,"TDGN",xc,yc,127.,0,"ONLY");
1626 gMC->Gspos("TDGN",1,"TPC ",0.,0.,0.,0,"ONLY");
1628 // services wheel cover -> wheel
1631 gMC->Gspos("TSWC",1,"TSSW",0.,0.,4.5,0,"ONLY");
1632 gMC->Gspos("TSWC",2,"TSSW",0.,0.,-4.5,0,"ONLY");
1635 // put the wheel into the TPC
1637 gMC->Gspos("TSSW",1,"TPC ",0.,0.,278.7,0,"ONLY");
1638 gMC->Gspos("TSSW",2,"TPC ",0.,0.,-278.7,0,"ONLY");
1642 gMC->Gsord("TPMW",6);
1643 gMC->Gsord("TSSW",6);
1644 gMC->Gsord("TSWC",6);
1645 gMC->Gsord("TPLS",3);
1646 gMC->Gsord("TPUS",3);
1647 gMC->Gsord("TDGN",6);
1650 // put the TPC into ALIC (main mother volume)
1652 gMC->Gspos("TPC ",1,"ALIC",0.,0.,0.,0,"ONLY");
1656 } // end of function
1658 //_____________________________________________________________________________
1659 void AliTPCv1::DrawDetector()
1662 // Draw a shaded view of the Time Projection Chamber version 1
1665 // Set everything unseen
1666 gMC->Gsatt("*", "seen", -1);
1668 // Set ALIC mother transparent
1669 gMC->Gsatt("ALIC","SEEN",0);
1671 // Set the volumes visible
1672 gMC->Gsatt("TPC ","SEEN",0);
1673 gMC->Gsatt("TOIN","SEEN",1);
1674 gMC->Gsatt("TOIN","COLO",7);
1675 gMC->Gsatt("TOCV","SEEN",1);
1676 gMC->Gsatt("TOCV","COLO",4);
1677 gMC->Gsatt("TSA1","SEEN",0);
1678 gMC->Gsatt("TSA2","SEEN",0);
1679 gMC->Gsatt("TSA3","SEEN",0);
1680 gMC->Gsatt("TSA4","SEEN",0);
1681 gMC->Gsatt("TSA5","SEEN",0);
1682 gMC->Gsatt("TOFC","SEEN",1);
1683 gMC->Gsatt("TOFC","COLO",4);
1684 gMC->Gsatt("TSA6","SEEN",0);
1685 gMC->Gsatt("TSA7","SEEN",0);
1686 gMC->Gsatt("TSA8","SEEN",0);
1687 gMC->Gsatt("TIIN","SEEN",1);
1688 gMC->Gsatt("TIIN","COLO",7);
1689 gMC->Gsatt("TII1","SEEN",0);
1690 gMC->Gsatt("TIFC","SEEN",1);
1691 gMC->Gsatt("TIFC","COLO",4);
1692 gMC->Gsatt("TSA9","SEEN",0);
1693 gMC->Gsatt("TS10","SEEN",0);
1694 gMC->Gsatt("TS11","SEEN",0);
1695 gMC->Gsatt("TS12","SEEN",0);
1696 gMC->Gsatt("TS13","SEEN",0);
1697 gMC->Gsatt("TS14","SEEN",0);
1698 gMC->Gsatt("TICC","SEEN",0);
1699 gMC->Gsatt("TICM","SEEN",0);
1700 gMC->Gsatt("TS15","SEEN",0);
1701 gMC->Gsatt("TS16","SEEN",0);
1702 gMC->Gsatt("TS17","SEEN",0);
1703 gMC->Gsatt("TS18","SEEN",0);
1704 gMC->Gsatt("TS19","SEEN",0);
1705 gMC->Gsatt("TPJ1","SEEN",0);
1706 gMC->Gsatt("TPJ2","SEEN",0);
1707 gMC->Gsatt("TICS","SEEN",0);
1708 gMC->Gsatt("TDGN","SEEN",0);
1709 gMC->Gsatt("TIRC","SEEN",0);
1710 gMC->Gsatt("TIC1","SEEN",1);
1711 gMC->Gsatt("TIPP","SEEN",0);
1712 gMC->Gsatt("TIC3","SEEN",0);
1713 gMC->Gsatt("TRCE","SEEN",0);
1714 gMC->Gsatt("TPSC","SEEN",0);
1715 gMC->Gsatt("TPCC","SEEN",0);
1716 gMC->Gsatt("TORC","SEEN",0);
1717 gMC->Gsatt("TOPP","SEEN",0);
1718 gMC->Gsatt("TOC3","SEEN",0);
1719 gMC->Gsatt("TOC1","SEEN",1);
1720 gMC->Gsatt("TSSW","SEEN",1);
1721 gMC->Gsatt("TSWC","SEEN",1);
1722 gMC->Gsatt("TSSW","COLO",3);
1723 gMC->Gsatt("TSWC","COLO",3);
1724 gMC->Gsatt("TSCE","COLO",6);
1725 gMC->Gsatt("TSCE","SEEN",1);
1726 gMC->Gsatt("TWES","SEEN",0);
1727 gMC->Gsatt("TSWB","SEEN",0);
1728 gMC->Gsatt("TPEL","SEEN",0);
1729 gMC->Gsatt("TPMW","SEEN",1);
1730 gMC->Gsatt("TESR","SEEN",1);
1731 gMC->Gsatt("TPMW","COLO",12);
1732 gMC->Gsatt("TIC1","COLO",5);
1733 gMC->Gsatt("TOC1","COLO",5);
1734 gMC->Gsatt("TESB","SEEN",0);
1735 gMC->Gsatt("THVM","SEEN",1);
1736 gMC->Gsatt("THVM","COLO",11);
1737 gMC->Gsatt("THVH","SEEN",0);
1738 gMC->Gsatt("TPSR","SEEN",0);
1739 gMC->Gsatt("THVL","SEEN",0);
1740 gMC->Gsatt("THVC","SEEN",0);
1741 gMC->Gsatt("THVE","SEEN",0);
1742 gMC->Gsatt("THVR","SEEN",0);
1743 gMC->Gsatt("TPSS","SEEN",0);
1744 gMC->Gsatt("TPUS","SEEN",0);
1745 gMC->Gsatt("TPLS","SEEN",0);
1748 gMC->Gdopt("hide", "on");
1749 gMC->Gdopt("shad", "on");
1750 gMC->Gsatt("*", "fill", 7);
1751 gMC->SetClipBox(".");
1752 gMC->SetClipBox("TPMW",-300,300,-300,300,254.,270.);
1753 gMC->SetClipBox("TESR",-300,300,-300,300,254.,270.);
1754 gMC->SetClipBox("TSSW",-300,300,-300,300,283.,284.);
1755 gMC->SetClipBox("TSWC",-300,300,-300,300,283.,284.);
1756 gMC->SetClipBox("*", 0, 300, -300, 300, -290, 290);
1757 gMC->DefaultRange();
1758 gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .025, .025);
1759 gMC->Gdhead(1111, "Time Projection Chamber");
1760 gMC->Gdman(18, 4, "MAN");
1761 gMC->Gdopt("hide","off");
1764 //_____________________________________________________________________________
1765 void AliTPCv1::CreateMaterials()
1768 // Define materials for Time Projection Chamber
1770 AliTPC::CreateMaterials();
1773 //_____________________________________________________________________________
1774 void AliTPCv1::Init()
1777 // Initialises TPC detector after it has been created
1780 fIdSens=gMC->VolId("TPSS"); // sensitive strip
1781 fIdLSec=gMC->VolId("TPLS"); // lower sector
1782 fIdUSec=gMC->VolId("TPUS"); // upper sector
1784 printf("TPC version 1 initialized\n");
1787 //_____________________________________________________________________________
1788 void AliTPCv1::StepManager()
1791 // Called at every step in the Time Projection Chamber
1799 if(gMC->TrackCharge() && gMC->IsTrackEntering()) {
1802 // Only charged tracks entering the sensitive volume
1805 id = gMC->CurrentVolID(copy);
1809 // sensitive volume (strip)
1811 vol[1]= copy-1; // row number (absolute)
1815 id = gMC->CurrentVolOffID(1,copy);
1821 vol[0] = copy-1; // sector number
1828 vol[0] = copy-1+fTPCParam->GetNInnerSector(); // sector number
1829 vol[1] -= fTPCParam->GetNRowLow(); // row number
1835 // because Jouri wants to have this
1837 gMC->TrackMomentum(p);
1841 hits[3]=0.; // this hit has no energy loss
1842 // new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
1844 AddHit(gAlice->CurrentTrack(), vol,hits); // M.I.
1846 gMC->TrackPosition(p);
1850 hits[3]=0.; // this hit has no energy loss
1851 // new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
1853 AddHit(gAlice->CurrentTrack(), vol,hits); // M.I.
1857 gMC->TrackPosition(p);
1858 for(i=0;i<3;++i) hits[i]=p[i];
1859 hits[3]=1; //I'd like to have something positive here (I.Belikov)
1860 // new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
1862 AddHit(gAlice->CurrentTrack(), vol,hits); // M.I.
1869 //_____________________________________________________________________________