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.18 2000/06/30 12:07:50 kowal2
19 Updated from the TPC-PreRelease branch
21 Revision 1.17.2.4 2000/06/26 07:39:42 kowal2
22 Changes to obey the coding rules
24 Revision 1.17.2.3 2000/06/25 08:38:41 kowal2
25 Splitted from AliTPCtracking
27 Revision 1.17.2.2 2000/06/16 12:58:13 kowal2
28 Changed parameter settings
30 Revision 1.17.2.1 2000/06/09 07:15:07 kowal2
32 Defaults loaded automatically (hard-wired)
33 Optional parameters can be set via macro called in the constructor
35 Revision 1.17 2000/05/15 10:00:30 kowal2
36 Corrected bug in the TPC geometry, thanks to Ivana Hrivnacova
38 Revision 1.16 2000/04/17 09:37:33 kowal2
39 removed obsolete AliTPCDigitsDisplay.C
41 Revision 1.15.8.2 2000/04/10 08:29:48 kowal2
43 Different pad geometry for different sectors
44 Updated readouch chambers geometry
46 Revision 1.15.8.1 2000/04/10 07:56:53 kowal2
47 Not used anymore - removed
49 Revision 1.15 1999/11/04 17:28:07 fca
50 Correct barrel part of HV Degrader
52 Revision 1.14 1999/10/08 06:27:23 fca
53 Corrected bug in the HV degrader geometry, thanks to G.Tabary
55 Revision 1.13 1999/10/04 13:39:54 fca
56 Correct array index problem
58 Revision 1.12 1999/09/29 09:24:34 fca
59 Introduction of the Copyright and cvs Log
64 ///////////////////////////////////////////////////////////////////////////////
66 // Time Projection Chamber version 1 -- detailed TPC and fast simulation //
70 <img src="picts/AliTPCv1Class.gif">
75 ///////////////////////////////////////////////////////////////////////////////
78 #include <TGeometry.h>
90 #include "AliTPCParam.h"
91 #include "AliTPCParamSR.h"
92 #include "AliTPCDigitsArray.h"
93 #include <TInterpreter.h>
97 //_____________________________________________________________________________
98 AliTPCv1::AliTPCv1(const char *name, const char *title)
99 :AliTPC(name, title) {
101 // Standard constructor for Time Projection Chamber
103 fIdSens=fIdLSec=fIdUSec=0;
105 SetGasMixt(2,20,10,-1,0.9,0.1,0.);
108 fTPCParam->Write(fTPCParam->GetTitle());
111 //_____________________________________________________________________________
112 void AliTPCv1::CreateGeometry()
114 //-------------------------------------------------------------
115 // Creates geometry for Time Projection Chamber version 1
116 // Detailed geometry -- Fast simulation - space points
117 // at the pad-rows centers
118 // Origin M.Kowalski, INP Cracow, Marek.Kowalski@ifj.edu.pl
119 //-----------------------------------------------------------
123 <img src="picts/AliTPC.gif">
128 <img src="picts/AliTPCv1Tree.gif">
133 Int_t *idtmed = fIdtmed->GetArray(); // TPC media
135 Int_t idrotm[120]; // rotation matrices
137 Int_t nRotMat = 0; // actual number of rotation matrices
141 // Mother volume (Air) - all volumes will be positioned in it
221 gMC->Gsvolu("TPC ","PCON",idtmed[0],dm,39);
224 //-------------------------------------------------------------------
225 // Tpc Outer INsulator (CO2)
226 //-------------------------------------------------------------------
265 gMC->Gsvolu("TOIN","PCON",idtmed[3],dm,21);
267 //---------------------------------------------------------------
268 // shreds (G10) - TPC Rings
269 //---------------------------------------------------------------
271 gMC->Gsvolu("TPCR","TUBE",idtmed[12],dm,0);
277 gMC->Gsposp("TPCR",1,"TOIN",0.,0.,-253.3,0,"ONLY",dm,3); // left bottom
285 gMC->Gsposp("TPCR",2,"TOIN",0.,0.,253.3,0,"ONLY",dm,3); // right
293 gMC->Gsposp("TPCR",3,"TOIN",0.,0.,-250.7,0,"ONLY",dm,3); // left top
295 //----------------------------------------------------------------
296 // Tpc Outer Contaiment Vessel
297 // mother volume - Al, daughters - composite (sandwich)
298 //----------------------------------------------------------------
334 gMC->Gsvolu("TOCV","PCON",idtmed[4],dm,18);
338 // Tpc SAndwich 1 - Al
344 gMC->Gsvolu("TSA1","TUBE",idtmed[4],dm,3);
346 // Tpc SAndwich 2 - Tedlar
351 gMC->Gsvolu("TSA2","TUBE",idtmed[9],dm,3);
353 // Tpc SAndwich 3 - Kevlar
358 gMC->Gsvolu("TSA3","TUBE",idtmed[5],dm,3);
360 // Tpc SAndwich 4 - NOMEX honeycomb
365 gMC->Gsvolu("TSA4","TUBE",idtmed[5],dm,3);
369 gMC->Gspos("TSA4",1,"TSA3",0.,0.,0.,0,"ONLY");
370 gMC->Gspos("TSA3",1,"TSA2",0.,0.,0.,0,"ONLY");
371 gMC->Gspos("TSA2",1,"TSA1",0.,0.,0.,0,"ONLY");
373 gMC->Gspos("TSA1",1,"TOCV",0.,0.,2.6,0,"ONLY");
377 gMC->Gspos("TOCV",1,"TOIN",0.,0.,0.,0,"ONLY");
379 //-------------------------------------------------------
380 // Tpc Outer Field Cage
381 // mother volume - Al, daughters - composite (sandwich)
382 //-------------------------------------------------------
422 gMC->Gsvolu("TOFC","PCON",idtmed[4],dm,21);
426 // Tpc SAndwich 5 - Al
432 gMC->Gsvolu("TSA5","TUBE",idtmed[4],dm,3);
434 // Tpc SAndwich 6 - Tedlar
439 gMC->Gsvolu("TSA6","TUBE",idtmed[9],dm,3);
441 // Tpc SAndwich 7 - Kevlar
446 gMC->Gsvolu("TSA7","TUBE",idtmed[5],dm,3);
448 // Tpc SAndwich 8 - NOMEX
453 gMC->Gsvolu("TSA8","TUBE",idtmed[6],dm,3);
457 gMC->Gspos("TSA8",1,"TSA7",0.,0.,0.,0,"ONLY");
458 gMC->Gspos("TSA7",1,"TSA6",0.,0.,0.,0,"ONLY");
459 gMC->Gspos("TSA6",1,"TSA5",0.,0.,0.,0,"ONLY");
461 gMC->Gspos("TSA5",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");
471 //--------------------------------------------------------------------
472 // Tpc Inner INsulator (CO2)
473 //--------------------------------------------------------------------
488 Float_t tanL = (66.2-59.0)/(255.6-73.3); // tangent of the left cone part
491 dm[7]= 59.0+ (253.6-73.3)*tanL;
572 gMC->Gsvolu("TIIN","PCON",idtmed[3],dm,48);
575 //--------------------------------------------------------------------
576 // Tpc Inner Containment vessel, Left part
577 // mother volume - Al, daughter - composite (sandwich)
578 //--------------------------------------------------------------------
592 Float_t cosL = 1./TMath::Sqrt(1.+tanL*tanL);
593 Float_t sandThick = 2.14; // cone composite thickness
599 dm[7]= 59.0 + (253.6-73.3)*tanL;
606 dm[11]= dm[7]+sandThick/cosL;
611 dm[13]= 59.0+(75.6-73.3)*tanL;
612 dm[14]= dm[13]+sandThick/cosL;
638 gMC->Gsvolu("TICL","PCON",idtmed[4],dm,27);
642 // Tpc SAndwich 9 - Al
651 dm[4]= 59.0+(254.3-73.3)*tanL;
652 dm[5]= dm[4]+sandThick/cosL;
657 dm[7]= 59.0+(78.3-73.3)*tanL;
658 dm[8]= dm[7]+sandThick/cosL;
662 gMC->Gsvolu("TSA9","PCON",idtmed[4],dm,9);
664 // Tpc SAndwich 10 - Tedlar
674 gMC->Gsvolu("TS10","PCON",idtmed[9],dm,9);
676 // Tpc SAndwich 11 - Kevlar
686 gMC->Gsvolu("TS11","PCON",idtmed[5],dm,9);
688 // Tpc SAndwich 12 - NOMEX
698 gMC->Gsvolu("TS12","PCON",idtmed[6],dm,9);
702 gMC->Gspos("TS12",1,"TS11",0.,0.,0.,0,"ONLY");
703 gMC->Gspos("TS11",1,"TS10",0.,0.,0.,0,"ONLY");
704 gMC->Gspos("TS10",1,"TSA9",0.,0.,0.,0,"ONLY");
708 gMC->Gspos("TSA9",1,"TICL",0.,0.,0.,0,"ONLY");
710 //--------------------------------------------------------------------
711 // Tpc Inner Containment vessel, Right part
712 // mother volume - Al, daughter - composite (sandwich)
713 //--------------------------------------------------------------------
739 Float_t tanR = (66.0-59.0)/(250.5-73.3); // to avoid accuracy problems
740 Float_t cosR = 1./TMath::Sqrt(1.+tanR*tanR); //as above
745 dm[13]= 59.0+(75.6-73.3)*tanR;
752 dm[17]= dm[16]+sandThick/cosR;
757 dm[19]= 59.0+(248.4-73.3)*tanR;
758 dm[20]= dm[19]+sandThick/cosR;
772 gMC->Gsvolu("TICR","PCON",idtmed[4],dm,27);
778 // Tpc SAndwich 13 - Al
787 dm[4]= 59.0+(78.3-73.3)*tanR;
788 dm[5]= dm[4]+sandThick/cosR;
793 dm[7]= 59.0+(249.1-73.3)*tanR;
794 dm[8]= dm[7]+sandThick/cosR;
798 gMC->Gsvolu("TS13","PCON",idtmed[4],dm,9);
800 // Tpc SAndwich 14 - Tedlar
810 gMC->Gsvolu("TS14","PCON",idtmed[9],dm,9);
812 // Tpc SAndwich 15 - Kevlar
822 gMC->Gsvolu("TS15","PCON",idtmed[5],dm,9);
824 // Tpc SAndwich 16 - NOMEX
834 gMC->Gsvolu("TS16","PCON",idtmed[6],dm,9);
838 gMC->Gspos("TS16",1,"TS15",0.,0.,0.,0,"ONLY");
839 gMC->Gspos("TS15",1,"TS14",0.,0.,0.,0,"ONLY");
840 gMC->Gspos("TS14",1,"TS13",0.,0.,0.,0,"ONLY");
844 gMC->Gspos("TS13",1,"TICR",0.,0.,0.,0,"ONLY");
846 //------------------------------------------------------
847 // Tpc Inner Field Cage
848 // mother volume - Al, daughters - composite (sandwich)
849 //------------------------------------------------------
891 gMC->Gsvolu("TIFC","PCON",idtmed[4],dm,21);
895 // Tpc Sandwich 17 - Al
901 gMC->Gsvolu("TS17","TUBE",idtmed[4],dm,3);
903 // Tpc Sandwich 18 - Tedlar
908 gMC->Gsvolu("TS18","TUBE",idtmed[9],dm,3);
910 // Tpc Sandwich 19 - Kevlar
915 gMC->Gsvolu("TS19","TUBE",idtmed[5],dm,3);
917 // Tpc Sandwich 20 - NOMEX
922 gMC->Gsvolu("TS20","TUBE",idtmed[6],dm,3);
926 gMC->Gspos("TS20",1,"TS19",0.,0.,0.,0,"ONLY");
927 gMC->Gspos("TS19",1,"TS18",0.,0.,0.,0,"ONLY");
928 gMC->Gspos("TS18",1,"TS17",0.,0.,0.,0,"ONLY");
932 gMC->Gspos("TS17",1,"TIFC",0.,0.,0.,0,"ONLY");
940 gMC->Gsposp("TPCR",4,"TIIN",0.,0.,-253.3,0,"ONLY",dm,3);
945 gMC->Gsposp("TPCR",5,"TIIN",0.,0.,250.7,0,"ONLY",dm,3);
950 gMC->Gsposp("TPCR",6,"TIIN",0.,0.,253.3,0,"ONLY",dm,3);
954 gMC->Gspos("TICL",1,"TIIN",0.,0.,0.,0,"ONLY");
958 gMC->Gspos("TICR",1,"TIIN",0.,0.,0.,0,"ONLY");
962 gMC->Gspos("TIFC",1,"TIIN",0.,0.,0.,0,"ONLY");
964 // Tpc Sandwich 21 - Al (central barrel)
970 gMC->Gsvolu("TS21","TUBE",idtmed[4],dm,3);
972 // Tpc Sandwich 22 - Tedlar (central barrel)
977 gMC->Gsvolu("TS22","TUBE",idtmed[9],dm,3);
979 // Tpc Sandwich 23 - Kevlar (central barrel)
984 gMC->Gsvolu("TS23","TUBE",idtmed[5],dm,3);
986 // Tpc Sandwich 24 - NOMEX (central barrel)
991 gMC->Gsvolu("TS24","TUBE",idtmed[6],dm,3);
995 gMC->Gspos("TS24",1,"TS23",0.,0.,0.,0,"ONLY");
996 gMC->Gspos("TS23",1,"TS22",0.,0.,0.,0,"ONLY");
997 gMC->Gspos("TS22",1,"TS21",0.,0.,0.,0,"ONLY");
999 gMC->Gspos("TS21",1,"TIIN",0.,0.,0.,0,"ONLY");
1001 // put everything into the TPC
1003 gMC->Gspos("TIIN",1,"TPC ",0.,0.,0.,0,"ONLY");
1006 //---------------------------------------------------------
1007 // Tpc Dift Gas volume Nonsensitive (Ne-CO2 90/10)
1008 // and its daughters (HV membrane, rods, readout chambers)
1009 //---------------------------------------------------------
1015 gMC->Gsvolu("TDGN","TUBE",idtmed[1],dm,3);
1017 // sector opening angles
1019 Float_t innerOpenAngle = fTPCParam->GetInnerAngle();
1020 Float_t outerOpenAngle = fTPCParam->GetOuterAngle();
1022 // sector angle shift
1024 Float_t innerAngleShift = fTPCParam->GetInnerAngleShift();
1026 // number of sectors
1028 Int_t nInnerSector = fTPCParam->GetNInnerSector()/2;
1029 Int_t nOuterSector = fTPCParam->GetNOuterSector()/2;
1031 // All above parameters are identical for inner and outer
1032 // sectors. The distinction is kept for the historical reasons
1033 // and eventually will disappear.
1035 Float_t tanAlpha = TMath::Tan(0.5*innerOpenAngle);
1036 Float_t cosAlpha = TMath::Sqrt(1.+tanAlpha*tanAlpha);
1039 //-------------------------------------------------------------------------
1040 // Tpc Inner Readout Chambers
1041 //-------------------------------------------------------------------------
1045 dm[2]= 1.6; // thickness
1048 gMC->Gsvolu("TIRC","TRD1",idtmed[4],dm,4);
1050 // this volume will be positioned in the empty space
1051 // of the end-cap to avoid overlaps
1058 gMC->Gsvolu("TIC1","TRD1",idtmed[4],dm,4);
1061 //------------------------------------------------
1062 // Tpc Inner readout chamber Pad Plane
1063 //------------------------------------------------
1070 gMC->Gsvolu("TIPP","TRD1",idtmed[12],dm,4);
1074 dm[0] -= 1.218511934;
1075 dm[1] -= 1.218511934;
1078 gMC->Gsvolu("TIC3","TRD1",idtmed[1],dm,4);
1080 gMC->Gspos("TIC3",1,"TIPP",0.,0.15,0.,0,"ONLY");
1082 gMC->Gspos("TIPP",1,"TIRC",0.,1.1,0.,0,"ONLY");
1085 //----------------------------------------------
1086 // Tpc Readout Chambers Empty spaces - for both
1087 // inner and outer sectors
1088 //----------------------------------------------
1090 gMC->Gsvolu("TRCE","TRD1",idtmed[0],dm,0);
1092 // Inner sector - 4 spaces
1103 space = rr*tanAlpha-dm[0];
1105 for(Int_t nsLow=0;nsLow<4;nsLow++){
1108 dm[1]= rr*tanAlpha - space;
1112 gMC->Gsposp("TRCE",nsLow+1,"TIRC",0.,-0.8,zz,0,"ONLY",dm,4);
1118 gMC->Gsposp("TRCE",nsLow+5,"TIC1",0.,1.05,zz-2.1,0,"ONLY",dm,4);
1121 dm[0] = rr*tanAlpha - space;
1127 // dm[1] - this is the dm[1] from the previous TRCE
1131 gMC->Gsposp("TRCE",9,"TIC1",0.,-1.2,0.,0,"ONLY",dm,4);
1134 // TPc Space for Connectors
1141 gMC->Gsvolu("TPSC","BOX ",idtmed[0],dm,3);
1149 gMC->Gsvolu("TPCC","BOX ",idtmed[13],dm,3);
1151 gMC->Gspos("TPCC",1,"TPSC",0.,0.15,0.,0,"ONLY");
1159 Float_t phi1,phi2,phi3,theta1,theta2,theta3; // rotation angles
1161 // inner part of the inner sector - 2 x 20 holes
1163 astep = 20.00096874/19.;
1165 alpha = 10.00048437-astep;
1177 for(ncon=0;ncon<20;ncon++){
1183 phi3 = (alpha>0) ? 0. : 180.;
1184 theta3 = TMath::Abs(alpha);
1186 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1190 gMC->Gspos("TPSC",ncon+1,"TIRC",x1,0.3,-12.7875,idrotm[nRotMat],"ONLY");
1191 gMC->Gspos("TPSC",ncon+21,"TIRC",x2,0.3,-2.8625,idrotm[nRotMat],"ONLY");
1202 // outer part of the inner sector - 2 x 25 holes
1204 astep = 20.00096874/24.;
1205 alpha = 10.00048437-astep;
1213 for(ncon=0;ncon<25;ncon++){
1219 phi3 = (alpha>0) ? 0. : 180.;
1220 theta3 = TMath::Abs(alpha);
1222 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1226 gMC->Gspos("TPSC",ncon+41,"TIRC",x1,0.3,7.0625,idrotm[nRotMat],"ONLY");
1227 gMC->Gspos("TPSC",ncon+66,"TIRC",x2,0.3,16.9875,idrotm[nRotMat],"ONLY");
1238 //--------------------------------------------------------------------------
1239 // TPC Outer Readout Chambers
1240 // this is NOT a final design
1241 //--------------------------------------------------------------------------
1245 dm[2]= 1.5; //thickness
1248 gMC->Gsvolu("TORC","TRD1",idtmed[4],dm,4);
1250 //------------------------------------------------
1251 // Tpc Outer readout chamber Pad Plane
1252 //------------------------------------------------
1256 gMC->Gsvolu("TOPP","TRD1",idtmed[12],dm,4);
1258 dm[0] -= 1.218511934;
1259 dm[1] -= 1.218511934;
1262 gMC->Gsvolu("TOC3","TRD1",idtmed[1],dm,4);
1264 gMC->Gspos("TOC3",1,"TOPP",0.,0.15,0.,0,"ONLY");
1266 gMC->Gspos("TOPP",1,"TORC",0.,1.0,0.,0,"ONLY");
1276 gMC->Gsposp("TRCE",11,"TORC",0.,-0.8,-2.15,0,"ONLY",dm,4);
1283 gMC->Gsvolu("TOC1","TRD1",idtmed[4],dm,4);
1291 gMC->Gsposp("TRCE",11,"TOC1",0.,0.,0.,0,"ONLY",dm,4);
1294 //-----------------------------------------------
1295 // Tpc Services Support Wheel
1296 //-----------------------------------------------
1311 gMC->Gsvolu("TSSW","PGON",idtmed[4],dm,10);
1313 // Tpc Services Wheel Cover
1318 gMC->Gsvolu("TSWC","PGON",idtmed[4],dm,10);
1320 // Tpc Service wheel Cover Empty space
1327 gMC->Gsvolu("TSCE","TRD1",idtmed[0],dm,4);
1329 // Tpc services Wheel Empty Spaces
1336 gMC->Gsvolu("TWES","TRD1",idtmed[0],dm,4);
1338 // Tpc Services Wheel Bars
1340 gMC->Gsvolu("TSWB","TRD1",idtmed[4],dm,0);
1350 gMC->Gsposp("TSWB",1,"TWES",0.,0.,-85.125,0,"ONLY",dm,4);
1355 gMC->Gsposp("TSWB",2,"TWES",0.,0.,85.125,0,"ONLY",dm,4);
1357 // TPc ELectronics - right now 30% X0 Si
1364 gMC->Gsvolu("TPEL","TRD1",idtmed[11],dm,4);
1365 gMC->Gspos("TPEL",1,"TWES",0.,0.,0.,0,"ONLY");
1367 //--------------------------------------------------------------------------
1369 //--------------------------------------------------------------------------
1371 // TPc Main Wheel - Al
1377 gMC->Gsvolu("TPMW","TUBE",idtmed[4],dm,3);
1379 // TPc Extra Wheel (to avoid overlapping) - Al
1385 gMC->Gsvolu("TPEW","TUBE",idtmed[4],dm,3);
1387 //--------------------------------------------------------------------------
1388 // Tpc Empty Space for the Readout chambers
1389 //--------------------------------------------------------------------------
1393 Float_t dR = 0.5*(rUp-rLow);
1395 space= 1.4/cosAlpha; // wheel ribs are 2.8 cm wide
1397 dm[0]= rLow*tanAlpha-space;
1398 dm[1]= rUp*tanAlpha-space;
1402 gMC->Gsvolu("TESR","TRD1",idtmed[0],dm,4);
1407 gMC->Gspos("TIC1",1,"TESR",0.,0.75,-dR+23.97,0,"ONLY");
1412 gMC->Gspos("TOC1",1,"TESR",0.,0.75,dR-55.02,0,"ONLY");
1414 // Tpc Empty Space Bars - Al (daughters of TESR)
1418 gMC->Gsvolu("TESB","TRD1",idtmed[4],dm,0);
1422 dm[0]= rLow*tanAlpha-space;
1423 dm[1]= 88.7*tanAlpha-space;
1429 gMC->Gsposp("TESB",1,"TESR",0.,2.05,zBar,0,"ONLY",dm,4);
1433 dm[0]= 131.65*tanAlpha-space;
1434 dm[1]= 136.5*tanAlpha-space;
1437 zBar = -dR +131.65+dm[3]-rLow;
1439 gMC->Gsposp("TESB",2,"TESR",0.,2.05,zBar,0,"ONLY",dm,4);
1443 dm[0]= 240.4*tanAlpha-space;
1444 dm[1]= rUp*tanAlpha-space;
1449 gMC->Gsposp("TESB",3,"TESR",0.,2.05,zBar,0,"ONLY",dm,4);
1451 //------------------------------------------------------
1452 // TPc Lower "S" Sectors
1453 //------------------------------------------------------
1458 Float_t inSecLowEdge = fTPCParam->GetInnerRadiusLow();
1459 Float_t inSecUpEdge = fTPCParam->GetInnerRadiusUp();
1461 dm[0] = inSecLowEdge*TMath::Tan(0.5*innerOpenAngle)-0.01;
1462 dm[1] = inSecUpEdge*TMath::Tan(0.5*innerOpenAngle)-0.01;
1463 dm[2] = 0.5*(250. - 0.3);
1464 dm[3] = 0.5*(inSecUpEdge-inSecLowEdge);
1466 gMC->Gsvolu("TPLS", "TRD1", idtmed[1], dm, 4); // nonsensitive
1468 //----------------------------------------------------------
1469 // TPc Upper Sectors
1470 //----------------------------------------------------------
1472 Float_t ouSecLowEdge = fTPCParam->GetOuterRadiusLow();
1473 Float_t ouSecUpEdge = fTPCParam->GetOuterRadiusUp();
1475 dm[0] = ouSecLowEdge*TMath::Tan(0.5*outerOpenAngle)-0.01;
1476 dm[1] = ouSecUpEdge*TMath::Tan(0.5*outerOpenAngle)-0.01;
1477 dm[2] = 0.5*(250. - 0.3);
1478 dm[3] = 0.5*(ouSecUpEdge-ouSecLowEdge);
1480 gMC->Gsvolu("TPUS", "TRD1", idtmed[1], dm, 4); // nonsensitive
1482 //--------------------------------------------------------
1483 // TPc Sensitive Strips, the same for S and L sectors
1484 //--------------------------------------------------------
1486 gMC->Gsvolu("TPSS","TRD1",idtmed[2],dm,0); // sensitive
1488 Int_t nofStrips,nstr;
1490 Float_t stripThick = 0.01; // 100 microns
1494 nofStrips = fTPCParam->GetNRowLow();
1495 deadSpace = fTPCParam->GetInnerWireMount();
1497 dm[2] = 0.5*(250. - 0.3);
1498 dm[3] = 0.5 * stripThick;
1500 for(nstr=0;nstr<nofStrips;nstr++){
1502 r1 = fTPCParam->GetPadRowRadiiLow(nstr);
1503 r2 = r1 + stripThick;
1504 dm[0] = r1 * TMath::Tan(0.5*innerOpenAngle) - deadSpace;
1505 dm[1] = r2 * TMath::Tan(0.5*innerOpenAngle) - deadSpace;
1506 zs = -inSecLowEdge -0.5*(inSecUpEdge-inSecLowEdge);
1510 gMC->Gsposp("TPSS", nstr+1, "TPLS", 0., 0., zs, 0, "ONLY", dm, 4);
1514 Int_t nsSave = nofStrips;
1518 nofStrips = fTPCParam->GetNRowUp();
1519 deadSpace = fTPCParam->GetOuterWireMount();
1521 dm[2] = 0.5*(250. - 0.3);
1522 dm[3] = 0.5 * stripThick;
1524 for(nstr=0;nstr<nofStrips;nstr++){
1526 r1 = fTPCParam->GetPadRowRadiiUp(nstr);
1527 r2 = r1 + stripThick;
1528 dm[0] = r1 * TMath::Tan(0.5*outerOpenAngle) - deadSpace;
1529 dm[1] = r2 * TMath::Tan(0.5*outerOpenAngle) - deadSpace;
1530 zs = -ouSecLowEdge -0.5*(ouSecUpEdge-ouSecLowEdge);
1534 gMC->Gsposp("TPSS", nstr+1+nsSave, "TPUS", 0., 0., zs, 0, "ONLY", dm, 4);
1539 //-------------------------------------------------------
1540 // positioning of the empty spaces into the main wheel
1541 // and readout chambers and sectors into the drift gas
1542 //-------------------------------------------------------
1544 Float_t rCenter,xc,yc;
1545 Float_t rInner,rOuter; // center of the inner and outer chamber
1552 for(Int_t ns=0; ns<nInnerSector;ns++){
1554 phi1 = ns * innerOpenAngle + innerAngleShift;
1555 phi1 *= kRaddeg; // in degrees
1557 phi1 = (Float_t)TMath::Nint(phi1) + 270.;
1559 if (phi1 > 360.) phi1 -= 360.;
1564 phi3 = ns * innerOpenAngle + innerAngleShift;
1565 phi3 *= kRaddeg; // in degrees
1567 phi3 = (Float_t)TMath::Nint(phi3);
1569 if(phi3 > 360.) phi3 -= 360.;
1573 // "holes"->End plate
1575 xc = rCenter*TMath::Cos(phi3*kDegrad);
1576 yc = rCenter*TMath::Sin(phi3*kDegrad);
1578 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1580 gMC->Gspos("TESR",ns+1,"TPMW",xc,yc,0.,idrotm[nRotMat],"ONLY");
1582 // TSCE->TSWC (services wheel volumes)
1584 xc = 166.142*TMath::Cos(phi3*kDegrad);
1585 yc = 166.142*TMath::Sin(phi3*kDegrad);
1587 gMC->Gspos("TSCE",ns+1,"TSWC",xc,yc,0.,idrotm[nRotMat],"ONLY");
1588 gMC->Gspos("TWES",ns+1,"TSSW",xc,yc,0.,idrotm[nRotMat],"ONLY");
1591 // readout chambers->TDGN (drift gas)
1593 xc = rInner*TMath::Cos(phi3*kDegrad);
1594 yc = rInner*TMath::Sin(phi3*kDegrad);
1596 gMC->Gspos("TIRC",ns+1,"TDGN",xc,yc,252.,idrotm[nRotMat],"ONLY");
1598 // here lower sectors
1600 gMC->Gspos("TPLS",ns+1,"TDGN",xc,yc,125.15,idrotm[nRotMat],"ONLY");
1601 gMC->Gspos("TPLS",ns+nInnerSector+1,"TDGN",xc,yc,-125.15,idrotm[nRotMat],"ONLY");
1603 xc = rOuter*TMath::Cos(phi3*kDegrad);
1604 yc = rOuter*TMath::Sin(phi3*kDegrad);
1606 gMC->Gspos("TORC",ns+1,"TDGN",xc,yc,252.1,idrotm[nRotMat],"ONLY");
1608 // here upper sectors
1610 gMC->Gspos("TPUS",ns+1,"TDGN",xc,yc,125.15,idrotm[nRotMat],"ONLY");
1611 gMC->Gspos("TPUS",ns+nOuterSector+1,"TDGN",xc,yc,-125.15,idrotm[nRotMat],"ONLY");
1615 theta2 = 0.; // reflection
1617 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1619 xc = rInner*TMath::Cos(phi3*kDegrad);
1620 yc = rInner*TMath::Sin(phi3*kDegrad);
1622 gMC->Gspos("TIRC",ns+nInnerSector+1,"TDGN",xc,yc,-252.,idrotm[nRotMat],"ONLY");
1624 xc = rOuter*TMath::Cos(phi3*kDegrad);
1625 yc = rOuter*TMath::Sin(phi3*kDegrad);
1627 gMC->Gspos("TORC",ns+nOuterSector+1,"TDGN",xc,yc,-252.1,idrotm[nRotMat],"ONLY");
1633 // reflection matrix
1642 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1647 gMC->Gspos("TPMW",1,"TPC ",0.,0.,256.6,0,"ONLY");
1648 gMC->Gspos("TPMW",2,"TPC ",0.,0.,-256.6,idrotm[nRotMat],"ONLY");
1649 gMC->Gspos("TPEW",1,"TPC ",0.,0.,257.65,0,"ONLY");
1650 gMC->Gspos("TPEW",2,"TPC ",0.,0.,-257.5,0,"ONLY");
1654 //-------------------------------------------------------
1655 // Tpc High Voltage Membrane - NOMEX honeycomb
1656 //-------------------------------------------------------
1675 gMC->Gsvolu("THVM","PGON",idtmed[6],dm,10);
1677 gMC->Gspos("THVM",1,"TDGN",0.,0.,0.,0,"ONLY");
1679 //----------------------------------------------------------
1680 // TPc Support Rods - MAKROLON
1681 //----------------------------------------------------------
1687 gMC->Gsvolu("TPSR","TUBE",idtmed[7],dm,3);
1689 for(Int_t nrod=1;nrod<18;nrod++){
1690 Float_t angle=innerOpenAngle*(Float_t)nrod;
1692 xc=82.4*TMath::Cos(angle);
1693 yc=82.4*TMath::Sin(angle);
1695 gMC->Gspos("TPSR",nrod,"TDGN",xc,yc,126.95,0,"ONLY");
1696 gMC->Gspos("TPSR",nrod+17,"TDGN",xc,yc,-126.95,0,"ONLY");
1698 xc=254.2*TMath::Cos(angle);
1699 yc=254.2*TMath::Sin(angle);
1701 gMC->Gspos("TPSR",nrod+34,"TDGN",xc,yc,126.95,0,"ONLY");
1702 gMC->Gspos("TPSR",nrod+51,"TDGN",xc,yc,-126.95,0,"ONLY");
1706 //----------------------------------------------------------
1707 // Tpc High Voltage rod - MAKROLON + Copper cable
1708 //----------------------------------------------------------
1710 // rod with cable (Left)
1716 gMC->Gsvolu("THVL","TUBE",idtmed[7],dm,3);
1724 gMC->Gsvolu("THVC","TUBE",idtmed[10],dm,3);
1732 gMC->Gsvolu("THVE","TUBE",idtmed[1],dm,3);
1734 gMC->Gspos("THVC",1,"THVL",0.,0.,0.,0,"ONLY");
1735 gMC->Gspos("THVE",1,"THVL",0.,0.,0.,0,"ONLY");
1737 // rod without cable
1743 gMC->Gsvolu("THVR","TUBE",idtmed[7],dm,3);
1747 gMC->Gspos("THVL",1,"TDGN",82.4,0.,-126.95,0,"ONLY");
1748 gMC->Gspos("THVL",2,"TDGN",254.2,0.,-126.95,0,"ONLY");
1750 gMC->Gspos("THVR",1,"TDGN",82.4,0.,126.95,0,"ONLY");
1751 gMC->Gspos("THVR",2,"TDGN",254.2,0.,126.95,0,"ONLY");
1755 gMC->Gspos("TDGN",1,"TPC ",0.,0.,0.,0,"ONLY");
1757 // services wheel cover -> wheel
1760 gMC->Gspos("TSWC",1,"TSSW",0.,0.,4.5,0,"ONLY");
1761 gMC->Gspos("TSWC",2,"TSSW",0.,0.,-4.5,0,"ONLY");
1764 // put the wheel into the TPC
1766 gMC->Gspos("TSSW",1,"TPC ",0.,0.,278.7,0,"ONLY");
1767 gMC->Gspos("TSSW",2,"TPC ",0.,0.,-278.7,0,"ONLY");
1769 gMC->Gsord("TPMW",6);
1770 gMC->Gsord("TPLS",3);
1771 gMC->Gsord("TPUS",3);
1772 gMC->Gsord("TDGN",6);
1773 gMC->Gsord("TSSW",6);
1774 gMC->Gsord("TSWC",6);
1776 // put the TPC into ALIC (main mother volume)
1778 gMC->Gspos("TPC ", 1, "ALIC", 0, 0, 0, 0, "ONLY");
1781 } // end of function
1783 //_____________________________________________________________________________
1784 void AliTPCv1::DrawDetector()
1787 // Draw a shaded view of the Time Projection Chamber version 1
1790 // Set everything unseen
1791 gMC->Gsatt("*", "seen", -1);
1793 // Set ALIC mother transparent
1794 gMC->Gsatt("ALIC","SEEN",0);
1796 // Set the volumes visible
1797 gMC->Gsatt("TPC ","SEEN",0);
1798 gMC->Gsatt("TOIN","SEEN",1);
1799 gMC->Gsatt("TOIN","COLO",7);
1800 gMC->Gsatt("TPCR","SEEN",0);
1801 gMC->Gsatt("TOCV","SEEN",1);
1802 gMC->Gsatt("TOCV","COLO",4);
1803 gMC->Gsatt("TSA1","SEEN",0);
1804 gMC->Gsatt("TSA2","SEEN",0);
1805 gMC->Gsatt("TSA3","SEEN",0);
1806 gMC->Gsatt("TSA4","SEEN",0);
1807 gMC->Gsatt("TOFC","SEEN",1);
1808 gMC->Gsatt("TOFC","COLO",4);
1809 gMC->Gsatt("TSA5","SEEN",0);
1810 gMC->Gsatt("TSA6","SEEN",0);
1811 gMC->Gsatt("TSA7","SEEN",0);
1812 gMC->Gsatt("TSA8","SEEN",0);
1813 gMC->Gsatt("TIIN","COLO",7);
1814 gMC->Gsatt("TIIN","SEEN",1);
1815 gMC->Gsatt("TICL","SEEN",0);
1816 gMC->Gsatt("TSA9","SEEN",0);
1817 gMC->Gsatt("TS10","SEEN",0);
1818 gMC->Gsatt("TS11","SEEN",0);
1819 gMC->Gsatt("TS12","SEEN",0);
1820 gMC->Gsatt("TICR","SEEN",0);
1821 gMC->Gsatt("TS13","SEEN",0);
1822 gMC->Gsatt("TS14","SEEN",0);
1823 gMC->Gsatt("TS15","SEEN",0);
1824 gMC->Gsatt("TS16","SEEN",0);
1825 gMC->Gsatt("TIFC","SEEN",1);
1826 gMC->Gsatt("TIFC","COLO",4);
1827 gMC->Gsatt("TS17","SEEN",0);
1828 gMC->Gsatt("TS18","SEEN",0);
1829 gMC->Gsatt("TS19","SEEN",0);
1830 gMC->Gsatt("TS20","SEEN",0);
1831 gMC->Gsatt("TS21","SEEN",0);
1832 gMC->Gsatt("TS22","SEEN",0);
1833 gMC->Gsatt("TS23","SEEN",0);
1834 gMC->Gsatt("TS24","SEEN",0);
1835 gMC->Gsatt("TDGN","SEEN",0);
1836 gMC->Gsatt("TIRC","SEEN",0);
1837 gMC->Gsatt("TIC1","SEEN",1);
1838 gMC->Gsatt("TIPP","SEEN",0);
1839 gMC->Gsatt("TIC3","SEEN",0);
1840 gMC->Gsatt("TRCE","SEEN",0);
1841 gMC->Gsatt("TPSC","SEEN",0);
1842 gMC->Gsatt("TPCC","SEEN",0);
1843 gMC->Gsatt("TORC","SEEN",0);
1844 gMC->Gsatt("TOPP","SEEN",0);
1845 gMC->Gsatt("TOC3","SEEN",0);
1846 gMC->Gsatt("TOC1","SEEN",1);
1847 gMC->Gsatt("TSSW","SEEN",1);
1848 gMC->Gsatt("TSWC","SEEN",1);
1849 gMC->Gsatt("TSCE","SEEN",1);
1850 gMC->Gsatt("TSSW","COLO",3);
1851 gMC->Gsatt("TSWC","COLO",3);
1852 gMC->Gsatt("TSCE","COLO",6);
1853 gMC->Gsatt("TWES","SEEN",0);
1854 gMC->Gsatt("TSWB","SEEN",0);
1855 gMC->Gsatt("TPEL","SEEN",0);
1856 gMC->Gsatt("TPMW","SEEN",1);
1857 gMC->Gsatt("TPEW","SEEN",1);
1858 gMC->Gsatt("TESR","SEEN",1);
1859 gMC->Gsatt("TPMW","COLO",12);
1860 gMC->Gsatt("TPEW","COLO",12);
1861 gMC->Gsatt("TWES","COLO",5);
1862 gMC->Gsatt("TIC1","COLO",5);
1863 gMC->Gsatt("TOC1","COLO",5);
1864 gMC->Gsatt("TESB","SEEN",0);
1865 gMC->Gsatt("TPLS","SEEN",0);
1866 gMC->Gsatt("TPUS","SEEN",0);
1867 gMC->Gsatt("TPSS","SEEN",0);
1868 gMC->Gsatt("THVM","SEEN",1);
1869 gMC->Gsatt("THVM","COLO",11);
1870 gMC->Gsatt("TPSR","SEEN",0);
1871 gMC->Gsatt("THVL","SEEN",0);
1872 gMC->Gsatt("THVC","SEEN",0);
1873 gMC->Gsatt("THVE","SEEN",0);
1874 gMC->Gsatt("THVR","SEEN",0);
1876 gMC->Gdopt("hide", "on");
1877 gMC->Gdopt("shad", "on");
1878 gMC->Gsatt("*", "fill", 7);
1879 gMC->SetClipBox(".");
1880 gMC->SetClipBox("TPMW",-300,300,-300,300,254.,270.);
1881 gMC->SetClipBox("TESR",-300,300,-300,300,254.,270.);
1882 gMC->SetClipBox("TSSW",-300,300,-300,300,283.,284.);
1883 gMC->SetClipBox("TSWC",-300,300,-300,300,283.,284.);
1884 gMC->SetClipBox("*", 0, 300, -300, 300, -290, 290);
1885 gMC->DefaultRange();
1886 gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .025, .025);
1887 gMC->Gdhead(1111, "Time Projection Chamber");
1888 gMC->Gdman(18, 4, "MAN");
1889 gMC->Gdopt("hide","off");
1892 //_____________________________________________________________________________
1893 void AliTPCv1::CreateMaterials()
1896 // Define materials for Time Projection Chamber
1898 AliTPC::CreateMaterials();
1901 //_____________________________________________________________________________
1902 void AliTPCv1::Init()
1905 // Initialises TPC detector after it has been created
1908 fIdSens=gMC->VolId("TPSS"); // sensitive strip
1909 fIdLSec=gMC->VolId("TPLS"); // lower sector
1910 fIdUSec=gMC->VolId("TPUS"); // upper sector
1912 printf("TPC version 1 initialized\n");
1915 //_____________________________________________________________________________
1916 void AliTPCv1::StepManager()
1919 // Called at every step in the Time Projection Chamber
1925 TClonesArray &lhits = *fHits;
1928 if(gMC->TrackCharge() && gMC->IsTrackEntering()) {
1931 // Only charged tracks entering the sensitive volume
1934 id = gMC->CurrentVolID(copy);
1938 // sensitive volume (strip)
1940 vol[1]= copy-1; // row number (absolute)
1944 id = gMC->CurrentVolOffID(1,copy);
1950 vol[0] = copy-1; // sector number
1957 vol[0] = copy-1+fTPCParam->GetNInnerSector(); // sector number
1958 vol[1] -= fTPCParam->GetNRowLow(); // row number
1964 // because Jouri wants to have this
1966 gMC->TrackMomentum(p);
1970 hits[3]=0.; // this hit has no energy loss
1971 new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
1973 gMC->TrackPosition(p);
1977 hits[3]=0.; // this hit has no energy loss
1978 new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
1982 gMC->TrackPosition(p);
1983 for(i=0;i<3;++i) hits[i]=p[i];
1984 hits[3]=1; //I'd like to have something positive here (I.Belikov)
1985 new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
1992 //_____________________________________________________________________________