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.22 2000/11/06 17:24:10 kowal2
19 Corrected bug in the outer containment vessel and
20 the outer field cage geometry.
23 Revision 1.21 2000/11/02 16:55:24 kowal2
24 Corrected bug in the inner containment vessel geometry.
27 Revision 1.20 2000/11/02 07:24:11 kowal2
28 Correction in the TPC geometry.
29 Changes due to the new hit structure.
31 Revision 1.19 2000/07/10 20:57:39 hristov
32 Update of TPC code and macros by M.Kowalski
34 Revision 1.18 2000/06/30 12:07:50 kowal2
35 Updated from the TPC-PreRelease branch
37 Revision 1.17.2.4 2000/06/26 07:39:42 kowal2
38 Changes to obey the coding rules
40 Revision 1.17.2.3 2000/06/25 08:38:41 kowal2
41 Splitted from AliTPCtracking
43 Revision 1.17.2.2 2000/06/16 12:58:13 kowal2
44 Changed parameter settings
46 Revision 1.17.2.1 2000/06/09 07:15:07 kowal2
48 Defaults loaded automatically (hard-wired)
49 Optional parameters can be set via macro called in the constructor
51 Revision 1.17 2000/05/15 10:00:30 kowal2
52 Corrected bug in the TPC geometry, thanks to Ivana Hrivnacova
54 Revision 1.16 2000/04/17 09:37:33 kowal2
55 removed obsolete AliTPCDigitsDisplay.C
57 Revision 1.15.8.2 2000/04/10 08:29:48 kowal2
59 Different pad geometry for different sectors
60 Updated readouch chambers geometry
62 Revision 1.15.8.1 2000/04/10 07:56:53 kowal2
63 Not used anymore - removed
65 Revision 1.15 1999/11/04 17:28:07 fca
66 Correct barrel part of HV Degrader
68 Revision 1.14 1999/10/08 06:27:23 fca
69 Corrected bug in the HV degrader geometry, thanks to G.Tabary
71 Revision 1.13 1999/10/04 13:39:54 fca
72 Correct array index problem
74 Revision 1.12 1999/09/29 09:24:34 fca
75 Introduction of the Copyright and cvs Log
80 ///////////////////////////////////////////////////////////////////////////////
82 // Time Projection Chamber version 1 -- detailed TPC and fast simulation //
86 <img src="picts/AliTPCv1Class.gif">
91 ///////////////////////////////////////////////////////////////////////////////
94 #include <TGeometry.h>
100 #include <iostream.h>
104 #include "AliConst.h"
106 #include "AliTPCParam.h"
107 #include "AliTPCParamSR.h"
108 #include "AliTPCDigitsArray.h"
109 #include <TInterpreter.h>
113 //_____________________________________________________________________________
115 AliTPCv1::AliTPCv1(){
121 //_____________________________________________________________________________
122 AliTPCv1::AliTPCv1(const char *name, const char *title)
123 :AliTPC(name, title) {
125 // Standard constructor for Time Projection Chamber
127 fIdSens=fIdLSec=fIdUSec=0;
129 SetGasMixt(2,20,10,-1,0.9,0.1,0.);
132 fTPCParam->Write(fTPCParam->GetTitle());
137 //_____________________________________________________________________________
138 void AliTPCv1::CreateGeometry()
140 //-------------------------------------------------------------
141 // Creates geometry for Time Projection Chamber version 1
142 // Detailed geometry -- Fast simulation - space points
143 // at the pad-rows centers
144 // Origin M.Kowalski, INP Cracow, Marek.Kowalski@ifj.edu.pl
145 //-----------------------------------------------------------
149 <img src="picts/AliTPC.gif">
154 <img src="picts/AliTPCv1Tree.gif">
159 Int_t *idtmed = fIdtmed->GetArray(); // TPC media
161 Int_t idrotm[120]; // rotation matrices
163 Int_t nRotMat = 0; // actual number of rotation matrices
167 // Mother volume (Air) - all volumes will be positioned in it
247 gMC->Gsvolu("TPC ","PCON",idtmed[0],dm,39);
250 //-------------------------------------------------------------------
251 // Tpc Outer INsulator (CO2)
252 //-------------------------------------------------------------------
291 gMC->Gsvolu("TOIN","PCON",idtmed[3],dm,21);
293 //---------------------------------------------------------------
294 // shreds (G10) - TPC Rings
295 //---------------------------------------------------------------
297 gMC->Gsvolu("TPCR","TUBE",idtmed[12],dm,0);
303 gMC->Gsposp("TPCR",1,"TOIN",0.,0.,-253.3,0,"ONLY",dm,3); // left bottom
311 gMC->Gsposp("TPCR",2,"TOIN",0.,0.,253.3,0,"ONLY",dm,3); // right
319 gMC->Gsposp("TPCR",3,"TOIN",0.,0.,-250.7,0,"ONLY",dm,3); // left top
321 //----------------------------------------------------------------
322 // Tpc Outer Contaiment Vessel
323 // mother volume - Al, daughters - composite (sandwich)
324 //----------------------------------------------------------------
365 gMC->Gsvolu("TOCV","PCON",idtmed[4],dm,21);
369 // Tpc SAndwich 1 - Al
375 gMC->Gsvolu("TSA1","TUBE",idtmed[4],dm,3);
377 // Tpc SAndwich 2 - Tedlar
382 gMC->Gsvolu("TSA2","TUBE",idtmed[9],dm,3);
384 // Tpc SAndwich 3 - Kevlar
389 gMC->Gsvolu("TSA3","TUBE",idtmed[5],dm,3);
391 // Tpc SAndwich 4 - NOMEX honeycomb
396 gMC->Gsvolu("TSA4","TUBE",idtmed[6],dm,3);
400 gMC->Gspos("TSA4",1,"TSA3",0.,0.,0.,0,"ONLY");
401 gMC->Gspos("TSA3",1,"TSA2",0.,0.,0.,0,"ONLY");
402 gMC->Gspos("TSA2",1,"TSA1",0.,0.,0.,0,"ONLY");
404 gMC->Gspos("TSA1",1,"TOCV",0.,0.,2.6,0,"ONLY");
408 gMC->Gspos("TOCV",1,"TOIN",0.,0.,0.,0,"ONLY");
410 //-------------------------------------------------------
411 // Tpc Outer Field Cage
412 // mother volume - Al, daughters - composite (sandwich)
413 //-------------------------------------------------------
453 gMC->Gsvolu("TOFC","PCON",idtmed[4],dm,21);
457 // Tpc SAndwich 5 - Tedlar
463 gMC->Gsvolu("TSA5","TUBE",idtmed[9],dm,3);
465 // Tpc SAndwich 6 - Kevlar
470 gMC->Gsvolu("TSA6","TUBE",idtmed[5],dm,3);
473 // Tpc SAndwich 7 - NOMEX
478 gMC->Gsvolu("TSA7","TUBE",idtmed[6],dm,3);
482 gMC->Gspos("TSA7",1,"TSA6",0.,0.,0.,0,"ONLY");
483 gMC->Gspos("TSA6",1,"TSA5",0.,0.,0.,0,"ONLY");
485 gMC->Gspos("TSA5",1,"TOFC",0.,0.,0.,0,"ONLY");
489 gMC->Gspos("TOFC",1,"TOIN",0.,0.,0.,0,"ONLY");
493 gMC->Gspos("TOIN",1,"TPC ",0.,0.,0.,0,"ONLY");
495 //--------------------------------------------------------------------
496 // Tpc Inner INsulator (CO2)
497 //--------------------------------------------------------------------
512 Float_t tanL = (66.2-59.0)/(255.6-73.3); // tangent of the left cone part
515 dm[7]= 59.0+ (253.6-73.3)*tanL;
596 gMC->Gsvolu("TIIN","PCON",idtmed[3],dm,48);
599 //--------------------------------------------------------------------
600 // Tpc Inner Containment vessel, Left part
601 // mother volume - Al, daughter - composite (sandwich)
602 //--------------------------------------------------------------------
616 Float_t cosL = 1./TMath::Sqrt(1.+tanL*tanL);
617 Float_t sandThick = 2.14; // cone composite thickness
623 dm[7]= 59.0 + (253.6-73.3)*tanL;
630 dm[11]= dm[7]+sandThick/cosL;
635 dm[13]= 59.0+(75.6-73.3)*tanL;
636 dm[14]= dm[13]+sandThick/cosL;
662 gMC->Gsvolu("TICL","PCON",idtmed[4],dm,27);
666 // Tpc SAndwich 9 - Al
675 dm[4]= 59.0+(254.3-73.3)*tanL;
676 dm[5]= dm[4]+sandThick/cosL;
681 dm[7]= 59.0+(78.3-73.3)*tanL;
682 dm[8]= dm[7]+sandThick/cosL;
686 gMC->Gsvolu("TSA9","PCON",idtmed[4],dm,9);
688 // Tpc SAndwich 10 - Tedlar
698 gMC->Gsvolu("TS10","PCON",idtmed[9],dm,9);
700 // Tpc SAndwich 11 - Kevlar
710 gMC->Gsvolu("TS11","PCON",idtmed[5],dm,9);
712 // Tpc SAndwich 12 - NOMEX
722 gMC->Gsvolu("TS12","PCON",idtmed[6],dm,9);
726 gMC->Gspos("TS12",1,"TS11",0.,0.,0.,0,"ONLY");
727 gMC->Gspos("TS11",1,"TS10",0.,0.,0.,0,"ONLY");
728 gMC->Gspos("TS10",1,"TSA9",0.,0.,0.,0,"ONLY");
732 gMC->Gspos("TSA9",1,"TICL",0.,0.,0.,0,"ONLY");
734 //--------------------------------------------------------------------
735 // Tpc Inner Containment vessel, Right part
736 // mother volume - Al, daughter - composite (sandwich)
737 //--------------------------------------------------------------------
763 Float_t tanR = (66.0-59.0)/(250.5-73.3); // to avoid accuracy problems
764 Float_t cosR = 1./TMath::Sqrt(1.+tanR*tanR); //as above
769 dm[13]= 59.0+(75.6-73.3)*tanR;
776 dm[17]= dm[16]+sandThick/cosR;
781 dm[19]= 59.0+(248.4-73.3)*tanR;
782 dm[20]= dm[19]+sandThick/cosR;
796 gMC->Gsvolu("TICR","PCON",idtmed[4],dm,27);
802 // Tpc SAndwich 13 - Al
811 dm[4]= 59.0+(78.3-73.3)*tanR;
812 dm[5]= dm[4]+sandThick/cosR;
817 dm[7]= 59.0+(249.1-73.3)*tanR;
818 dm[8]= dm[7]+sandThick/cosR;
822 gMC->Gsvolu("TS13","PCON",idtmed[4],dm,9);
824 // Tpc SAndwich 14 - Tedlar
834 gMC->Gsvolu("TS14","PCON",idtmed[9],dm,9);
836 // Tpc SAndwich 15 - Kevlar
846 gMC->Gsvolu("TS15","PCON",idtmed[5],dm,9);
848 // Tpc SAndwich 16 - NOMEX
858 gMC->Gsvolu("TS16","PCON",idtmed[6],dm,9);
862 gMC->Gspos("TS16",1,"TS15",0.,0.,0.,0,"ONLY");
863 gMC->Gspos("TS15",1,"TS14",0.,0.,0.,0,"ONLY");
864 gMC->Gspos("TS14",1,"TS13",0.,0.,0.,0,"ONLY");
868 gMC->Gspos("TS13",1,"TICR",0.,0.,0.,0,"ONLY");
870 //------------------------------------------------------
871 // Tpc Inner Field Cage
872 // mother volume - Al, daughters - composite (sandwich)
873 //------------------------------------------------------
915 gMC->Gsvolu("TIFC","PCON",idtmed[4],dm,21);
919 // Tpc Sandwich 17 - Tedlar
925 gMC->Gsvolu("TS17","TUBE",idtmed[9],dm,3);
927 // Tpc Sandwich 18 - Kevlar
932 gMC->Gsvolu("TS18","TUBE",idtmed[5],dm,3);
935 // Tpc Sandwich 19 - NOMEX
940 gMC->Gsvolu("TS19","TUBE",idtmed[6],dm,3);
944 gMC->Gspos("TS19",1,"TS18",0.,0.,0.,0,"ONLY");
945 gMC->Gspos("TS18",1,"TS17",0.,0.,0.,0,"ONLY");
949 gMC->Gspos("TS17",1,"TIFC",0.,0.,0.,0,"ONLY");
957 gMC->Gsposp("TPCR",4,"TIIN",0.,0.,-253.3,0,"ONLY",dm,3);
962 gMC->Gsposp("TPCR",5,"TIIN",0.,0.,250.7,0,"ONLY",dm,3);
967 gMC->Gsposp("TPCR",6,"TIIN",0.,0.,253.3,0,"ONLY",dm,3);
971 gMC->Gspos("TICL",1,"TIIN",0.,0.,0.,0,"ONLY");
975 gMC->Gspos("TICR",1,"TIIN",0.,0.,0.,0,"ONLY");
979 gMC->Gspos("TIFC",1,"TIIN",0.,0.,0.,0,"ONLY");
981 // Tpc Sandwich 21 - Al (central barrel)
987 gMC->Gsvolu("TS21","TUBE",idtmed[4],dm,3);
989 // Tpc Sandwich 22 - Tedlar (central barrel)
994 gMC->Gsvolu("TS22","TUBE",idtmed[9],dm,3);
996 // Tpc Sandwich 23 - Kevlar (central barrel)
1001 gMC->Gsvolu("TS23","TUBE",idtmed[5],dm,3);
1003 // Tpc Sandwich 24 - NOMEX (central barrel)
1008 gMC->Gsvolu("TS24","TUBE",idtmed[6],dm,3);
1012 gMC->Gspos("TS24",1,"TS23",0.,0.,0.,0,"ONLY");
1013 gMC->Gspos("TS23",1,"TS22",0.,0.,0.,0,"ONLY");
1014 gMC->Gspos("TS22",1,"TS21",0.,0.,0.,0,"ONLY");
1016 gMC->Gspos("TS21",1,"TIIN",0.,0.,0.,0,"ONLY");
1018 // put everything into the TPC
1020 gMC->Gspos("TIIN",1,"TPC ",0.,0.,0.,0,"ONLY");
1023 //---------------------------------------------------------
1024 // Tpc Dift Gas volume Nonsensitive (Ne-CO2 90/10)
1025 // and its daughters (HV membrane, rods, readout chambers)
1026 //---------------------------------------------------------
1032 gMC->Gsvolu("TDGN","TUBE",idtmed[1],dm,3);
1034 // sector opening angles
1036 Float_t innerOpenAngle = fTPCParam->GetInnerAngle();
1037 Float_t outerOpenAngle = fTPCParam->GetOuterAngle();
1039 // sector angle shift
1041 Float_t innerAngleShift = fTPCParam->GetInnerAngleShift();
1043 // number of sectors
1045 Int_t nInnerSector = fTPCParam->GetNInnerSector()/2;
1046 Int_t nOuterSector = fTPCParam->GetNOuterSector()/2;
1048 // All above parameters are identical for inner and outer
1049 // sectors. The distinction is kept for the historical reasons
1050 // and eventually will disappear.
1052 Float_t tanAlpha = TMath::Tan(0.5*innerOpenAngle);
1053 Float_t cosAlpha = TMath::Sqrt(1.+tanAlpha*tanAlpha);
1056 //-------------------------------------------------------------------------
1057 // Tpc Inner Readout Chambers
1058 //-------------------------------------------------------------------------
1062 dm[2]= 1.6; // thickness
1065 gMC->Gsvolu("TIRC","TRD1",idtmed[4],dm,4);
1067 // this volume will be positioned in the empty space
1068 // of the end-cap to avoid overlaps
1075 gMC->Gsvolu("TIC1","TRD1",idtmed[4],dm,4);
1078 //------------------------------------------------
1079 // Tpc Inner readout chamber Pad Plane
1080 //------------------------------------------------
1087 gMC->Gsvolu("TIPP","TRD1",idtmed[12],dm,4);
1091 dm[0] -= 1.218511934;
1092 dm[1] -= 1.218511934;
1095 gMC->Gsvolu("TIC3","TRD1",idtmed[1],dm,4);
1097 gMC->Gspos("TIC3",1,"TIPP",0.,0.15,0.,0,"ONLY");
1099 gMC->Gspos("TIPP",1,"TIRC",0.,1.1,0.,0,"ONLY");
1102 //----------------------------------------------
1103 // Tpc Readout Chambers Empty spaces - for both
1104 // inner and outer sectors
1105 //----------------------------------------------
1107 gMC->Gsvolu("TRCE","TRD1",idtmed[0],dm,0);
1109 // Inner sector - 4 spaces
1120 space = rr*tanAlpha-dm[0];
1122 for(Int_t nsLow=0;nsLow<4;nsLow++){
1125 dm[1]= rr*tanAlpha - space;
1129 gMC->Gsposp("TRCE",nsLow+1,"TIRC",0.,-0.8,zz,0,"ONLY",dm,4);
1135 gMC->Gsposp("TRCE",nsLow+5,"TIC1",0.,1.05,zz-2.1,0,"ONLY",dm,4);
1138 dm[0] = rr*tanAlpha - space;
1144 // dm[1] - this is the dm[1] from the previous TRCE
1148 gMC->Gsposp("TRCE",9,"TIC1",0.,-1.2,0.,0,"ONLY",dm,4);
1151 // TPc Space for Connectors
1158 gMC->Gsvolu("TPSC","BOX ",idtmed[0],dm,3);
1166 gMC->Gsvolu("TPCC","BOX ",idtmed[13],dm,3);
1168 gMC->Gspos("TPCC",1,"TPSC",0.,0.15,0.,0,"ONLY");
1176 Float_t phi1,phi2,phi3,theta1,theta2,theta3; // rotation angles
1178 // inner part of the inner sector - 2 x 20 holes
1180 astep = 20.00096874/19.;
1182 alpha = 10.00048437-astep;
1194 for(ncon=0;ncon<20;ncon++){
1200 phi3 = (alpha>0) ? 0. : 180.;
1201 theta3 = TMath::Abs(alpha);
1203 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1207 gMC->Gspos("TPSC",ncon+1,"TIRC",x1,0.3,-12.7875,idrotm[nRotMat],"ONLY");
1208 gMC->Gspos("TPSC",ncon+21,"TIRC",x2,0.3,-2.8625,idrotm[nRotMat],"ONLY");
1219 // outer part of the inner sector - 2 x 25 holes
1221 astep = 20.00096874/24.;
1222 alpha = 10.00048437-astep;
1230 for(ncon=0;ncon<25;ncon++){
1236 phi3 = (alpha>0) ? 0. : 180.;
1237 theta3 = TMath::Abs(alpha);
1239 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1243 gMC->Gspos("TPSC",ncon+41,"TIRC",x1,0.3,7.0625,idrotm[nRotMat],"ONLY");
1244 gMC->Gspos("TPSC",ncon+66,"TIRC",x2,0.3,16.9875,idrotm[nRotMat],"ONLY");
1255 //--------------------------------------------------------------------------
1256 // TPC Outer Readout Chambers
1257 // this is NOT a final design
1258 //--------------------------------------------------------------------------
1262 dm[2]= 1.5; //thickness
1265 gMC->Gsvolu("TORC","TRD1",idtmed[4],dm,4);
1267 //------------------------------------------------
1268 // Tpc Outer readout chamber Pad Plane
1269 //------------------------------------------------
1273 gMC->Gsvolu("TOPP","TRD1",idtmed[12],dm,4);
1275 dm[0] -= 1.218511934;
1276 dm[1] -= 1.218511934;
1279 gMC->Gsvolu("TOC3","TRD1",idtmed[1],dm,4);
1281 gMC->Gspos("TOC3",1,"TOPP",0.,0.15,0.,0,"ONLY");
1283 gMC->Gspos("TOPP",1,"TORC",0.,1.0,0.,0,"ONLY");
1293 gMC->Gsposp("TRCE",11,"TORC",0.,-0.8,-2.15,0,"ONLY",dm,4);
1300 gMC->Gsvolu("TOC1","TRD1",idtmed[4],dm,4);
1308 gMC->Gsposp("TRCE",11,"TOC1",0.,0.,0.,0,"ONLY",dm,4);
1311 //-----------------------------------------------
1312 // Tpc Services Support Wheel
1313 //-----------------------------------------------
1328 gMC->Gsvolu("TSSW","PGON",idtmed[4],dm,10);
1330 // Tpc Services Wheel Cover
1335 gMC->Gsvolu("TSWC","PGON",idtmed[4],dm,10);
1337 // Tpc Service wheel Cover Empty space
1344 gMC->Gsvolu("TSCE","TRD1",idtmed[0],dm,4);
1346 // Tpc services Wheel Empty Spaces
1353 gMC->Gsvolu("TWES","TRD1",idtmed[0],dm,4);
1355 // Tpc Services Wheel Bars
1357 gMC->Gsvolu("TSWB","TRD1",idtmed[4],dm,0);
1367 gMC->Gsposp("TSWB",1,"TWES",0.,0.,-85.125,0,"ONLY",dm,4);
1372 gMC->Gsposp("TSWB",2,"TWES",0.,0.,85.125,0,"ONLY",dm,4);
1374 // TPc ELectronics - right now 30% X0 Si
1381 gMC->Gsvolu("TPEL","TRD1",idtmed[11],dm,4);
1382 gMC->Gspos("TPEL",1,"TWES",0.,0.,0.,0,"ONLY");
1384 //--------------------------------------------------------------------------
1386 //--------------------------------------------------------------------------
1388 // TPc Main Wheel - Al
1394 gMC->Gsvolu("TPMW","TUBE",idtmed[4],dm,3);
1396 // TPc Extra Wheel (to avoid overlapping) - Al
1402 gMC->Gsvolu("TPEW","TUBE",idtmed[4],dm,3);
1404 //--------------------------------------------------------------------------
1405 // Tpc Empty Space for the Readout chambers
1406 //--------------------------------------------------------------------------
1410 Float_t dR = 0.5*(rUp-rLow);
1412 space= 1.4/cosAlpha; // wheel ribs are 2.8 cm wide
1414 dm[0]= rLow*tanAlpha-space;
1415 dm[1]= rUp*tanAlpha-space;
1419 gMC->Gsvolu("TESR","TRD1",idtmed[0],dm,4);
1424 gMC->Gspos("TIC1",1,"TESR",0.,0.75,-dR+23.97,0,"ONLY");
1429 gMC->Gspos("TOC1",1,"TESR",0.,0.75,dR-55.02,0,"ONLY");
1431 // Tpc Empty Space Bars - Al (daughters of TESR)
1435 gMC->Gsvolu("TESB","TRD1",idtmed[4],dm,0);
1439 dm[0]= rLow*tanAlpha-space;
1440 dm[1]= 88.7*tanAlpha-space;
1446 gMC->Gsposp("TESB",1,"TESR",0.,2.05,zBar,0,"ONLY",dm,4);
1450 dm[0]= 131.65*tanAlpha-space;
1451 dm[1]= 136.5*tanAlpha-space;
1454 zBar = -dR +131.65+dm[3]-rLow;
1456 gMC->Gsposp("TESB",2,"TESR",0.,2.05,zBar,0,"ONLY",dm,4);
1460 dm[0]= 240.4*tanAlpha-space;
1461 dm[1]= rUp*tanAlpha-space;
1466 gMC->Gsposp("TESB",3,"TESR",0.,2.05,zBar,0,"ONLY",dm,4);
1468 //------------------------------------------------------
1469 // TPc Lower "S" Sectors
1470 //------------------------------------------------------
1475 Float_t inSecLowEdge = fTPCParam->GetInnerRadiusLow();
1476 Float_t inSecUpEdge = fTPCParam->GetInnerRadiusUp();
1478 dm[0] = inSecLowEdge*TMath::Tan(0.5*innerOpenAngle)-0.01;
1479 dm[1] = inSecUpEdge*TMath::Tan(0.5*innerOpenAngle)-0.01;
1480 dm[2] = 0.5*(250. - 0.3);
1481 dm[3] = 0.5*(inSecUpEdge-inSecLowEdge);
1483 gMC->Gsvolu("TPLS", "TRD1", idtmed[1], dm, 4); // nonsensitive
1485 //----------------------------------------------------------
1486 // TPc Upper Sectors
1487 //----------------------------------------------------------
1489 Float_t ouSecLowEdge = fTPCParam->GetOuterRadiusLow();
1490 Float_t ouSecUpEdge = fTPCParam->GetOuterRadiusUp();
1492 dm[0] = ouSecLowEdge*TMath::Tan(0.5*outerOpenAngle)-0.01;
1493 dm[1] = ouSecUpEdge*TMath::Tan(0.5*outerOpenAngle)-0.01;
1494 dm[2] = 0.5*(250. - 0.3);
1495 dm[3] = 0.5*(ouSecUpEdge-ouSecLowEdge);
1497 gMC->Gsvolu("TPUS", "TRD1", idtmed[1], dm, 4); // nonsensitive
1499 //--------------------------------------------------------
1500 // TPc Sensitive Strips, the same for S and L sectors
1501 //--------------------------------------------------------
1503 gMC->Gsvolu("TPSS","TRD1",idtmed[2],dm,0); // sensitive
1505 Int_t nofStrips,nstr;
1507 Float_t stripThick = 0.01; // 100 microns
1511 nofStrips = fTPCParam->GetNRowLow();
1512 deadSpace = fTPCParam->GetInnerWireMount();
1514 dm[2] = 0.5*(250. - 0.3);
1515 dm[3] = 0.5 * stripThick;
1517 for(nstr=0;nstr<nofStrips;nstr++){
1519 r1 = fTPCParam->GetPadRowRadiiLow(nstr);
1520 r2 = r1 + stripThick;
1521 dm[0] = r1 * TMath::Tan(0.5*innerOpenAngle) - deadSpace;
1522 dm[1] = r2 * TMath::Tan(0.5*innerOpenAngle) - deadSpace;
1523 zs = -inSecLowEdge -0.5*(inSecUpEdge-inSecLowEdge);
1527 gMC->Gsposp("TPSS", nstr+1, "TPLS", 0., 0., zs, 0, "ONLY", dm, 4);
1531 Int_t nsSave = nofStrips;
1535 nofStrips = fTPCParam->GetNRowUp();
1536 deadSpace = fTPCParam->GetOuterWireMount();
1538 dm[2] = 0.5*(250. - 0.3);
1539 dm[3] = 0.5 * stripThick;
1541 for(nstr=0;nstr<nofStrips;nstr++){
1543 r1 = fTPCParam->GetPadRowRadiiUp(nstr);
1544 r2 = r1 + stripThick;
1545 dm[0] = r1 * TMath::Tan(0.5*outerOpenAngle) - deadSpace;
1546 dm[1] = r2 * TMath::Tan(0.5*outerOpenAngle) - deadSpace;
1547 zs = -ouSecLowEdge -0.5*(ouSecUpEdge-ouSecLowEdge);
1551 gMC->Gsposp("TPSS", nstr+1+nsSave, "TPUS", 0., 0., zs, 0, "ONLY", dm, 4);
1556 //-------------------------------------------------------
1557 // positioning of the empty spaces into the main wheel
1558 // and readout chambers and sectors into the drift gas
1559 //-------------------------------------------------------
1561 Float_t rCenter,xc,yc;
1562 Float_t rInner,rOuter; // center of the inner and outer chamber
1569 for(Int_t ns=0; ns<nInnerSector;ns++){
1571 phi1 = ns * innerOpenAngle + innerAngleShift;
1572 phi1 *= kRaddeg; // in degrees
1574 phi1 = (Float_t)TMath::Nint(phi1) + 270.;
1576 if (phi1 > 360.) phi1 -= 360.;
1581 phi3 = ns * innerOpenAngle + innerAngleShift;
1582 phi3 *= kRaddeg; // in degrees
1584 phi3 = (Float_t)TMath::Nint(phi3);
1586 if(phi3 > 360.) phi3 -= 360.;
1590 // "holes"->End plate
1592 xc = rCenter*TMath::Cos(phi3*kDegrad);
1593 yc = rCenter*TMath::Sin(phi3*kDegrad);
1595 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1597 gMC->Gspos("TESR",ns+1,"TPMW",xc,yc,0.,idrotm[nRotMat],"ONLY");
1599 // TSCE->TSWC (services wheel volumes)
1601 xc = 166.142*TMath::Cos(phi3*kDegrad);
1602 yc = 166.142*TMath::Sin(phi3*kDegrad);
1604 gMC->Gspos("TSCE",ns+1,"TSWC",xc,yc,0.,idrotm[nRotMat],"ONLY");
1605 gMC->Gspos("TWES",ns+1,"TSSW",xc,yc,0.,idrotm[nRotMat],"ONLY");
1608 // readout chambers->TDGN (drift gas)
1610 xc = rInner*TMath::Cos(phi3*kDegrad);
1611 yc = rInner*TMath::Sin(phi3*kDegrad);
1613 gMC->Gspos("TIRC",ns+1,"TDGN",xc,yc,252.,idrotm[nRotMat],"ONLY");
1615 // here lower sectors
1617 gMC->Gspos("TPLS",ns+1,"TDGN",xc,yc,125.15,idrotm[nRotMat],"ONLY");
1618 gMC->Gspos("TPLS",ns+nInnerSector+1,"TDGN",xc,yc,-125.15,idrotm[nRotMat],"ONLY");
1620 xc = rOuter*TMath::Cos(phi3*kDegrad);
1621 yc = rOuter*TMath::Sin(phi3*kDegrad);
1623 gMC->Gspos("TORC",ns+1,"TDGN",xc,yc,252.1,idrotm[nRotMat],"ONLY");
1625 // here upper sectors
1627 gMC->Gspos("TPUS",ns+1,"TDGN",xc,yc,125.15,idrotm[nRotMat],"ONLY");
1628 gMC->Gspos("TPUS",ns+nOuterSector+1,"TDGN",xc,yc,-125.15,idrotm[nRotMat],"ONLY");
1632 theta2 = 0.; // reflection
1634 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1636 xc = rInner*TMath::Cos(phi3*kDegrad);
1637 yc = rInner*TMath::Sin(phi3*kDegrad);
1639 gMC->Gspos("TIRC",ns+nInnerSector+1,"TDGN",xc,yc,-252.,idrotm[nRotMat],"ONLY");
1641 xc = rOuter*TMath::Cos(phi3*kDegrad);
1642 yc = rOuter*TMath::Sin(phi3*kDegrad);
1644 gMC->Gspos("TORC",ns+nOuterSector+1,"TDGN",xc,yc,-252.1,idrotm[nRotMat],"ONLY");
1650 // reflection matrix
1659 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1664 gMC->Gspos("TPMW",1,"TPC ",0.,0.,256.6,0,"ONLY");
1665 gMC->Gspos("TPMW",2,"TPC ",0.,0.,-256.6,idrotm[nRotMat],"ONLY");
1666 gMC->Gspos("TPEW",1,"TPC ",0.,0.,257.65,0,"ONLY");
1667 gMC->Gspos("TPEW",2,"TPC ",0.,0.,-257.5,0,"ONLY");
1671 //-------------------------------------------------------
1672 // Tpc High Voltage Membrane - NOMEX honeycomb
1673 //-------------------------------------------------------
1692 gMC->Gsvolu("THVM","PGON",idtmed[6],dm,10);
1694 gMC->Gspos("THVM",1,"TDGN",0.,0.,0.,0,"ONLY");
1696 //----------------------------------------------------------
1697 // TPc Support Rods - MAKROLON
1698 //----------------------------------------------------------
1704 gMC->Gsvolu("TPSR","TUBE",idtmed[7],dm,3);
1706 for(Int_t nrod=1;nrod<18;nrod++){
1707 Float_t angle=innerOpenAngle*(Float_t)nrod;
1709 xc=82.4*TMath::Cos(angle);
1710 yc=82.4*TMath::Sin(angle);
1712 gMC->Gspos("TPSR",nrod,"TDGN",xc,yc,126.95,0,"ONLY");
1713 gMC->Gspos("TPSR",nrod+17,"TDGN",xc,yc,-126.95,0,"ONLY");
1715 xc=254.2*TMath::Cos(angle);
1716 yc=254.2*TMath::Sin(angle);
1718 gMC->Gspos("TPSR",nrod+34,"TDGN",xc,yc,126.95,0,"ONLY");
1719 gMC->Gspos("TPSR",nrod+51,"TDGN",xc,yc,-126.95,0,"ONLY");
1723 //----------------------------------------------------------
1724 // Tpc High Voltage rod - MAKROLON + Copper cable
1725 //----------------------------------------------------------
1727 // rod with cable (Left)
1733 gMC->Gsvolu("THVL","TUBE",idtmed[7],dm,3);
1741 gMC->Gsvolu("THVC","TUBE",idtmed[10],dm,3);
1749 gMC->Gsvolu("THVE","TUBE",idtmed[1],dm,3);
1751 gMC->Gspos("THVC",1,"THVL",0.,0.,0.,0,"ONLY");
1752 gMC->Gspos("THVE",1,"THVL",0.,0.,0.,0,"ONLY");
1754 // rod without cable
1760 gMC->Gsvolu("THVR","TUBE",idtmed[7],dm,3);
1764 gMC->Gspos("THVL",1,"TDGN",82.4,0.,-126.95,0,"ONLY");
1765 gMC->Gspos("THVL",2,"TDGN",254.2,0.,-126.95,0,"ONLY");
1767 gMC->Gspos("THVR",1,"TDGN",82.4,0.,126.95,0,"ONLY");
1768 gMC->Gspos("THVR",2,"TDGN",254.2,0.,126.95,0,"ONLY");
1772 gMC->Gspos("TDGN",1,"TPC ",0.,0.,0.,0,"ONLY");
1774 // services wheel cover -> wheel
1777 gMC->Gspos("TSWC",1,"TSSW",0.,0.,4.5,0,"ONLY");
1778 gMC->Gspos("TSWC",2,"TSSW",0.,0.,-4.5,0,"ONLY");
1781 // put the wheel into the TPC
1783 gMC->Gspos("TSSW",1,"TPC ",0.,0.,278.7,0,"ONLY");
1784 gMC->Gspos("TSSW",2,"TPC ",0.,0.,-278.7,0,"ONLY");
1786 gMC->Gsord("TPMW",6);
1787 gMC->Gsord("TPLS",3);
1788 gMC->Gsord("TPUS",3);
1789 gMC->Gsord("TDGN",6);
1790 gMC->Gsord("TSSW",6);
1791 gMC->Gsord("TSWC",6);
1793 // put the TPC into ALIC (main mother volume)
1795 gMC->Gspos("TPC ", 1, "ALIC", 0, 0, 0, 0, "ONLY");
1798 } // end of function
1800 //_____________________________________________________________________________
1801 void AliTPCv1::DrawDetector()
1804 // Draw a shaded view of the Time Projection Chamber version 1
1807 // Set everything unseen
1808 gMC->Gsatt("*", "seen", -1);
1810 // Set ALIC mother transparent
1811 gMC->Gsatt("ALIC","SEEN",0);
1813 // Set the volumes visible
1814 gMC->Gsatt("TPC ","SEEN",0);
1815 gMC->Gsatt("TOIN","SEEN",1);
1816 gMC->Gsatt("TOIN","COLO",7);
1817 gMC->Gsatt("TPCR","SEEN",0);
1818 gMC->Gsatt("TOCV","SEEN",1);
1819 gMC->Gsatt("TOCV","COLO",4);
1820 gMC->Gsatt("TSA1","SEEN",0);
1821 gMC->Gsatt("TSA2","SEEN",0);
1822 gMC->Gsatt("TSA3","SEEN",0);
1823 gMC->Gsatt("TSA4","SEEN",0);
1824 gMC->Gsatt("TOFC","SEEN",1);
1825 gMC->Gsatt("TOFC","COLO",4);
1826 gMC->Gsatt("TSA5","SEEN",0);
1827 gMC->Gsatt("TSA6","SEEN",0);
1828 gMC->Gsatt("TSA7","SEEN",0);
1829 gMC->Gsatt("TIIN","COLO",7);
1830 gMC->Gsatt("TIIN","SEEN",1);
1831 gMC->Gsatt("TICL","SEEN",0);
1832 gMC->Gsatt("TSA9","SEEN",0);
1833 gMC->Gsatt("TS10","SEEN",0);
1834 gMC->Gsatt("TS11","SEEN",0);
1835 gMC->Gsatt("TS12","SEEN",0);
1836 gMC->Gsatt("TICR","SEEN",0);
1837 gMC->Gsatt("TS13","SEEN",0);
1838 gMC->Gsatt("TS14","SEEN",0);
1839 gMC->Gsatt("TS15","SEEN",0);
1840 gMC->Gsatt("TS16","SEEN",0);
1841 gMC->Gsatt("TIFC","SEEN",1);
1842 gMC->Gsatt("TIFC","COLO",4);
1843 gMC->Gsatt("TS17","SEEN",0);
1844 gMC->Gsatt("TS18","SEEN",0);
1845 gMC->Gsatt("TS19","SEEN",0);
1846 gMC->Gsatt("TS21","SEEN",0);
1847 gMC->Gsatt("TS22","SEEN",0);
1848 gMC->Gsatt("TS23","SEEN",0);
1849 gMC->Gsatt("TS24","SEEN",0);
1850 gMC->Gsatt("TDGN","SEEN",0);
1851 gMC->Gsatt("TIRC","SEEN",0);
1852 gMC->Gsatt("TIC1","SEEN",1);
1853 gMC->Gsatt("TIPP","SEEN",0);
1854 gMC->Gsatt("TIC3","SEEN",0);
1855 gMC->Gsatt("TRCE","SEEN",0);
1856 gMC->Gsatt("TPSC","SEEN",0);
1857 gMC->Gsatt("TPCC","SEEN",0);
1858 gMC->Gsatt("TORC","SEEN",0);
1859 gMC->Gsatt("TOPP","SEEN",0);
1860 gMC->Gsatt("TOC3","SEEN",0);
1861 gMC->Gsatt("TOC1","SEEN",1);
1862 gMC->Gsatt("TSSW","SEEN",1);
1863 gMC->Gsatt("TSWC","SEEN",1);
1864 gMC->Gsatt("TSCE","SEEN",1);
1865 gMC->Gsatt("TSSW","COLO",3);
1866 gMC->Gsatt("TSWC","COLO",3);
1867 gMC->Gsatt("TSCE","COLO",6);
1868 gMC->Gsatt("TWES","SEEN",0);
1869 gMC->Gsatt("TSWB","SEEN",0);
1870 gMC->Gsatt("TPEL","SEEN",0);
1871 gMC->Gsatt("TPMW","SEEN",1);
1872 gMC->Gsatt("TPEW","SEEN",1);
1873 gMC->Gsatt("TESR","SEEN",1);
1874 gMC->Gsatt("TPMW","COLO",12);
1875 gMC->Gsatt("TPEW","COLO",12);
1876 gMC->Gsatt("TWES","COLO",5);
1877 gMC->Gsatt("TIC1","COLO",5);
1878 gMC->Gsatt("TOC1","COLO",5);
1879 gMC->Gsatt("TESB","SEEN",0);
1880 gMC->Gsatt("TPLS","SEEN",0);
1881 gMC->Gsatt("TPUS","SEEN",0);
1882 gMC->Gsatt("TPSS","SEEN",0);
1883 gMC->Gsatt("THVM","SEEN",1);
1884 gMC->Gsatt("THVM","COLO",11);
1885 gMC->Gsatt("TPSR","SEEN",0);
1886 gMC->Gsatt("THVL","SEEN",0);
1887 gMC->Gsatt("THVC","SEEN",0);
1888 gMC->Gsatt("THVE","SEEN",0);
1889 gMC->Gsatt("THVR","SEEN",0);
1891 gMC->Gdopt("hide", "on");
1892 gMC->Gdopt("shad", "on");
1893 gMC->Gsatt("*", "fill", 7);
1894 gMC->SetClipBox(".");
1895 gMC->SetClipBox("TPMW",-300,300,-300,300,254.,270.);
1896 gMC->SetClipBox("TESR",-300,300,-300,300,254.,270.);
1897 gMC->SetClipBox("TSSW",-300,300,-300,300,283.,284.);
1898 gMC->SetClipBox("TSWC",-300,300,-300,300,283.,284.);
1899 gMC->SetClipBox("*", 0, 300, -300, 300, -290, 290);
1900 gMC->DefaultRange();
1901 gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .025, .025);
1902 gMC->Gdhead(1111, "Time Projection Chamber");
1903 gMC->Gdman(18, 4, "MAN");
1904 gMC->Gdopt("hide","off");
1907 //_____________________________________________________________________________
1908 void AliTPCv1::CreateMaterials()
1911 // Define materials for Time Projection Chamber
1913 AliTPC::CreateMaterials();
1916 //_____________________________________________________________________________
1917 void AliTPCv1::Init()
1920 // Initialises TPC detector after it has been created
1923 fIdSens=gMC->VolId("TPSS"); // sensitive strip
1924 fIdLSec=gMC->VolId("TPLS"); // lower sector
1925 fIdUSec=gMC->VolId("TPUS"); // upper sector
1927 printf("TPC version 1 initialized\n");
1930 //_____________________________________________________________________________
1931 void AliTPCv1::StepManager()
1934 // Called at every step in the Time Projection Chamber
1942 if(gMC->TrackCharge() && gMC->IsTrackEntering()) {
1945 // Only charged tracks entering the sensitive volume
1948 id = gMC->CurrentVolID(copy);
1952 // sensitive volume (strip)
1954 vol[1]= copy-1; // row number (absolute)
1958 id = gMC->CurrentVolOffID(1,copy);
1964 vol[0] = copy-1; // sector number
1971 vol[0] = copy-1+fTPCParam->GetNInnerSector(); // sector number
1972 vol[1] -= fTPCParam->GetNRowLow(); // row number
1978 // because Jouri wants to have this
1980 gMC->TrackMomentum(p);
1984 hits[3]=0.; // this hit has no energy loss
1985 // new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
1987 AddHit(gAlice->CurrentTrack(), vol,hits); // M.I.
1989 gMC->TrackPosition(p);
1993 hits[3]=0.; // this hit has no energy loss
1994 // new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
1996 AddHit(gAlice->CurrentTrack(), vol,hits); // M.I.
2000 gMC->TrackPosition(p);
2001 for(i=0;i<3;++i) hits[i]=p[i];
2002 hits[3]=1; //I'd like to have something positive here (I.Belikov)
2003 // new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
2005 AddHit(gAlice->CurrentTrack(), vol,hits); // M.I.
2012 //_____________________________________________________________________________