]>
Commit | Line | Data |
---|---|---|
4c039060 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
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 | **************************************************************************/ | |
15 | ||
16 | /* | |
17 | $Log$ | |
2d74ba4f | 18 | Revision 1.45 2003/01/14 10:50:20 alibrary |
19 | Cleanup of STEER coding conventions | |
20 | ||
116cbefd | 21 | Revision 1.44 2002/11/21 22:43:32 alibrary |
22 | Removing AliMC and AliMCProcess | |
23 | ||
4c475d27 | 24 | Revision 1.43 2002/10/14 14:57:43 hristov |
25 | Merging the VirtualMC branch to the main development branch (HEAD) | |
26 | ||
b9d0a01d | 27 | Revision 1.40.6.2 2002/07/24 10:09:01 alibrary |
28 | Updating VirtualMC | |
29 | ||
30 | Revision 1.42 2002/06/12 14:56:56 kowal2 | |
31 | Added track length to the reference hits | |
32 | ||
ac4fb434 | 33 | Revision 1.41 2002/05/27 14:33:15 hristov |
34 | The new class AliTrackReference used (M.Ivanov) | |
35 | ||
da33556f | 36 | Revision 1.40 2002/01/21 17:12:00 kowal2 |
37 | New track hits structure using root containers | |
38 | ||
4ed5dced | 39 | Revision 1.39 2001/05/16 14:57:25 alibrary |
40 | New files for folders and Stack | |
41 | ||
9e1a0ddb | 42 | Revision 1.38 2001/05/08 16:03:06 kowal2 |
43 | Geometry update according to the latest technical spec. | |
44 | ||
cea9b4f7 | 45 | Revision 1.37 2001/04/27 15:23:07 kowal2 |
46 | Correct materian in the central part of the inner containment vessel | |
47 | ||
90222263 | 48 | Revision 1.36 2001/04/26 06:15:12 kowal2 |
49 | Corrected bug in the inner containment vessel (cones) | |
50 | ||
f4900c61 | 51 | Revision 1.35 2001/04/24 11:17:33 kowal2 |
52 | New TPC geometry. | |
53 | ||
79575d04 | 54 | Revision 1.34 2001/04/23 10:20:18 hristov |
55 | Constant casted to avoid ambiguity | |
56 | ||
07521998 | 57 | Revision 1.33 2001/04/20 08:16:47 kowal2 |
58 | Protection against too small betaGamma. Thanks to Ivana and Yves. | |
59 | ||
595bf2c3 | 60 | Revision 1.32 2001/03/13 13:07:34 kowal2 |
61 | Corrected bug in the TPC mother volume geometry. | |
62 | Thanks to A. Morsch | |
63 | ||
7ab50f40 | 64 | Revision 1.31 2000/11/30 11:48:50 kowal2 |
65 | TLorentzVector.h adde to satisfy the latest changes by Federico | |
66 | ||
a383b30d | 67 | Revision 1.30 2000/11/14 10:48:57 kowal2 |
68 | Correct material used for TSA4. Thanks to J. Barbosa. | |
69 | ||
2c668420 | 70 | Revision 1.29 2000/11/06 17:24:10 kowal2 |
71 | Corrected bug in the outer containment vessel and | |
72 | the outer field cage geometry. | |
73 | Thanks to J. Barbosa. | |
74 | ||
720b23b8 | 75 | Revision 1.28 2000/11/02 16:55:24 kowal2 |
76 | Corrected bug in the inner containment vessel geometry. | |
77 | Thanks to J. Belikov | |
78 | ||
08db548a | 79 | Revision 1.27 2000/11/02 07:24:11 kowal2 |
80 | Correction in the TPC geometry. | |
81 | Changes due to the new hit structure. | |
82 | ||
6a905708 | 83 | Revision 1.26 2000/10/05 16:16:29 kowal2 |
84 | Corrections of the hit recording algorithm. | |
85 | ||
d4c354b9 | 86 | Revision 1.25 2000/10/02 21:28:18 fca |
87 | Removal of useless dependecies via forward declarations | |
88 | ||
94de3818 | 89 | Revision 1.24 2000/08/28 10:02:30 kowal2 |
90 | Corrected bug in the StepManager | |
91 | ||
930ee558 | 92 | Revision 1.23 2000/07/10 20:57:39 hristov |
93 | Update of TPC code and macros by M.Kowalski | |
94 | ||
37831078 | 95 | Revision 1.22 2000/06/30 12:07:50 kowal2 |
96 | Updated from the TPC-PreRelease branch | |
97 | ||
73042f01 | 98 | Revision 1.21.2.4 2000/06/26 07:39:42 kowal2 |
99 | Changes to obey the coding rules | |
100 | ||
101 | Revision 1.21.2.3 2000/06/25 08:38:41 kowal2 | |
102 | Splitted from AliTPCtracking | |
103 | ||
104 | Revision 1.21.2.2 2000/06/16 12:58:13 kowal2 | |
105 | Changed parameter settings | |
106 | ||
107 | Revision 1.21.2.1 2000/06/09 07:15:07 kowal2 | |
108 | ||
109 | Defaults loaded automatically (hard-wired) | |
110 | Optional parameters can be set via macro called in the constructor | |
111 | ||
112 | Revision 1.21 2000/05/15 10:00:30 kowal2 | |
113 | Corrected bug in the TPC geometry, thanks to Ivana Hrivnacova | |
114 | ||
e94dd9ca | 115 | Revision 1.20 2000/04/17 09:37:33 kowal2 |
116 | removed obsolete AliTPCDigitsDisplay.C | |
117 | ||
cc80f89e | 118 | Revision 1.19.8.2 2000/04/10 08:31:52 kowal2 |
119 | ||
120 | Different geometry for different sectors | |
121 | Updated readout chambers | |
122 | Some modifications to StepManager by J.Belikov | |
123 | ||
124 | Revision 1.19.8.1 2000/04/10 07:56:53 kowal2 | |
125 | Not used anymore - removed | |
126 | ||
127 | Revision 1.19 1999/11/04 17:28:07 fca | |
128 | Correct barrel part of HV Degrader | |
129 | ||
a5371c42 | 130 | Revision 1.18 1999/10/14 16:52:08 fca |
131 | Only use PDG codes and not GEANT ones | |
132 | ||
69e40cce | 133 | Revision 1.17 1999/10/08 06:27:23 fca |
134 | Corrected bug in the HV degrader geometry, thanks to G.Tabary | |
135 | ||
d183a600 | 136 | Revision 1.16 1999/10/04 13:39:54 fca |
137 | Correct array index problem | |
138 | ||
cdde5b1e | 139 | Revision 1.15 1999/09/29 09:24:34 fca |
140 | Introduction of the Copyright and cvs Log | |
141 | ||
4c039060 | 142 | */ |
143 | ||
73042f01 | 144 | // |
fe4da5cc | 145 | /////////////////////////////////////////////////////////////////////////////// |
146 | // // | |
147 | // Time Projection Chamber version 2 -- detailed TPC and slow simulation // | |
148 | // // | |
149 | //Begin_Html | |
150 | /* | |
1439f98e | 151 | <img src="picts/AliTPCv2Class.gif"> |
fe4da5cc | 152 | */ |
153 | //End_Html | |
154 | // // | |
155 | // // | |
156 | /////////////////////////////////////////////////////////////////////////////// | |
116cbefd | 157 | |
2a49965d | 158 | #include <stdlib.h> |
fe4da5cc | 159 | |
160 | #include <TMath.h> | |
116cbefd | 161 | #include <TPDGCode.h> |
bcac8ae4 | 162 | |
fe4da5cc | 163 | #include "AliConst.h" |
116cbefd | 164 | #include "AliRun.h" |
165 | #include "AliTPCDigitsArray.h" | |
73042f01 | 166 | #include "AliTPCParam.h" |
167 | #include "AliTPCParamSR.h" | |
4ed5dced | 168 | #include "AliTPCTrackHitsV2.h" |
116cbefd | 169 | #include "AliTPCv2.h" |
a383b30d | 170 | #include "TLorentzVector.h" |
6a905708 | 171 | |
fe4da5cc | 172 | ClassImp(AliTPCv2) |
173 | ||
174 | //_____________________________________________________________________________ | |
175 | AliTPCv2::AliTPCv2(const char *name, const char *title) : | |
176 | AliTPC(name, title) | |
177 | { | |
178 | // | |
179 | // Standard constructor for Time Projection Chamber version 2 | |
180 | // | |
37831078 | 181 | fIdSens=0; |
182 | fIdLSec=0; | |
183 | fIdUSec=0; | |
184 | ||
fe4da5cc | 185 | SetBufferSize(128000); |
73042f01 | 186 | |
187 | SetGasMixt(2,20,10,-1,0.9,0.1,0.); // Ne-CO2 90-10 | |
188 | ||
189 | // Default sectors | |
190 | ||
191 | SetSecAL(4); | |
192 | SetSecAU(4); | |
193 | SetSecLows(1, 2, 3, 19, 20, 21); | |
194 | SetSecUps(37, 38, 39, 37+18, 38+18, 39+18, -1, -1, -1, -1, -1, -1); | |
37831078 | 195 | SetSens(1); // sensitive strips set |
73042f01 | 196 | |
197 | if (fTPCParam) | |
198 | fTPCParam->Write(fTPCParam->GetTitle()); | |
fe4da5cc | 199 | } |
200 | ||
201 | //_____________________________________________________________________________ | |
202 | void AliTPCv2::CreateGeometry() | |
203 | { | |
204 | // | |
205 | // Create the geometry of Time Projection Chamber version 2 | |
206 | // | |
207 | //Begin_Html | |
208 | /* | |
37831078 | 209 | <img src="picts/AliTPC.gif"> |
fe4da5cc | 210 | */ |
211 | //End_Html | |
212 | //Begin_Html | |
213 | /* | |
1439f98e | 214 | <img src="picts/AliTPCv2Tree.gif"> |
fe4da5cc | 215 | */ |
216 | //End_Html | |
217 | ||
8c555625 | 218 | |
1283eee5 | 219 | Int_t *idtmed = fIdtmed->GetArray(); |
220 | ||
37831078 | 221 | Float_t dm[50]; |
62a73ee5 | 222 | Int_t idrotm[120]; |
1283eee5 | 223 | |
224 | Int_t nRotMat = 0; | |
225 | ||
d4c354b9 | 226 | Int_t i,ifl1=0; |
1283eee5 | 227 | |
37831078 | 228 | // number of sectors |
229 | ||
1283eee5 | 230 | Int_t nInnerSector = fTPCParam->GetNInnerSector()/2; |
231 | Int_t nOuterSector = fTPCParam->GetNOuterSector()/2; | |
fe4da5cc | 232 | |
233 | // --------------------------------------------------- | |
234 | // sector specification check | |
235 | // --------------------------------------------------- | |
236 | if (fSecAL >= 0) { | |
237 | ifl1 = 0; | |
238 | ||
239 | for (i = 0; i < 6; ++i) { | |
1283eee5 | 240 | if (fSecLows[i] >= 0 && fSecLows[i] < 2*nInnerSector) { |
fe4da5cc | 241 | ifl1 = 1; |
9e1a0ddb | 242 | printf("%s: *** SECTOR %d selected\n",ClassName(),fSecLows[i]); |
fe4da5cc | 243 | } |
244 | } | |
245 | ||
246 | } else { | |
9e1a0ddb | 247 | printf("%s: *** ALL LOWER SECTORS SELECTED ***\n",ClassName()); |
8c555625 | 248 | ifl1 = 1; |
fe4da5cc | 249 | } |
250 | ||
d4c354b9 | 251 | if (ifl1 == 0) { |
9e1a0ddb | 252 | printf("%s: *** ERROR: AT LEAST ONE LOWER SECTOR MUST BE SPECIFIED ***\n",ClassName()); |
253 | printf("%s: !!! PROGRAM STOPPED !!!\n",ClassName()); | |
d4c354b9 | 254 | exit(1); |
255 | } | |
256 | ||
fe4da5cc | 257 | if (fSecAU >= 0) { |
fe4da5cc | 258 | |
259 | for (i = 0; i < 12; ++i) { | |
1283eee5 | 260 | if (fSecUps[i] > 2*nInnerSector-1 && |
261 | fSecUps[i] < 2*(nInnerSector+nOuterSector)) { | |
9e1a0ddb | 262 | printf("%s: *** SECTOR %d selected\n",ClassName(),fSecUps[i]); |
fe4da5cc | 263 | } |
264 | } | |
265 | ||
266 | } else { | |
9e1a0ddb | 267 | printf("%s: *** ALL UPPER SECTORS SELECTED ***\n",ClassName()); |
fe4da5cc | 268 | } |
269 | ||
d4c354b9 | 270 | |
37831078 | 271 | |
272 | //-------------------------------------------------------------------- | |
273 | ||
274 | // | |
79575d04 | 275 | // Mother volume TPC (Air) - all volumes will be positioned in it |
37831078 | 276 | // |
79575d04 | 277 | |
37831078 | 278 | dm[0]=0.; |
279 | dm[1]=360.; | |
79575d04 | 280 | dm[2]=8.; |
1283eee5 | 281 | |
37831078 | 282 | // |
1283eee5 | 283 | |
79575d04 | 284 | dm[3]=-283.7; |
285 | dm[4]=65.6; | |
286 | dm[5]=278.; | |
1283eee5 | 287 | |
37831078 | 288 | // |
1283eee5 | 289 | |
79575d04 | 290 | dm[6]=-253.6; |
291 | dm[7]=65.6; | |
292 | dm[8]=278.; | |
1283eee5 | 293 | |
37831078 | 294 | // |
1283eee5 | 295 | |
79575d04 | 296 | dm[9]=-73.3; |
297 | dm[10]=60.9; | |
298 | dm[11]=278.; | |
1283eee5 | 299 | |
37831078 | 300 | // |
1283eee5 | 301 | |
79575d04 | 302 | dm[12]=-73.3; |
303 | dm[13]=56.9; | |
304 | dm[14]=278.; | |
1283eee5 | 305 | |
37831078 | 306 | // |
1283eee5 | 307 | |
79575d04 | 308 | dm[15]=73.3; |
309 | dm[16]=56.9; | |
310 | dm[17]=278.; | |
1283eee5 | 311 | |
37831078 | 312 | // |
1283eee5 | 313 | |
79575d04 | 314 | dm[18]=73.3; |
315 | dm[19]=60.9; | |
316 | dm[20]=278.; | |
1283eee5 | 317 | |
37831078 | 318 | // |
1283eee5 | 319 | |
79575d04 | 320 | dm[21]=253.6; |
321 | dm[22]=65.6; | |
322 | dm[23]=278.; | |
1283eee5 | 323 | |
37831078 | 324 | // |
1283eee5 | 325 | |
79575d04 | 326 | dm[24]=283.7; |
327 | dm[25]=65.6; | |
328 | dm[26]=278.; | |
329 | ||
330 | gMC->Gsvolu("TPC ","PCON",idtmed[0],dm,27); | |
1283eee5 | 331 | |
79575d04 | 332 | // outer part |
1283eee5 | 333 | |
37831078 | 334 | //------------------------------------------------------------------- |
79575d04 | 335 | // Tpc Outer INsulator (CO2) - contains cont. vessel and field cage |
37831078 | 336 | //------------------------------------------------------------------- |
1283eee5 | 337 | |
37831078 | 338 | dm[0]= 0.; |
339 | dm[1]= 360.; | |
340 | dm[2]= 6.; | |
1283eee5 | 341 | |
37831078 | 342 | // |
1283eee5 | 343 | |
79575d04 | 344 | dm[3]=-253.6; |
345 | dm[4]=258.; | |
346 | dm[5]=275.5; | |
1283eee5 | 347 | |
37831078 | 348 | // |
1283eee5 | 349 | |
79575d04 | 350 | dm[6]=-250.6; |
351 | dm[7]=258.; | |
352 | dm[8]=275.5; | |
1283eee5 | 353 | |
37831078 | 354 | // |
cc80f89e | 355 | |
79575d04 | 356 | dm[9]=-250.6; |
357 | dm[10]=258.; | |
358 | dm[11]=278.; | |
1283eee5 | 359 | |
79575d04 | 360 | // |
1283eee5 | 361 | |
79575d04 | 362 | dm[12]=253.6; |
363 | dm[13]=258.; | |
364 | dm[14]=278.; | |
1283eee5 | 365 | |
37831078 | 366 | // |
1283eee5 | 367 | |
79575d04 | 368 | dm[15]=253.6; |
369 | dm[16]=264.8; | |
370 | dm[17]=278.; | |
1283eee5 | 371 | |
37831078 | 372 | // |
1283eee5 | 373 | |
79575d04 | 374 | dm[18]=256.6; |
375 | dm[19]=264.8; | |
376 | dm[20]=278.; | |
1283eee5 | 377 | |
79575d04 | 378 | gMC->Gsvolu("TOIN","PCON",idtmed[3],dm,21); |
1283eee5 | 379 | |
37831078 | 380 | //---------------------------------------------------------------- |
381 | // Tpc Outer Contaiment Vessel | |
382 | // mother volume - Al, daughters - composite (sandwich) | |
383 | //---------------------------------------------------------------- | |
79575d04 | 384 | |
385 | dm[0]=0.; | |
386 | dm[1]=360.; | |
720b23b8 | 387 | dm[2]=6.; |
1283eee5 | 388 | |
37831078 | 389 | // |
cc80f89e | 390 | |
79575d04 | 391 | dm[3]=-250.6; |
392 | dm[4]=270.4; | |
393 | dm[5]=278.; | |
1283eee5 | 394 | |
37831078 | 395 | // |
1283eee5 | 396 | |
79575d04 | 397 | dm[6]=-247.6; |
398 | dm[7]=270.4; | |
399 | dm[8]=278.; | |
1283eee5 | 400 | |
37831078 | 401 | // |
79575d04 | 402 | |
403 | dm[9]=-247.6; | |
cea9b4f7 | 404 | dm[10]=274.8124; |
79575d04 | 405 | dm[11]=278.; |
406 | ||
37831078 | 407 | // |
1283eee5 | 408 | |
79575d04 | 409 | dm[12]=253.6; |
cea9b4f7 | 410 | dm[13]=274.8124; |
79575d04 | 411 | dm[14]=278.; |
1283eee5 | 412 | |
720b23b8 | 413 | // |
1283eee5 | 414 | |
79575d04 | 415 | dm[15]=253.6; |
416 | dm[16]=264.8; | |
417 | dm[17]=278.; | |
1283eee5 | 418 | |
79575d04 | 419 | // |
720b23b8 | 420 | |
79575d04 | 421 | dm[18]=256.6; |
422 | dm[19]=264.8; | |
423 | dm[20]=278.; | |
720b23b8 | 424 | |
425 | gMC->Gsvolu("TOCV","PCON",idtmed[4],dm,21); | |
1283eee5 | 426 | |
79575d04 | 427 | // Daughter volumes - sandwich |
1283eee5 | 428 | |
37831078 | 429 | // Tpc SAndwich 1 - Al |
79575d04 | 430 | |
cea9b4f7 | 431 | dm[0]=274.8124; |
79575d04 | 432 | dm[1]=278.; |
433 | dm[2]=252.1; | |
1283eee5 | 434 | |
37831078 | 435 | gMC->Gsvolu("TSA1","TUBE",idtmed[4],dm,3); |
1283eee5 | 436 | |
79575d04 | 437 | // Tpc SAndwich 2 - epoxy glue (I use Lexan) |
1283eee5 | 438 | |
37831078 | 439 | dm[0] += 5.e-3; |
440 | dm[1] -= 5.e-3; | |
79575d04 | 441 | |
442 | gMC->Gsvolu("TSA2","TUBE",idtmed[14],dm,3); | |
443 | ||
444 | // Tpc SAndwich 3 - Tedlar | |
445 | ||
446 | dm[0] += 0.01; | |
447 | dm[1] -= 0.01; | |
37831078 | 448 | |
79575d04 | 449 | gMC->Gsvolu("TSA3","TUBE",idtmed[9],dm,3); |
1283eee5 | 450 | |
8c555625 | 451 | |
79575d04 | 452 | // Tpc SAndwich 4 - fiber glass (G10) |
8c555625 | 453 | |
cea9b4f7 | 454 | dm[0] += 3.8e-3; |
455 | dm[1] -= 3.8e-3; | |
8c555625 | 456 | |
79575d04 | 457 | gMC->Gsvolu("TSA4","TUBE",idtmed[12],dm,3); |
1283eee5 | 458 | |
79575d04 | 459 | // Tpc SAndwich 5 - NOMEX honeycomb |
1283eee5 | 460 | |
79575d04 | 461 | dm[0] += 0.075; |
462 | dm[1] -= 0.075; | |
37831078 | 463 | |
79575d04 | 464 | gMC->Gsvolu("TSA5","TUBE",idtmed[6],dm,3); |
465 | ||
466 | // 5->4->3->2->1->TCOV | |
8c555625 | 467 | |
79575d04 | 468 | |
469 | gMC->Gspos("TSA5",1,"TSA4",0.,0.,0.,0,"ONLY"); | |
37831078 | 470 | gMC->Gspos("TSA4",1,"TSA3",0.,0.,0.,0,"ONLY"); |
471 | gMC->Gspos("TSA3",1,"TSA2",0.,0.,0.,0,"ONLY"); | |
79575d04 | 472 | gMC->Gspos("TSA2",1,"TSA1",0.,0.,0.,0,"ONLY"); |
fe4da5cc | 473 | |
79575d04 | 474 | gMC->Gspos("TSA1",1,"TOCV",0.,0.,3.,0,"ONLY"); |
fe4da5cc | 475 | |
37831078 | 476 | // TCOV-> TOIN |
fe4da5cc | 477 | |
37831078 | 478 | gMC->Gspos("TOCV",1,"TOIN",0.,0.,0.,0,"ONLY"); |
fe4da5cc | 479 | |
37831078 | 480 | //------------------------------------------------------- |
481 | // Tpc Outer Field Cage | |
482 | // mother volume - Al, daughters - composite (sandwich) | |
483 | //------------------------------------------------------- | |
1283eee5 | 484 | |
37831078 | 485 | dm[0]=0.; |
486 | dm[1]=360.; | |
487 | dm[2]=6.; | |
1283eee5 | 488 | |
79575d04 | 489 | // |
490 | ||
491 | dm[3]=-253.6; | |
492 | dm[4]=258.; | |
493 | dm[5]=275.5; | |
1283eee5 | 494 | |
37831078 | 495 | // |
1283eee5 | 496 | |
79575d04 | 497 | dm[6]=-250.6; |
498 | dm[7]=258.; | |
499 | dm[8]=275.5; | |
1283eee5 | 500 | |
37831078 | 501 | // |
79575d04 | 502 | |
503 | dm[9]=-250.6; | |
504 | dm[10]=258.; | |
cea9b4f7 | 505 | dm[11]=260.0476; |
1283eee5 | 506 | |
37831078 | 507 | // |
1283eee5 | 508 | |
79575d04 | 509 | dm[12]=250.6; |
510 | dm[13]=258.; | |
cea9b4f7 | 511 | dm[14]=260.0476; |
1283eee5 | 512 | |
37831078 | 513 | // |
1283eee5 | 514 | |
79575d04 | 515 | dm[15]=250.6; |
516 | dm[16]=258.; | |
517 | dm[17]=275.5; | |
1283eee5 | 518 | |
37831078 | 519 | // |
1283eee5 | 520 | |
79575d04 | 521 | dm[18]=253.6; |
522 | dm[19]=258.; | |
523 | dm[20]=275.5; | |
1283eee5 | 524 | |
79575d04 | 525 | gMC->Gsvolu("TOFC","PCON",idtmed[4],dm,21); |
1283eee5 | 526 | |
37831078 | 527 | // Daughter volumes |
1283eee5 | 528 | |
79575d04 | 529 | // Tpc SAndwich 6 - Tedlar |
1283eee5 | 530 | |
37831078 | 531 | dm[0]= 258.; |
cea9b4f7 | 532 | dm[1]= 260.0476; |
79575d04 | 533 | dm[2]= 252.1; |
1283eee5 | 534 | |
79575d04 | 535 | gMC->Gsvolu("TSA6","TUBE",idtmed[9],dm,3); |
1283eee5 | 536 | |
79575d04 | 537 | // Tpc SAndwich 7 - fiber glass |
1283eee5 | 538 | |
cea9b4f7 | 539 | dm[0] += 3.8e-3; |
540 | dm[1] -= 3.8e-3; | |
1283eee5 | 541 | |
79575d04 | 542 | gMC->Gsvolu("TSA7","TUBE",idtmed[12],dm,3); |
1283eee5 | 543 | |
1283eee5 | 544 | |
37831078 | 545 | // Tpc SAndwich 8 - NOMEX |
1283eee5 | 546 | |
37831078 | 547 | dm[0] += 0.02; |
548 | dm[1] -= 0.02; | |
1283eee5 | 549 | |
79575d04 | 550 | gMC->Gsvolu("TSA8","TUBE",idtmed[6],dm,3); |
1283eee5 | 551 | |
79575d04 | 552 | // 8->7->6->TOFC |
1283eee5 | 553 | |
79575d04 | 554 | gMC->Gspos("TSA8",1,"TSA7",0.,0.,0.,0,"ONLY"); |
555 | gMC->Gspos("TSA7",1,"TSA6",0.,0.,0.,0,"ONLY"); | |
556 | gMC->Gspos("TSA6",1,"TOFC",0.,0.,0.,0,"ONLY"); | |
fe4da5cc | 557 | |
37831078 | 558 | // TOFC->TOIN |
fe4da5cc | 559 | |
79575d04 | 560 | gMC->Gspos("TOFC",1,"TOIN",0.,0.,0.,0,"ONLY"); |
1283eee5 | 561 | |
37831078 | 562 | // TOIN->TPC |
1283eee5 | 563 | |
37831078 | 564 | gMC->Gspos("TOIN",1,"TPC ",0.,0.,0.,0,"ONLY"); |
1283eee5 | 565 | |
79575d04 | 566 | // inner part |
1283eee5 | 567 | |
79575d04 | 568 | //-------------------------------------------------------------------- |
569 | // Tpc Inner INsulator (CO2) - inner f.c. will be placed there | |
570 | // Inner containment vessel will be placed directly in the TPC | |
571 | //-------------------------------------------------------------------- | |
1283eee5 | 572 | |
37831078 | 573 | dm[0]=0.; |
79575d04 | 574 | dm[1]=360.; |
575 | dm[2]=4.; | |
1283eee5 | 576 | |
79575d04 | 577 | // |
1283eee5 | 578 | |
79575d04 | 579 | dm[3]=-253.6; |
580 | dm[4]=65.9; | |
581 | dm[5]=79.2; | |
1283eee5 | 582 | |
37831078 | 583 | // |
1283eee5 | 584 | |
79575d04 | 585 | dm[6]=-73.3; |
586 | dm[7]=61.2; | |
587 | dm[8]=79.2; | |
1283eee5 | 588 | |
37831078 | 589 | // |
1283eee5 | 590 | |
79575d04 | 591 | dm[9]=73.3; |
592 | dm[10]=61.2; | |
593 | dm[11]=79.2; | |
1283eee5 | 594 | |
37831078 | 595 | // |
1283eee5 | 596 | |
79575d04 | 597 | dm[12]=253.6; |
598 | dm[13]=65.9; | |
599 | dm[14]=79.2; | |
1283eee5 | 600 | |
79575d04 | 601 | gMC->Gsvolu("TIIN","PCON",idtmed[3],dm,15); |
1283eee5 | 602 | |
79575d04 | 603 | // the middle part of the F.C. is thinner - carve out the strip - Ne-CO2 |
1283eee5 | 604 | |
79575d04 | 605 | dm[0]=79.16; |
606 | dm[1]=79.2; | |
607 | dm[2]=88.; | |
1283eee5 | 608 | |
79575d04 | 609 | gMC->Gsvolu("TII1","TUBE",idtmed[1],dm,3); |
1283eee5 | 610 | |
79575d04 | 611 | gMC->Gspos("TII1",1,"TIIN",0.,0.,0.,0,"ONLY"); |
1283eee5 | 612 | |
79575d04 | 613 | //----------------------------------------------------- |
614 | // Tpc Inner Field Cage | |
615 | // mother volume - Al, daughters - composite (sandwich) | |
616 | //------------------------------------------------------ | |
1283eee5 | 617 | |
79575d04 | 618 | dm[0]=0.; |
619 | dm[1]=360.; | |
620 | dm[2]=10.; | |
1283eee5 | 621 | |
37831078 | 622 | // |
1283eee5 | 623 | |
79575d04 | 624 | dm[3]=-253.6; |
625 | dm[4]=70.3; | |
626 | dm[5]=79.2; | |
1283eee5 | 627 | |
37831078 | 628 | // |
1283eee5 | 629 | |
79575d04 | 630 | dm[6]=-250.6; |
631 | dm[7]=70.3; | |
632 | dm[8]=79.2; | |
1283eee5 | 633 | |
37831078 | 634 | // |
1283eee5 | 635 | |
79575d04 | 636 | dm[9]=-250.6; |
cea9b4f7 | 637 | dm[10]=77.0524; |
79575d04 | 638 | dm[11]=79.2; |
37831078 | 639 | |
640 | // | |
641 | ||
79575d04 | 642 | dm[12]=-88.; |
cea9b4f7 | 643 | dm[13]=77.0524; |
79575d04 | 644 | dm[14]=79.2; |
1283eee5 | 645 | |
37831078 | 646 | // |
1283eee5 | 647 | |
79575d04 | 648 | dm[15]=-88.; |
cea9b4f7 | 649 | dm[16]=77.0924; |
79575d04 | 650 | dm[17]=79.16; |
1283eee5 | 651 | |
652 | // | |
37831078 | 653 | |
79575d04 | 654 | dm[18]=88.; |
cea9b4f7 | 655 | dm[19]=77.0924; |
79575d04 | 656 | dm[20]=79.16; |
37831078 | 657 | |
1283eee5 | 658 | // |
659 | ||
79575d04 | 660 | dm[21]=88.; |
cea9b4f7 | 661 | dm[22]=77.0524; |
79575d04 | 662 | dm[23]=79.2; |
1283eee5 | 663 | |
37831078 | 664 | // |
1283eee5 | 665 | |
79575d04 | 666 | dm[24]=250.6; |
cea9b4f7 | 667 | dm[25]=77.0524; |
79575d04 | 668 | dm[26]=79.2; |
1283eee5 | 669 | |
37831078 | 670 | // |
1283eee5 | 671 | |
79575d04 | 672 | dm[27]=250.6; |
673 | dm[28]=70.3; | |
674 | dm[29]=79.2; | |
1283eee5 | 675 | |
37831078 | 676 | // |
1283eee5 | 677 | |
79575d04 | 678 | dm[30]=253.6; |
679 | dm[31]=70.3; | |
680 | dm[32]=79.2; | |
1283eee5 | 681 | |
79575d04 | 682 | gMC->Gsvolu("TIFC","PCON",idtmed[4],dm,33); |
1283eee5 | 683 | |
79575d04 | 684 | // daughter volumes - central part |
1283eee5 | 685 | |
79575d04 | 686 | // Tpc Sandwich 9 -Tedlar |
1283eee5 | 687 | |
cea9b4f7 | 688 | dm[0]=77.0924; |
79575d04 | 689 | dm[1]=79.16; |
690 | dm[2]=88.; | |
1283eee5 | 691 | |
79575d04 | 692 | gMC->Gsvolu("TSA9","TUBE",idtmed[9],dm,3); |
1283eee5 | 693 | |
79575d04 | 694 | // Tpc Sandwich 10 - fiber glass (G10) |
1283eee5 | 695 | |
cea9b4f7 | 696 | dm[0] += 3.8e-3; |
697 | dm[1] -= 3.8e-3; | |
1283eee5 | 698 | |
79575d04 | 699 | gMC->Gsvolu("TS10","TUBE",idtmed[12],dm,3); |
1283eee5 | 700 | |
79575d04 | 701 | // Tpc Sandwich 11 - NOMEX |
1283eee5 | 702 | |
79575d04 | 703 | dm[0] += 0.03; |
704 | dm[1] -= 0.03; | |
1283eee5 | 705 | |
79575d04 | 706 | gMC->Gsvolu("TS11","TUBE",idtmed[6],dm,3); |
1283eee5 | 707 | |
79575d04 | 708 | // 11->10->9->TIFC |
1283eee5 | 709 | |
79575d04 | 710 | gMC->Gspos("TS11",1,"TS10",0.,0.,0.,0,"ONLY"); |
711 | gMC->Gspos("TS10",1,"TSA9",0.,0.,0.,0,"ONLY"); | |
1283eee5 | 712 | |
79575d04 | 713 | gMC->Gspos("TSA9",1,"TIFC",0.,0.,0.,0,"ONLY"); |
1283eee5 | 714 | |
79575d04 | 715 | // daughter volumes - outer parts (reinforced) |
1283eee5 | 716 | |
79575d04 | 717 | // Tpc Sandwich 12 -Tedlar |
1283eee5 | 718 | |
cea9b4f7 | 719 | dm[0]=77.0524; |
79575d04 | 720 | dm[1]=79.2; |
721 | dm[2]=82.05; | |
1283eee5 | 722 | |
79575d04 | 723 | gMC->Gsvolu("TS12","TUBE",idtmed[9],dm,3); |
1283eee5 | 724 | |
79575d04 | 725 | // Tpc Sandwich 13 - fiber glass (G10) |
1283eee5 | 726 | |
cea9b4f7 | 727 | dm[0] += 3.8e-3; |
728 | dm[1] -= 3.8e-3; | |
1283eee5 | 729 | |
79575d04 | 730 | gMC->Gsvolu("TS13","TUBE",idtmed[12],dm,3); |
1283eee5 | 731 | |
79575d04 | 732 | // Tpc Sandwich 14 - NOMEX |
1283eee5 | 733 | |
79575d04 | 734 | dm[0] += 0.07; |
735 | dm[1] -= 0.07; | |
1283eee5 | 736 | |
79575d04 | 737 | gMC->Gsvolu("TS14","TUBE",idtmed[6],dm,3); |
1283eee5 | 738 | |
79575d04 | 739 | // 14->13->12->TIFC |
1283eee5 | 740 | |
79575d04 | 741 | gMC->Gspos("TS14",1,"TS13",0.,0.,0.,0,"ONLY"); |
742 | gMC->Gspos("TS13",1,"TS12",0.,0.,0.,0,"ONLY"); | |
1283eee5 | 743 | |
79575d04 | 744 | gMC->Gspos("TS12",1,"TIFC",0.,0.,170.05,0,"ONLY"); |
745 | gMC->Gspos("TS12",2,"TIFC",0.,0.,-170.05,0,"ONLY"); | |
1283eee5 | 746 | |
79575d04 | 747 | // place this inside the inner insulator |
1283eee5 | 748 | |
79575d04 | 749 | gMC->Gspos("TIFC",1,"TIIN",0.,0.,0.,0,"ONLY"); |
1283eee5 | 750 | |
79575d04 | 751 | // and now in the TPC... |
1283eee5 | 752 | |
79575d04 | 753 | gMC->Gspos("TIIN",1,"TPC ",0.,0.,0.,0,"ONLY"); |
37831078 | 754 | |
79575d04 | 755 | //--------------------------------------------------------- |
756 | // Tpc Inner Containment vessel - Cones | |
757 | //--------------------------------------------------------- | |
1283eee5 | 758 | |
79575d04 | 759 | dm[0]=0.; |
760 | dm[1]=360.; | |
37831078 | 761 | dm[2]=8.; |
1283eee5 | 762 | |
37831078 | 763 | // |
1283eee5 | 764 | |
79575d04 | 765 | dm[3]=71.8; |
766 | dm[4]=56.9; | |
767 | dm[5]=59.4; | |
1283eee5 | 768 | |
37831078 | 769 | // |
1283eee5 | 770 | |
79575d04 | 771 | dm[6]=73.; |
772 | dm[7]=56.9; | |
773 | dm[8]=59.4; | |
1283eee5 | 774 | |
37831078 | 775 | // |
1283eee5 | 776 | |
79575d04 | 777 | dm[9]=73.; |
778 | dm[10]=56.9; | |
779 | dm[11]=61.2; | |
1283eee5 | 780 | |
37831078 | 781 | // |
1283eee5 | 782 | |
79575d04 | 783 | dm[12]=73.3; |
784 | dm[13]=56.9; | |
785 | dm[14]=61.2; | |
1283eee5 | 786 | |
37831078 | 787 | // |
79575d04 | 788 | |
789 | dm[15]=73.3; | |
790 | dm[16]=60.9; | |
791 | dm[17]=61.2; | |
1283eee5 | 792 | |
79575d04 | 793 | // |
1283eee5 | 794 | |
79575d04 | 795 | dm[18]=253.6; |
796 | dm[19]=65.6; | |
797 | dm[20]=65.9; | |
1283eee5 | 798 | |
37831078 | 799 | // |
1283eee5 | 800 | |
79575d04 | 801 | dm[21]=253.6; |
802 | dm[22]=65.6; | |
f4900c61 | 803 | dm[23]=74.6; |
1283eee5 | 804 | |
37831078 | 805 | // |
1283eee5 | 806 | |
f4900c61 | 807 | dm[24]=256.6; |
79575d04 | 808 | dm[25]=65.6; |
f4900c61 | 809 | dm[26]=74.6; |
1283eee5 | 810 | |
79575d04 | 811 | gMC->Gsvolu("TICC","PCON",idtmed[4],dm,27); |
1283eee5 | 812 | |
79575d04 | 813 | Float_t phi1,phi2,phi3,theta1,theta2,theta3; // rotation angles |
1283eee5 | 814 | |
79575d04 | 815 | // reflection matrix |
816 | ||
817 | theta1 = 90.; | |
818 | phi1 = 0.; | |
819 | theta2 = 90.; | |
820 | phi2 = 270.; | |
821 | theta3 = 180.; | |
822 | phi3 = 0.; | |
1283eee5 | 823 | |
79575d04 | 824 | AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3); |
1283eee5 | 825 | |
79575d04 | 826 | gMC->Gspos("TICC",1,"TPC ",0.,0.,0.,0,"ONLY"); |
827 | gMC->Gspos("TICC",2,"TPC ",0.,0.,0.,idrotm[nRotMat],"ONLY"); | |
1283eee5 | 828 | |
1283eee5 | 829 | |
79575d04 | 830 | //--------------------------------------------------------- |
831 | // Tpc Inner Containment vessel - Middle part -Al | |
832 | //--------------------------------------------------------- | |
1283eee5 | 833 | |
79575d04 | 834 | dm[0]=0.; |
835 | dm[1]=360.; | |
836 | dm[2]=6.; | |
1283eee5 | 837 | |
37831078 | 838 | // |
1283eee5 | 839 | |
79575d04 | 840 | dm[3]=-71.6; |
841 | dm[4]=60.2; | |
842 | dm[5]=61.2; | |
1283eee5 | 843 | |
37831078 | 844 | // |
1283eee5 | 845 | |
79575d04 | 846 | dm[6]=-69.1; |
847 | dm[7]=60.2; | |
848 | dm[8]=61.2; | |
1283eee5 | 849 | |
37831078 | 850 | // |
1283eee5 | 851 | |
79575d04 | 852 | dm[9]=-69.1; |
cea9b4f7 | 853 | dm[10]=60.6224; |
79575d04 | 854 | dm[11]=61.2; |
1283eee5 | 855 | |
fe4da5cc | 856 | // |
857 | ||
79575d04 | 858 | dm[12]=69.1; |
cea9b4f7 | 859 | dm[13]=60.6224; |
79575d04 | 860 | dm[14]=61.2; |
fe4da5cc | 861 | |
fe4da5cc | 862 | // |
863 | ||
79575d04 | 864 | dm[15]=69.1; |
865 | dm[16]=60.2; | |
866 | dm[17]=61.2; | |
37831078 | 867 | |
fe4da5cc | 868 | // |
37831078 | 869 | |
79575d04 | 870 | dm[18]=71.6; |
871 | dm[19]=60.2; | |
872 | dm[20]=61.2; | |
37831078 | 873 | |
79575d04 | 874 | gMC->Gsvolu("TICM","PCON",idtmed[4],dm,21); |
fe4da5cc | 875 | |
79575d04 | 876 | // Tpc Sandwich 15 - Al |
37831078 | 877 | |
cea9b4f7 | 878 | dm[0]=60.6224; |
79575d04 | 879 | dm[1]=61.2; |
880 | dm[2]=70.1; | |
37831078 | 881 | |
79575d04 | 882 | gMC->Gsvolu("TS15","TUBE",idtmed[4],dm,3); |
fe4da5cc | 883 | |
79575d04 | 884 | // Tpc Sandwich 16 - epoxy glue |
fe4da5cc | 885 | |
79575d04 | 886 | dm[0] += 5.e-3; |
887 | dm[1] -= 5.e-3; | |
fe4da5cc | 888 | |
79575d04 | 889 | gMC->Gsvolu("TS16","TUBE",idtmed[14],dm,3); |
fe4da5cc | 890 | |
6a905708 | 891 | // Tpc Sandwich 17 - Tedlar |
37831078 | 892 | |
79575d04 | 893 | dm[0] += 0.01; |
894 | dm[1] -= 0.01; | |
37831078 | 895 | |
6a905708 | 896 | gMC->Gsvolu("TS17","TUBE",idtmed[9],dm,3); |
37831078 | 897 | |
cea9b4f7 | 898 | // Tpc Sandwich 18 - carbon fiber |
37831078 | 899 | |
cea9b4f7 | 900 | dm[0] += 3.8e-3; |
901 | dm[1] -= 3.8e-3; | |
37831078 | 902 | |
cea9b4f7 | 903 | gMC->Gsvolu("TS18","TUBE",idtmed[15],dm,3); |
37831078 | 904 | |
79575d04 | 905 | // Tpc Sandwich 19 - Nomex |
37831078 | 906 | |
cea9b4f7 | 907 | dm[0] += 0.02; |
908 | dm[1] -= 0.02; | |
37831078 | 909 | |
90222263 | 910 | gMC->Gsvolu("TS19","TUBE",idtmed[6],dm,3); |
37831078 | 911 | |
79575d04 | 912 | // 19->18->17->16->15-> TICM |
37831078 | 913 | |
79575d04 | 914 | gMC->Gspos("TS19",1,"TS18",0.,0.,0.,0,"ONLY"); |
37831078 | 915 | gMC->Gspos("TS18",1,"TS17",0.,0.,0.,0,"ONLY"); |
79575d04 | 916 | gMC->Gspos("TS17",1,"TS16",0.,0.,0.,0,"ONLY"); |
917 | gMC->Gspos("TS16",1,"TS15",0.,0.,0.,0,"ONLY"); | |
37831078 | 918 | |
79575d04 | 919 | gMC->Gspos("TS15",1,"TICM ",0.,0.,0.,0,"ONLY"); |
920 | ||
37831078 | 921 | |
79575d04 | 922 | // TPc inner cont. vessel Joints |
37831078 | 923 | |
79575d04 | 924 | dm[0]=60.2; |
925 | dm[1]=61.2; | |
926 | dm[2]=0.5; | |
37831078 | 927 | |
79575d04 | 928 | gMC->Gsvolu("TPJ1","TUBE",idtmed[4],dm,3); |
37831078 | 929 | |
79575d04 | 930 | gMC->Gspos("TPJ1",1,"TPC ",0.,0.,72.3,0,"ONLY"); |
931 | gMC->Gspos("TPJ1",2,"TPC ",0.,0.,-72.3,0,"ONLY"); | |
37831078 | 932 | |
79575d04 | 933 | // |
37831078 | 934 | |
79575d04 | 935 | dm[0]=0.; |
936 | dm[1]=360.; | |
937 | dm[2]=4.; | |
37831078 | 938 | |
79575d04 | 939 | // |
37831078 | 940 | |
79575d04 | 941 | dm[3]=70.8; |
942 | dm[4]=58.4; | |
943 | dm[5]=60.1; | |
37831078 | 944 | |
79575d04 | 945 | // |
37831078 | 946 | |
79575d04 | 947 | dm[6]=71.2; |
948 | dm[7]=58.4; | |
949 | dm[8]=60.1; | |
37831078 | 950 | |
79575d04 | 951 | // |
37831078 | 952 | |
79575d04 | 953 | dm[9]=71.2; |
954 | dm[10]=58.4; | |
955 | dm[11]=59.4; | |
37831078 | 956 | |
79575d04 | 957 | // |
37831078 | 958 | |
79575d04 | 959 | dm[12]=71.6; |
960 | dm[13]=58.4; | |
961 | dm[14]=59.4; | |
37831078 | 962 | |
79575d04 | 963 | gMC->Gsvolu("TPJ2","PCON",idtmed[4],dm,15); |
37831078 | 964 | |
79575d04 | 965 | gMC->Gspos("TPJ2",1,"TPC ",0.,0.,0.,0,"ONLY"); |
966 | gMC->Gspos("TPJ2",2,"TPC ",0.,0.,0.,idrotm[nRotMat],"ONLY"); | |
37831078 | 967 | |
37831078 | 968 | |
37831078 | 969 | |
79575d04 | 970 | // Tpc Inner Containment vessel Seal (Viton, I use Lexan for a time being) |
37831078 | 971 | |
79575d04 | 972 | dm[0]=58.4; |
973 | dm[1]=61.2; | |
974 | dm[2]=0.1; | |
37831078 | 975 | |
79575d04 | 976 | gMC->Gsvolu("TICS","TUBE",idtmed[14],dm,3); |
37831078 | 977 | |
79575d04 | 978 | gMC->Gspos("TICS",1,"TPC ",0.,0.,71.7,0,"ONLY"); |
979 | gMC->Gspos("TICS",2,"TPC ",0.,0.,-71.7,0,"ONLY"); | |
37831078 | 980 | |
79575d04 | 981 | // TICM -> TPC |
37831078 | 982 | |
79575d04 | 983 | gMC->Gspos("TICM",1,"TPC ",0.,0.,0.,0,"ONLY"); |
37831078 | 984 | |
79575d04 | 985 | // |
37831078 | 986 | |
79575d04 | 987 | nRotMat++; // prepare for the next rotation matrix |
37831078 | 988 | |
989 | //--------------------------------------------------------- | |
990 | // Tpc Dift Gas volume Nonsensitive (Ne-CO2 90/10) | |
991 | // and its daughters (HV membrane, rods, readout chambers) | |
992 | //--------------------------------------------------------- | |
993 | ||
994 | dm[0]= 79.2; | |
995 | dm[1]= 258.0; | |
996 | dm[2]= 253.6; | |
997 | ||
79575d04 | 998 | gMC->Gsvolu("TDGN","TUBE",idtmed[1],dm,3); |
37831078 | 999 | |
79575d04 | 1000 | // sector opening angles |
37831078 | 1001 | |
1002 | Float_t innerOpenAngle = fTPCParam->GetInnerAngle(); | |
1003 | Float_t outerOpenAngle = fTPCParam->GetOuterAngle(); | |
1004 | ||
1005 | // sector angle shift | |
1006 | ||
1007 | Float_t innerAngleShift = fTPCParam->GetInnerAngleShift(); | |
1008 | ||
79575d04 | 1009 | |
37831078 | 1010 | // All above parameters are identical for inner and outer |
1011 | // sectors. The distinction is kept for the historical reasons | |
1012 | // and eventually will disappear. | |
1013 | ||
1014 | Float_t tanAlpha = TMath::Tan(0.5*innerOpenAngle); | |
1015 | Float_t cosAlpha = TMath::Sqrt(1.+tanAlpha*tanAlpha); | |
1016 | Float_t space; | |
1017 | ||
1018 | //------------------------------------------------------------------------- | |
1019 | // Tpc Inner Readout Chambers | |
1020 | //------------------------------------------------------------------------- | |
1021 | ||
1022 | dm[0]= 14.483; | |
1023 | dm[1]= 23.3345; | |
1024 | dm[2]= 1.6; // thickness | |
1025 | dm[3]= 25.1; | |
1026 | ||
1027 | gMC->Gsvolu("TIRC","TRD1",idtmed[4],dm,4); | |
1028 | ||
1029 | // this volume will be positioned in the empty space | |
1030 | // of the end-cap to avoid overlaps | |
1031 | ||
1032 | dm[0]= 13.7305; | |
1033 | dm[1]= 21.1895; | |
1034 | dm[2]= 2.25; | |
1035 | dm[3]= 21.15; | |
1036 | ||
1037 | gMC->Gsvolu("TIC1","TRD1",idtmed[4],dm,4); | |
1038 | ||
79575d04 | 1039 | |
37831078 | 1040 | //------------------------------------------------ |
1041 | // Tpc Inner readout chamber Pad Plane | |
1042 | //------------------------------------------------ | |
1043 | ||
1044 | dm[0]= 14.483; | |
1045 | dm[1]= 23.3345; | |
1046 | dm[2]= 0.5; | |
1047 | dm[3]= 25.1; | |
1048 | ||
1049 | gMC->Gsvolu("TIPP","TRD1",idtmed[12],dm,4); | |
1050 | ||
1051 | // | |
1052 | ||
1053 | dm[0] -= 1.218511934; | |
1054 | dm[1] -= 1.218511934; | |
1055 | dm[2] = 0.35; | |
1056 | ||
1057 | gMC->Gsvolu("TIC3","TRD1",idtmed[1],dm,4); | |
1058 | ||
1059 | gMC->Gspos("TIC3",1,"TIPP",0.,0.15,0.,0,"ONLY"); | |
1060 | ||
1061 | gMC->Gspos("TIPP",1,"TIRC",0.,1.1,0.,0,"ONLY"); | |
1062 | ||
79575d04 | 1063 | |
37831078 | 1064 | //---------------------------------------------- |
1065 | // Tpc Readout Chambers Empty spaces - for both | |
1066 | // inner and outer sectors | |
1067 | //---------------------------------------------- | |
1068 | ||
1069 | gMC->Gsvolu("TRCE","TRD1",idtmed[0],dm,0); | |
1070 | ||
1071 | // Inner sector - 4 spaces | |
1072 | ||
1073 | ||
1074 | dm[3] = 4.7625; | |
1075 | dm[0] = 12.472; | |
1076 | ||
1077 | Float_t rr = 90.52; | |
1078 | Float_t zz; | |
1079 | ||
1080 | zz= -12.7875; | |
1081 | ||
1082 | space = rr*tanAlpha-dm[0]; | |
1083 | ||
1084 | for(Int_t nsLow=0;nsLow<4;nsLow++){ | |
1085 | ||
1086 | rr += 9.525; | |
1087 | dm[1]= rr*tanAlpha - space; | |
1088 | ||
1089 | dm[2]=0.8; | |
1090 | ||
1091 | gMC->Gsposp("TRCE",nsLow+1,"TIRC",0.,-0.8,zz,0,"ONLY",dm,4); | |
1092 | ||
1093 | // | |
1094 | ||
79575d04 | 1095 | dm[2] = 1.2; |
37831078 | 1096 | |
1097 | gMC->Gsposp("TRCE",nsLow+5,"TIC1",0.,1.05,zz-2.1,0,"ONLY",dm,4); | |
1098 | ||
1099 | rr += 0.4; | |
1100 | dm[0] = rr*tanAlpha - space; | |
1101 | zz += (0.4+9.525); | |
1102 | ||
1103 | } | |
1104 | ||
1105 | dm[0]= 12.472; | |
1106 | // dm[1] - this is the dm[1] from the previous TRCE | |
1107 | dm[2]= 1.05; | |
1108 | dm[3]= 19.65; | |
1109 | ||
79575d04 | 1110 | gMC->Gsposp("TRCE",9,"TIC1",0.,-1.2,0.,0,"ONLY",dm,4); |
37831078 | 1111 | |
1112 | // | |
1113 | // TPc Space for Connectors | |
1114 | // | |
1115 | ||
1116 | dm[0]= .3; | |
1117 | dm[1]= .3; | |
1118 | dm[2]= 4.5; | |
1119 | ||
1120 | gMC->Gsvolu("TPSC","BOX ",idtmed[0],dm,3); | |
1121 | ||
1122 | // TPC Connectors | |
1123 | ||
1124 | dm[0]= .25; | |
1125 | dm[1]= .15; | |
1126 | dm[2]= 3.75; | |
1127 | ||
1128 | gMC->Gsvolu("TPCC","BOX ",idtmed[13],dm,3); | |
1129 | ||
1130 | gMC->Gspos("TPCC",1,"TPSC",0.,0.15,0.,0,"ONLY"); | |
1131 | ||
1132 | zz = -12.7875; | |
1133 | ||
79575d04 | 1134 | |
37831078 | 1135 | Float_t alpha; |
1136 | Float_t astep; | |
1137 | ||
37831078 | 1138 | // inner part of the inner sector - 2 x 20 holes |
1139 | ||
1140 | astep = 20.00096874/19.; | |
1141 | ||
1142 | alpha = 10.00048437-astep; | |
1143 | ||
1144 | Float_t x1,x2; | |
1145 | ||
1146 | x1 = 13.31175725; | |
1147 | x1 -= 0.996357832; | |
1148 | ||
1149 | x2 = 15.06180253; | |
1150 | x2 -= 1.163028812; | |
1151 | ||
1152 | Int_t ncon; | |
1153 | ||
1154 | for(ncon=0;ncon<20;ncon++){ | |
1155 | ||
1156 | phi1 = 0.; | |
1157 | theta1 = 90.+alpha; | |
1158 | phi2=90.; | |
1159 | theta2 = 90.; | |
1160 | phi3 = (alpha>0) ? 0. : 180.; | |
1161 | theta3 = TMath::Abs(alpha); | |
1162 | ||
1163 | AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3); | |
1164 | ||
1165 | ||
1166 | ||
1167 | gMC->Gspos("TPSC",ncon+1,"TIRC",x1,0.3,-12.7875,idrotm[nRotMat],"ONLY"); | |
1168 | gMC->Gspos("TPSC",ncon+21,"TIRC",x2,0.3,-2.8625,idrotm[nRotMat],"ONLY"); | |
1169 | ||
1170 | ||
1171 | x1 -= 1.296357833; | |
1172 | x2 -= 1.463028812; | |
1173 | ||
1174 | alpha -= astep; | |
1175 | nRotMat++; | |
1176 | ||
1177 | } | |
1178 | ||
1179 | // outer part of the inner sector - 2 x 25 holes | |
1180 | ||
1181 | astep = 20.00096874/24.; | |
1182 | alpha = 10.00048437-astep; | |
1183 | ||
1184 | x1 = 16.81184781; | |
1185 | x1 -= 1.016295986; | |
1186 | ||
1187 | x2 = 18.5618931; | |
1188 | x2 -= 1.150914854; | |
1189 | ||
1190 | for(ncon=0;ncon<25;ncon++){ | |
1191 | ||
1192 | phi1 = 0.; | |
1193 | theta1 = 90.+alpha; | |
1194 | phi2=90.; | |
1195 | theta2 = 90.; | |
1196 | phi3 = (alpha>0) ? 0. : 180.; | |
1197 | theta3 = TMath::Abs(alpha); | |
1198 | ||
1199 | AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3); | |
1200 | ||
1201 | ||
1202 | ||
1203 | gMC->Gspos("TPSC",ncon+41,"TIRC",x1,0.3,7.0625,idrotm[nRotMat],"ONLY"); | |
1204 | gMC->Gspos("TPSC",ncon+66,"TIRC",x2,0.3,16.9875,idrotm[nRotMat],"ONLY"); | |
1205 | ||
1206 | ||
1207 | x1 -= 1.316295986; | |
1208 | x2 -= 1.450914854; | |
1209 | ||
1210 | alpha -= astep; | |
1211 | nRotMat++; | |
1212 | ||
1213 | } | |
1214 | ||
1215 | //-------------------------------------------------------------------------- | |
1216 | // TPC Outer Readout Chambers | |
1217 | // this is NOT a final design | |
1218 | //-------------------------------------------------------------------------- | |
1219 | ||
1220 | dm[0]= 23.3875; | |
1221 | dm[1]= 43.524; | |
1222 | dm[2]= 1.5; //thickness | |
1223 | dm[3]= 57.1; | |
1224 | ||
1225 | gMC->Gsvolu("TORC","TRD1",idtmed[4],dm,4); | |
1226 | ||
1227 | //------------------------------------------------ | |
1228 | // Tpc Outer readout chamber Pad Plane | |
1229 | //------------------------------------------------ | |
1230 | ||
1231 | dm[2]= 0.5; | |
1232 | ||
1233 | gMC->Gsvolu("TOPP","TRD1",idtmed[12],dm,4); | |
1234 | ||
1235 | dm[0] -= 1.218511934; | |
1236 | dm[1] -= 1.218511934; | |
1237 | dm[2] = 0.35; | |
1238 | ||
1239 | gMC->Gsvolu("TOC3","TRD1",idtmed[1],dm,4); | |
1240 | ||
1241 | gMC->Gspos("TOC3",1,"TOPP",0.,0.15,0.,0,"ONLY"); | |
1242 | ||
1243 | gMC->Gspos("TOPP",1,"TORC",0.,1.0,0.,0,"ONLY"); | |
1244 | ||
1245 | // empty space | |
1246 | ||
37831078 | 1247 | dm[0]= 21.035; |
1248 | dm[1]= 38.7205; | |
1249 | dm[2]= 0.7; | |
1250 | dm[3]= 50.15; | |
1251 | ||
1252 | gMC->Gsposp("TRCE",10,"TORC",0.,-0.8,-2.15,0,"ONLY",dm,4); | |
1253 | ||
1254 | dm[0]= 22.2935; | |
1255 | dm[1]= 40.5085; | |
1256 | dm[2]= 2.25; | |
1257 | dm[3]= 51.65; | |
1258 | ||
1259 | gMC->Gsvolu("TOC1","TRD1",idtmed[4],dm,4); | |
1260 | ||
1261 | dm[0]= 21.35; | |
1262 | dm[1]= 38.7205; | |
1263 | dm[2]= 2.25; | |
1264 | dm[3]= 50.15; | |
1265 | ||
79575d04 | 1266 | gMC->Gsposp("TRCE",11,"TOC1",0.,0.,0.,0,"ONLY",dm,4); |
37831078 | 1267 | |
1268 | //----------------------------------------------- | |
1269 | // Tpc Services Support Wheel | |
1270 | //----------------------------------------------- | |
1271 | ||
1272 | dm[0]=0.; | |
1273 | dm[1]=360.; | |
1274 | dm[2]=18.; | |
1275 | dm[3]=2.; | |
1276 | ||
1277 | dm[4]= -5.; | |
1278 | dm[5]= 77.017; | |
1279 | dm[6]= 255.267; | |
1280 | ||
1281 | dm[7]= 5.; | |
1282 | dm[8]= dm[5]; | |
1283 | dm[9]= dm[6]; | |
1284 | ||
1285 | gMC->Gsvolu("TSSW","PGON",idtmed[4],dm,10); | |
1286 | ||
1287 | // Tpc Services Wheel Cover | |
1288 | ||
1289 | dm[4]= -0.5; | |
1290 | dm[7]= 0.5; | |
1291 | ||
1292 | gMC->Gsvolu("TSWC","PGON",idtmed[4],dm,10); | |
1293 | ||
1294 | // Tpc Service wheel Cover Empty space | |
1295 | ||
1296 | dm[0]= 10.99; | |
1297 | dm[1]= 39.599; | |
1298 | dm[2]= .5; | |
1299 | dm[3]= 81.125; | |
1300 | ||
1301 | gMC->Gsvolu("TSCE","TRD1",idtmed[0],dm,4); | |
1302 | ||
1303 | // Tpc services Wheel Empty Spaces | |
1304 | ||
1305 | dm[0]= 13.18017507; | |
1306 | dm[1]= 44.61045938; | |
1307 | dm[2]= 4.; | |
1308 | dm[3]= 89.125; | |
1309 | ||
1310 | gMC->Gsvolu("TWES","TRD1",idtmed[0],dm,4); | |
1311 | ||
1312 | // Tpc Services Wheel Bars | |
1313 | ||
1314 | gMC->Gsvolu("TSWB","TRD1",idtmed[4],dm,0); | |
1315 | ||
1316 | // bars-> TWES | |
1317 | ||
1318 | dm[2]= 4.; | |
1319 | dm[3]= .4; | |
1320 | ||
1321 | dm[0]= 13.8149522; | |
1322 | dm[1]= 13.95601379; | |
1323 | ||
1324 | gMC->Gsposp("TSWB",1,"TWES",0.,0.,-85.125,0,"ONLY",dm,4); | |
1325 | ||
1326 | dm[0]= 43.83462067; | |
1327 | dm[1]= 43.97568225; | |
1328 | ||
1329 | gMC->Gsposp("TSWB",2,"TWES",0.,0.,85.125,0,"ONLY",dm,4); | |
1330 | ||
1331 | // TPc ELectronics - right now 30% X0 Si | |
1332 | ||
1333 | dm[0]= 14.03813696; | |
1334 | dm[1]= 43.3524075; | |
1335 | dm[2]= 1.404; | |
1336 | dm[3]= 83.125; | |
1337 | ||
1338 | gMC->Gsvolu("TPEL","TRD1",idtmed[11],dm,4); | |
1339 | gMC->Gspos("TPEL",1,"TWES",0.,0.,0.,0,"ONLY"); | |
1340 | ||
1341 | //-------------------------------------------------------------------------- | |
1342 | // End caps | |
1343 | //-------------------------------------------------------------------------- | |
1344 | ||
1345 | // TPc Main Wheel - Al | |
1346 | ||
79575d04 | 1347 | dm[0]= 74.9; |
1348 | dm[1]= 264.4; | |
37831078 | 1349 | dm[2]= 3.0; |
1350 | ||
1351 | gMC->Gsvolu("TPMW","TUBE",idtmed[4],dm,3); | |
1352 | ||
37831078 | 1353 | //-------------------------------------------------------------------------- |
1354 | // Tpc Empty Space for the Readout chambers | |
1355 | //-------------------------------------------------------------------------- | |
1356 | ||
1357 | Float_t rLow= 86.2; | |
1358 | Float_t rUp= 243.5; | |
1359 | Float_t dR = 0.5*(rUp-rLow); | |
1360 | ||
79575d04 | 1361 | space= 1.5/cosAlpha; // wheel ribs are 3.0 cm wide |
37831078 | 1362 | |
1363 | dm[0]= rLow*tanAlpha-space; | |
1364 | dm[1]= rUp*tanAlpha-space; | |
79575d04 | 1365 | dm[2] = 3.0; |
37831078 | 1366 | dm[3]= dR; |
1367 | ||
1368 | gMC->Gsvolu("TESR","TRD1",idtmed[0],dm,4); | |
1369 | ||
1370 | // TIC1->TESR | |
1371 | ||
37831078 | 1372 | gMC->Gspos("TIC1",1,"TESR",0.,0.75,-dR+23.97,0,"ONLY"); |
1373 | ||
37831078 | 1374 | // TOC1->TESR |
1375 | ||
1376 | gMC->Gspos("TOC1",1,"TESR",0.,0.75,dR-55.02,0,"ONLY"); | |
1377 | ||
1378 | // Tpc Empty Space Bars - Al (daughters of TESR) | |
1379 | ||
1380 | Float_t zBar; | |
1381 | ||
1382 | gMC->Gsvolu("TESB","TRD1",idtmed[4],dm,0); | |
1383 | ||
1384 | // lower bar | |
1385 | ||
1386 | dm[0]= rLow*tanAlpha-space; | |
1387 | dm[1]= 88.7*tanAlpha-space; | |
79575d04 | 1388 | dm[2]= 2.25; |
37831078 | 1389 | dm[3]= 1.275; |
1390 | ||
1391 | zBar = -dR+dm[3]; | |
1392 | ||
79575d04 | 1393 | gMC->Gsposp("TESB",1,"TESR",0.,0.75,zBar,0,"ONLY",dm,4); |
37831078 | 1394 | |
1395 | // middle bar | |
1396 | ||
1397 | dm[0]= 131.65*tanAlpha-space; | |
1398 | dm[1]= 136.5*tanAlpha-space; | |
1399 | dm[3]= 2.425; | |
1400 | ||
1401 | zBar = -dR +131.65+dm[3]-rLow; | |
1402 | ||
79575d04 | 1403 | gMC->Gsposp("TESB",2,"TESR",0.,0.75,zBar,0,"ONLY",dm,4); |
37831078 | 1404 | |
1405 | // upper bar | |
1406 | ||
1407 | dm[0]= 240.4*tanAlpha-space; | |
1408 | dm[1]= rUp*tanAlpha-space; | |
1409 | dm[3]= 1.55; | |
1410 | ||
1411 | zBar = dR-dm[3]; | |
1412 | ||
79575d04 | 1413 | gMC->Gsposp("TESB",3,"TESR",0.,0.75,zBar,0,"ONLY",dm,4); |
37831078 | 1414 | |
1415 | //------------------------------------------------------ | |
1416 | // TPc Lower "S" Sectors | |
1417 | //------------------------------------------------------ | |
1418 | ||
1419 | ||
1420 | Float_t inSecLowEdge = fTPCParam->GetInnerRadiusLow(); | |
1421 | Float_t inSecUpEdge = fTPCParam->GetInnerRadiusUp(); | |
1422 | ||
1423 | dm[0] = inSecLowEdge*TMath::Tan(0.5*innerOpenAngle)-0.01; | |
1424 | dm[1] = inSecUpEdge*TMath::Tan(0.5*innerOpenAngle)-0.01; | |
79575d04 | 1425 | dm[2] = 0.5*(250. - 5.e-3); |
37831078 | 1426 | dm[3] = 0.5*(inSecUpEdge-inSecLowEdge); |
1427 | ||
1428 | gMC->Gsvolu("TPLS", "TRD1", idtmed[2], dm, 4); // sensitive | |
1429 | ||
79575d04 | 1430 | |
37831078 | 1431 | //---------------------------------------------------------- |
1432 | // TPc Upper Sectors | |
1433 | //---------------------------------------------------------- | |
1434 | ||
1435 | Float_t ouSecLowEdge = fTPCParam->GetOuterRadiusLow(); | |
1436 | Float_t ouSecUpEdge = fTPCParam->GetOuterRadiusUp(); | |
1437 | ||
1438 | dm[0] = ouSecLowEdge*TMath::Tan(0.5*outerOpenAngle)-0.01; | |
1439 | dm[1] = ouSecUpEdge*TMath::Tan(0.5*outerOpenAngle)-0.01; | |
79575d04 | 1440 | dm[2] = 0.5*(250. - 5.e-3); |
37831078 | 1441 | dm[3] = 0.5*(ouSecUpEdge-ouSecLowEdge); |
1442 | ||
1443 | gMC->Gsvolu("TPUS", "TRD1", idtmed[2], dm, 4); // sensitive | |
1444 | ||
1445 | ||
37831078 | 1446 | |
79575d04 | 1447 | // sensitive strips |
37831078 | 1448 | |
1449 | gMC->Gsvolu("TPSS","TRD1",idtmed[2],dm,0); // sensitive | |
1450 | ||
1451 | Int_t nofStrips,nstr; | |
1452 | Float_t r1,r2,zs; | |
1453 | Float_t stripThick = 0.01; // 100 microns | |
1454 | Float_t deadSpace; | |
1455 | ||
1456 | // inner sector | |
1457 | ||
d4c354b9 | 1458 | |
1459 | // if all lower sectors selected define only 1 strip | |
1460 | ||
1461 | nofStrips=((fSecAL <0)||(fSecAL>=0 && fSens<0)) ? 1 : fTPCParam->GetNRowLow(); | |
37831078 | 1462 | deadSpace = fTPCParam->GetInnerWireMount(); |
1463 | ||
79575d04 | 1464 | dm[2] = 0.5*(250. - 5.e-3); |
1465 | dm[3] = 0.5 * stripThick; | |
d4c354b9 | 1466 | |
37831078 | 1467 | for(nstr=0;nstr<nofStrips;nstr++){ |
1468 | ||
1469 | r1 = fTPCParam->GetPadRowRadiiLow(nstr); | |
1470 | r2 = r1 + stripThick; | |
1471 | dm[0] = r1 * TMath::Tan(0.5*innerOpenAngle) - deadSpace; | |
1472 | dm[1] = r2 * TMath::Tan(0.5*innerOpenAngle) - deadSpace; | |
1473 | zs = -inSecLowEdge -0.5*(inSecUpEdge-inSecLowEdge); | |
1474 | zs += r1; | |
1475 | zs += dm[3]; | |
1476 | ||
1477 | gMC->Gsposp("TPSS", nstr+1, "TPLS", 0., 0., zs, 0, "ONLY", dm, 4); | |
1478 | ||
37831078 | 1479 | |
1480 | } | |
1481 | ||
d4c354b9 | 1482 | // strips only if several upper sectors selected end fSens > 0 |
1483 | ||
1484 | if(fSecAU >=0 && fSens >0){ | |
1485 | ||
37831078 | 1486 | Int_t nsSave = nofStrips; |
1487 | ||
1488 | // outer sector | |
1489 | ||
1490 | nofStrips = fTPCParam->GetNRowUp(); | |
1491 | deadSpace = fTPCParam->GetOuterWireMount(); | |
1492 | ||
79575d04 | 1493 | dm[2] = 0.5*(250. - 5.e-3); |
37831078 | 1494 | dm[3] = 0.5 * stripThick; |
d4c354b9 | 1495 | |
37831078 | 1496 | |
1497 | for(nstr=0;nstr<nofStrips;nstr++){ | |
1498 | ||
1499 | r1 = fTPCParam->GetPadRowRadiiUp(nstr); | |
1500 | r2 = r1 + stripThick; | |
1501 | dm[0] = r1 * TMath::Tan(0.5*outerOpenAngle) - deadSpace; | |
1502 | dm[1] = r2 * TMath::Tan(0.5*outerOpenAngle) - deadSpace; | |
1503 | zs = -ouSecLowEdge -0.5*(ouSecUpEdge-ouSecLowEdge); | |
1504 | zs += r1; | |
1505 | zs += dm[3]; | |
1506 | ||
1507 | gMC->Gsposp("TPSS", nstr+1+nsSave, "TPUS", 0., 0., zs, 0, "ONLY", dm, 4); | |
1508 | ||
1509 | } | |
79575d04 | 1510 | } |
1511 | ||
37831078 | 1512 | |
1513 | //------------------------------------------------------- | |
1514 | // positioning of the empty spaces into the main wheel | |
1515 | // and readout chambers and sectors into the drift gas | |
1516 | //------------------------------------------------------- | |
1517 | ||
1518 | Float_t rCenter,xc,yc; | |
1519 | Float_t rInner,rOuter; // center of the inner and outer chamber | |
1520 | ||
1521 | rCenter = rLow+dR; | |
1522 | ||
1523 | rInner = 108.07; | |
1524 | rOuter = 190.68; | |
1525 | ||
79575d04 | 1526 | |
37831078 | 1527 | for(Int_t ns=0; ns<nInnerSector;ns++){ |
1528 | ||
1529 | phi1 = ns * innerOpenAngle + innerAngleShift; | |
1530 | phi1 *= kRaddeg; // in degrees | |
1531 | ||
1532 | phi1 = (Float_t)TMath::Nint(phi1) + 270.; | |
1533 | ||
1534 | if (phi1 > 360.) phi1 -= 360.; | |
1535 | ||
1536 | theta1 = 90.; | |
1537 | phi2 = 90.; | |
1538 | theta2 = 180.; | |
1539 | phi3 = ns * innerOpenAngle + innerAngleShift; | |
1540 | phi3 *= kRaddeg; // in degrees | |
1541 | ||
1542 | phi3 = (Float_t)TMath::Nint(phi3); | |
1543 | ||
1544 | if(phi3 > 360.) phi3 -= 360.; | |
1545 | ||
1546 | theta3 = 90.; | |
1547 | ||
1548 | // "holes"->End plate | |
1549 | ||
1550 | xc = rCenter*TMath::Cos(phi3*kDegrad); | |
1551 | yc = rCenter*TMath::Sin(phi3*kDegrad); | |
1552 | ||
1553 | AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3); | |
1554 | ||
1555 | gMC->Gspos("TESR",ns+1,"TPMW",xc,yc,0.,idrotm[nRotMat],"ONLY"); | |
1556 | ||
1557 | // TSCE->TSWC (services wheel volumes) | |
1558 | ||
1559 | xc = 166.142*TMath::Cos(phi3*kDegrad); | |
1560 | yc = 166.142*TMath::Sin(phi3*kDegrad); | |
1561 | ||
1562 | gMC->Gspos("TSCE",ns+1,"TSWC",xc,yc,0.,idrotm[nRotMat],"ONLY"); | |
1563 | gMC->Gspos("TWES",ns+1,"TSSW",xc,yc,0.,idrotm[nRotMat],"ONLY"); | |
1564 | ||
79575d04 | 1565 | |
37831078 | 1566 | // readout chambers->TDGN (drift gas) |
1567 | ||
1568 | xc = rInner*TMath::Cos(phi3*kDegrad); | |
1569 | yc = rInner*TMath::Sin(phi3*kDegrad); | |
1570 | ||
1571 | gMC->Gspos("TIRC",ns+1,"TDGN",xc,yc,252.,idrotm[nRotMat],"ONLY"); | |
1572 | ||
1573 | // here lower sectors | |
1574 | ||
1575 | if(fSecAL <0){ | |
1576 | ||
1577 | // all lower sectors are positioned | |
1578 | ||
79575d04 | 1579 | gMC->Gspos("TPLS",ns+1,"TDGN",xc,yc,125.0025,idrotm[nRotMat],"ONLY"); |
37831078 | 1580 | gMC-> |
79575d04 | 1581 | Gspos("TPLS",ns+nInnerSector+1,"TDGN",xc,yc,-125.0025,idrotm[nRotMat],"ONLY"); |
37831078 | 1582 | } |
1583 | else{ | |
1584 | ||
1585 | // only selected sectors are positioned (up to 6 sectors) | |
1586 | ||
1587 | for(Int_t sel=0;sel<6;sel++){ | |
1588 | ||
1589 | if(fSecLows[sel] == ns){ | |
79575d04 | 1590 | gMC->Gspos("TPLS",ns+1,"TDGN",xc,yc,125.0025,idrotm[nRotMat],"ONLY"); |
37831078 | 1591 | } |
1592 | else if(fSecLows[sel] == ns+nInnerSector){ | |
1593 | gMC-> | |
79575d04 | 1594 | Gspos("TPLS",ns+nInnerSector+1,"TDGN",xc,yc,-125.0025,idrotm[nRotMat],"ONLY"); |
37831078 | 1595 | } |
1596 | } | |
1597 | } // lower sectors finished | |
79575d04 | 1598 | |
1599 | ||
37831078 | 1600 | xc = rOuter*TMath::Cos(phi3*kDegrad); |
1601 | yc = rOuter*TMath::Sin(phi3*kDegrad); | |
1602 | ||
1603 | gMC->Gspos("TORC",ns+1,"TDGN",xc,yc,252.1,idrotm[nRotMat],"ONLY"); | |
1604 | ||
1605 | // here upper sectors | |
1606 | ||
1607 | if(fSecAU <0){ | |
1608 | ||
1609 | // all upper sectors | |
1610 | ||
79575d04 | 1611 | gMC->Gspos("TPUS",ns+1,"TDGN",xc,yc,125.0025,idrotm[nRotMat],"ONLY"); |
37831078 | 1612 | gMC-> |
79575d04 | 1613 | Gspos("TPUS",ns+nOuterSector+1,"TDGN",xc,yc,-125.0025,idrotm[nRotMat],"ONLY"); |
37831078 | 1614 | } |
1615 | else{ | |
1616 | ||
1617 | // only selected sectors (up to 12) | |
1618 | ||
1619 | for(Int_t sel=0;sel<12;sel++){ | |
1620 | if(fSecUps[sel] == ns+2*nInnerSector){ | |
79575d04 | 1621 | gMC->Gspos("TPUS",ns+1,"TDGN",xc,yc,125.0025,idrotm[nRotMat],"ONLY"); |
37831078 | 1622 | } |
1623 | else if(fSecUps[sel] == ns+2*nInnerSector+nOuterSector){ | |
1624 | gMC-> | |
79575d04 | 1625 | Gspos("TPUS",ns+nOuterSector+1,"TDGN",xc,yc,-125.0025,idrotm[nRotMat],"ONLY"); |
37831078 | 1626 | } |
1627 | } | |
1628 | } // upper sectors finished | |
1629 | ||
79575d04 | 1630 | |
37831078 | 1631 | nRotMat++; |
1632 | ||
79575d04 | 1633 | theta2 = 0.; // reflection |
37831078 | 1634 | |
1635 | AliMatrix(idrotm[nRotMat], theta1, phi1, theta2, phi2, theta3, phi3); | |
1636 | ||
1637 | xc = rInner*TMath::Cos(phi3*kDegrad); | |
1638 | yc = rInner*TMath::Sin(phi3*kDegrad); | |
1639 | ||
1640 | gMC->Gspos("TIRC",ns+nInnerSector+1,"TDGN",xc,yc,-252.,idrotm[nRotMat],"ONLY"); | |
1641 | ||
1642 | xc = rOuter*TMath::Cos(phi3*kDegrad); | |
1643 | yc = rOuter*TMath::Sin(phi3*kDegrad); | |
1644 | ||
1645 | gMC->Gspos("TORC",ns+nOuterSector+1,"TDGN",xc,yc,-252.1,idrotm[nRotMat],"ONLY"); | |
1646 | ||
1647 | nRotMat++; | |
1648 | ||
37831078 | 1649 | } |
37831078 | 1650 | // TPMW->TPC |
1651 | ||
1652 | gMC->Gspos("TPMW",1,"TPC ",0.,0.,256.6,0,"ONLY"); | |
79575d04 | 1653 | gMC->Gspos("TPMW",2,"TPC ",0.,0.,-256.6,idrotm[0],"ONLY"); |
37831078 | 1654 | |
79575d04 | 1655 | //--------------------------------------------------------- |
1656 | // Tpc High Voltage Membrane - 100 microns of mylar | |
1657 | //--------------------------------------------------------- | |
37831078 | 1658 | |
79575d04 | 1659 | dm[0]=82.8; |
1660 | dm[1]=252.; | |
1661 | dm[2]=0.005; | |
37831078 | 1662 | |
79575d04 | 1663 | gMC->Gsvolu("THVM","TUBE",idtmed[8],dm,3); |
37831078 | 1664 | |
79575d04 | 1665 | gMC->Gspos("THVM",1,"TDGN",0.,0.,0.,0,"ONLY"); |
37831078 | 1666 | |
79575d04 | 1667 | // Tpc High Voltage membrane Holders |
37831078 | 1668 | |
79575d04 | 1669 | gMC->Gsvolu("THVH","TUBE",idtmed[4],dm,0); |
37831078 | 1670 | |
79575d04 | 1671 | |
37831078 | 1672 | |
79575d04 | 1673 | // inner |
37831078 | 1674 | |
79575d04 | 1675 | dm[0]=79.3; |
1676 | dm[1]=82.8; | |
1677 | dm[2]=0.2; | |
37831078 | 1678 | |
79575d04 | 1679 | gMC->Gsposp("THVH",1,"TDGN",0.,0.,0.,0,"ONLY",dm,3); |
1680 | ||
1681 | // outer | |
1682 | ||
1683 | dm[0]= 252.; | |
1684 | dm[1]= 257.9; | |
1685 | dm[2]= 0.4; | |
1686 | ||
1687 | gMC->Gsposp("THVH",2,"TDGN",0.,0.,0.,0,"ONLY",dm,3); | |
37831078 | 1688 | |
1689 | //---------------------------------------------------------- | |
1690 | // TPc Support Rods - MAKROLON | |
1691 | //---------------------------------------------------------- | |
1692 | ||
1693 | dm[0]= 0.9; | |
1694 | dm[1]= 1.2; | |
37831078 | 1695 | |
79575d04 | 1696 | gMC->Gsvolu("TPSR","TUBE",idtmed[7],dm,0); // inner and outer rods differ |
37831078 | 1697 | |
79575d04 | 1698 | |
1699 | for(Int_t nrod=0;nrod<18;nrod++){ | |
37831078 | 1700 | Float_t angle=innerOpenAngle*(Float_t)nrod; |
1701 | ||
79575d04 | 1702 | xc=81.5*TMath::Cos(angle); |
1703 | yc=81.5*TMath::Sin(angle); | |
1704 | ||
1705 | dm[2]=126.7; | |
37831078 | 1706 | |
79575d04 | 1707 | gMC->Gsposp("TPSR",nrod+1,"TDGN",xc,yc,126.9,0,"ONLY",dm,3); |
1708 | gMC->Gsposp("TPSR",nrod+19,"TDGN",xc,yc,-126.9,0,"ONLY",dm,3); | |
37831078 | 1709 | |
79575d04 | 1710 | dm[2]=126.6; |
37831078 | 1711 | |
79575d04 | 1712 | xc=254.25*TMath::Cos(angle); |
1713 | yc=254.25*TMath::Sin(angle); | |
1714 | ||
1715 | // rod number 54 contans the HV cable | |
37831078 | 1716 | |
79575d04 | 1717 | if(nrod<17) { |
1718 | gMC->Gsposp("TPSR",nrod+37,"TDGN",xc,yc,127.,0,"ONLY",dm,3); | |
1719 | gMC->Gsposp("TPSR",nrod+54,"TDGN",xc,yc,-127.,0,"ONLY",dm,3); | |
1720 | } | |
1721 | ||
37831078 | 1722 | } |
1723 | ||
1724 | //---------------------------------------------------------- | |
79575d04 | 1725 | // Tpc High Voltage Rod - MAKROLON + Copper cable |
37831078 | 1726 | //---------------------------------------------------------- |
1727 | ||
1728 | // rod with cable (Left) | |
1729 | ||
1730 | dm[0]=0.; | |
1731 | dm[1]=2.25; | |
79575d04 | 1732 | dm[2]=126.6; |
37831078 | 1733 | |
1734 | gMC->Gsvolu("THVL","TUBE",idtmed[7],dm,3); | |
1735 | ||
1736 | // HV cable | |
1737 | ||
1738 | dm[0]=0.; | |
1739 | dm[1]=0.3; | |
79575d04 | 1740 | dm[2]=126.6; |
37831078 | 1741 | |
79575d04 | 1742 | gMC->Gsvolu("THVC","TUBE",idtmed[10],dm,3); |
37831078 | 1743 | |
1744 | // empty space | |
1745 | ||
1746 | dm[0]=0.3; | |
1747 | dm[1]=1.; | |
79575d04 | 1748 | dm[2]=126.6; |
37831078 | 1749 | |
1750 | gMC->Gsvolu("THVE","TUBE",idtmed[1],dm,3); | |
1751 | ||
1752 | gMC->Gspos("THVC",1,"THVL",0.,0.,0.,0,"ONLY"); | |
1753 | gMC->Gspos("THVE",1,"THVL",0.,0.,0.,0,"ONLY"); | |
1754 | ||
1755 | // rod without cable | |
1756 | ||
1757 | dm[0]=1.8; | |
1758 | dm[1]=2.25; | |
79575d04 | 1759 | dm[2]=126.6; |
37831078 | 1760 | |
1761 | gMC->Gsvolu("THVR","TUBE",idtmed[7],dm,3); | |
1762 | ||
79575d04 | 1763 | gMC->Gspos("THVL",1,"TDGN",xc,yc,-127.,0,"ONLY"); |
1764 | gMC->Gspos("THVR",1,"TDGN",xc,yc,127.,0,"ONLY"); | |
37831078 | 1765 | |
1766 | gMC->Gspos("TDGN",1,"TPC ",0.,0.,0.,0,"ONLY"); | |
79575d04 | 1767 | |
37831078 | 1768 | // services wheel cover -> wheel |
1769 | ||
1770 | ||
1771 | gMC->Gspos("TSWC",1,"TSSW",0.,0.,4.5,0,"ONLY"); | |
1772 | gMC->Gspos("TSWC",2,"TSSW",0.,0.,-4.5,0,"ONLY"); | |
1773 | ||
1774 | ||
1775 | // put the wheel into the TPC | |
1776 | ||
1777 | gMC->Gspos("TSSW",1,"TPC ",0.,0.,278.7,0,"ONLY"); | |
1778 | gMC->Gspos("TSSW",2,"TPC ",0.,0.,-278.7,0,"ONLY"); | |
1779 | ||
79575d04 | 1780 | // |
1781 | ||
37831078 | 1782 | gMC->Gsord("TPMW",6); |
79575d04 | 1783 | gMC->Gsord("TSSW",6); |
1784 | gMC->Gsord("TSWC",6); | |
d4c354b9 | 1785 | if(fSecAL >=0) gMC->Gsord("TPLS",3); |
1786 | if(fSecAU >=0 && fSens >0) gMC->Gsord("TPUS",3); | |
37831078 | 1787 | gMC->Gsord("TDGN",6); |
37831078 | 1788 | |
1789 | // put the TPC into ALIC (main mother volume) | |
1790 | ||
79575d04 | 1791 | gMC->Gspos("TPC ",1,"ALIC",0.,0.,0.,0,"ONLY"); |
1792 | ||
1793 | ||
37831078 | 1794 | |
1795 | } // end of function | |
1796 | ||
1797 | //_____________________________________________________________________________ | |
1798 | void AliTPCv2::DrawDetector() | |
1799 | { | |
1800 | // | |
1801 | // Draw a shaded view of the Time Projection Chamber version 1 | |
1802 | // | |
1803 | ||
1804 | // Set everything unseen | |
1805 | gMC->Gsatt("*", "seen", -1); | |
1806 | // | |
1807 | // Set ALIC mother transparent | |
1808 | gMC->Gsatt("ALIC","SEEN",0); | |
1809 | // | |
1810 | // Set the volumes visible | |
1811 | // | |
1812 | ||
1813 | gMC->Gsatt("TPC ","SEEN",0); | |
1814 | gMC->Gsatt("TOIN","SEEN",1); | |
1815 | gMC->Gsatt("TOIN","COLO",7); | |
37831078 | 1816 | gMC->Gsatt("TOCV","SEEN",1); |
1817 | gMC->Gsatt("TOCV","COLO",4); | |
1818 | gMC->Gsatt("TSA1","SEEN",0); | |
1819 | gMC->Gsatt("TSA2","SEEN",0); | |
1820 | gMC->Gsatt("TSA3","SEEN",0); | |
79575d04 | 1821 | gMC->Gsatt("TSA4","SEEN",0); |
1822 | gMC->Gsatt("TSA5","SEEN",0); | |
37831078 | 1823 | gMC->Gsatt("TOFC","SEEN",1); |
1824 | gMC->Gsatt("TOFC","COLO",4); | |
37831078 | 1825 | gMC->Gsatt("TSA6","SEEN",0); |
1826 | gMC->Gsatt("TSA7","SEEN",0); | |
79575d04 | 1827 | gMC->Gsatt("TSA8","SEEN",0); |
37831078 | 1828 | gMC->Gsatt("TIIN","SEEN",1); |
79575d04 | 1829 | gMC->Gsatt("TIIN","COLO",7); |
1830 | gMC->Gsatt("TII1","SEEN",0); | |
1831 | gMC->Gsatt("TIFC","SEEN",1); | |
1832 | gMC->Gsatt("TIFC","COLO",4); | |
1833 | gMC->Gsatt("TSA9","SEEN",0); | |
37831078 | 1834 | gMC->Gsatt("TS10","SEEN",0); |
1835 | gMC->Gsatt("TS11","SEEN",0); | |
1836 | gMC->Gsatt("TS12","SEEN",0); | |
37831078 | 1837 | gMC->Gsatt("TS13","SEEN",0); |
1838 | gMC->Gsatt("TS14","SEEN",0); | |
79575d04 | 1839 | gMC->Gsatt("TICC","SEEN",0); |
1840 | gMC->Gsatt("TICM","SEEN",0); | |
37831078 | 1841 | gMC->Gsatt("TS15","SEEN",0); |
1842 | gMC->Gsatt("TS16","SEEN",0); | |
37831078 | 1843 | gMC->Gsatt("TS17","SEEN",0); |
79575d04 | 1844 | gMC->Gsatt("TS18","SEEN",0); |
1845 | gMC->Gsatt("TS19","SEEN",0); | |
1846 | gMC->Gsatt("TPJ1","SEEN",0); | |
1847 | gMC->Gsatt("TPJ2","SEEN",0); | |
1848 | gMC->Gsatt("TICS","SEEN",0); | |
1849 | gMC->Gsatt("TDGN","SEEN",0); | |
37831078 | 1850 | gMC->Gsatt("TIRC","SEEN",0); |
1851 | gMC->Gsatt("TIC1","SEEN",1); | |
1852 | gMC->Gsatt("TIPP","SEEN",0); | |
1853 | gMC->Gsatt("TIC3","SEEN",0); | |
1854 | gMC->Gsatt("TRCE","SEEN",0); | |
1855 | gMC->Gsatt("TPSC","SEEN",0); | |
79575d04 | 1856 | gMC->Gsatt("TPCC","SEEN",0); |
37831078 | 1857 | gMC->Gsatt("TORC","SEEN",0); |
1858 | gMC->Gsatt("TOPP","SEEN",0); | |
1859 | gMC->Gsatt("TOC3","SEEN",0); | |
1860 | gMC->Gsatt("TOC1","SEEN",1); | |
1861 | gMC->Gsatt("TSSW","SEEN",1); | |
1862 | gMC->Gsatt("TSWC","SEEN",1); | |
37831078 | 1863 | gMC->Gsatt("TSSW","COLO",3); |
1864 | gMC->Gsatt("TSWC","COLO",3); | |
1865 | gMC->Gsatt("TSCE","COLO",6); | |
79575d04 | 1866 | gMC->Gsatt("TSCE","SEEN",1); |
37831078 | 1867 | gMC->Gsatt("TWES","SEEN",0); |
1868 | gMC->Gsatt("TSWB","SEEN",0); | |
1869 | gMC->Gsatt("TPEL","SEEN",0); | |
1870 | gMC->Gsatt("TPMW","SEEN",1); | |
37831078 | 1871 | gMC->Gsatt("TESR","SEEN",1); |
1872 | gMC->Gsatt("TPMW","COLO",12); | |
37831078 | 1873 | gMC->Gsatt("TIC1","COLO",5); |
79575d04 | 1874 | gMC->Gsatt("TOC1","COLO",5); |
37831078 | 1875 | gMC->Gsatt("TESB","SEEN",0); |
37831078 | 1876 | gMC->Gsatt("THVM","SEEN",1); |
1877 | gMC->Gsatt("THVM","COLO",11); | |
79575d04 | 1878 | gMC->Gsatt("THVH","SEEN",0); |
1879 | gMC->Gsatt("TPSR","SEEN",0); | |
37831078 | 1880 | gMC->Gsatt("THVL","SEEN",0); |
79575d04 | 1881 | gMC->Gsatt("THVC","SEEN",0); |
37831078 | 1882 | gMC->Gsatt("THVE","SEEN",0); |
1883 | gMC->Gsatt("THVR","SEEN",0); | |
79575d04 | 1884 | gMC->Gsatt("TPSS","SEEN",0); |
1885 | gMC->Gsatt("TPUS","SEEN",0); | |
1886 | gMC->Gsatt("TPLS","SEEN",0); | |
37831078 | 1887 | |
1888 | // | |
1889 | gMC->Gdopt("hide", "on"); | |
1890 | gMC->Gdopt("shad", "on"); | |
1891 | gMC->Gsatt("*", "fill", 7); | |
1892 | gMC->SetClipBox("."); | |
1893 | gMC->SetClipBox("TPMW",-300,300,-300,300,254.,270.); | |
1894 | gMC->SetClipBox("TESR",-300,300,-300,300,254.,270.); | |
1895 | gMC->SetClipBox("TSSW",-300,300,-300,300,283.,284.); | |
1896 | gMC->SetClipBox("TSWC",-300,300,-300,300,283.,284.); | |
1897 | gMC->SetClipBox("*", 0, 300, -300, 300, -290, 290); | |
1898 | gMC->DefaultRange(); | |
1899 | gMC->Gdraw("alic", 40, 30, 0, 12, 9.5, .025, .025); | |
1900 | gMC->Gdhead(1111, "Time Projection Chamber"); | |
1901 | gMC->Gdman(18, 4, "MAN"); | |
1902 | gMC->Gdopt("hide","off"); | |
1903 | } | |
1904 | ||
1905 | //_____________________________________________________________________________ | |
1906 | void AliTPCv2::CreateMaterials() | |
1907 | { | |
1908 | // | |
1909 | // Define materials for version 2 of the Time Projection Chamber | |
1910 | // | |
1911 | ||
1912 | AliTPC::CreateMaterials(); | |
1913 | } | |
1914 | ||
1915 | //_____________________________________________________________________________ | |
1916 | void AliTPCv2::Init() | |
1917 | { | |
1918 | // | |
1919 | // Initialises version 2 of the TPC after that it has been built | |
1920 | // | |
1921 | ||
1922 | Int_t *idtmed = fIdtmed->GetArray(); | |
1923 | ||
1924 | AliTPC::Init(); | |
d4c354b9 | 1925 | |
1926 | ||
1927 | ||
1928 | fIdSens=gMC->VolId("TPSS"); | |
1929 | ||
1930 | fIdLSec=gMC->VolId("TPLS"); // lower sector | |
37831078 | 1931 | fIdUSec=gMC->VolId("TPUS"); // upper sector |
1932 | ||
1933 | gMC->SetMaxNStep(30000); // max. number of steps increased | |
1934 | ||
1935 | gMC->Gstpar(idtmed[2],"LOSS",5); // specific energy loss | |
1936 | ||
9e1a0ddb | 1937 | printf("%s: *** TPC version 2 initialized ***\n",ClassName()); |
1938 | printf("%s: Maximum number of steps = %d\n",ClassName(),gMC->GetMaxNStep()); | |
37831078 | 1939 | |
1940 | // | |
fe4da5cc | 1941 | |
1942 | } | |
1943 | ||
1944 | //_____________________________________________________________________________ | |
1945 | void AliTPCv2::StepManager() | |
1946 | { | |
1947 | // | |
1948 | // Called for every step in the Time Projection Chamber | |
1949 | // | |
1950 | ||
1951 | // | |
1952 | // parameters used for the energy loss calculations | |
1953 | // | |
73042f01 | 1954 | const Float_t kprim = 14.35; // number of primary collisions per 1 cm |
1955 | const Float_t kpoti = 20.77e-9; // first ionization potential for Ne/CO2 | |
1956 | const Float_t kwIon = 35.97e-9; // energy for the ion-electron pair creation | |
fe4da5cc | 1957 | |
1958 | ||
73042f01 | 1959 | const Float_t kbig = 1.e10; |
fe4da5cc | 1960 | |
1961 | Int_t id,copy; | |
1962 | Float_t hits[4]; | |
1963 | Int_t vol[2]; | |
37831078 | 1964 | TLorentzVector p; |
fe4da5cc | 1965 | |
37831078 | 1966 | vol[1]=0; // preset row number to 0 |
fe4da5cc | 1967 | |
1968 | // | |
1969 | ||
73042f01 | 1970 | gMC->SetMaxStep(kbig); |
fe4da5cc | 1971 | |
0a6d8768 | 1972 | if(!gMC->IsTrackAlive()) return; // particle has disappeared |
fe4da5cc | 1973 | |
cfce8870 | 1974 | Float_t charge = gMC->TrackCharge(); |
fe4da5cc | 1975 | |
1976 | if(TMath::Abs(charge)<=0.) return; // take only charged particles | |
1977 | ||
37831078 | 1978 | // check the sensitive volume |
1979 | ||
1980 | id = gMC->CurrentVolID(copy); // current volume Id | |
1981 | ||
2d74ba4f | 1982 | if ( (gMC->IsTrackEntering() || gMC->IsTrackExiting()) && |
1983 | ((id == fIdLSec) || (id == fIdUSec)) ) { | |
da33556f | 1984 | |
2d74ba4f | 1985 | AddTrackReference(gAlice->CurrentTrack(), gMC); |
da33556f | 1986 | } |
1987 | ||
37831078 | 1988 | if(id == fIdLSec){ |
1989 | vol[0] = copy-1; // lower sector number | |
1990 | } | |
1991 | else if(id == fIdUSec){ | |
1992 | vol[0] = copy+fTPCParam->GetNInnerSector()-1; // upper sector number | |
1993 | } | |
1994 | else if(id == fIdSens && gMC->IsTrackEntering()){ | |
1995 | ||
1996 | // track is entering the sensitive strip | |
1997 | ||
1998 | vol[1]= copy-1; // row number (absolute) | |
1999 | ||
2000 | // sector type | |
2001 | ||
2002 | id = gMC->CurrentVolOffID(1,copy); | |
2003 | ||
2004 | if(id == fIdLSec){ | |
2005 | ||
2006 | // lower sector | |
2007 | ||
2008 | vol[0] = copy-1; // sector number | |
2009 | ||
fe4da5cc | 2010 | } |
37831078 | 2011 | else { |
2012 | ||
2013 | // upper sector | |
2014 | ||
2015 | vol[0] = copy-1+fTPCParam->GetNInnerSector(); // sector number | |
6a905708 | 2016 | vol[1] -= fTPCParam->GetNRowLow(); // row number (starts also from 0) |
37831078 | 2017 | |
2018 | } | |
2019 | ||
2020 | if(vol[1] == 0){ | |
2021 | ||
2022 | // because Jouri wants to have this | |
2023 | ||
2024 | gMC->TrackMomentum(p); | |
2025 | hits[0]=p[0]; | |
2026 | hits[1]=p[1]; | |
2027 | hits[2]=p[2]; | |
fe4da5cc | 2028 | hits[3]=0.; // this hit has no energy loss |
6a905708 | 2029 | // new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits); |
2030 | ||
2031 | AddHit(gAlice->CurrentTrack(), vol,hits); //MI change | |
37831078 | 2032 | |
930ee558 | 2033 | } |
37831078 | 2034 | |
930ee558 | 2035 | gMC->TrackPosition(p); |
2036 | hits[0]=p[0]; | |
2037 | hits[1]=p[1]; | |
2038 | hits[2]=p[2]; | |
2039 | hits[3]=0.; // this hit has no energy loss | |
6a905708 | 2040 | // new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits); |
2041 | ||
2042 | AddHit(gAlice->CurrentTrack(), vol,hits); //MI change | |
930ee558 | 2043 | |
37831078 | 2044 | } |
fe4da5cc | 2045 | else return; |
37831078 | 2046 | |
2047 | //----------------------------------------------------------------- | |
fe4da5cc | 2048 | // charged particle is in the sensitive volume |
37831078 | 2049 | //----------------------------------------------------------------- |
fe4da5cc | 2050 | |
cfce8870 | 2051 | if(gMC->TrackStep() > 0) { |
fe4da5cc | 2052 | |
73042f01 | 2053 | Int_t nel = (Int_t)(((gMC->Edep())-kpoti)/kwIon) + 1; |
fe4da5cc | 2054 | nel=TMath::Min(nel,300); // 300 electrons corresponds to 10 keV |
2055 | ||
37831078 | 2056 | gMC->TrackPosition(p); |
2057 | hits[0]=p[0]; | |
2058 | hits[1]=p[1]; | |
2059 | hits[2]=p[2]; | |
fe4da5cc | 2060 | hits[3]=(Float_t)nel; |
2061 | ||
2062 | // Add this hit | |
2063 | ||
6a905708 | 2064 | // new(lhits[fNhits++]) AliTPChit(fIshunt,gAlice->CurrentTrack(),vol,hits); |
2065 | if (fHitType&&2){ | |
2066 | gMC->TrackMomentum(p); | |
2067 | Float_t momentum = TMath::Sqrt(p[0]*p[0]+p[1]*p[1]); | |
2068 | Float_t precision = (momentum>0.1) ? 0.002 :0.01; | |
2069 | fTrackHits->SetHitPrecision(precision); | |
2070 | } | |
2071 | AddHit(gAlice->CurrentTrack(), vol,hits); //MI change | |
fe4da5cc | 2072 | |
2073 | } | |
2074 | ||
2075 | // Stemax calculation for the next step | |
2076 | ||
2077 | Float_t pp; | |
0a6d8768 | 2078 | TLorentzVector mom; |
2079 | gMC->TrackMomentum(mom); | |
2080 | Float_t ptot=mom.Rho(); | |
73042f01 | 2081 | Float_t betaGamma = ptot/gMC->TrackMass(); |
fe4da5cc | 2082 | |
69e40cce | 2083 | Int_t pid=gMC->TrackPid(); |
cc80f89e | 2084 | if((pid==kElectron || pid==kPositron) && ptot > 0.002) |
fe4da5cc | 2085 | { |
73042f01 | 2086 | pp = kprim*1.58; // electrons above 20 MeV/c are on the plateau! |
fe4da5cc | 2087 | } |
2088 | else | |
2089 | { | |
595bf2c3 | 2090 | |
07521998 | 2091 | betaGamma = TMath::Max(betaGamma,(Float_t)7.e-3); // protection against too small bg |
595bf2c3 | 2092 | pp=kprim*BetheBloch(betaGamma); |
2093 | ||
fe4da5cc | 2094 | if(TMath::Abs(charge) > 1.) pp *= (charge*charge); |
2095 | } | |
2096 | ||
b9d0a01d | 2097 | Double_t rnd = gMC->GetRandom()->Rndm(); |
fe4da5cc | 2098 | |
cfce8870 | 2099 | gMC->SetMaxStep(-TMath::Log(rnd)/pp); |
fe4da5cc | 2100 | |
2101 | } | |
2102 | ||
2103 | //_____________________________________________________________________________ | |
2104 | Float_t AliTPCv2::BetheBloch(Float_t bg) | |
2105 | { | |
2106 | // | |
2107 | // Bethe-Bloch energy loss formula | |
2108 | // | |
73042f01 | 2109 | const Double_t kp1=0.76176e-1; |
2110 | const Double_t kp2=10.632; | |
2111 | const Double_t kp3=0.13279e-4; | |
2112 | const Double_t kp4=1.8631; | |
2113 | const Double_t kp5=1.9479; | |
fe4da5cc | 2114 | |
2115 | Double_t dbg = (Double_t) bg; | |
2116 | ||
2117 | Double_t beta = dbg/TMath::Sqrt(1.+dbg*dbg); | |
2118 | ||
73042f01 | 2119 | Double_t aa = TMath::Power(beta,kp4); |
2120 | Double_t bb = TMath::Power(1./dbg,kp5); | |
fe4da5cc | 2121 | |
73042f01 | 2122 | bb=TMath::Log(kp3+bb); |
fe4da5cc | 2123 | |
73042f01 | 2124 | return ((Float_t)((kp2-aa-bb)*kp1/aa)); |
fe4da5cc | 2125 | } |
73042f01 | 2126 | |
2127 |