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/06/30 12:07:50 kowal2
19 Updated from the TPC-PreRelease branch
21 Revision 1.21.2.4 2000/06/26 07:39:42 kowal2
22 Changes to obey the coding rules
24 Revision 1.21.2.3 2000/06/25 08:38:41 kowal2
25 Splitted from AliTPCtracking
27 Revision 1.21.2.2 2000/06/16 12:58:13 kowal2
28 Changed parameter settings
30 Revision 1.21.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.21 2000/05/15 10:00:30 kowal2
36 Corrected bug in the TPC geometry, thanks to Ivana Hrivnacova
38 Revision 1.20 2000/04/17 09:37:33 kowal2
39 removed obsolete AliTPCDigitsDisplay.C
41 Revision 1.19.8.2 2000/04/10 08:31:52 kowal2
43 Different geometry for different sectors
44 Updated readout chambers
45 Some modifications to StepManager by J.Belikov
47 Revision 1.19.8.1 2000/04/10 07:56:53 kowal2
48 Not used anymore - removed
50 Revision 1.19 1999/11/04 17:28:07 fca
51 Correct barrel part of HV Degrader
53 Revision 1.18 1999/10/14 16:52:08 fca
54 Only use PDG codes and not GEANT ones
56 Revision 1.17 1999/10/08 06:27:23 fca
57 Corrected bug in the HV degrader geometry, thanks to G.Tabary
59 Revision 1.16 1999/10/04 13:39:54 fca
60 Correct array index problem
62 Revision 1.15 1999/09/29 09:24:34 fca
63 Introduction of the Copyright and cvs Log
68 ///////////////////////////////////////////////////////////////////////////////
70 // Time Projection Chamber version 2 -- detailed TPC and slow simulation //
74 <img src="picts/AliTPCv2Class.gif">
79 ///////////////////////////////////////////////////////////////////////////////
85 #include "AliTPCDigitsArray.h"
89 #include "AliTPCParam.h"
90 #include "AliTPCParamSR.h"
94 //_____________________________________________________________________________
95 AliTPCv2::AliTPCv2(const char *name, const char *title) :
99 // Standard constructor for Time Projection Chamber version 2
105 SetBufferSize(128000);
107 SetGasMixt(2,20,10,-1,0.9,0.1,0.); // Ne-CO2 90-10
113 SetSecLows(1, 2, 3, 19, 20, 21);
114 SetSecUps(37, 38, 39, 37+18, 38+18, 39+18, -1, -1, -1, -1, -1, -1);
115 SetSens(1); // sensitive strips set
118 fTPCParam->Write(fTPCParam->GetTitle());
121 //_____________________________________________________________________________
122 void AliTPCv2::CreateGeometry()
125 // Create the geometry of Time Projection Chamber version 2
129 <img src="picts/AliTPC.gif">
134 <img src="picts/AliTPCv2Tree.gif">
139 Int_t *idtmed = fIdtmed->GetArray();
150 Int_t nInnerSector = fTPCParam->GetNInnerSector()/2;
151 Int_t nOuterSector = fTPCParam->GetNOuterSector()/2;
153 // ---------------------------------------------------
154 // sector specification check
155 // ---------------------------------------------------
159 for (i = 0; i < 6; ++i) {
160 if (fSecLows[i] >= 0 && fSecLows[i] < 2*nInnerSector) {
162 printf("*** SECTOR %d selected\n",fSecLows[i]);
167 printf("*** ALL LOWER SECTORS SELECTED ***\n");
174 for (i = 0; i < 12; ++i) {
175 if (fSecUps[i] > 2*nInnerSector-1 &&
176 fSecUps[i] < 2*(nInnerSector+nOuterSector)) {
178 printf("*** SECTOR %d selected\n",fSecUps[i]);
183 printf("*** ALL UPPER SECTORS SELECTED ***\n");
187 if (ifl1 == 0 && ifl2 == 0) {
188 printf("*** ERROR: AT LEAST ONE SECTOR MUST BE SPECIFIED ***\n");
189 printf("!!! PROGRAM STOPPED !!!\n");
193 if ((fSecAL < 0 || fSecAU < 0) && fSens >= 0) {
194 printf("** ERROR: STRIPS CANNOT BE SPECIFIED FOR ALL SECTORS **\n");
195 printf("!!! PROGRAM STOPPED !!!\n");
199 //--------------------------------------------------------------------
202 // Mother volume (Air) - all volumes will be positioned in it
282 gMC->Gsvolu("TPC ","PCON",idtmed[0],dm,39);
285 //-------------------------------------------------------------------
286 // Tpc Outer INsulator (CO2)
287 //-------------------------------------------------------------------
326 gMC->Gsvolu("TOIN","PCON",idtmed[3],dm,21);
328 //---------------------------------------------------------------
329 // shreds (G10) - TPC Rings
330 //---------------------------------------------------------------
332 gMC->Gsvolu("TPCR","TUBE",idtmed[12],dm,0);
338 gMC->Gsposp("TPCR",1,"TOIN",0.,0.,-253.3,0,"ONLY",dm,3); // left bottom
346 gMC->Gsposp("TPCR",2,"TOIN",0.,0.,253.3,0,"ONLY",dm,3); // right
354 gMC->Gsposp("TPCR",3,"TOIN",0.,0.,-250.7,0,"ONLY",dm,3); // left top
356 //----------------------------------------------------------------
357 // Tpc Outer Contaiment Vessel
358 // mother volume - Al, daughters - composite (sandwich)
359 //----------------------------------------------------------------
395 gMC->Gsvolu("TOCV","PCON",idtmed[4],dm,18);
399 // Tpc SAndwich 1 - Al
405 gMC->Gsvolu("TSA1","TUBE",idtmed[4],dm,3);
407 // Tpc SAndwich 2 - Tedlar
412 gMC->Gsvolu("TSA2","TUBE",idtmed[9],dm,3);
414 // Tpc SAndwich 3 - Kevlar
419 gMC->Gsvolu("TSA3","TUBE",idtmed[5],dm,3);
421 // Tpc SAndwich 4 - NOMEX honeycomb
426 gMC->Gsvolu("TSA4","TUBE",idtmed[5],dm,3);
430 gMC->Gspos("TSA4",1,"TSA3",0.,0.,0.,0,"ONLY");
431 gMC->Gspos("TSA3",1,"TSA2",0.,0.,0.,0,"ONLY");
432 gMC->Gspos("TSA2",1,"TSA1",0.,0.,0.,0,"ONLY");
434 gMC->Gspos("TSA1",1,"TOCV",0.,0.,2.6,0,"ONLY");
438 gMC->Gspos("TOCV",1,"TOIN",0.,0.,0.,0,"ONLY");
440 //-------------------------------------------------------
441 // Tpc Outer Field Cage
442 // mother volume - Al, daughters - composite (sandwich)
443 //-------------------------------------------------------
483 gMC->Gsvolu("TOFC","PCON",idtmed[4],dm,21);
487 // Tpc SAndwich 5 - Al
493 gMC->Gsvolu("TSA5","TUBE",idtmed[4],dm,3);
495 // Tpc SAndwich 6 - Tedlar
500 gMC->Gsvolu("TSA6","TUBE",idtmed[9],dm,3);
502 // Tpc SAndwich 7 - Kevlar
507 gMC->Gsvolu("TSA7","TUBE",idtmed[5],dm,3);
509 // Tpc SAndwich 8 - NOMEX
514 gMC->Gsvolu("TSA8","TUBE",idtmed[6],dm,3);
518 gMC->Gspos("TSA8",1,"TSA7",0.,0.,0.,0,"ONLY");
519 gMC->Gspos("TSA7",1,"TSA6",0.,0.,0.,0,"ONLY");
520 gMC->Gspos("TSA6",1,"TSA5",0.,0.,0.,0,"ONLY");
522 gMC->Gspos("TSA5",1,"TOFC",0.,0.,0.,0,"ONLY");
526 gMC->Gspos("TOFC",1,"TOIN",0.,0.,0.,0,"ONLY");
530 gMC->Gspos("TOIN",1,"TPC ",0.,0.,0.,0,"ONLY");
532 //--------------------------------------------------------------------
533 // Tpc Inner INsulator (CO2)
534 //--------------------------------------------------------------------
549 Float_t tanL = (66.2-59.0)/(255.6-73.3); // tangent of the left cone part
552 dm[7]= 59.0+ (253.6-73.3)*tanL;
633 gMC->Gsvolu("TIIN","PCON",idtmed[3],dm,48);
636 //--------------------------------------------------------------------
637 // Tpc Inner Containment vessel, Left part
638 // mother volume - Al, daughter - composite (sandwich)
639 //--------------------------------------------------------------------
653 Float_t cosL = 1./TMath::Sqrt(1.+tanL*tanL);
654 Float_t sandThick = 2.14; // cone composite thickness
660 dm[7]= 59.0 + (253.6-73.3)*tanL;
667 dm[11]= dm[7]+sandThick/cosL;
672 dm[13]= 59.0+(75.6-73.3)*tanL;
673 dm[14]= dm[13]+sandThick/cosL;
699 gMC->Gsvolu("TICL","PCON",idtmed[4],dm,27);
703 // Tpc SAndwich 9 - Al
712 dm[4]= 59.0+(254.3-73.3)*tanL;
713 dm[5]= dm[4]+sandThick/cosL;
718 dm[7]= 59.0+(78.3-73.3)*tanL;
719 dm[8]= dm[7]+sandThick/cosL;
723 gMC->Gsvolu("TSA9","PCON",idtmed[4],dm,9);
725 // Tpc SAndwich 10 - Tedlar
735 gMC->Gsvolu("TS10","PCON",idtmed[9],dm,9);
737 // Tpc SAndwich 11 - Kevlar
747 gMC->Gsvolu("TS11","PCON",idtmed[5],dm,9);
749 // Tpc SAndwich 12 - NOMEX
759 gMC->Gsvolu("TS12","PCON",idtmed[6],dm,9);
763 gMC->Gspos("TS12",1,"TS11",0.,0.,0.,0,"ONLY");
764 gMC->Gspos("TS11",1,"TS10",0.,0.,0.,0,"ONLY");
765 gMC->Gspos("TS10",1,"TSA9",0.,0.,0.,0,"ONLY");
769 gMC->Gspos("TSA9",1,"TICL",0.,0.,0.,0,"ONLY");
771 //--------------------------------------------------------------------
772 // Tpc Inner Containment vessel, Right part
773 // mother volume - Al, daughter - composite (sandwich)
774 //--------------------------------------------------------------------
800 Float_t tanR = (66.0-59.0)/(250.5-73.3); // to avoid accuracy problems
801 Float_t cosR = 1./TMath::Sqrt(1.+tanR*tanR); //as above
806 dm[13]= 59.0+(75.6-73.3)*tanR;
813 dm[17]= dm[16]+sandThick/cosR;
818 dm[19]= 59.0+(248.4-73.3)*tanR;
819 dm[20]= dm[19]+sandThick/cosR;
833 gMC->Gsvolu("TICR","PCON",idtmed[4],dm,27);
839 // Tpc SAndwich 13 - Al
848 dm[4]= 59.0+(78.3-73.3)*tanR;
849 dm[5]= dm[4]+sandThick/cosR;
854 dm[7]= 59.0+(249.1-73.3)*tanR;
855 dm[8]= dm[7]+sandThick/cosR;
859 gMC->Gsvolu("TS13","PCON",idtmed[4],dm,9);
861 // Tpc SAndwich 14 - Tedlar
871 gMC->Gsvolu("TS14","PCON",idtmed[9],dm,9);
873 // Tpc SAndwich 15 - Kevlar
883 gMC->Gsvolu("TS15","PCON",idtmed[5],dm,9);
885 // Tpc SAndwich 16 - NOMEX
895 gMC->Gsvolu("TS16","PCON",idtmed[6],dm,9);
899 gMC->Gspos("TS16",1,"TS15",0.,0.,0.,0,"ONLY");
900 gMC->Gspos("TS15",1,"TS14",0.,0.,0.,0,"ONLY");
901 gMC->Gspos("TS14",1,"TS13",0.,0.,0.,0,"ONLY");
905 gMC->Gspos("TS13",1,"TICR",0.,0.,0.,0,"ONLY");
907 //------------------------------------------------------
908 // Tpc Inner Field Cage
909 // mother volume - Al, daughters - composite (sandwich)
910 //------------------------------------------------------
952 gMC->Gsvolu("TIFC","PCON",idtmed[4],dm,21);
956 // Tpc Sandwich 17 - Al
962 gMC->Gsvolu("TS17","TUBE",idtmed[4],dm,3);
964 // Tpc Sandwich 18 - Tedlar
969 gMC->Gsvolu("TS18","TUBE",idtmed[9],dm,3);
971 // Tpc Sandwich 19 - Kevlar
976 gMC->Gsvolu("TS19","TUBE",idtmed[5],dm,3);
978 // Tpc Sandwich 20 - NOMEX
983 gMC->Gsvolu("TS20","TUBE",idtmed[6],dm,3);
987 gMC->Gspos("TS20",1,"TS19",0.,0.,0.,0,"ONLY");
988 gMC->Gspos("TS19",1,"TS18",0.,0.,0.,0,"ONLY");
989 gMC->Gspos("TS18",1,"TS17",0.,0.,0.,0,"ONLY");
993 gMC->Gspos("TS17",1,"TIFC",0.,0.,0.,0,"ONLY");
1001 gMC->Gsposp("TPCR",4,"TIIN",0.,0.,-253.3,0,"ONLY",dm,3);
1006 gMC->Gsposp("TPCR",5,"TIIN",0.,0.,250.7,0,"ONLY",dm,3);
1011 gMC->Gsposp("TPCR",6,"TIIN",0.,0.,253.3,0,"ONLY",dm,3);
1015 gMC->Gspos("TICL",1,"TIIN",0.,0.,0.,0,"ONLY");
1019 gMC->Gspos("TICR",1,"TIIN",0.,0.,0.,0,"ONLY");
1023 gMC->Gspos("TIFC",1,"TIIN",0.,0.,0.,0,"ONLY");
1025 // Tpc Sandwich 21 - Al (central barrel)
1031 gMC->Gsvolu("TS21","TUBE",idtmed[4],dm,3);
1033 // Tpc Sandwich 22 - Tedlar (central barrel)
1038 gMC->Gsvolu("TS22","TUBE",idtmed[9],dm,3);
1040 // Tpc Sandwich 23 - Kevlar (central barrel)
1045 gMC->Gsvolu("TS23","TUBE",idtmed[5],dm,3);
1047 // Tpc Sandwich 24 - NOMEX (central barrel)
1052 gMC->Gsvolu("TS24","TUBE",idtmed[6],dm,3);
1056 gMC->Gspos("TS24",1,"TS23",0.,0.,0.,0,"ONLY");
1057 gMC->Gspos("TS23",1,"TS22",0.,0.,0.,0,"ONLY");
1058 gMC->Gspos("TS22",1,"TS21",0.,0.,0.,0,"ONLY");
1060 gMC->Gspos("TS21",1,"TIIN",0.,0.,0.,0,"ONLY");
1062 // put everything into the TPC
1064 gMC->Gspos("TIIN",1,"TPC ",0.,0.,0.,0,"ONLY");
1067 //---------------------------------------------------------
1068 // Tpc Dift Gas volume Nonsensitive (Ne-CO2 90/10)
1069 // and its daughters (HV membrane, rods, readout chambers)
1070 //---------------------------------------------------------
1076 gMC->Gsvolu("TDGN","TUBE",idtmed[1],dm,3); // nonsensitive
1078 // sector opening angles
1080 Float_t innerOpenAngle = fTPCParam->GetInnerAngle();
1081 Float_t outerOpenAngle = fTPCParam->GetOuterAngle();
1083 // sector angle shift
1085 Float_t innerAngleShift = fTPCParam->GetInnerAngleShift();
1087 // All above parameters are identical for inner and outer
1088 // sectors. The distinction is kept for the historical reasons
1089 // and eventually will disappear.
1091 Float_t tanAlpha = TMath::Tan(0.5*innerOpenAngle);
1092 Float_t cosAlpha = TMath::Sqrt(1.+tanAlpha*tanAlpha);
1095 //-------------------------------------------------------------------------
1096 // Tpc Inner Readout Chambers
1097 //-------------------------------------------------------------------------
1101 dm[2]= 1.6; // thickness
1104 gMC->Gsvolu("TIRC","TRD1",idtmed[4],dm,4);
1106 // this volume will be positioned in the empty space
1107 // of the end-cap to avoid overlaps
1114 gMC->Gsvolu("TIC1","TRD1",idtmed[4],dm,4);
1116 //------------------------------------------------
1117 // Tpc Inner readout chamber Pad Plane
1118 //------------------------------------------------
1125 gMC->Gsvolu("TIPP","TRD1",idtmed[12],dm,4);
1129 dm[0] -= 1.218511934;
1130 dm[1] -= 1.218511934;
1133 gMC->Gsvolu("TIC3","TRD1",idtmed[1],dm,4);
1135 gMC->Gspos("TIC3",1,"TIPP",0.,0.15,0.,0,"ONLY");
1137 gMC->Gspos("TIPP",1,"TIRC",0.,1.1,0.,0,"ONLY");
1139 //----------------------------------------------
1140 // Tpc Readout Chambers Empty spaces - for both
1141 // inner and outer sectors
1142 //----------------------------------------------
1144 gMC->Gsvolu("TRCE","TRD1",idtmed[0],dm,0);
1146 // Inner sector - 4 spaces
1157 space = rr*tanAlpha-dm[0];
1159 for(Int_t nsLow=0;nsLow<4;nsLow++){
1162 dm[1]= rr*tanAlpha - space;
1166 gMC->Gsposp("TRCE",nsLow+1,"TIRC",0.,-0.8,zz,0,"ONLY",dm,4);
1172 gMC->Gsposp("TRCE",nsLow+5,"TIC1",0.,1.05,zz-2.1,0,"ONLY",dm,4);
1175 dm[0] = rr*tanAlpha - space;
1181 // dm[1] - this is the dm[1] from the previous TRCE
1185 gMC->Gsposp("TRCE",9,"TIC1",0.,-1.2,0.,0,"ONLY",dm,4);
1188 // TPc Space for Connectors
1195 gMC->Gsvolu("TPSC","BOX ",idtmed[0],dm,3);
1203 gMC->Gsvolu("TPCC","BOX ",idtmed[13],dm,3);
1205 gMC->Gspos("TPCC",1,"TPSC",0.,0.15,0.,0,"ONLY");
1212 Float_t phi1,phi2,phi3,theta1,theta2,theta3; // rotation angles
1214 // inner part of the inner sector - 2 x 20 holes
1216 astep = 20.00096874/19.;
1218 alpha = 10.00048437-astep;
1230 for(ncon=0;ncon<20;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+1,"TIRC",x1,0.3,-12.7875,idrotm[nRotMat],"ONLY");
1244 gMC->Gspos("TPSC",ncon+21,"TIRC",x2,0.3,-2.8625,idrotm[nRotMat],"ONLY");
1255 // outer part of the inner sector - 2 x 25 holes
1257 astep = 20.00096874/24.;
1258 alpha = 10.00048437-astep;
1266 for(ncon=0;ncon<25;ncon++){
1272 phi3 = (alpha>0) ? 0. : 180.;
1273 theta3 = TMath::Abs(alpha);
1275 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1279 gMC->Gspos("TPSC",ncon+41,"TIRC",x1,0.3,7.0625,idrotm[nRotMat],"ONLY");
1280 gMC->Gspos("TPSC",ncon+66,"TIRC",x2,0.3,16.9875,idrotm[nRotMat],"ONLY");
1291 //--------------------------------------------------------------------------
1292 // TPC Outer Readout Chambers
1293 // this is NOT a final design
1294 //--------------------------------------------------------------------------
1298 dm[2]= 1.5; //thickness
1301 gMC->Gsvolu("TORC","TRD1",idtmed[4],dm,4);
1303 //------------------------------------------------
1304 // Tpc Outer readout chamber Pad Plane
1305 //------------------------------------------------
1309 gMC->Gsvolu("TOPP","TRD1",idtmed[12],dm,4);
1311 dm[0] -= 1.218511934;
1312 dm[1] -= 1.218511934;
1315 gMC->Gsvolu("TOC3","TRD1",idtmed[1],dm,4);
1317 gMC->Gspos("TOC3",1,"TOPP",0.,0.15,0.,0,"ONLY");
1319 gMC->Gspos("TOPP",1,"TORC",0.,1.0,0.,0,"ONLY");
1329 gMC->Gsposp("TRCE",10,"TORC",0.,-0.8,-2.15,0,"ONLY",dm,4);
1336 gMC->Gsvolu("TOC1","TRD1",idtmed[4],dm,4);
1343 gMC->Gsposp("TRCE",11,"TOC1",0.,0.,0.,0,"ONLY",dm,4);
1347 //-----------------------------------------------
1348 // Tpc Services Support Wheel
1349 //-----------------------------------------------
1364 gMC->Gsvolu("TSSW","PGON",idtmed[4],dm,10);
1366 // Tpc Services Wheel Cover
1371 gMC->Gsvolu("TSWC","PGON",idtmed[4],dm,10);
1373 // Tpc Service wheel Cover Empty space
1380 gMC->Gsvolu("TSCE","TRD1",idtmed[0],dm,4);
1382 // Tpc services Wheel Empty Spaces
1389 gMC->Gsvolu("TWES","TRD1",idtmed[0],dm,4);
1391 // Tpc Services Wheel Bars
1393 gMC->Gsvolu("TSWB","TRD1",idtmed[4],dm,0);
1403 gMC->Gsposp("TSWB",1,"TWES",0.,0.,-85.125,0,"ONLY",dm,4);
1408 gMC->Gsposp("TSWB",2,"TWES",0.,0.,85.125,0,"ONLY",dm,4);
1410 // TPc ELectronics - right now 30% X0 Si
1417 gMC->Gsvolu("TPEL","TRD1",idtmed[11],dm,4);
1418 gMC->Gspos("TPEL",1,"TWES",0.,0.,0.,0,"ONLY");
1420 //--------------------------------------------------------------------------
1422 //--------------------------------------------------------------------------
1424 // TPc Main Wheel - Al
1430 gMC->Gsvolu("TPMW","TUBE",idtmed[4],dm,3);
1432 // TPc Extra Wheel (to avoid overlapping) - Al
1438 gMC->Gsvolu("TPEW","TUBE",idtmed[4],dm,3);
1440 //--------------------------------------------------------------------------
1441 // Tpc Empty Space for the Readout chambers
1442 //--------------------------------------------------------------------------
1446 Float_t dR = 0.5*(rUp-rLow);
1448 space= 1.4/cosAlpha; // wheel ribs are 2.8 cm wide
1450 dm[0]= rLow*tanAlpha-space;
1451 dm[1]= rUp*tanAlpha-space;
1455 gMC->Gsvolu("TESR","TRD1",idtmed[0],dm,4);
1460 gMC->Gspos("TIC1",1,"TESR",0.,0.75,-dR+23.97,0,"ONLY");
1465 gMC->Gspos("TOC1",1,"TESR",0.,0.75,dR-55.02,0,"ONLY");
1467 // Tpc Empty Space Bars - Al (daughters of TESR)
1471 gMC->Gsvolu("TESB","TRD1",idtmed[4],dm,0);
1475 dm[0]= rLow*tanAlpha-space;
1476 dm[1]= 88.7*tanAlpha-space;
1482 gMC->Gsposp("TESB",1,"TESR",0.,2.05,zBar,0,"ONLY",dm,4);
1486 dm[0]= 131.65*tanAlpha-space;
1487 dm[1]= 136.5*tanAlpha-space;
1490 zBar = -dR +131.65+dm[3]-rLow;
1492 gMC->Gsposp("TESB",2,"TESR",0.,2.05,zBar,0,"ONLY",dm,4);
1496 dm[0]= 240.4*tanAlpha-space;
1497 dm[1]= rUp*tanAlpha-space;
1502 gMC->Gsposp("TESB",3,"TESR",0.,2.05,zBar,0,"ONLY",dm,4);
1504 //------------------------------------------------------
1505 // TPc Lower "S" Sectors
1506 //------------------------------------------------------
1509 Float_t inSecLowEdge = fTPCParam->GetInnerRadiusLow();
1510 Float_t inSecUpEdge = fTPCParam->GetInnerRadiusUp();
1512 dm[0] = inSecLowEdge*TMath::Tan(0.5*innerOpenAngle)-0.01;
1513 dm[1] = inSecUpEdge*TMath::Tan(0.5*innerOpenAngle)-0.01;
1514 dm[2] = 0.5*(250. - 0.3);
1515 dm[3] = 0.5*(inSecUpEdge-inSecLowEdge);
1517 gMC->Gsvolu("TPLS", "TRD1", idtmed[2], dm, 4); // sensitive
1519 //----------------------------------------------------------
1520 // TPc Upper Sectors
1521 //----------------------------------------------------------
1523 Float_t ouSecLowEdge = fTPCParam->GetOuterRadiusLow();
1524 Float_t ouSecUpEdge = fTPCParam->GetOuterRadiusUp();
1526 dm[0] = ouSecLowEdge*TMath::Tan(0.5*outerOpenAngle)-0.01;
1527 dm[1] = ouSecUpEdge*TMath::Tan(0.5*outerOpenAngle)-0.01;
1528 dm[2] = 0.5*(250. - 0.3);
1529 dm[3] = 0.5*(ouSecUpEdge-ouSecLowEdge);
1531 gMC->Gsvolu("TPUS", "TRD1", idtmed[2], dm, 4); // sensitive
1534 // if sensitive strips selected
1538 gMC->Gsvolu("TPSS","TRD1",idtmed[2],dm,0); // sensitive
1540 Int_t nofStrips,nstr;
1542 Float_t stripThick = 0.01; // 100 microns
1547 nofStrips = fTPCParam->GetNRowLow();
1548 deadSpace = fTPCParam->GetInnerWireMount();
1550 dm[2] = 0.5*(250. - 0.3);
1551 dm[3] = 0.5 * stripThick;
1553 for(nstr=0;nstr<nofStrips;nstr++){
1555 r1 = fTPCParam->GetPadRowRadiiLow(nstr);
1556 r2 = r1 + stripThick;
1557 dm[0] = r1 * TMath::Tan(0.5*innerOpenAngle) - deadSpace;
1558 dm[1] = r2 * TMath::Tan(0.5*innerOpenAngle) - deadSpace;
1559 zs = -inSecLowEdge -0.5*(inSecUpEdge-inSecLowEdge);
1563 gMC->Gsposp("TPSS", nstr+1, "TPLS", 0., 0., zs, 0, "ONLY", dm, 4);
1565 gMC->Gsord("TPLS",3);
1569 Int_t nsSave = nofStrips;
1573 nofStrips = fTPCParam->GetNRowUp();
1574 deadSpace = fTPCParam->GetOuterWireMount();
1576 dm[2] = 0.5*(250. - 0.3);
1577 dm[3] = 0.5 * stripThick;
1579 for(nstr=0;nstr<nofStrips;nstr++){
1581 r1 = fTPCParam->GetPadRowRadiiUp(nstr);
1582 r2 = r1 + stripThick;
1583 dm[0] = r1 * TMath::Tan(0.5*outerOpenAngle) - deadSpace;
1584 dm[1] = r2 * TMath::Tan(0.5*outerOpenAngle) - deadSpace;
1585 zs = -ouSecLowEdge -0.5*(ouSecUpEdge-ouSecLowEdge);
1589 gMC->Gsposp("TPSS", nstr+1+nsSave, "TPUS", 0., 0., zs, 0, "ONLY", dm, 4);
1594 //-------------------------------------------------------
1595 // positioning of the empty spaces into the main wheel
1596 // and readout chambers and sectors into the drift gas
1597 //-------------------------------------------------------
1599 Float_t rCenter,xc,yc;
1600 Float_t rInner,rOuter; // center of the inner and outer chamber
1607 for(Int_t ns=0; ns<nInnerSector;ns++){
1609 phi1 = ns * innerOpenAngle + innerAngleShift;
1610 phi1 *= kRaddeg; // in degrees
1612 phi1 = (Float_t)TMath::Nint(phi1) + 270.;
1614 if (phi1 > 360.) phi1 -= 360.;
1619 phi3 = ns * innerOpenAngle + innerAngleShift;
1620 phi3 *= kRaddeg; // in degrees
1622 phi3 = (Float_t)TMath::Nint(phi3);
1624 if(phi3 > 360.) phi3 -= 360.;
1628 // "holes"->End plate
1630 xc = rCenter*TMath::Cos(phi3*kDegrad);
1631 yc = rCenter*TMath::Sin(phi3*kDegrad);
1633 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1635 gMC->Gspos("TESR",ns+1,"TPMW",xc,yc,0.,idrotm[nRotMat],"ONLY");
1637 // TSCE->TSWC (services wheel volumes)
1639 xc = 166.142*TMath::Cos(phi3*kDegrad);
1640 yc = 166.142*TMath::Sin(phi3*kDegrad);
1642 gMC->Gspos("TSCE",ns+1,"TSWC",xc,yc,0.,idrotm[nRotMat],"ONLY");
1643 gMC->Gspos("TWES",ns+1,"TSSW",xc,yc,0.,idrotm[nRotMat],"ONLY");
1645 // readout chambers->TDGN (drift gas)
1647 xc = rInner*TMath::Cos(phi3*kDegrad);
1648 yc = rInner*TMath::Sin(phi3*kDegrad);
1650 gMC->Gspos("TIRC",ns+1,"TDGN",xc,yc,252.,idrotm[nRotMat],"ONLY");
1652 // here lower sectors
1656 // all lower sectors are positioned
1658 gMC->Gspos("TPLS",ns+1,"TDGN",xc,yc,125.15,idrotm[nRotMat],"ONLY");
1660 Gspos("TPLS",ns+nInnerSector+1,"TDGN",xc,yc,-125.15,idrotm[nRotMat],"ONLY");
1664 // only selected sectors are positioned (up to 6 sectors)
1666 for(Int_t sel=0;sel<6;sel++){
1668 if(fSecLows[sel] == ns){
1669 gMC->Gspos("TPLS",ns+1,"TDGN",xc,yc,125.15,idrotm[nRotMat],"ONLY");
1671 else if(fSecLows[sel] == ns+nInnerSector){
1673 Gspos("TPLS",ns+nInnerSector+1,"TDGN",xc,yc,-125.15,idrotm[nRotMat],"ONLY");
1676 } // lower sectors finished
1678 xc = rOuter*TMath::Cos(phi3*kDegrad);
1679 yc = rOuter*TMath::Sin(phi3*kDegrad);
1681 gMC->Gspos("TORC",ns+1,"TDGN",xc,yc,252.1,idrotm[nRotMat],"ONLY");
1683 // here upper sectors
1687 // all upper sectors
1689 gMC->Gspos("TPUS",ns+1,"TDGN",xc,yc,125.15,idrotm[nRotMat],"ONLY");
1691 Gspos("TPUS",ns+nOuterSector+1,"TDGN",xc,yc,-125.15,idrotm[nRotMat],"ONLY");
1695 // only selected sectors (up to 12)
1697 for(Int_t sel=0;sel<12;sel++){
1698 if(fSecUps[sel] == ns+2*nInnerSector){
1699 gMC->Gspos("TPUS",ns+1,"TDGN",xc,yc,125.15,idrotm[nRotMat],"ONLY");
1701 else if(fSecUps[sel] == ns+2*nInnerSector+nOuterSector){
1703 Gspos("TPUS",ns+nOuterSector+1,"TDGN",xc,yc,-125.15,idrotm[nRotMat],"ONLY");
1706 } // upper sectors finished
1710 theta2 = 0.; // reflection, needed for readout chambers!
1712 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1714 xc = rInner*TMath::Cos(phi3*kDegrad);
1715 yc = rInner*TMath::Sin(phi3*kDegrad);
1717 gMC->Gspos("TIRC",ns+nInnerSector+1,"TDGN",xc,yc,-252.,idrotm[nRotMat],"ONLY");
1719 xc = rOuter*TMath::Cos(phi3*kDegrad);
1720 yc = rOuter*TMath::Sin(phi3*kDegrad);
1722 gMC->Gspos("TORC",ns+nOuterSector+1,"TDGN",xc,yc,-252.1,idrotm[nRotMat],"ONLY");
1729 // reflection matrix
1738 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1743 gMC->Gspos("TPMW",1,"TPC ",0.,0.,256.6,0,"ONLY");
1744 gMC->Gspos("TPMW",2,"TPC ",0.,0.,-256.6,idrotm[nRotMat],"ONLY");
1745 gMC->Gspos("TPEW",1,"TPC ",0.,0.,257.65,0,"ONLY");
1746 gMC->Gspos("TPEW",2,"TPC ",0.,0.,-257.65,0,"ONLY");
1750 //-------------------------------------------------------
1751 // Tpc High Voltage Membrane - NOMEX honeycomb
1752 //-------------------------------------------------------
1771 gMC->Gsvolu("THVM","PGON",idtmed[6],dm,10);
1773 gMC->Gspos("THVM",1,"TDGN",0.,0.,0.,0,"ONLY");
1775 //----------------------------------------------------------
1776 // TPc Support Rods - MAKROLON
1777 //----------------------------------------------------------
1783 gMC->Gsvolu("TPSR","TUBE",idtmed[7],dm,3);
1785 for(Int_t nrod=1;nrod<18;nrod++){
1786 Float_t angle=innerOpenAngle*(Float_t)nrod;
1788 xc=82.4*TMath::Cos(angle);
1789 yc=82.4*TMath::Sin(angle);
1791 gMC->Gspos("TPSR",nrod,"TDGN",xc,yc,126.95,0,"ONLY");
1792 gMC->Gspos("TPSR",nrod+17,"TDGN",xc,yc,-126.95,0,"ONLY");
1794 xc=254.2*TMath::Cos(angle);
1795 yc=254.2*TMath::Sin(angle);
1797 gMC->Gspos("TPSR",nrod+34,"TDGN",xc,yc,126.95,0,"ONLY");
1798 gMC->Gspos("TPSR",nrod+51,"TDGN",xc,yc,-126.95,0,"ONLY");
1802 //----------------------------------------------------------
1803 // Tpc High Voltage rod - MAKROLON + Copper cable
1804 //----------------------------------------------------------
1806 // rod with cable (Left)
1812 gMC->Gsvolu("THVL","TUBE",idtmed[7],dm,3);
1820 gMC->Gsvolu("THVC","TUBE",idtmed[10],dm,3);
1828 gMC->Gsvolu("THVE","TUBE",idtmed[1],dm,3);
1830 gMC->Gspos("THVC",1,"THVL",0.,0.,0.,0,"ONLY");
1831 gMC->Gspos("THVE",1,"THVL",0.,0.,0.,0,"ONLY");
1833 // rod without cable
1839 gMC->Gsvolu("THVR","TUBE",idtmed[7],dm,3);
1843 gMC->Gspos("THVL",1,"TDGN",82.4,0.,-126.95,0,"ONLY");
1844 gMC->Gspos("THVL",2,"TDGN",254.2,0.,-126.95,0,"ONLY");
1846 gMC->Gspos("THVR",1,"TDGN",82.4,0.,126.95,0,"ONLY");
1847 gMC->Gspos("THVR",2,"TDGN",254.2,0.,126.95,0,"ONLY");
1851 gMC->Gspos("TDGN",1,"TPC ",0.,0.,0.,0,"ONLY");
1853 // services wheel cover -> wheel
1856 gMC->Gspos("TSWC",1,"TSSW",0.,0.,4.5,0,"ONLY");
1857 gMC->Gspos("TSWC",2,"TSSW",0.,0.,-4.5,0,"ONLY");
1860 // put the wheel into the TPC
1862 gMC->Gspos("TSSW",1,"TPC ",0.,0.,278.7,0,"ONLY");
1863 gMC->Gspos("TSSW",2,"TPC ",0.,0.,-278.7,0,"ONLY");
1865 gMC->Gsord("TPMW",6);
1866 gMC->Gsord("TPLS",3);
1867 gMC->Gsord("TPUS",3);
1868 gMC->Gsord("TDGN",6);
1869 gMC->Gsord("TSSW",6);
1870 gMC->Gsord("TSWC",6);
1872 // put the TPC into ALIC (main mother volume)
1874 gMC->Gspos("TPC ", 1, "ALIC", 0, 0, 0, 0, "ONLY");
1876 } // end of function
1878 //_____________________________________________________________________________
1879 void AliTPCv2::DrawDetector()
1882 // Draw a shaded view of the Time Projection Chamber version 1
1885 // Set everything unseen
1886 gMC->Gsatt("*", "seen", -1);
1888 // Set ALIC mother transparent
1889 gMC->Gsatt("ALIC","SEEN",0);
1891 // Set the volumes visible
1894 gMC->Gsatt("TPC ","SEEN",0);
1895 gMC->Gsatt("TOIN","SEEN",1);
1896 gMC->Gsatt("TOIN","COLO",7);
1897 gMC->Gsatt("TPCR","SEEN",0);
1898 gMC->Gsatt("TOCV","SEEN",1);
1899 gMC->Gsatt("TOCV","COLO",4);
1900 gMC->Gsatt("TSA1","SEEN",0);
1901 gMC->Gsatt("TSA2","SEEN",0);
1902 gMC->Gsatt("TSA3","SEEN",0);
1903 gMC->Gsatt("TSA4","SEEN",0);
1904 gMC->Gsatt("TOFC","SEEN",1);
1905 gMC->Gsatt("TOFC","COLO",4);
1906 gMC->Gsatt("TSA5","SEEN",0);
1907 gMC->Gsatt("TSA6","SEEN",0);
1908 gMC->Gsatt("TSA7","SEEN",0);
1909 gMC->Gsatt("TSA8","SEEN",0);
1910 gMC->Gsatt("TIIN","COLO",7);
1911 gMC->Gsatt("TIIN","SEEN",1);
1912 gMC->Gsatt("TICL","SEEN",0);
1913 gMC->Gsatt("TSA9","SEEN",0);
1914 gMC->Gsatt("TS10","SEEN",0);
1915 gMC->Gsatt("TS11","SEEN",0);
1916 gMC->Gsatt("TS12","SEEN",0);
1917 gMC->Gsatt("TICR","SEEN",0);
1918 gMC->Gsatt("TS13","SEEN",0);
1919 gMC->Gsatt("TS14","SEEN",0);
1920 gMC->Gsatt("TS15","SEEN",0);
1921 gMC->Gsatt("TS16","SEEN",0);
1922 gMC->Gsatt("TIFC","SEEN",1);
1923 gMC->Gsatt("TIFC","COLO",4);
1924 gMC->Gsatt("TS17","SEEN",0);
1925 gMC->Gsatt("TS18","SEEN",0);
1926 gMC->Gsatt("TS19","SEEN",0);
1927 gMC->Gsatt("TS20","SEEN",0);
1928 gMC->Gsatt("TS21","SEEN",0);
1929 gMC->Gsatt("TS22","SEEN",0);
1930 gMC->Gsatt("TS23","SEEN",0);
1931 gMC->Gsatt("TS24","SEEN",0);
1932 gMC->Gsatt("TDGN","SEEN",0);
1933 gMC->Gsatt("TIRC","SEEN",0);
1934 gMC->Gsatt("TIC1","SEEN",1);
1935 gMC->Gsatt("TIPP","SEEN",0);
1936 gMC->Gsatt("TIC3","SEEN",0);
1937 gMC->Gsatt("TRCE","SEEN",0);
1938 gMC->Gsatt("TPSC","SEEN",0);
1939 gMC->Gsatt("TPCC","SEEN",0);
1940 gMC->Gsatt("TORC","SEEN",0);
1941 gMC->Gsatt("TOPP","SEEN",0);
1942 gMC->Gsatt("TOC3","SEEN",0);
1943 gMC->Gsatt("TOC1","SEEN",1);
1944 gMC->Gsatt("TSSW","SEEN",1);
1945 gMC->Gsatt("TSWC","SEEN",1);
1946 gMC->Gsatt("TSCE","SEEN",1);
1947 gMC->Gsatt("TSSW","COLO",3);
1948 gMC->Gsatt("TSWC","COLO",3);
1949 gMC->Gsatt("TSCE","COLO",6);
1950 gMC->Gsatt("TWES","SEEN",0);
1951 gMC->Gsatt("TSWB","SEEN",0);
1952 gMC->Gsatt("TPEL","SEEN",0);
1953 gMC->Gsatt("TPMW","SEEN",1);
1954 gMC->Gsatt("TPEW","SEEN",1);
1955 gMC->Gsatt("TESR","SEEN",1);
1956 gMC->Gsatt("TPMW","COLO",12);
1957 gMC->Gsatt("TPEW","COLO",12);
1958 gMC->Gsatt("TWES","COLO",5);
1959 gMC->Gsatt("TIC1","COLO",5);
1960 gMC->Gsatt("TOC1","COLO",5);
1961 gMC->Gsatt("TESB","SEEN",0);
1962 gMC->Gsatt("TPLS","SEEN",0);
1963 gMC->Gsatt("TPUS","SEEN",0);
1964 gMC->Gsatt("TPSS","SEEN",0);
1965 gMC->Gsatt("THVM","SEEN",1);
1966 gMC->Gsatt("THVM","COLO",11);
1967 gMC->Gsatt("TPSR","SEEN",0);
1968 gMC->Gsatt("THVL","SEEN",0);
1969 gMC->Gsatt("THVC","SEEN",0);
1970 gMC->Gsatt("THVE","SEEN",0);
1971 gMC->Gsatt("THVR","SEEN",0);
1974 gMC->Gdopt("hide", "on");
1975 gMC->Gdopt("shad", "on");
1976 gMC->Gsatt("*", "fill", 7);
1977 gMC->SetClipBox(".");
1978 gMC->SetClipBox("TPMW",-300,300,-300,300,254.,270.);
1979 gMC->SetClipBox("TESR",-300,300,-300,300,254.,270.);
1980 gMC->SetClipBox("TSSW",-300,300,-300,300,283.,284.);
1981 gMC->SetClipBox("TSWC",-300,300,-300,300,283.,284.);
1982 gMC->SetClipBox("*", 0, 300, -300, 300, -290, 290);
1983 gMC->DefaultRange();
1984 gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .025, .025);
1985 gMC->Gdhead(1111, "Time Projection Chamber");
1986 gMC->Gdman(18, 4, "MAN");
1987 gMC->Gdopt("hide","off");
1990 //_____________________________________________________________________________
1991 void AliTPCv2::CreateMaterials()
1994 // Define materials for version 2 of the Time Projection Chamber
1997 AliTPC::CreateMaterials();
2000 //_____________________________________________________________________________
2001 void AliTPCv2::Init()
2004 // Initialises version 2 of the TPC after that it has been built
2007 Int_t *idtmed = fIdtmed->GetArray();
2010 fIdSens=gMC->VolId("TPSS"); // sensitive strips (not always used)
2011 fIdLSec=gMC->VolId("TPLS"); // lower sector
2012 fIdUSec=gMC->VolId("TPUS"); // upper sector
2014 gMC->SetMaxNStep(30000); // max. number of steps increased
2016 gMC->Gstpar(idtmed[2],"LOSS",5); // specific energy loss
2018 printf("*** TPC version 2 initialized ***\n");
2019 printf("Maximum number of steps = %d\n",gMC->GetMaxNStep());
2025 //_____________________________________________________________________________
2026 void AliTPCv2::StepManager()
2029 // Called for every step in the Time Projection Chamber
2033 // parameters used for the energy loss calculations
2035 const Float_t kprim = 14.35; // number of primary collisions per 1 cm
2036 const Float_t kpoti = 20.77e-9; // first ionization potential for Ne/CO2
2037 const Float_t kwIon = 35.97e-9; // energy for the ion-electron pair creation
2040 const Float_t kbig = 1.e10;
2045 TClonesArray &lhits = *fHits;
2048 vol[1]=0; // preset row number to 0
2052 gMC->SetMaxStep(kbig);
2054 if(!gMC->IsTrackAlive()) return; // particle has disappeared
2056 Float_t charge = gMC->TrackCharge();
2058 if(TMath::Abs(charge)<=0.) return; // take only charged particles
2060 // check the sensitive volume
2062 id = gMC->CurrentVolID(copy); // current volume Id
2065 vol[0] = copy-1; // lower sector number
2067 else if(id == fIdUSec){
2068 vol[0] = copy+fTPCParam->GetNInnerSector()-1; // upper sector number
2070 else if(id == fIdSens && gMC->IsTrackEntering()){
2072 // track is entering the sensitive strip
2074 vol[1]= copy-1; // row number (absolute)
2078 id = gMC->CurrentVolOffID(1,copy);
2084 vol[0] = copy-1; // sector number
2091 vol[0] = copy-1+fTPCParam->GetNInnerSector(); // sector number
2092 vol[1] -= fTPCParam->GetNRowLow(); // row number
2098 // because Jouri wants to have this
2100 gMC->TrackMomentum(p);
2104 hits[3]=0.; // this hit has no energy loss
2105 new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
2107 gMC->TrackPosition(p);
2111 hits[3]=0.; // this hit has no energy loss
2112 new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
2118 //-----------------------------------------------------------------
2119 // charged particle is in the sensitive volume
2120 //-----------------------------------------------------------------
2122 if(gMC->TrackStep() > 0) {
2124 Int_t nel = (Int_t)(((gMC->Edep())-kpoti)/kwIon) + 1;
2125 nel=TMath::Min(nel,300); // 300 electrons corresponds to 10 keV
2127 gMC->TrackPosition(p);
2131 hits[3]=(Float_t)nel;
2135 new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
2139 // Stemax calculation for the next step
2143 gMC->TrackMomentum(mom);
2144 Float_t ptot=mom.Rho();
2145 Float_t betaGamma = ptot/gMC->TrackMass();
2147 Int_t pid=gMC->TrackPid();
2148 if((pid==kElectron || pid==kPositron) && ptot > 0.002)
2150 pp = kprim*1.58; // electrons above 20 MeV/c are on the plateau!
2154 pp=kprim*BetheBloch(betaGamma);
2155 if(TMath::Abs(charge) > 1.) pp *= (charge*charge);
2159 gMC->Rndm(random,1); // good, old GRNDM from Geant3
2161 Double_t rnd = (Double_t)random[0];
2163 gMC->SetMaxStep(-TMath::Log(rnd)/pp);
2167 //_____________________________________________________________________________
2168 Float_t AliTPCv2::BetheBloch(Float_t bg)
2171 // Bethe-Bloch energy loss formula
2173 const Double_t kp1=0.76176e-1;
2174 const Double_t kp2=10.632;
2175 const Double_t kp3=0.13279e-4;
2176 const Double_t kp4=1.8631;
2177 const Double_t kp5=1.9479;
2179 Double_t dbg = (Double_t) bg;
2181 Double_t beta = dbg/TMath::Sqrt(1.+dbg*dbg);
2183 Double_t aa = TMath::Power(beta,kp4);
2184 Double_t bb = TMath::Power(1./dbg,kp5);
2186 bb=TMath::Log(kp3+bb);
2188 return ((Float_t)((kp2-aa-bb)*kp1/aa));