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.33 2001/04/20 08:16:47 kowal2
19 Protection against too small betaGamma. Thanks to Ivana and Yves.
21 Revision 1.32 2001/03/13 13:07:34 kowal2
22 Corrected bug in the TPC mother volume geometry.
25 Revision 1.31 2000/11/30 11:48:50 kowal2
26 TLorentzVector.h adde to satisfy the latest changes by Federico
28 Revision 1.30 2000/11/14 10:48:57 kowal2
29 Correct material used for TSA4. Thanks to J. Barbosa.
31 Revision 1.29 2000/11/06 17:24:10 kowal2
32 Corrected bug in the outer containment vessel and
33 the outer field cage geometry.
36 Revision 1.28 2000/11/02 16:55:24 kowal2
37 Corrected bug in the inner containment vessel geometry.
40 Revision 1.27 2000/11/02 07:24:11 kowal2
41 Correction in the TPC geometry.
42 Changes due to the new hit structure.
44 Revision 1.26 2000/10/05 16:16:29 kowal2
45 Corrections of the hit recording algorithm.
47 Revision 1.25 2000/10/02 21:28:18 fca
48 Removal of useless dependecies via forward declarations
50 Revision 1.24 2000/08/28 10:02:30 kowal2
51 Corrected bug in the StepManager
53 Revision 1.23 2000/07/10 20:57:39 hristov
54 Update of TPC code and macros by M.Kowalski
56 Revision 1.22 2000/06/30 12:07:50 kowal2
57 Updated from the TPC-PreRelease branch
59 Revision 1.21.2.4 2000/06/26 07:39:42 kowal2
60 Changes to obey the coding rules
62 Revision 1.21.2.3 2000/06/25 08:38:41 kowal2
63 Splitted from AliTPCtracking
65 Revision 1.21.2.2 2000/06/16 12:58:13 kowal2
66 Changed parameter settings
68 Revision 1.21.2.1 2000/06/09 07:15:07 kowal2
70 Defaults loaded automatically (hard-wired)
71 Optional parameters can be set via macro called in the constructor
73 Revision 1.21 2000/05/15 10:00:30 kowal2
74 Corrected bug in the TPC geometry, thanks to Ivana Hrivnacova
76 Revision 1.20 2000/04/17 09:37:33 kowal2
77 removed obsolete AliTPCDigitsDisplay.C
79 Revision 1.19.8.2 2000/04/10 08:31:52 kowal2
81 Different geometry for different sectors
82 Updated readout chambers
83 Some modifications to StepManager by J.Belikov
85 Revision 1.19.8.1 2000/04/10 07:56:53 kowal2
86 Not used anymore - removed
88 Revision 1.19 1999/11/04 17:28:07 fca
89 Correct barrel part of HV Degrader
91 Revision 1.18 1999/10/14 16:52:08 fca
92 Only use PDG codes and not GEANT ones
94 Revision 1.17 1999/10/08 06:27:23 fca
95 Corrected bug in the HV degrader geometry, thanks to G.Tabary
97 Revision 1.16 1999/10/04 13:39:54 fca
98 Correct array index problem
100 Revision 1.15 1999/09/29 09:24:34 fca
101 Introduction of the Copyright and cvs Log
106 ///////////////////////////////////////////////////////////////////////////////
108 // Time Projection Chamber version 2 -- detailed TPC and slow simulation //
112 <img src="picts/AliTPCv2Class.gif">
117 ///////////////////////////////////////////////////////////////////////////////
122 #include "AliTPCv2.h"
123 #include "AliTPCDigitsArray.h"
126 #include "AliConst.h"
128 #include "AliTPCParam.h"
129 #include "AliTPCParamSR.h"
130 #include "AliTPCTrackHits.h"
131 #include "TLorentzVector.h"
136 //_____________________________________________________________________________
137 AliTPCv2::AliTPCv2(const char *name, const char *title) :
141 // Standard constructor for Time Projection Chamber version 2
147 SetBufferSize(128000);
149 SetGasMixt(2,20,10,-1,0.9,0.1,0.); // Ne-CO2 90-10
155 SetSecLows(1, 2, 3, 19, 20, 21);
156 SetSecUps(37, 38, 39, 37+18, 38+18, 39+18, -1, -1, -1, -1, -1, -1);
157 SetSens(1); // sensitive strips set
160 fTPCParam->Write(fTPCParam->GetTitle());
163 //_____________________________________________________________________________
164 void AliTPCv2::CreateGeometry()
167 // Create the geometry of Time Projection Chamber version 2
171 <img src="picts/AliTPC.gif">
176 <img src="picts/AliTPCv2Tree.gif">
181 Int_t *idtmed = fIdtmed->GetArray();
192 Int_t nInnerSector = fTPCParam->GetNInnerSector()/2;
193 Int_t nOuterSector = fTPCParam->GetNOuterSector()/2;
195 // ---------------------------------------------------
196 // sector specification check
197 // ---------------------------------------------------
201 for (i = 0; i < 6; ++i) {
202 if (fSecLows[i] >= 0 && fSecLows[i] < 2*nInnerSector) {
204 printf("*** SECTOR %d selected\n",fSecLows[i]);
209 printf("*** ALL LOWER SECTORS SELECTED ***\n");
214 printf("*** ERROR: AT LEAST ONE LOWER SECTOR MUST BE SPECIFIED ***\n");
215 printf("!!! PROGRAM STOPPED !!!\n");
221 for (i = 0; i < 12; ++i) {
222 if (fSecUps[i] > 2*nInnerSector-1 &&
223 fSecUps[i] < 2*(nInnerSector+nOuterSector)) {
224 printf("*** SECTOR %d selected\n",fSecUps[i]);
229 printf("*** ALL UPPER SECTORS SELECTED ***\n");
234 //--------------------------------------------------------------------
237 // Mother volume (Air) - all volumes will be positioned in it
317 gMC->Gsvolu("TPC ","PCON",idtmed[0],dm,39);
320 //-------------------------------------------------------------------
321 // Tpc Outer INsulator (CO2)
322 //-------------------------------------------------------------------
361 gMC->Gsvolu("TOIN","PCON",idtmed[3],dm,21);
363 //---------------------------------------------------------------
364 // shreds (G10) - TPC Rings
365 //---------------------------------------------------------------
367 gMC->Gsvolu("TPCR","TUBE",idtmed[12],dm,0);
373 gMC->Gsposp("TPCR",1,"TOIN",0.,0.,-253.3,0,"ONLY",dm,3); // left bottom
381 gMC->Gsposp("TPCR",2,"TOIN",0.,0.,253.3,0,"ONLY",dm,3); // right
389 gMC->Gsposp("TPCR",3,"TOIN",0.,0.,-250.7,0,"ONLY",dm,3); // left top
391 //----------------------------------------------------------------
392 // Tpc Outer Contaiment Vessel
393 // mother volume - Al, daughters - composite (sandwich)
394 //----------------------------------------------------------------
434 gMC->Gsvolu("TOCV","PCON",idtmed[4],dm,21);
438 // Tpc SAndwich 1 - Al
444 gMC->Gsvolu("TSA1","TUBE",idtmed[4],dm,3);
446 // Tpc SAndwich 2 - Tedlar
451 gMC->Gsvolu("TSA2","TUBE",idtmed[9],dm,3);
453 // Tpc SAndwich 3 - Kevlar
458 gMC->Gsvolu("TSA3","TUBE",idtmed[5],dm,3);
460 // Tpc SAndwich 4 - NOMEX honeycomb
465 gMC->Gsvolu("TSA4","TUBE",idtmed[6],dm,3);
469 gMC->Gspos("TSA4",1,"TSA3",0.,0.,0.,0,"ONLY");
470 gMC->Gspos("TSA3",1,"TSA2",0.,0.,0.,0,"ONLY");
471 gMC->Gspos("TSA2",1,"TSA1",0.,0.,0.,0,"ONLY");
473 gMC->Gspos("TSA1",1,"TOCV",0.,0.,2.6,0,"ONLY");
477 gMC->Gspos("TOCV",1,"TOIN",0.,0.,0.,0,"ONLY");
479 //-------------------------------------------------------
480 // Tpc Outer Field Cage
481 // mother volume - Al, daughters - composite (sandwich)
482 //-------------------------------------------------------
522 gMC->Gsvolu("TOFC","PCON",idtmed[4],dm,21);
526 // Tpc SAndwich 5 - Tedlar
532 gMC->Gsvolu("TSA5","TUBE",idtmed[9],dm,3);
534 // Tpc SAndwich 6 - Kevlar
539 gMC->Gsvolu("TSA6","TUBE",idtmed[5],dm,3);
542 // Tpc SAndwich 8 - NOMEX
547 gMC->Gsvolu("TSA7","TUBE",idtmed[6],dm,3);
551 gMC->Gspos("TSA7",1,"TSA6",0.,0.,0.,0,"ONLY");
552 gMC->Gspos("TSA6",1,"TSA5",0.,0.,0.,0,"ONLY");
554 gMC->Gspos("TSA5",1,"TOFC",0.,0.,0.,0,"ONLY");
558 gMC->Gspos("TOFC",1,"TOIN",0.,0.,0.,0,"ONLY");
562 gMC->Gspos("TOIN",1,"TPC ",0.,0.,0.,0,"ONLY");
564 //--------------------------------------------------------------------
565 // Tpc Inner INsulator (CO2)
566 //--------------------------------------------------------------------
581 Float_t tanL = (66.2-59.0)/(255.6-73.3); // tangent of the left cone part
584 dm[7]= 59.0+ (253.6-73.3)*tanL;
665 gMC->Gsvolu("TIIN","PCON",idtmed[3],dm,48);
668 //--------------------------------------------------------------------
669 // Tpc Inner Containment vessel, Left part
670 // mother volume - Al, daughter - composite (sandwich)
671 //--------------------------------------------------------------------
685 Float_t cosL = 1./TMath::Sqrt(1.+tanL*tanL);
686 Float_t sandThick = 2.14; // cone composite thickness
692 dm[7]= 59.0 + (253.6-73.3)*tanL;
699 dm[11]= dm[7]+sandThick/cosL;
704 dm[13]= 59.0+(75.6-73.3)*tanL;
705 dm[14]= dm[13]+sandThick/cosL;
731 gMC->Gsvolu("TICL","PCON",idtmed[4],dm,27);
735 // Tpc SAndwich 9 - Al
744 dm[4]= 59.0+(254.3-73.3)*tanL;
745 dm[5]= dm[4]+sandThick/cosL;
750 dm[7]= 59.0+(78.3-73.3)*tanL;
751 dm[8]= dm[7]+sandThick/cosL;
755 gMC->Gsvolu("TSA9","PCON",idtmed[4],dm,9);
757 // Tpc SAndwich 10 - Tedlar
767 gMC->Gsvolu("TS10","PCON",idtmed[9],dm,9);
769 // Tpc SAndwich 11 - Kevlar
779 gMC->Gsvolu("TS11","PCON",idtmed[5],dm,9);
781 // Tpc SAndwich 12 - NOMEX
791 gMC->Gsvolu("TS12","PCON",idtmed[6],dm,9);
795 gMC->Gspos("TS12",1,"TS11",0.,0.,0.,0,"ONLY");
796 gMC->Gspos("TS11",1,"TS10",0.,0.,0.,0,"ONLY");
797 gMC->Gspos("TS10",1,"TSA9",0.,0.,0.,0,"ONLY");
801 gMC->Gspos("TSA9",1,"TICL",0.,0.,0.,0,"ONLY");
803 //--------------------------------------------------------------------
804 // Tpc Inner Containment vessel, Right part
805 // mother volume - Al, daughter - composite (sandwich)
806 //--------------------------------------------------------------------
832 Float_t tanR = (66.0-59.0)/(250.5-73.3); // to avoid accuracy problems
833 Float_t cosR = 1./TMath::Sqrt(1.+tanR*tanR); //as above
838 dm[13]= 59.0+(75.6-73.3)*tanR;
845 dm[17]= dm[16]+sandThick/cosR;
850 dm[19]= 59.0+(248.4-73.3)*tanR;
851 dm[20]= dm[19]+sandThick/cosR;
865 gMC->Gsvolu("TICR","PCON",idtmed[4],dm,27);
871 // Tpc SAndwich 13 - Al
880 dm[4]= 59.0+(78.3-73.3)*tanR;
881 dm[5]= dm[4]+sandThick/cosR;
886 dm[7]= 59.0+(249.1-73.3)*tanR;
887 dm[8]= dm[7]+sandThick/cosR;
891 gMC->Gsvolu("TS13","PCON",idtmed[4],dm,9);
893 // Tpc SAndwich 14 - Tedlar
903 gMC->Gsvolu("TS14","PCON",idtmed[9],dm,9);
905 // Tpc SAndwich 15 - Kevlar
915 gMC->Gsvolu("TS15","PCON",idtmed[5],dm,9);
917 // Tpc SAndwich 16 - NOMEX
927 gMC->Gsvolu("TS16","PCON",idtmed[6],dm,9);
931 gMC->Gspos("TS16",1,"TS15",0.,0.,0.,0,"ONLY");
932 gMC->Gspos("TS15",1,"TS14",0.,0.,0.,0,"ONLY");
933 gMC->Gspos("TS14",1,"TS13",0.,0.,0.,0,"ONLY");
937 gMC->Gspos("TS13",1,"TICR",0.,0.,0.,0,"ONLY");
939 //------------------------------------------------------
940 // Tpc Inner Field Cage
941 // mother volume - Al, daughters - composite (sandwich)
942 //------------------------------------------------------
984 gMC->Gsvolu("TIFC","PCON",idtmed[4],dm,21);
988 // Tpc Sandwich 17 - Tedlar
994 gMC->Gsvolu("TS17","TUBE",idtmed[9],dm,3);
996 // Tpc Sandwich 18 - Kevlar
1001 gMC->Gsvolu("TS18","TUBE",idtmed[5],dm,3);
1004 // Tpc Sandwich 19 - NOMEX
1009 gMC->Gsvolu("TS19","TUBE",idtmed[6],dm,3);
1013 gMC->Gspos("TS19",1,"TS18",0.,0.,0.,0,"ONLY");
1014 gMC->Gspos("TS18",1,"TS17",0.,0.,0.,0,"ONLY");
1018 gMC->Gspos("TS17",1,"TIFC",0.,0.,0.,0,"ONLY");
1026 gMC->Gsposp("TPCR",4,"TIIN",0.,0.,-253.3,0,"ONLY",dm,3);
1031 gMC->Gsposp("TPCR",5,"TIIN",0.,0.,250.7,0,"ONLY",dm,3);
1036 gMC->Gsposp("TPCR",6,"TIIN",0.,0.,253.3,0,"ONLY",dm,3);
1040 gMC->Gspos("TICL",1,"TIIN",0.,0.,0.,0,"ONLY");
1044 gMC->Gspos("TICR",1,"TIIN",0.,0.,0.,0,"ONLY");
1048 gMC->Gspos("TIFC",1,"TIIN",0.,0.,0.,0,"ONLY");
1050 // Tpc Sandwich 21 - Al (central barrel)
1056 gMC->Gsvolu("TS21","TUBE",idtmed[4],dm,3);
1058 // Tpc Sandwich 22 - Tedlar (central barrel)
1063 gMC->Gsvolu("TS22","TUBE",idtmed[9],dm,3);
1065 // Tpc Sandwich 23 - Kevlar (central barrel)
1070 gMC->Gsvolu("TS23","TUBE",idtmed[5],dm,3);
1072 // Tpc Sandwich 24 - NOMEX (central barrel)
1077 gMC->Gsvolu("TS24","TUBE",idtmed[6],dm,3);
1081 gMC->Gspos("TS24",1,"TS23",0.,0.,0.,0,"ONLY");
1082 gMC->Gspos("TS23",1,"TS22",0.,0.,0.,0,"ONLY");
1083 gMC->Gspos("TS22",1,"TS21",0.,0.,0.,0,"ONLY");
1085 gMC->Gspos("TS21",1,"TIIN",0.,0.,0.,0,"ONLY");
1087 // put everything into the TPC
1089 gMC->Gspos("TIIN",1,"TPC ",0.,0.,0.,0,"ONLY");
1092 //---------------------------------------------------------
1093 // Tpc Dift Gas volume Nonsensitive (Ne-CO2 90/10)
1094 // and its daughters (HV membrane, rods, readout chambers)
1095 //---------------------------------------------------------
1101 gMC->Gsvolu("TDGN","TUBE",idtmed[1],dm,3); // nonsensitive
1103 // sector opening angles
1105 Float_t innerOpenAngle = fTPCParam->GetInnerAngle();
1106 Float_t outerOpenAngle = fTPCParam->GetOuterAngle();
1108 // sector angle shift
1110 Float_t innerAngleShift = fTPCParam->GetInnerAngleShift();
1112 // All above parameters are identical for inner and outer
1113 // sectors. The distinction is kept for the historical reasons
1114 // and eventually will disappear.
1116 Float_t tanAlpha = TMath::Tan(0.5*innerOpenAngle);
1117 Float_t cosAlpha = TMath::Sqrt(1.+tanAlpha*tanAlpha);
1120 //-------------------------------------------------------------------------
1121 // Tpc Inner Readout Chambers
1122 //-------------------------------------------------------------------------
1126 dm[2]= 1.6; // thickness
1129 gMC->Gsvolu("TIRC","TRD1",idtmed[4],dm,4);
1131 // this volume will be positioned in the empty space
1132 // of the end-cap to avoid overlaps
1139 gMC->Gsvolu("TIC1","TRD1",idtmed[4],dm,4);
1141 //------------------------------------------------
1142 // Tpc Inner readout chamber Pad Plane
1143 //------------------------------------------------
1150 gMC->Gsvolu("TIPP","TRD1",idtmed[12],dm,4);
1154 dm[0] -= 1.218511934;
1155 dm[1] -= 1.218511934;
1158 gMC->Gsvolu("TIC3","TRD1",idtmed[1],dm,4);
1160 gMC->Gspos("TIC3",1,"TIPP",0.,0.15,0.,0,"ONLY");
1162 gMC->Gspos("TIPP",1,"TIRC",0.,1.1,0.,0,"ONLY");
1164 //----------------------------------------------
1165 // Tpc Readout Chambers Empty spaces - for both
1166 // inner and outer sectors
1167 //----------------------------------------------
1169 gMC->Gsvolu("TRCE","TRD1",idtmed[0],dm,0);
1171 // Inner sector - 4 spaces
1182 space = rr*tanAlpha-dm[0];
1184 for(Int_t nsLow=0;nsLow<4;nsLow++){
1187 dm[1]= rr*tanAlpha - space;
1191 gMC->Gsposp("TRCE",nsLow+1,"TIRC",0.,-0.8,zz,0,"ONLY",dm,4);
1197 gMC->Gsposp("TRCE",nsLow+5,"TIC1",0.,1.05,zz-2.1,0,"ONLY",dm,4);
1200 dm[0] = rr*tanAlpha - space;
1206 // dm[1] - this is the dm[1] from the previous TRCE
1210 gMC->Gsposp("TRCE",9,"TIC1",0.,-1.2,0.,0,"ONLY",dm,4);
1213 // TPc Space for Connectors
1220 gMC->Gsvolu("TPSC","BOX ",idtmed[0],dm,3);
1228 gMC->Gsvolu("TPCC","BOX ",idtmed[13],dm,3);
1230 gMC->Gspos("TPCC",1,"TPSC",0.,0.15,0.,0,"ONLY");
1237 Float_t phi1,phi2,phi3,theta1,theta2,theta3; // rotation angles
1239 // inner part of the inner sector - 2 x 20 holes
1241 astep = 20.00096874/19.;
1243 alpha = 10.00048437-astep;
1255 for(ncon=0;ncon<20;ncon++){
1261 phi3 = (alpha>0) ? 0. : 180.;
1262 theta3 = TMath::Abs(alpha);
1264 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1268 gMC->Gspos("TPSC",ncon+1,"TIRC",x1,0.3,-12.7875,idrotm[nRotMat],"ONLY");
1269 gMC->Gspos("TPSC",ncon+21,"TIRC",x2,0.3,-2.8625,idrotm[nRotMat],"ONLY");
1280 // outer part of the inner sector - 2 x 25 holes
1282 astep = 20.00096874/24.;
1283 alpha = 10.00048437-astep;
1291 for(ncon=0;ncon<25;ncon++){
1297 phi3 = (alpha>0) ? 0. : 180.;
1298 theta3 = TMath::Abs(alpha);
1300 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1304 gMC->Gspos("TPSC",ncon+41,"TIRC",x1,0.3,7.0625,idrotm[nRotMat],"ONLY");
1305 gMC->Gspos("TPSC",ncon+66,"TIRC",x2,0.3,16.9875,idrotm[nRotMat],"ONLY");
1316 //--------------------------------------------------------------------------
1317 // TPC Outer Readout Chambers
1318 // this is NOT a final design
1319 //--------------------------------------------------------------------------
1323 dm[2]= 1.5; //thickness
1326 gMC->Gsvolu("TORC","TRD1",idtmed[4],dm,4);
1328 //------------------------------------------------
1329 // Tpc Outer readout chamber Pad Plane
1330 //------------------------------------------------
1334 gMC->Gsvolu("TOPP","TRD1",idtmed[12],dm,4);
1336 dm[0] -= 1.218511934;
1337 dm[1] -= 1.218511934;
1340 gMC->Gsvolu("TOC3","TRD1",idtmed[1],dm,4);
1342 gMC->Gspos("TOC3",1,"TOPP",0.,0.15,0.,0,"ONLY");
1344 gMC->Gspos("TOPP",1,"TORC",0.,1.0,0.,0,"ONLY");
1354 gMC->Gsposp("TRCE",10,"TORC",0.,-0.8,-2.15,0,"ONLY",dm,4);
1361 gMC->Gsvolu("TOC1","TRD1",idtmed[4],dm,4);
1368 gMC->Gsposp("TRCE",11,"TOC1",0.,0.,0.,0,"ONLY",dm,4);
1372 //-----------------------------------------------
1373 // Tpc Services Support Wheel
1374 //-----------------------------------------------
1389 gMC->Gsvolu("TSSW","PGON",idtmed[4],dm,10);
1391 // Tpc Services Wheel Cover
1396 gMC->Gsvolu("TSWC","PGON",idtmed[4],dm,10);
1398 // Tpc Service wheel Cover Empty space
1405 gMC->Gsvolu("TSCE","TRD1",idtmed[0],dm,4);
1407 // Tpc services Wheel Empty Spaces
1414 gMC->Gsvolu("TWES","TRD1",idtmed[0],dm,4);
1416 // Tpc Services Wheel Bars
1418 gMC->Gsvolu("TSWB","TRD1",idtmed[4],dm,0);
1428 gMC->Gsposp("TSWB",1,"TWES",0.,0.,-85.125,0,"ONLY",dm,4);
1433 gMC->Gsposp("TSWB",2,"TWES",0.,0.,85.125,0,"ONLY",dm,4);
1435 // TPc ELectronics - right now 30% X0 Si
1442 gMC->Gsvolu("TPEL","TRD1",idtmed[11],dm,4);
1443 gMC->Gspos("TPEL",1,"TWES",0.,0.,0.,0,"ONLY");
1445 //--------------------------------------------------------------------------
1447 //--------------------------------------------------------------------------
1449 // TPc Main Wheel - Al
1455 gMC->Gsvolu("TPMW","TUBE",idtmed[4],dm,3);
1457 // TPc Extra Wheel (to avoid overlapping) - Al
1463 gMC->Gsvolu("TPEW","TUBE",idtmed[4],dm,3);
1465 //--------------------------------------------------------------------------
1466 // Tpc Empty Space for the Readout chambers
1467 //--------------------------------------------------------------------------
1471 Float_t dR = 0.5*(rUp-rLow);
1473 space= 1.4/cosAlpha; // wheel ribs are 2.8 cm wide
1475 dm[0]= rLow*tanAlpha-space;
1476 dm[1]= rUp*tanAlpha-space;
1480 gMC->Gsvolu("TESR","TRD1",idtmed[0],dm,4);
1485 gMC->Gspos("TIC1",1,"TESR",0.,0.75,-dR+23.97,0,"ONLY");
1490 gMC->Gspos("TOC1",1,"TESR",0.,0.75,dR-55.02,0,"ONLY");
1492 // Tpc Empty Space Bars - Al (daughters of TESR)
1496 gMC->Gsvolu("TESB","TRD1",idtmed[4],dm,0);
1500 dm[0]= rLow*tanAlpha-space;
1501 dm[1]= 88.7*tanAlpha-space;
1507 gMC->Gsposp("TESB",1,"TESR",0.,2.05,zBar,0,"ONLY",dm,4);
1511 dm[0]= 131.65*tanAlpha-space;
1512 dm[1]= 136.5*tanAlpha-space;
1515 zBar = -dR +131.65+dm[3]-rLow;
1517 gMC->Gsposp("TESB",2,"TESR",0.,2.05,zBar,0,"ONLY",dm,4);
1521 dm[0]= 240.4*tanAlpha-space;
1522 dm[1]= rUp*tanAlpha-space;
1527 gMC->Gsposp("TESB",3,"TESR",0.,2.05,zBar,0,"ONLY",dm,4);
1529 //------------------------------------------------------
1530 // TPc Lower "S" Sectors
1531 //------------------------------------------------------
1534 Float_t inSecLowEdge = fTPCParam->GetInnerRadiusLow();
1535 Float_t inSecUpEdge = fTPCParam->GetInnerRadiusUp();
1537 dm[0] = inSecLowEdge*TMath::Tan(0.5*innerOpenAngle)-0.01;
1538 dm[1] = inSecUpEdge*TMath::Tan(0.5*innerOpenAngle)-0.01;
1539 dm[2] = 0.5*(250. - 0.3);
1540 dm[3] = 0.5*(inSecUpEdge-inSecLowEdge);
1542 gMC->Gsvolu("TPLS", "TRD1", idtmed[2], dm, 4); // sensitive
1544 //----------------------------------------------------------
1545 // TPc Upper Sectors
1546 //----------------------------------------------------------
1548 Float_t ouSecLowEdge = fTPCParam->GetOuterRadiusLow();
1549 Float_t ouSecUpEdge = fTPCParam->GetOuterRadiusUp();
1551 dm[0] = ouSecLowEdge*TMath::Tan(0.5*outerOpenAngle)-0.01;
1552 dm[1] = ouSecUpEdge*TMath::Tan(0.5*outerOpenAngle)-0.01;
1553 dm[2] = 0.5*(250. - 0.3);
1554 dm[3] = 0.5*(ouSecUpEdge-ouSecLowEdge);
1556 gMC->Gsvolu("TPUS", "TRD1", idtmed[2], dm, 4); // sensitive
1561 gMC->Gsvolu("TPSS","TRD1",idtmed[2],dm,0); // sensitive
1563 Int_t nofStrips,nstr;
1565 Float_t stripThick = 0.01; // 100 microns
1571 // if all lower sectors selected define only 1 strip
1573 nofStrips=((fSecAL <0)||(fSecAL>=0 && fSens<0)) ? 1 : fTPCParam->GetNRowLow();
1574 deadSpace = fTPCParam->GetInnerWireMount();
1576 dm[2] = 0.5*(250. - 0.3);
1577 dm[3] = 0.5 * stripThick;
1580 for(nstr=0;nstr<nofStrips;nstr++){
1582 r1 = fTPCParam->GetPadRowRadiiLow(nstr);
1583 r2 = r1 + stripThick;
1584 dm[0] = r1 * TMath::Tan(0.5*innerOpenAngle) - deadSpace;
1585 dm[1] = r2 * TMath::Tan(0.5*innerOpenAngle) - deadSpace;
1586 zs = -inSecLowEdge -0.5*(inSecUpEdge-inSecLowEdge);
1590 gMC->Gsposp("TPSS", nstr+1, "TPLS", 0., 0., zs, 0, "ONLY", dm, 4);
1595 // strips only if several upper sectors selected end fSens > 0
1597 if(fSecAU >=0 && fSens >0){
1599 Int_t nsSave = nofStrips;
1603 nofStrips = fTPCParam->GetNRowUp();
1604 deadSpace = fTPCParam->GetOuterWireMount();
1606 dm[2] = 0.5*(250. - 0.3);
1607 dm[3] = 0.5 * stripThick;
1610 for(nstr=0;nstr<nofStrips;nstr++){
1612 r1 = fTPCParam->GetPadRowRadiiUp(nstr);
1613 r2 = r1 + stripThick;
1614 dm[0] = r1 * TMath::Tan(0.5*outerOpenAngle) - deadSpace;
1615 dm[1] = r2 * TMath::Tan(0.5*outerOpenAngle) - deadSpace;
1616 zs = -ouSecLowEdge -0.5*(ouSecUpEdge-ouSecLowEdge);
1620 gMC->Gsposp("TPSS", nstr+1+nsSave, "TPUS", 0., 0., zs, 0, "ONLY", dm, 4);
1625 //-------------------------------------------------------
1626 // positioning of the empty spaces into the main wheel
1627 // and readout chambers and sectors into the drift gas
1628 //-------------------------------------------------------
1630 Float_t rCenter,xc,yc;
1631 Float_t rInner,rOuter; // center of the inner and outer chamber
1638 for(Int_t ns=0; ns<nInnerSector;ns++){
1640 phi1 = ns * innerOpenAngle + innerAngleShift;
1641 phi1 *= kRaddeg; // in degrees
1643 phi1 = (Float_t)TMath::Nint(phi1) + 270.;
1645 if (phi1 > 360.) phi1 -= 360.;
1650 phi3 = ns * innerOpenAngle + innerAngleShift;
1651 phi3 *= kRaddeg; // in degrees
1653 phi3 = (Float_t)TMath::Nint(phi3);
1655 if(phi3 > 360.) phi3 -= 360.;
1659 // "holes"->End plate
1661 xc = rCenter*TMath::Cos(phi3*kDegrad);
1662 yc = rCenter*TMath::Sin(phi3*kDegrad);
1664 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1666 gMC->Gspos("TESR",ns+1,"TPMW",xc,yc,0.,idrotm[nRotMat],"ONLY");
1668 // TSCE->TSWC (services wheel volumes)
1670 xc = 166.142*TMath::Cos(phi3*kDegrad);
1671 yc = 166.142*TMath::Sin(phi3*kDegrad);
1673 gMC->Gspos("TSCE",ns+1,"TSWC",xc,yc,0.,idrotm[nRotMat],"ONLY");
1674 gMC->Gspos("TWES",ns+1,"TSSW",xc,yc,0.,idrotm[nRotMat],"ONLY");
1676 // readout chambers->TDGN (drift gas)
1678 xc = rInner*TMath::Cos(phi3*kDegrad);
1679 yc = rInner*TMath::Sin(phi3*kDegrad);
1681 gMC->Gspos("TIRC",ns+1,"TDGN",xc,yc,252.,idrotm[nRotMat],"ONLY");
1683 // here lower sectors
1687 // all lower sectors are positioned
1689 gMC->Gspos("TPLS",ns+1,"TDGN",xc,yc,125.15,idrotm[nRotMat],"ONLY");
1691 Gspos("TPLS",ns+nInnerSector+1,"TDGN",xc,yc,-125.15,idrotm[nRotMat],"ONLY");
1695 // only selected sectors are positioned (up to 6 sectors)
1697 for(Int_t sel=0;sel<6;sel++){
1699 if(fSecLows[sel] == ns){
1700 gMC->Gspos("TPLS",ns+1,"TDGN",xc,yc,125.15,idrotm[nRotMat],"ONLY");
1702 else if(fSecLows[sel] == ns+nInnerSector){
1704 Gspos("TPLS",ns+nInnerSector+1,"TDGN",xc,yc,-125.15,idrotm[nRotMat],"ONLY");
1707 } // lower sectors finished
1709 xc = rOuter*TMath::Cos(phi3*kDegrad);
1710 yc = rOuter*TMath::Sin(phi3*kDegrad);
1712 gMC->Gspos("TORC",ns+1,"TDGN",xc,yc,252.1,idrotm[nRotMat],"ONLY");
1714 // here upper sectors
1718 // all upper sectors
1720 gMC->Gspos("TPUS",ns+1,"TDGN",xc,yc,125.15,idrotm[nRotMat],"ONLY");
1722 Gspos("TPUS",ns+nOuterSector+1,"TDGN",xc,yc,-125.15,idrotm[nRotMat],"ONLY");
1726 // only selected sectors (up to 12)
1728 for(Int_t sel=0;sel<12;sel++){
1729 if(fSecUps[sel] == ns+2*nInnerSector){
1730 gMC->Gspos("TPUS",ns+1,"TDGN",xc,yc,125.15,idrotm[nRotMat],"ONLY");
1732 else if(fSecUps[sel] == ns+2*nInnerSector+nOuterSector){
1734 Gspos("TPUS",ns+nOuterSector+1,"TDGN",xc,yc,-125.15,idrotm[nRotMat],"ONLY");
1737 } // upper sectors finished
1741 theta2 = 0.; // reflection, needed for readout chambers!
1743 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1745 xc = rInner*TMath::Cos(phi3*kDegrad);
1746 yc = rInner*TMath::Sin(phi3*kDegrad);
1748 gMC->Gspos("TIRC",ns+nInnerSector+1,"TDGN",xc,yc,-252.,idrotm[nRotMat],"ONLY");
1750 xc = rOuter*TMath::Cos(phi3*kDegrad);
1751 yc = rOuter*TMath::Sin(phi3*kDegrad);
1753 gMC->Gspos("TORC",ns+nOuterSector+1,"TDGN",xc,yc,-252.1,idrotm[nRotMat],"ONLY");
1760 // reflection matrix
1769 AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3);
1774 gMC->Gspos("TPMW",1,"TPC ",0.,0.,256.6,0,"ONLY");
1775 gMC->Gspos("TPMW",2,"TPC ",0.,0.,-256.6,idrotm[nRotMat],"ONLY");
1776 gMC->Gspos("TPEW",1,"TPC ",0.,0.,257.65,0,"ONLY");
1777 gMC->Gspos("TPEW",2,"TPC ",0.,0.,-257.65,0,"ONLY");
1781 //-------------------------------------------------------
1782 // Tpc High Voltage Membrane - NOMEX honeycomb
1783 //-------------------------------------------------------
1802 gMC->Gsvolu("THVM","PGON",idtmed[6],dm,10);
1804 gMC->Gspos("THVM",1,"TDGN",0.,0.,0.,0,"ONLY");
1806 //----------------------------------------------------------
1807 // TPc Support Rods - MAKROLON
1808 //----------------------------------------------------------
1814 gMC->Gsvolu("TPSR","TUBE",idtmed[7],dm,3);
1816 for(Int_t nrod=1;nrod<18;nrod++){
1817 Float_t angle=innerOpenAngle*(Float_t)nrod;
1819 xc=82.4*TMath::Cos(angle);
1820 yc=82.4*TMath::Sin(angle);
1822 gMC->Gspos("TPSR",nrod,"TDGN",xc,yc,126.95,0,"ONLY");
1823 gMC->Gspos("TPSR",nrod+17,"TDGN",xc,yc,-126.95,0,"ONLY");
1825 xc=254.2*TMath::Cos(angle);
1826 yc=254.2*TMath::Sin(angle);
1828 gMC->Gspos("TPSR",nrod+34,"TDGN",xc,yc,126.95,0,"ONLY");
1829 gMC->Gspos("TPSR",nrod+51,"TDGN",xc,yc,-126.95,0,"ONLY");
1833 //----------------------------------------------------------
1834 // Tpc High Voltage rod - MAKROLON + Copper cable
1835 //----------------------------------------------------------
1837 // rod with cable (Left)
1843 gMC->Gsvolu("THVL","TUBE",idtmed[7],dm,3);
1851 gMC->Gsvolu("THVC","TUBE",idtmed[10],dm,3);
1859 gMC->Gsvolu("THVE","TUBE",idtmed[1],dm,3);
1861 gMC->Gspos("THVC",1,"THVL",0.,0.,0.,0,"ONLY");
1862 gMC->Gspos("THVE",1,"THVL",0.,0.,0.,0,"ONLY");
1864 // rod without cable
1870 gMC->Gsvolu("THVR","TUBE",idtmed[7],dm,3);
1874 gMC->Gspos("THVL",1,"TDGN",82.4,0.,-126.95,0,"ONLY");
1875 gMC->Gspos("THVL",2,"TDGN",254.2,0.,-126.95,0,"ONLY");
1877 gMC->Gspos("THVR",1,"TDGN",82.4,0.,126.95,0,"ONLY");
1878 gMC->Gspos("THVR",2,"TDGN",254.2,0.,126.95,0,"ONLY");
1882 gMC->Gspos("TDGN",1,"TPC ",0.,0.,0.,0,"ONLY");
1884 // services wheel cover -> wheel
1887 gMC->Gspos("TSWC",1,"TSSW",0.,0.,4.5,0,"ONLY");
1888 gMC->Gspos("TSWC",2,"TSSW",0.,0.,-4.5,0,"ONLY");
1891 // put the wheel into the TPC
1893 gMC->Gspos("TSSW",1,"TPC ",0.,0.,278.7,0,"ONLY");
1894 gMC->Gspos("TSSW",2,"TPC ",0.,0.,-278.7,0,"ONLY");
1896 gMC->Gsord("TPMW",6);
1897 if(fSecAL >=0) gMC->Gsord("TPLS",3);
1898 if(fSecAU >=0 && fSens >0) gMC->Gsord("TPUS",3);
1899 gMC->Gsord("TDGN",6);
1900 gMC->Gsord("TSSW",6);
1901 gMC->Gsord("TSWC",6);
1903 // put the TPC into ALIC (main mother volume)
1905 gMC->Gspos("TPC ", 1, "ALIC", 0, 0, 0, 0, "ONLY");
1907 } // end of function
1909 //_____________________________________________________________________________
1910 void AliTPCv2::DrawDetector()
1913 // Draw a shaded view of the Time Projection Chamber version 1
1916 // Set everything unseen
1917 gMC->Gsatt("*", "seen", -1);
1919 // Set ALIC mother transparent
1920 gMC->Gsatt("ALIC","SEEN",0);
1922 // Set the volumes visible
1925 gMC->Gsatt("TPC ","SEEN",0);
1926 gMC->Gsatt("TOIN","SEEN",1);
1927 gMC->Gsatt("TOIN","COLO",7);
1928 gMC->Gsatt("TPCR","SEEN",0);
1929 gMC->Gsatt("TOCV","SEEN",1);
1930 gMC->Gsatt("TOCV","COLO",4);
1931 gMC->Gsatt("TSA1","SEEN",0);
1932 gMC->Gsatt("TSA2","SEEN",0);
1933 gMC->Gsatt("TSA3","SEEN",0);
1934 gMC->Gsatt("TSA4","SEEN",0);
1935 gMC->Gsatt("TOFC","SEEN",1);
1936 gMC->Gsatt("TOFC","COLO",4);
1937 gMC->Gsatt("TSA5","SEEN",0);
1938 gMC->Gsatt("TSA6","SEEN",0);
1939 gMC->Gsatt("TSA7","SEEN",0);
1940 gMC->Gsatt("TIIN","COLO",7);
1941 gMC->Gsatt("TIIN","SEEN",1);
1942 gMC->Gsatt("TICL","SEEN",0);
1943 gMC->Gsatt("TSA9","SEEN",0);
1944 gMC->Gsatt("TS10","SEEN",0);
1945 gMC->Gsatt("TS11","SEEN",0);
1946 gMC->Gsatt("TS12","SEEN",0);
1947 gMC->Gsatt("TICR","SEEN",0);
1948 gMC->Gsatt("TS13","SEEN",0);
1949 gMC->Gsatt("TS14","SEEN",0);
1950 gMC->Gsatt("TS15","SEEN",0);
1951 gMC->Gsatt("TS16","SEEN",0);
1952 gMC->Gsatt("TIFC","SEEN",1);
1953 gMC->Gsatt("TIFC","COLO",4);
1954 gMC->Gsatt("TS17","SEEN",0);
1955 gMC->Gsatt("TS18","SEEN",0);
1956 gMC->Gsatt("TS19","SEEN",0);
1957 gMC->Gsatt("TS21","SEEN",0);
1958 gMC->Gsatt("TS22","SEEN",0);
1959 gMC->Gsatt("TS23","SEEN",0);
1960 gMC->Gsatt("TS24","SEEN",0);
1961 gMC->Gsatt("TDGN","SEEN",0);
1962 gMC->Gsatt("TIRC","SEEN",0);
1963 gMC->Gsatt("TIC1","SEEN",1);
1964 gMC->Gsatt("TIPP","SEEN",0);
1965 gMC->Gsatt("TIC3","SEEN",0);
1966 gMC->Gsatt("TRCE","SEEN",0);
1967 gMC->Gsatt("TPSC","SEEN",0);
1968 gMC->Gsatt("TPCC","SEEN",0);
1969 gMC->Gsatt("TORC","SEEN",0);
1970 gMC->Gsatt("TOPP","SEEN",0);
1971 gMC->Gsatt("TOC3","SEEN",0);
1972 gMC->Gsatt("TOC1","SEEN",1);
1973 gMC->Gsatt("TSSW","SEEN",1);
1974 gMC->Gsatt("TSWC","SEEN",1);
1975 gMC->Gsatt("TSCE","SEEN",1);
1976 gMC->Gsatt("TSSW","COLO",3);
1977 gMC->Gsatt("TSWC","COLO",3);
1978 gMC->Gsatt("TSCE","COLO",6);
1979 gMC->Gsatt("TWES","SEEN",0);
1980 gMC->Gsatt("TSWB","SEEN",0);
1981 gMC->Gsatt("TPEL","SEEN",0);
1982 gMC->Gsatt("TPMW","SEEN",1);
1983 gMC->Gsatt("TPEW","SEEN",1);
1984 gMC->Gsatt("TESR","SEEN",1);
1985 gMC->Gsatt("TPMW","COLO",12);
1986 gMC->Gsatt("TPEW","COLO",12);
1987 gMC->Gsatt("TWES","COLO",5);
1988 gMC->Gsatt("TIC1","COLO",5);
1989 gMC->Gsatt("TOC1","COLO",5);
1990 gMC->Gsatt("TESB","SEEN",0);
1991 gMC->Gsatt("TPLS","SEEN",0);
1992 gMC->Gsatt("TPUS","SEEN",0);
1993 gMC->Gsatt("TPSS","SEEN",0);
1994 gMC->Gsatt("THVM","SEEN",1);
1995 gMC->Gsatt("THVM","COLO",11);
1996 gMC->Gsatt("TPSR","SEEN",0);
1997 gMC->Gsatt("THVL","SEEN",0);
1998 gMC->Gsatt("THVC","SEEN",0);
1999 gMC->Gsatt("THVE","SEEN",0);
2000 gMC->Gsatt("THVR","SEEN",0);
2003 gMC->Gdopt("hide", "on");
2004 gMC->Gdopt("shad", "on");
2005 gMC->Gsatt("*", "fill", 7);
2006 gMC->SetClipBox(".");
2007 gMC->SetClipBox("TPMW",-300,300,-300,300,254.,270.);
2008 gMC->SetClipBox("TESR",-300,300,-300,300,254.,270.);
2009 gMC->SetClipBox("TSSW",-300,300,-300,300,283.,284.);
2010 gMC->SetClipBox("TSWC",-300,300,-300,300,283.,284.);
2011 gMC->SetClipBox("*", 0, 300, -300, 300, -290, 290);
2012 gMC->DefaultRange();
2013 gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .025, .025);
2014 gMC->Gdhead(1111, "Time Projection Chamber");
2015 gMC->Gdman(18, 4, "MAN");
2016 gMC->Gdopt("hide","off");
2019 //_____________________________________________________________________________
2020 void AliTPCv2::CreateMaterials()
2023 // Define materials for version 2 of the Time Projection Chamber
2026 AliTPC::CreateMaterials();
2029 //_____________________________________________________________________________
2030 void AliTPCv2::Init()
2033 // Initialises version 2 of the TPC after that it has been built
2036 Int_t *idtmed = fIdtmed->GetArray();
2042 fIdSens=gMC->VolId("TPSS");
2044 fIdLSec=gMC->VolId("TPLS"); // lower sector
2045 fIdUSec=gMC->VolId("TPUS"); // upper sector
2047 gMC->SetMaxNStep(30000); // max. number of steps increased
2049 gMC->Gstpar(idtmed[2],"LOSS",5); // specific energy loss
2051 printf("*** TPC version 2 initialized ***\n");
2052 printf("Maximum number of steps = %d\n",gMC->GetMaxNStep());
2058 //_____________________________________________________________________________
2059 void AliTPCv2::StepManager()
2062 // Called for every step in the Time Projection Chamber
2066 // parameters used for the energy loss calculations
2068 const Float_t kprim = 14.35; // number of primary collisions per 1 cm
2069 const Float_t kpoti = 20.77e-9; // first ionization potential for Ne/CO2
2070 const Float_t kwIon = 35.97e-9; // energy for the ion-electron pair creation
2073 const Float_t kbig = 1.e10;
2080 vol[1]=0; // preset row number to 0
2084 gMC->SetMaxStep(kbig);
2086 if(!gMC->IsTrackAlive()) return; // particle has disappeared
2088 Float_t charge = gMC->TrackCharge();
2090 if(TMath::Abs(charge)<=0.) return; // take only charged particles
2092 // check the sensitive volume
2094 id = gMC->CurrentVolID(copy); // current volume Id
2097 vol[0] = copy-1; // lower sector number
2099 else if(id == fIdUSec){
2100 vol[0] = copy+fTPCParam->GetNInnerSector()-1; // upper sector number
2102 else if(id == fIdSens && gMC->IsTrackEntering()){
2104 // track is entering the sensitive strip
2106 vol[1]= copy-1; // row number (absolute)
2110 id = gMC->CurrentVolOffID(1,copy);
2116 vol[0] = copy-1; // sector number
2123 vol[0] = copy-1+fTPCParam->GetNInnerSector(); // sector number
2124 vol[1] -= fTPCParam->GetNRowLow(); // row number (starts also from 0)
2130 // because Jouri wants to have this
2132 gMC->TrackMomentum(p);
2136 hits[3]=0.; // this hit has no energy loss
2137 // new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
2139 AddHit(gAlice->CurrentTrack(), vol,hits); //MI change
2143 gMC->TrackPosition(p);
2147 hits[3]=0.; // this hit has no energy loss
2148 // new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
2150 AddHit(gAlice->CurrentTrack(), vol,hits); //MI change
2155 //-----------------------------------------------------------------
2156 // charged particle is in the sensitive volume
2157 //-----------------------------------------------------------------
2159 if(gMC->TrackStep() > 0) {
2161 Int_t nel = (Int_t)(((gMC->Edep())-kpoti)/kwIon) + 1;
2162 nel=TMath::Min(nel,300); // 300 electrons corresponds to 10 keV
2164 gMC->TrackPosition(p);
2168 hits[3]=(Float_t)nel;
2172 // new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits);
2174 gMC->TrackMomentum(p);
2175 Float_t momentum = TMath::Sqrt(p[0]*p[0]+p[1]*p[1]);
2176 Float_t precision = (momentum>0.1) ? 0.002 :0.01;
2177 fTrackHits->SetHitPrecision(precision);
2179 AddHit(gAlice->CurrentTrack(), vol,hits); //MI change
2183 // Stemax calculation for the next step
2187 gMC->TrackMomentum(mom);
2188 Float_t ptot=mom.Rho();
2189 Float_t betaGamma = ptot/gMC->TrackMass();
2191 Int_t pid=gMC->TrackPid();
2192 if((pid==kElectron || pid==kPositron) && ptot > 0.002)
2194 pp = kprim*1.58; // electrons above 20 MeV/c are on the plateau!
2199 betaGamma = TMath::Max(betaGamma,(Float_t)7.e-3); // protection against too small bg
2200 pp=kprim*BetheBloch(betaGamma);
2202 if(TMath::Abs(charge) > 1.) pp *= (charge*charge);
2206 gMC->Rndm(random,1); // good, old GRNDM from Geant3
2208 Double_t rnd = (Double_t)random[0];
2210 gMC->SetMaxStep(-TMath::Log(rnd)/pp);
2214 //_____________________________________________________________________________
2215 Float_t AliTPCv2::BetheBloch(Float_t bg)
2218 // Bethe-Bloch energy loss formula
2220 const Double_t kp1=0.76176e-1;
2221 const Double_t kp2=10.632;
2222 const Double_t kp3=0.13279e-4;
2223 const Double_t kp4=1.8631;
2224 const Double_t kp5=1.9479;
2226 Double_t dbg = (Double_t) bg;
2228 Double_t beta = dbg/TMath::Sqrt(1.+dbg*dbg);
2230 Double_t aa = TMath::Power(beta,kp4);
2231 Double_t bb = TMath::Power(1./dbg,kp5);
2233 bb=TMath::Log(kp3+bb);
2235 return ((Float_t)((kp2-aa-bb)*kp1/aa));