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