]>
Commit | Line | Data |
---|---|---|
c4561145 | 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 | **************************************************************************/ | |
dee197d3 | 15 | |
88cb7938 | 16 | /* $Id$ */ |
c4561145 | 17 | |
18 | // | |
19 | /////////////////////////////////////////////////////////////////////////////// | |
20 | // // | |
21 | // Photon Multiplicity Detector Version 1 // | |
22 | // // | |
23 | //Begin_Html | |
24 | /* | |
25 | <img src="picts/AliPMDv0Class.gif"> | |
26 | */ | |
27 | //End_Html | |
28 | // // | |
29 | /////////////////////////////////////////////////////////////////////////////// | |
30 | //// | |
31 | ||
88cb7938 | 32 | #include "Riostream.h" |
33 | ||
34 | #include <TVirtualMC.h> | |
35 | ||
c4561145 | 36 | #include "AliConst.h" |
37 | #include "AliMagF.h" | |
88cb7938 | 38 | #include "AliPMDv0.h" |
39 | #include "AliRun.h" | |
c4561145 | 40 | |
41 | static Int_t kdet, ncell_sm, ncell_hole; | |
42 | static Float_t zdist, zdist1; | |
43 | static Float_t sm_length, sm_thick, cell_radius, cell_wall, cell_depth; | |
44 | static Float_t boundary, th_base, th_air, th_pcb; | |
45 | static Float_t th_lead, th_steel; | |
46 | ||
47 | ClassImp(AliPMDv0) | |
48 | ||
49 | //_____________________________________________________________________________ | |
50 | AliPMDv0::AliPMDv0() | |
51 | { | |
52 | // | |
53 | // Default constructor | |
54 | // | |
55 | fMedSens=0; | |
56 | } | |
57 | ||
58 | //_____________________________________________________________________________ | |
59 | AliPMDv0::AliPMDv0(const char *name, const char *title) | |
60 | : AliPMD(name,title) | |
61 | { | |
62 | // | |
63 | // Standard constructor | |
64 | // | |
65 | fMedSens=0; | |
66 | } | |
67 | ||
68 | //_____________________________________________________________________________ | |
69 | void AliPMDv0::CreateGeometry() | |
70 | { | |
71 | // | |
72 | // Create geometry for Photon Multiplicity Detector Version 3 : | |
73 | // April 2, 2001 | |
74 | // | |
75 | //Begin_Html | |
76 | /* | |
77 | <img src="picts/AliPMDv0.gif"> | |
78 | */ | |
79 | //End_Html | |
80 | //Begin_Html | |
81 | /* | |
82 | <img src="picts/AliPMDv0Tree.gif"> | |
83 | */ | |
84 | //End_Html | |
85 | GetParameters(); | |
86 | CreateSupermodule(); | |
87 | CreatePMD(); | |
88 | } | |
89 | ||
90 | //_____________________________________________________________________________ | |
91 | void AliPMDv0::CreateSupermodule() | |
92 | { | |
93 | // | |
94 | // Creates the geometry of the cells, places them in supermodule which | |
95 | // is a rhombus object. | |
96 | ||
97 | // *** DEFINITION OF THE GEOMETRY OF THE PMD *** | |
98 | // *** HEXAGONAL CELLS WITH CELL RADIUS 0.25 cm (see "GetParameters") | |
99 | // -- Author : S. Chattopadhyay, 02/04/1999. | |
100 | ||
101 | // Basic unit is ECAR, a hexagonal cell made of Ar+CO2, which is placed inside another | |
102 | // hexagonal cell made of Cu (ECCU) with larger radius, compared to ECAR. The difference | |
103 | // in radius gives the dimension of half width of each cell wall. | |
104 | // These cells are placed as 72 x 72 array in a | |
105 | // rhombus shaped supermodule (EHC1). The rhombus shaped modules are designed | |
106 | // to have closed packed structure. | |
107 | // | |
108 | // Each supermodule (ESMA, ESMB), made of G10 is filled with following components | |
109 | // EAIR --> Air gap between gas hexagonal cells and G10 backing. | |
110 | // EHC1 --> Rhombus shaped parallelopiped containing the hexagonal cells | |
111 | // EAIR --> Air gap between gas hexagonal cells and G10 backing. | |
112 | // | |
113 | // ESMA, ESMB are placed in EMM1 along with EMPB (Pb converter) | |
114 | // and EMFE (iron support) | |
115 | ||
116 | // EMM1 made of | |
117 | // ESMB --> Normal supermodule, mirror image of ESMA | |
118 | // EMPB --> Pb converter | |
119 | // EMFE --> Fe backing | |
120 | // ESMA --> Normal supermodule | |
121 | // | |
122 | // ESMX, ESMY are placed in EMM2 along with EMPB (Pb converter) | |
123 | // and EMFE (iron support) | |
124 | ||
125 | // EMM2 made of | |
126 | // ESMY --> Special supermodule, mirror image of ESMX, | |
127 | // EMPB --> Pb converter | |
128 | // EMFE --> Fe backing | |
129 | // ESMX --> First of the two Special supermodules near the hole | |
130 | ||
131 | // EMM3 made of | |
132 | // ESMQ --> Special supermodule, mirror image of ESMX, | |
133 | // EMPB --> Pb converter | |
134 | // EMFE --> Fe backing | |
135 | // ESMP --> Second of the two Special supermodules near the hole | |
136 | ||
137 | // EMM2 and EMM3 are used to create the hexagonal HOLE | |
138 | ||
139 | // | |
140 | // EPMD | |
141 | // | | |
142 | // | | |
143 | // --------------------------------------------------------------------------- | |
144 | // | | | | | | |
145 | // EHOL EMM1 EMM2 EMM3 EALM | |
146 | // | | | | |
147 | // -------------------- -------------------- -------------------- | |
148 | // | | | | | | | | | | | | | |
149 | // ESMB EMPB EMFE ESMA ESMY EMPB EMFE ESMX ESMQ EMPB EMFE ESMP | |
150 | // | | | | |
151 | // ------------ ------------ ------------- | |
152 | // | | | | | | | | | | |
153 | // EAIR EHC1 EAIR EAIR EHC2 EAIR EAIR EHC3 EAIR | |
154 | // | | | | |
155 | // ECCU ECCU ECCU | |
156 | // | | | | |
157 | // ECAR ECAR ECAR | |
158 | ||
159 | ||
160 | Int_t i, j; | |
161 | Float_t xb, yb, zb; | |
162 | Int_t number; | |
163 | Int_t ihrotm,irotdm; | |
164 | const Float_t root3_2 = TMath::Sqrt(3.) /2.; | |
165 | Int_t *idtmed = fIdtmed->GetArray()-599; | |
166 | ||
167 | AliMatrix(ihrotm, 90., 30., 90., 120., 0., 0.); | |
168 | AliMatrix(irotdm, 90., 180., 90., 270., 180., 0.); | |
169 | ||
170 | zdist = TMath::Abs(zdist1); | |
171 | ||
172 | ||
173 | //Subhasis, dimensional parameters of rhombus (dpara) as given to gsvolu | |
174 | // rhombus to accomodate 72 x 72 hexagons, and with total 1.2cm extension | |
175 | //(1mm tolerance on both side and 5mm thick G10 wall) | |
176 | // | |
177 | ||
178 | // **** CELL SIZE 20 mm^2 EQUIVALENT | |
179 | ||
180 | // Inner hexagon filled with gas (Ar+CO2) | |
181 | ||
182 | Float_t hexd2[10] = {0.,360.,6,2,-0.25,0.,0.23,0.25,0.,0.23}; | |
183 | ||
184 | hexd2[4]= - cell_depth/2.; | |
185 | hexd2[7]= cell_depth/2.; | |
186 | hexd2[6]= cell_radius - cell_wall; | |
187 | hexd2[9]= cell_radius - cell_wall; | |
188 | ||
189 | // Gas replaced by vacuum for v0(insensitive) version of PMD. | |
190 | ||
191 | gMC->Gsvolu("ECAR", "PGON", idtmed[697], hexd2,10); | |
192 | gMC->Gsatt("ECAR", "SEEN", 0); | |
193 | ||
194 | // Outer hexagon made of Copper | |
195 | ||
196 | Float_t hexd1[10] = {0.,360.,6,2,-0.25,0.,0.25,0.25,0.,0.25}; | |
197 | //total wall thickness=0.2*2 | |
198 | ||
199 | hexd1[4]= - cell_depth/2.; | |
200 | hexd1[7]= cell_depth/2.; | |
201 | hexd1[6]= cell_radius; | |
202 | hexd1[9]= cell_radius; | |
203 | ||
204 | gMC->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10); | |
205 | gMC->Gsatt("ECCU", "SEEN", 1); | |
206 | ||
207 | // --- place inner hex inside outer hex | |
208 | ||
ef61784c | 209 | gMC->Gspos("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY"); |
c4561145 | 210 | |
211 | // Rhombus shaped supermodules (defined by PARA) | |
212 | ||
213 | // volume for SUPERMODULE | |
214 | ||
215 | Float_t dpara_sm1[6] = {12.5,12.5,0.8,30.,0.,0.}; | |
216 | dpara_sm1[0]=(ncell_sm+0.25)*hexd1[6] ; | |
217 | dpara_sm1[1] = dpara_sm1[0] *root3_2; | |
218 | dpara_sm1[2] = sm_thick/2.; | |
219 | ||
220 | // | |
221 | gMC->Gsvolu("ESMA","PARA", idtmed[607], dpara_sm1, 6); | |
222 | gMC->Gsatt("ESMA", "SEEN", 0); | |
223 | // | |
224 | gMC->Gsvolu("ESMB","PARA", idtmed[607], dpara_sm1, 6); | |
225 | gMC->Gsatt("ESMB", "SEEN", 0); | |
226 | ||
227 | // Air residing between the PCB and the base | |
228 | ||
229 | Float_t dpara_air[6] = {12.5,12.5,8.,30.,0.,0.}; | |
230 | dpara_air[0]= dpara_sm1[0]; | |
231 | dpara_air[1]= dpara_sm1[1]; | |
232 | dpara_air[2]= th_air/2.; | |
233 | ||
234 | gMC->Gsvolu("EAIR","PARA", idtmed[698], dpara_air, 6); | |
235 | gMC->Gsatt("EAIR", "SEEN", 0); | |
236 | ||
237 | // volume for honeycomb chamber EHC1 | |
238 | ||
239 | Float_t dpara1[6] = {12.5,12.5,0.4,30.,0.,0.}; | |
240 | dpara1[0] = dpara_sm1[0]; | |
241 | dpara1[1] = dpara_sm1[1]; | |
242 | dpara1[2] = cell_depth/2.; | |
243 | ||
244 | gMC->Gsvolu("EHC1","PARA", idtmed[698], dpara1, 6); | |
245 | gMC->Gsatt("EHC1", "SEEN", 1); | |
246 | ||
247 | ||
248 | ||
249 | // Place hexagonal cells ECCU cells inside EHC1 (72 X 72) | |
250 | ||
251 | Int_t xrow=1; | |
252 | ||
253 | yb = -dpara1[1] + (1./root3_2)*hexd1[6]; | |
254 | zb = 0.; | |
255 | ||
256 | for (j = 1; j <= ncell_sm; ++j) { | |
257 | xb =-(dpara1[0] + dpara1[1]*0.577) + 2*hexd1[6]; //0.577=tan(30deg) | |
258 | if(xrow >= 2){ | |
259 | xb = xb+(xrow-1)*hexd1[6]; | |
260 | } | |
261 | for (i = 1; i <= ncell_sm; ++i) { | |
262 | number = i+(j-1)*ncell_sm; | |
ef61784c | 263 | gMC->Gspos("ECCU", number, "EHC1", xb,yb,zb, ihrotm, "ONLY"); |
c4561145 | 264 | xb += (hexd1[6]*2.); |
265 | } | |
266 | xrow = xrow+1; | |
267 | yb += (hexd1[6]*TMath::Sqrt(3.)); | |
268 | } | |
269 | ||
270 | ||
271 | // Place EHC1 and EAIR into ESMA and ESMB | |
272 | ||
273 | Float_t z_air1,z_air2,z_gas; | |
274 | ||
275 | //ESMA is normal supermodule with base at bottom, with EHC1 | |
276 | z_air1= -dpara_sm1[2] + th_base + dpara_air[2]; | |
277 | gMC->Gspos("EAIR", 1, "ESMA", 0., 0., z_air1, 0, "ONLY"); | |
278 | z_gas=z_air1+dpara_air[2]+ th_pcb + dpara1[2]; | |
76ad67b5 | 279 | //Line below Commented for version 0 of PMD routine |
280 | // gMC->Gspos("EHC1", 1, "ESMA", 0., 0., z_gas, 0, "ONLY"); | |
c4561145 | 281 | z_air2=z_gas+dpara1[2]+ th_pcb + dpara_air[2]; |
282 | gMC->Gspos("EAIR", 2, "ESMA", 0., 0., z_air2, 0, "ONLY"); | |
283 | ||
284 | // ESMB is mirror image of ESMA, with base at top, with EHC1 | |
285 | ||
286 | z_air1= -dpara_sm1[2] + th_pcb + dpara_air[2]; | |
287 | gMC->Gspos("EAIR", 3, "ESMB", 0., 0., z_air1, 0, "ONLY"); | |
288 | z_gas=z_air1+dpara_air[2]+ th_pcb + dpara1[2]; | |
76ad67b5 | 289 | //Line below Commented for version 0 of PMD routine |
290 | // gMC->Gspos("EHC1", 2, "ESMB", 0., 0., z_gas, 0, "ONLY"); | |
c4561145 | 291 | z_air2=z_gas+dpara1[2]+ th_pcb + dpara_air[2]; |
292 | gMC->Gspos("EAIR", 4, "ESMB", 0., 0., z_air2, 0, "ONLY"); | |
293 | ||
294 | ||
295 | // special supermodule EMM2(GEANT only) containing 6 unit modules | |
296 | ||
297 | // volume for SUPERMODULE | |
298 | ||
299 | Float_t dpara_sm2[6] = {12.5,12.5,0.8,30.,0.,0.}; | |
300 | dpara_sm2[0]=(ncell_sm+0.25)*hexd1[6] ; | |
301 | dpara_sm2[1] = (ncell_sm - ncell_hole + 0.25) * root3_2 * hexd1[6]; | |
302 | dpara_sm2[2] = sm_thick/2.; | |
303 | ||
304 | gMC->Gsvolu("ESMX","PARA", idtmed[607], dpara_sm2, 6); | |
305 | gMC->Gsatt("ESMX", "SEEN", 0); | |
306 | // | |
307 | gMC->Gsvolu("ESMY","PARA", idtmed[607], dpara_sm2, 6); | |
308 | gMC->Gsatt("ESMY", "SEEN", 0); | |
309 | ||
310 | Float_t dpara2[6] = {12.5,12.5,0.4,30.,0.,0.}; | |
311 | dpara2[0] = dpara_sm2[0]; | |
312 | dpara2[1] = dpara_sm2[1]; | |
313 | dpara2[2] = cell_depth/2.; | |
314 | ||
315 | gMC->Gsvolu("EHC2","PARA", idtmed[698], dpara2, 6); | |
316 | gMC->Gsatt("EHC2", "SEEN", 1); | |
317 | ||
318 | ||
319 | // Air residing between the PCB and the base | |
320 | ||
321 | Float_t dpara2_air[6] = {12.5,12.5,8.,30.,0.,0.}; | |
322 | dpara2_air[0]= dpara_sm2[0]; | |
323 | dpara2_air[1]= dpara_sm2[1]; | |
324 | dpara2_air[2]= th_air/2.; | |
325 | ||
326 | gMC->Gsvolu("EAIX","PARA", idtmed[698], dpara2_air, 6); | |
327 | gMC->Gsatt("EAIX", "SEEN", 0); | |
328 | ||
329 | // Place hexagonal single cells ECCU inside EHC2 | |
330 | // skip cells which go into the hole in top left corner. | |
331 | ||
332 | xrow=1; | |
333 | yb = -dpara2[1] + (1./root3_2)*hexd1[6]; | |
334 | zb = 0.; | |
335 | for (j = 1; j <= (ncell_sm - ncell_hole); ++j) { | |
336 | xb =-(dpara2[0] + dpara2[1]*0.577) + 2*hexd1[6]; | |
337 | if(xrow >= 2){ | |
338 | xb = xb+(xrow-1)*hexd1[6]; | |
339 | } | |
340 | for (i = 1; i <= ncell_sm; ++i) { | |
341 | number = i+(j-1)*ncell_sm; | |
ef61784c | 342 | gMC->Gspos("ECCU", number, "EHC2", xb,yb,zb, ihrotm, "ONLY"); |
c4561145 | 343 | xb += (hexd1[6]*2.); |
344 | } | |
345 | xrow = xrow+1; | |
346 | yb += (hexd1[6]*TMath::Sqrt(3.)); | |
347 | } | |
348 | ||
349 | ||
350 | // ESMX is normal supermodule with base at bottom, with EHC2 | |
351 | ||
352 | z_air1= -dpara_sm2[2] + th_base + dpara2_air[2]; | |
353 | gMC->Gspos("EAIX", 1, "ESMX", 0., 0., z_air1, 0, "ONLY"); | |
354 | z_gas=z_air1+dpara2_air[2]+ th_pcb + dpara2[2]; | |
76ad67b5 | 355 | //Line below Commented for version 0 of PMD routine |
356 | // gMC->Gspos("EHC2", 1, "ESMX", 0., 0., z_gas, 0, "ONLY"); | |
c4561145 | 357 | z_air2=z_gas+dpara2[2]+ th_pcb + dpara2_air[2]; |
358 | gMC->Gspos("EAIX", 2, "ESMX", 0., 0., z_air2, 0, "ONLY"); | |
359 | ||
360 | // ESMY is mirror image of ESMX with base at bottom, with EHC2 | |
361 | ||
362 | z_air1= -dpara_sm2[2] + th_pcb + dpara2_air[2]; | |
363 | gMC->Gspos("EAIX", 3, "ESMY", 0., 0., z_air1, 0, "ONLY"); | |
364 | z_gas=z_air1+dpara2_air[2]+ th_pcb + dpara2[2]; | |
76ad67b5 | 365 | //Line below Commented for version 0 of PMD routine |
366 | // gMC->Gspos("EHC2", 2, "ESMY", 0., 0., z_gas, 0, "ONLY"); | |
c4561145 | 367 | z_air2=z_gas+dpara2[2]+ th_pcb + dpara2_air[2]; |
368 | gMC->Gspos("EAIX", 4, "ESMY", 0., 0., z_air2, 0, "ONLY"); | |
369 | ||
370 | // | |
371 | ||
372 | ||
373 | // special supermodule EMM3 (GEANT only) containing 2 unit modules | |
374 | ||
375 | // volume for SUPERMODULE | |
376 | ||
377 | Float_t dpara_sm3[6] = {12.5,12.5,0.8,30.,0.,0.}; | |
378 | dpara_sm3[0]=(ncell_sm - ncell_hole +0.25)*hexd1[6] ; | |
379 | dpara_sm3[1] = (ncell_hole + 0.25) * hexd1[6] * root3_2; | |
380 | dpara_sm3[2] = sm_thick/2.; | |
381 | ||
382 | gMC->Gsvolu("ESMP","PARA", idtmed[607], dpara_sm3, 6); | |
383 | gMC->Gsatt("ESMP", "SEEN", 0); | |
384 | // | |
385 | gMC->Gsvolu("ESMQ","PARA", idtmed[607], dpara_sm3, 6); | |
386 | gMC->Gsatt("ESMQ", "SEEN", 0); | |
387 | ||
388 | Float_t dpara3[6] = {12.5,12.5,0.4,30.,0.,0.}; | |
389 | dpara3[0] = dpara_sm3[0]; | |
390 | dpara3[1] = dpara_sm3[1]; | |
391 | dpara3[2] = cell_depth/2.; | |
392 | ||
393 | gMC->Gsvolu("EHC3","PARA", idtmed[698], dpara3, 6); | |
394 | gMC->Gsatt("EHC3", "SEEN", 1); | |
395 | ||
396 | ||
397 | // Air residing between the PCB and the base | |
398 | ||
399 | Float_t dpara3_air[6] = {12.5,12.5,8.,30.,0.,0.}; | |
400 | dpara3_air[0]= dpara_sm3[0]; | |
401 | dpara3_air[1]= dpara_sm3[1]; | |
402 | dpara3_air[2]= th_air/2.; | |
403 | ||
404 | gMC->Gsvolu("EAIP","PARA", idtmed[698], dpara3_air, 6); | |
405 | gMC->Gsatt("EAIP", "SEEN", 0); | |
406 | ||
407 | ||
408 | // Place hexagonal single cells ECCU inside EHC3 | |
409 | // skip cells which go into the hole in top left corner. | |
410 | ||
411 | xrow=1; | |
412 | yb = -dpara3[1] + (1./root3_2)*hexd1[6]; | |
413 | zb = 0.; | |
414 | for (j = 1; j <= ncell_hole; ++j) { | |
415 | xb =-(dpara3[0] + dpara3[1]*0.577) + 2*hexd1[6]; | |
416 | if(xrow >= 2){ | |
417 | xb = xb+(xrow-1)*hexd1[6]; | |
418 | } | |
419 | for (i = 1; i <= (ncell_sm - ncell_hole); ++i) { | |
420 | number = i+(j-1)*(ncell_sm - ncell_hole); | |
ef61784c | 421 | gMC->Gspos("ECCU", number, "EHC3", xb,yb,zb, ihrotm, "ONLY"); |
c4561145 | 422 | xb += (hexd1[6]*2.); |
423 | } | |
424 | xrow = xrow+1; | |
425 | yb += (hexd1[6]*TMath::Sqrt(3.)); | |
426 | } | |
427 | ||
428 | // ESMP is normal supermodule with base at bottom, with EHC3 | |
429 | ||
430 | z_air1= -dpara_sm3[2] + th_base + dpara3_air[2]; | |
431 | gMC->Gspos("EAIP", 1, "ESMP", 0., 0., z_air1, 0, "ONLY"); | |
432 | z_gas=z_air1+dpara3_air[2]+ th_pcb + dpara3[2]; | |
76ad67b5 | 433 | //Line below Commented for version 0 of PMD routine |
434 | // gMC->Gspos("EHC3", 1, "ESMP", 0., 0., z_gas, 0, "ONLY"); | |
c4561145 | 435 | z_air2=z_gas+dpara3[2]+ th_pcb + dpara3_air[2]; |
436 | gMC->Gspos("EAIP", 2, "ESMP", 0., 0., z_air2, 0, "ONLY"); | |
437 | ||
438 | // ESMQ is mirror image of ESMP with base at bottom, with EHC3 | |
439 | ||
440 | z_air1= -dpara_sm3[2] + th_pcb + dpara3_air[2]; | |
441 | gMC->Gspos("EAIP", 3, "ESMQ", 0., 0., z_air1, 0, "ONLY"); | |
442 | z_gas=z_air1+dpara3_air[2]+ th_pcb + dpara3[2]; | |
76ad67b5 | 443 | //Line below Commented for version 0 of PMD routine |
444 | // gMC->Gspos("EHC3", 2, "ESMQ", 0., 0., z_gas, 0, "ONLY"); | |
c4561145 | 445 | z_air2=z_gas+dpara3[2]+ th_pcb + dpara3_air[2]; |
446 | gMC->Gspos("EAIP", 4, "ESMQ", 0., 0., z_air2, 0, "ONLY"); | |
447 | ||
448 | } | |
449 | ||
450 | //_____________________________________________________________________________ | |
451 | ||
452 | void AliPMDv0::CreatePMD() | |
453 | { | |
454 | // | |
455 | // Create final detector from supermodules | |
456 | // | |
457 | // -- Author : Y.P. VIYOGI, 07/05/1996. | |
458 | // -- Modified: P.V.K.S.Baba(JU), 15-12-97. | |
459 | // -- Modified: For New Geometry YPV, March 2001. | |
460 | ||
461 | ||
462 | const Float_t root3_2 = TMath::Sqrt(3.)/2.; | |
463 | const Float_t pi = 3.14159; | |
464 | Int_t i,j; | |
465 | ||
466 | Float_t xp, yp, zp; | |
467 | ||
468 | Int_t num_mod; | |
469 | Int_t jhrot12,jhrot13, irotdm; | |
470 | ||
471 | Int_t *idtmed = fIdtmed->GetArray()-599; | |
472 | ||
473 | // VOLUMES Names : begining with "E" for all PMD volumes, | |
474 | // The names of SIZE variables begin with S and have more meaningful | |
475 | // characters as shown below. | |
476 | ||
477 | // VOLUME SIZE MEDIUM : REMARKS | |
478 | // ------ ----- ------ : --------------------------- | |
479 | ||
480 | // EPMD GASPMD AIR : INSIDE PMD and its SIZE | |
481 | ||
482 | // *** Define the EPMD Volume and fill with air *** | |
483 | ||
484 | ||
485 | // Gaspmd, the dimension of HEXAGONAL mother volume of PMD, | |
486 | ||
487 | ||
488 | Float_t gaspmd[10] = {0.,360.,6,2,-4.,12.,150.,4.,12.,150.}; | |
489 | ||
490 | gaspmd[5] = ncell_hole * cell_radius * 2. * root3_2; | |
491 | gaspmd[8] = gaspmd[5]; | |
492 | ||
493 | gMC->Gsvolu("EPMD", "PGON", idtmed[698], gaspmd, 10); | |
494 | gMC->Gsatt("EPMD", "SEEN", 0); | |
495 | ||
496 | AliMatrix(irotdm, 90., 0., 90., 90., 180., 0.); | |
497 | ||
498 | AliMatrix(jhrot12, 90., 120., 90., 210., 0., 0.); | |
499 | AliMatrix(jhrot13, 90., 240., 90., 330., 0., 0.); | |
500 | ||
501 | ||
502 | Float_t dm_thick = 2. * sm_thick + th_lead + th_steel; | |
503 | ||
504 | // dpara_emm1 array contains parameters of the imaginary volume EMM1, | |
505 | // EMM1 is a master module of type 1, which has 24 copies in the PMD. | |
506 | // EMM1 : normal volume as in old cases | |
507 | ||
508 | ||
509 | Float_t dpara_emm1[6] = {12.5,12.5,0.8,30.,0.,0.}; | |
510 | dpara_emm1[0] = sm_length/2.; | |
511 | dpara_emm1[1] = dpara_emm1[0] *root3_2; | |
512 | dpara_emm1[2] = dm_thick/2.; | |
513 | ||
514 | gMC->Gsvolu("EMM1","PARA", idtmed[698], dpara_emm1, 6); | |
515 | gMC->Gsatt("EMM1", "SEEN", 1); | |
516 | ||
517 | // | |
518 | // --- DEFINE Modules, iron, and lead volumes | |
519 | ||
520 | // Pb Convertor for EMM1 | |
521 | Float_t dpara_pb1[6] = {12.5,12.5,8.,30.,0.,0.}; | |
522 | dpara_pb1[0] = sm_length/2.; | |
523 | dpara_pb1[1] = dpara_pb1[0] * root3_2; | |
524 | dpara_pb1[2] = th_lead/2.; | |
525 | ||
526 | gMC->Gsvolu("EPB1","PARA", idtmed[600], dpara_pb1, 6); | |
527 | gMC->Gsatt ("EPB1", "SEEN", 0); | |
528 | ||
529 | // Fe Support for EMM1 | |
530 | Float_t dpara_fe1[6] = {12.5,12.5,8.,30.,0.,0.}; | |
531 | dpara_fe1[0] = dpara_pb1[0]; | |
532 | dpara_fe1[1] = dpara_pb1[1]; | |
533 | dpara_fe1[2] = th_steel/2.; | |
534 | ||
535 | gMC->Gsvolu("EFE1","PARA", idtmed[618], dpara_fe1, 6); | |
536 | gMC->Gsatt ("EFE1", "SEEN", 0); | |
537 | ||
538 | ||
539 | ||
540 | // | |
541 | // position supermodule ESMA, ESMB, EPB1, EFE1 inside EMM1 | |
542 | ||
543 | Float_t z_ps,z_pb,z_fe,z_cv; | |
544 | ||
545 | z_ps = - dpara_emm1[2] + sm_thick/2.; | |
546 | gMC->Gspos("ESMB", 1, "EMM1", 0., 0., z_ps, 0, "ONLY"); | |
547 | z_pb=z_ps+sm_thick/2.+dpara_pb1[2]; | |
548 | gMC->Gspos("EPB1", 1, "EMM1", 0., 0., z_pb, 0, "ONLY"); | |
549 | z_fe=z_pb+dpara_pb1[2]+dpara_fe1[2]; | |
550 | gMC->Gspos("EFE1", 1, "EMM1", 0., 0., z_fe, 0, "ONLY"); | |
551 | z_cv=z_fe+dpara_fe1[2]+sm_thick/2.; | |
552 | gMC->Gspos("ESMA", 1, "EMM1", 0., 0., z_cv, 0, "ONLY"); | |
553 | ||
554 | ||
555 | ||
556 | // EMM2 : special master module having full row of cells but the number | |
557 | // of rows limited by hole. | |
558 | ||
559 | Float_t dpara_emm2[6] = {12.5,12.5,0.8,30.,0.,0.}; | |
560 | dpara_emm2[0] = sm_length/2.; | |
561 | dpara_emm2[1] = (ncell_sm - ncell_hole + 0.25) * cell_radius * root3_2; | |
562 | dpara_emm2[2] = dm_thick/2.; | |
563 | ||
564 | gMC->Gsvolu("EMM2","PARA", idtmed[698], dpara_emm2, 6); | |
565 | gMC->Gsatt("EMM2", "SEEN", 1); | |
566 | ||
567 | ||
568 | // Pb Convertor for EMM2 | |
569 | Float_t dpara_pb2[6] = {12.5,12.5,8.,30.,0.,0.}; | |
570 | dpara_pb2[0] = dpara_emm2[0]; | |
571 | dpara_pb2[1] = dpara_emm2[1]; | |
572 | dpara_pb2[2] = th_lead/2.; | |
573 | ||
574 | gMC->Gsvolu("EPB2","PARA", idtmed[600], dpara_pb2, 6); | |
575 | gMC->Gsatt ("EPB2", "SEEN", 0); | |
576 | ||
577 | // Fe Support for EMM2 | |
578 | Float_t dpara_fe2[6] = {12.5,12.5,8.,30.,0.,0.}; | |
579 | dpara_fe2[0] = dpara_pb2[0]; | |
580 | dpara_fe2[1] = dpara_pb2[1]; | |
581 | dpara_fe2[2] = th_steel/2.; | |
582 | ||
583 | gMC->Gsvolu("EFE2","PARA", idtmed[618], dpara_fe2, 6); | |
584 | gMC->Gsatt ("EFE2", "SEEN", 0); | |
585 | ||
586 | ||
587 | ||
588 | // position supermodule ESMX, ESMY inside EMM2 | |
589 | ||
590 | z_ps = - dpara_emm2[2] + sm_thick/2.; | |
591 | gMC->Gspos("ESMY", 1, "EMM2", 0., 0., z_ps, 0, "ONLY"); | |
592 | z_pb = z_ps + sm_thick/2.+dpara_pb2[2]; | |
593 | gMC->Gspos("EPB2", 1, "EMM2", 0., 0., z_pb, 0, "ONLY"); | |
594 | z_fe = z_pb + dpara_pb2[2]+dpara_fe2[2]; | |
595 | gMC->Gspos("EFE2", 1, "EMM2", 0., 0., z_fe, 0, "ONLY"); | |
596 | z_cv = z_fe + dpara_fe2[2]+sm_thick/2.; | |
597 | gMC->Gspos("ESMX", 1, "EMM2", 0., 0., z_cv, 0, "ONLY"); | |
598 | // | |
599 | ||
600 | ||
601 | // EMM3 : special master module having truncated rows and columns of cells | |
602 | // limited by hole. | |
603 | ||
604 | Float_t dpara_emm3[6] = {12.5,12.5,0.8,30.,0.,0.}; | |
605 | dpara_emm3[0] = dpara_emm2[1]/root3_2; | |
606 | dpara_emm3[1] = (ncell_hole + 0.25) * cell_radius *root3_2; | |
607 | dpara_emm3[2] = dm_thick/2.; | |
608 | ||
609 | gMC->Gsvolu("EMM3","PARA", idtmed[698], dpara_emm3, 6); | |
610 | gMC->Gsatt("EMM3", "SEEN", 1); | |
611 | ||
612 | ||
613 | // Pb Convertor for EMM3 | |
614 | Float_t dpara_pb3[6] = {12.5,12.5,8.,30.,0.,0.}; | |
615 | dpara_pb3[0] = dpara_emm3[0]; | |
616 | dpara_pb3[1] = dpara_emm3[1]; | |
617 | dpara_pb3[2] = th_lead/2.; | |
618 | ||
619 | gMC->Gsvolu("EPB3","PARA", idtmed[600], dpara_pb3, 6); | |
620 | gMC->Gsatt ("EPB3", "SEEN", 0); | |
621 | ||
622 | // Fe Support for EMM3 | |
623 | Float_t dpara_fe3[6] = {12.5,12.5,8.,30.,0.,0.}; | |
624 | dpara_fe3[0] = dpara_pb3[0]; | |
625 | dpara_fe3[1] = dpara_pb3[1]; | |
626 | dpara_fe3[2] = th_steel/2.; | |
627 | ||
628 | gMC->Gsvolu("EFE3","PARA", idtmed[618], dpara_fe3, 6); | |
629 | gMC->Gsatt ("EFE3", "SEEN", 0); | |
630 | ||
631 | ||
632 | ||
633 | // position supermodule ESMP, ESMQ inside EMM3 | |
634 | ||
635 | z_ps = - dpara_emm3[2] + sm_thick/2.; | |
636 | gMC->Gspos("ESMQ", 1, "EMM3", 0., 0., z_ps, 0, "ONLY"); | |
637 | z_pb = z_ps + sm_thick/2.+dpara_pb3[2]; | |
638 | gMC->Gspos("EPB3", 1, "EMM3", 0., 0., z_pb, 0, "ONLY"); | |
639 | z_fe = z_pb + dpara_pb3[2]+dpara_fe3[2]; | |
640 | gMC->Gspos("EFE3", 1, "EMM3", 0., 0., z_fe, 0, "ONLY"); | |
641 | z_cv = z_fe + dpara_fe3[2] + sm_thick/2.; | |
642 | gMC->Gspos("ESMP", 1, "EMM3", 0., 0., z_cv, 0, "ONLY"); | |
643 | // | |
644 | ||
645 | // EHOL is a tube structure made of air | |
646 | // | |
647 | //Float_t d_hole[3]; | |
648 | //d_hole[0] = 0.; | |
649 | //d_hole[1] = ncell_hole * cell_radius *2. * root3_2 + boundary; | |
650 | //d_hole[2] = dm_thick/2.; | |
651 | // | |
652 | //gMC->Gsvolu("EHOL", "TUBE", idtmed[698], d_hole, 3); | |
653 | //gMC->Gsatt("EHOL", "SEEN", 1); | |
654 | ||
655 | //Al-rod as boundary of the supermodules | |
656 | ||
657 | Float_t Al_rod[3] ; | |
658 | Al_rod[0] = sm_length * 3/2. - gaspmd[5]/2 - boundary ; | |
659 | Al_rod[1] = boundary; | |
660 | Al_rod[2] = dm_thick/2.; | |
661 | ||
662 | gMC->Gsvolu("EALM","BOX ", idtmed[698], Al_rod, 3); | |
663 | gMC->Gsatt ("EALM", "SEEN", 1); | |
664 | Float_t xalm[3]; | |
665 | xalm[0]=Al_rod[0] + gaspmd[5] + 3.0*boundary; | |
666 | xalm[1]=-xalm[0]/2.; | |
667 | xalm[2]=xalm[1]; | |
668 | ||
669 | Float_t yalm[3]; | |
670 | yalm[0]=0.; | |
671 | yalm[1]=xalm[0]*root3_2; | |
672 | yalm[2]=-yalm[1]; | |
673 | ||
674 | // delx = full side of the supermodule | |
675 | Float_t delx=sm_length * 3.; | |
676 | Float_t x1= delx*root3_2 /2.; | |
677 | Float_t x4=delx/4.; | |
678 | ||
679 | ||
680 | // placing master modules and Al-rod in PMD | |
681 | ||
682 | Float_t dx = sm_length; | |
683 | Float_t dy = dx * root3_2; | |
684 | ||
685 | Float_t xsup[9] = {-dx/2., dx/2., 3.*dx/2., | |
686 | -dx, 0., dx, | |
687 | -3.*dx/2., -dx/2., dx/2.}; | |
688 | ||
689 | Float_t ysup[9] = {dy, dy, dy, | |
690 | 0., 0., 0., | |
691 | -dy, -dy, -dy}; | |
692 | ||
693 | // xpos and ypos are the x & y coordinates of the centres of EMM1 volumes | |
694 | ||
695 | Float_t xoff = boundary * TMath::Tan(pi/6.); | |
696 | Float_t xmod[3]={x4 + xoff , x4 + xoff, -2.*x4-boundary/root3_2}; | |
697 | Float_t ymod[3] = {-x1 - boundary, x1 + boundary, 0.}; | |
698 | Float_t xpos[9], ypos[9], x2, y2, x3, y3; | |
699 | ||
700 | Float_t xemm2 = sm_length/2. - | |
701 | (ncell_sm + ncell_hole + 0.25) * cell_radius * 0.5 | |
702 | + xoff; | |
703 | Float_t yemm2 = -(ncell_sm + ncell_hole + 0.25) * cell_radius * root3_2 | |
704 | - boundary; | |
705 | ||
706 | Float_t xemm3 = (ncell_sm + 0.5 * ncell_hole + 0.25) * cell_radius + xoff; | |
707 | Float_t yemm3 = - (ncell_hole - 0.25) * cell_radius * root3_2 - boundary; | |
708 | ||
709 | Float_t theta[3] = {0., 2.*pi/3., 4.*pi/3.}; | |
710 | Int_t irotate[3] = {0, jhrot12, jhrot13}; | |
711 | ||
712 | num_mod=0; | |
ef61784c | 713 | for (j=0; j<3; ++j) { |
714 | gMC->Gspos("EALM", j+1, "EPMD", xalm[j],yalm[j], 0., irotate[j], "ONLY"); | |
715 | x2=xemm2*TMath::Cos(theta[j]) - yemm2*TMath::Sin(theta[j]); | |
716 | y2=xemm2*TMath::Sin(theta[j]) + yemm2*TMath::Cos(theta[j]); | |
c4561145 | 717 | |
ef61784c | 718 | gMC->Gspos("EMM2", j+1, "EPMD", x2,y2, 0., irotate[j], "ONLY"); |
c4561145 | 719 | |
ef61784c | 720 | x3=xemm3*TMath::Cos(theta[j]) - yemm3*TMath::Sin(theta[j]); |
721 | y3=xemm3*TMath::Sin(theta[j]) + yemm3*TMath::Cos(theta[j]); | |
c4561145 | 722 | |
ef61784c | 723 | gMC->Gspos("EMM3", j+4, "EPMD", x3,y3, 0., irotate[j], "ONLY"); |
c4561145 | 724 | |
ef61784c | 725 | for (i=1; i<9; ++i) { |
726 | xpos[i]=xmod[j] + xsup[i]*TMath::Cos(theta[j]) - ysup[i]*TMath::Sin(theta[j]); | |
727 | ypos[i]=ymod[j] + xsup[i]*TMath::Sin(theta[j]) + ysup[i]*TMath::Cos(theta[j]); | |
728 | if(fDebug) | |
729 | printf("%s: %f %f \n", ClassName(), xpos[i], ypos[i]); | |
c4561145 | 730 | |
ef61784c | 731 | num_mod = num_mod+1; |
c4561145 | 732 | |
ef61784c | 733 | if(fDebug) |
734 | printf("\n%s: Num_mod %d\n",ClassName(),num_mod); | |
c4561145 | 735 | |
ef61784c | 736 | gMC->Gspos("EMM1", num_mod + 6, "EPMD", xpos[i],ypos[i], 0., irotate[j], "ONLY"); |
c4561145 | 737 | |
ef61784c | 738 | } |
739 | } | |
c4561145 | 740 | |
741 | ||
742 | // place EHOL in the centre of EPMD | |
743 | // gMC->Gspos("EHOL", 1, "EPMD", 0.,0.,0., 0, "ONLY"); | |
744 | ||
745 | // --- Place the EPMD in ALICE | |
746 | xp = 0.; | |
747 | yp = 0.; | |
748 | zp = zdist1; | |
749 | ||
750 | gMC->Gspos("EPMD", 1, "ALIC", xp,yp,zp, 0, "ONLY"); | |
751 | ||
752 | } | |
753 | ||
754 | ||
755 | //_____________________________________________________________________________ | |
756 | void AliPMDv0::DrawModule() | |
757 | { | |
758 | // | |
759 | // Draw a shaded view of the Photon Multiplicity Detector | |
760 | // | |
761 | ||
762 | gMC->Gsatt("*", "seen", -1); | |
763 | gMC->Gsatt("alic", "seen", 0); | |
764 | // | |
765 | // Set the visibility of the components | |
766 | // | |
767 | gMC->Gsatt("ECAR","seen",0); | |
768 | gMC->Gsatt("ECCU","seen",1); | |
769 | gMC->Gsatt("EHC1","seen",1); | |
770 | gMC->Gsatt("EHC1","seen",1); | |
771 | gMC->Gsatt("EHC2","seen",1); | |
772 | gMC->Gsatt("EMM1","seen",1); | |
773 | gMC->Gsatt("EHOL","seen",1); | |
774 | gMC->Gsatt("EPMD","seen",0); | |
775 | // | |
776 | gMC->Gdopt("hide", "on"); | |
777 | gMC->Gdopt("shad", "on"); | |
778 | gMC->Gsatt("*", "fill", 7); | |
779 | gMC->SetClipBox("."); | |
780 | gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000); | |
781 | gMC->DefaultRange(); | |
782 | gMC->Gdraw("alic", 40, 30, 0, 22, 20.5, .02, .02); | |
783 | gMC->Gdhead(1111, "Photon Multiplicity Detector Version 1"); | |
784 | ||
785 | //gMC->Gdman(17, 5, "MAN"); | |
786 | gMC->Gdopt("hide", "off"); | |
787 | } | |
788 | ||
789 | //_____________________________________________________________________________ | |
790 | void AliPMDv0::CreateMaterials() | |
791 | { | |
792 | // | |
793 | // Create materials for the PMD | |
794 | // | |
795 | // ORIGIN : Y. P. VIYOGI | |
796 | // | |
797 | ||
798 | // --- The Argon- CO2 mixture --- | |
799 | Float_t ag[2] = { 39.95 }; | |
800 | Float_t zg[2] = { 18. }; | |
801 | Float_t wg[2] = { .8,.2 }; | |
802 | Float_t dar = .001782; // --- Ar density in g/cm3 --- | |
803 | // --- CO2 --- | |
804 | Float_t ac[2] = { 12.,16. }; | |
805 | Float_t zc[2] = { 6.,8. }; | |
806 | Float_t wc[2] = { 1.,2. }; | |
807 | Float_t dc = .001977; | |
808 | Float_t dco = .002; // --- CO2 density in g/cm3 --- | |
809 | ||
810 | Float_t absl, radl, a, d, z; | |
811 | Float_t dg; | |
812 | Float_t x0ar; | |
813 | //Float_t x0xe=2.4; | |
814 | //Float_t dxe=0.005858; | |
815 | Float_t buf[1]; | |
816 | Int_t nbuf; | |
817 | Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 }; | |
818 | Float_t zsteel[4] = { 26.,24.,28.,14. }; | |
819 | Float_t wsteel[4] = { .715,.18,.1,.005 }; | |
820 | ||
821 | Int_t *idtmed = fIdtmed->GetArray()-599; | |
822 | Int_t isxfld = gAlice->Field()->Integ(); | |
823 | Float_t sxmgmx = gAlice->Field()->Max(); | |
824 | ||
825 | // --- Define the various materials for GEANT --- | |
826 | AliMaterial(1, "Pb $", 207.19, 82., 11.35, .56, 18.5); | |
827 | x0ar = 19.55 / dar; | |
828 | AliMaterial(2, "Argon$", 39.95, 18., dar, x0ar, 6.5e4); | |
829 | AliMixture(3, "CO2 $", ac, zc, dc, -2, wc); | |
830 | AliMaterial(4, "Al $", 26.98, 13., 2.7, 8.9, 18.5); | |
831 | AliMaterial(6, "Fe $", 55.85, 26., 7.87, 1.76, 18.5); | |
832 | AliMaterial(7, "W $", 183.85, 74., 19.3, .35, 10.3); | |
833 | AliMaterial(8, "G10 $", 20., 10., 1.7, 19.4, 999.); | |
834 | AliMaterial(9, "SILIC$", 28.09, 14., 2.33, 9.36, 45.); | |
835 | AliMaterial(10, "Be $", 9.01, 4., 1.848, 35.3, 36.7); | |
836 | AliMaterial(15, "Cu $", 63.54, 29., 8.96, 1.43, 15.); | |
837 | AliMaterial(16, "C $", 12.01, 6., 2.265, 18.8, 49.9); | |
838 | AliMaterial(17, "POLYCARBONATE $", 20., 10., 1.2, 34.6, 999.); | |
839 | AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel); | |
840 | // AliMaterial(31, "Xenon$", 131.3, 54., dxe, x0xe, 6.5e4); | |
841 | ||
842 | AliMaterial(96, "MYLAR$", 8.73, 4.55, 1.39, 28.7, 62.); | |
843 | AliMaterial(97, "CONCR$", 20., 10., 2.5, 10.7, 40.); | |
844 | AliMaterial(98, "Vacum$", 1e-9, 1e-9, 1e-9, 1e16, 1e16); | |
845 | AliMaterial(99, "Air $", 14.61, 7.3, .0012, 30420., 67500.); | |
846 | ||
847 | // define gas-mixtures | |
848 | ||
00d6d986 | 849 | char namate[21]=""; |
c4561145 | 850 | gMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf); |
851 | ag[1] = a; | |
852 | zg[1] = z; | |
853 | dg = (dar * 4 + dco) / 5; | |
854 | AliMixture(5, "ArCO2$", ag, zg, dg, 2, wg); | |
855 | ||
856 | // Define tracking media | |
857 | AliMedium(1, "Pb conv.$", 1, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1); | |
858 | AliMedium(7, "W conv.$", 7, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1); | |
859 | AliMedium(8, "G10plate$", 8, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1); | |
860 | AliMedium(4, "Al $", 4, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1); | |
861 | AliMedium(6, "Fe $", 6, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1); | |
862 | AliMedium(5, "ArCO2 $", 5, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1); | |
863 | AliMedium(9, "SILICON $", 9, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1); | |
864 | AliMedium(10, "Be $", 10, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1); | |
865 | AliMedium(98, "Vacuum $", 98, 0, 0, isxfld, sxmgmx, 1., .1, .1, 10); | |
866 | AliMedium(99, "Air gaps$", 99, 0, 0, isxfld, sxmgmx, 1., .1, .1, .1); | |
867 | AliMedium(15, "Cu $", 15, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1); | |
868 | AliMedium(16, "C $", 16, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1); | |
869 | AliMedium(17, "PLOYCARB$", 17, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1); | |
870 | AliMedium(19, " S steel$", 19, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1); | |
871 | // AliMedium(31, "Xenon $", 31, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1); | |
872 | ||
873 | // --- Generate explicitly delta rays in the iron, aluminium and lead --- | |
874 | gMC->Gstpar(idtmed[600], "LOSS", 3.); | |
875 | gMC->Gstpar(idtmed[600], "DRAY", 1.); | |
876 | ||
877 | gMC->Gstpar(idtmed[603], "LOSS", 3.); | |
878 | gMC->Gstpar(idtmed[603], "DRAY", 1.); | |
879 | ||
880 | gMC->Gstpar(idtmed[604], "LOSS", 3.); | |
881 | gMC->Gstpar(idtmed[604], "DRAY", 1.); | |
882 | ||
883 | gMC->Gstpar(idtmed[605], "LOSS", 3.); | |
884 | gMC->Gstpar(idtmed[605], "DRAY", 1.); | |
885 | ||
886 | gMC->Gstpar(idtmed[606], "LOSS", 3.); | |
887 | gMC->Gstpar(idtmed[606], "DRAY", 1.); | |
888 | ||
889 | gMC->Gstpar(idtmed[607], "LOSS", 3.); | |
890 | gMC->Gstpar(idtmed[607], "DRAY", 1.); | |
891 | ||
892 | // --- Energy cut-offs in the Pb and Al to gain time in tracking --- | |
893 | // --- without affecting the hit patterns --- | |
894 | gMC->Gstpar(idtmed[600], "CUTGAM", 1e-4); | |
895 | gMC->Gstpar(idtmed[600], "CUTELE", 1e-4); | |
896 | gMC->Gstpar(idtmed[600], "CUTNEU", 1e-4); | |
897 | gMC->Gstpar(idtmed[600], "CUTHAD", 1e-4); | |
898 | gMC->Gstpar(idtmed[605], "CUTGAM", 1e-4); | |
899 | gMC->Gstpar(idtmed[605], "CUTELE", 1e-4); | |
900 | gMC->Gstpar(idtmed[605], "CUTNEU", 1e-4); | |
901 | gMC->Gstpar(idtmed[605], "CUTHAD", 1e-4); | |
902 | gMC->Gstpar(idtmed[606], "CUTGAM", 1e-4); | |
903 | gMC->Gstpar(idtmed[606], "CUTELE", 1e-4); | |
904 | gMC->Gstpar(idtmed[606], "CUTNEU", 1e-4); | |
905 | gMC->Gstpar(idtmed[606], "CUTHAD", 1e-4); | |
906 | gMC->Gstpar(idtmed[603], "CUTGAM", 1e-4); | |
907 | gMC->Gstpar(idtmed[603], "CUTELE", 1e-4); | |
908 | gMC->Gstpar(idtmed[603], "CUTNEU", 1e-4); | |
909 | gMC->Gstpar(idtmed[603], "CUTHAD", 1e-4); | |
910 | gMC->Gstpar(idtmed[609], "CUTGAM", 1e-4); | |
911 | gMC->Gstpar(idtmed[609], "CUTELE", 1e-4); | |
912 | gMC->Gstpar(idtmed[609], "CUTNEU", 1e-4); | |
913 | gMC->Gstpar(idtmed[609], "CUTHAD", 1e-4); | |
914 | ||
915 | // --- Prevent particles stopping in the gas due to energy cut-off --- | |
916 | gMC->Gstpar(idtmed[604], "CUTGAM", 1e-5); | |
917 | gMC->Gstpar(idtmed[604], "CUTELE", 1e-5); | |
918 | gMC->Gstpar(idtmed[604], "CUTNEU", 1e-5); | |
919 | gMC->Gstpar(idtmed[604], "CUTHAD", 1e-5); | |
920 | gMC->Gstpar(idtmed[604], "CUTMUO", 1e-5); | |
921 | } | |
922 | ||
923 | //_____________________________________________________________________________ | |
924 | void AliPMDv0::Init() | |
925 | { | |
926 | // | |
927 | // Initialises PMD detector after it has been built | |
928 | // | |
929 | Int_t i; | |
930 | kdet=1; | |
931 | // | |
df622204 | 932 | if(fDebug) { |
933 | printf("\n%s: ",ClassName()); | |
934 | for(i=0;i<35;i++) printf("*"); | |
935 | printf(" PMD_INIT "); | |
936 | for(i=0;i<35;i++) printf("*"); | |
937 | printf("\n%s: ",ClassName()); | |
938 | printf(" PMD simulation package (v0) initialised\n"); | |
939 | printf("%s: parameters of pmd\n", ClassName()); | |
dee197d3 | 940 | printf("%s: %10.2f %10.2f %10.2f \ |
df622204 | 941 | %10.2f\n",ClassName(),cell_radius,cell_wall,cell_depth,zdist1 ); |
942 | printf("%s: ",ClassName()); | |
943 | for(i=0;i<80;i++) printf("*"); | |
944 | printf("\n"); | |
945 | } | |
c4561145 | 946 | Int_t *idtmed = fIdtmed->GetArray()-599; |
947 | fMedSens=idtmed[605-1]; | |
948 | } | |
949 | ||
950 | //_____________________________________________________________________________ | |
951 | void AliPMDv0::StepManager() | |
952 | { | |
953 | // | |
954 | // Called at each step in the PMD | |
955 | // | |
956 | Int_t copy; | |
957 | Float_t hits[4], destep; | |
958 | Float_t center[3] = {0,0,0}; | |
959 | Int_t vol[5]; | |
960 | //char *namep; | |
961 | ||
962 | if(gMC->GetMedium() == fMedSens && (destep = gMC->Edep())) { | |
963 | ||
964 | gMC->CurrentVolID(copy); | |
965 | ||
966 | //namep=gMC->CurrentVolName(); | |
967 | //printf("Current vol is %s \n",namep); | |
968 | ||
969 | vol[0]=copy; | |
970 | gMC->CurrentVolOffID(1,copy); | |
971 | ||
972 | //namep=gMC->CurrentVolOffName(1); | |
973 | //printf("Current vol 11 is %s \n",namep); | |
974 | ||
975 | vol[1]=copy; | |
976 | gMC->CurrentVolOffID(2,copy); | |
977 | ||
978 | //namep=gMC->CurrentVolOffName(2); | |
979 | //printf("Current vol 22 is %s \n",namep); | |
980 | ||
981 | vol[2]=copy; | |
982 | ||
983 | // if(strncmp(namep,"EHC1",4))vol[2]=1; | |
984 | ||
985 | gMC->CurrentVolOffID(3,copy); | |
986 | ||
987 | //namep=gMC->CurrentVolOffName(3); | |
988 | //printf("Current vol 33 is %s \n",namep); | |
989 | ||
990 | vol[3]=copy; | |
991 | gMC->CurrentVolOffID(4,copy); | |
992 | ||
993 | //namep=gMC->CurrentVolOffName(4); | |
994 | //printf("Current vol 44 is %s \n",namep); | |
995 | ||
996 | vol[4]=copy; | |
997 | //printf("volume number %d,%d,%d,%d,%d,%f \n",vol[0],vol[1],vol[2],vol[3],vol[4],destep*1000000); | |
998 | ||
999 | gMC->Gdtom(center,hits,1); | |
1000 | hits[3] = destep*1e9; //Number in eV | |
642f15cf | 1001 | AddHit(gAlice->GetCurrentTrackNumber(), vol, hits); |
c4561145 | 1002 | } |
1003 | } | |
1004 | ||
1005 | ||
1006 | //------------------------------------------------------------------------ | |
1007 | // Get parameters | |
1008 | ||
1009 | void AliPMDv0::GetParameters() | |
1010 | { | |
1011 | Int_t ncell_um, num_um; | |
1012 | ncell_um=24; | |
1013 | num_um=3; | |
1014 | ncell_hole=24; | |
1015 | cell_radius=0.25; | |
1016 | cell_wall=0.02; | |
1017 | cell_depth=0.25 * 2.; | |
1018 | // | |
1019 | boundary=0.7; | |
1020 | ncell_sm=ncell_um * num_um; //no. of cells in a row in one supermodule | |
1021 | sm_length= ((ncell_sm + 0.25 ) * cell_radius) * 2.; | |
1022 | // | |
1023 | th_base=0.3; | |
1024 | th_air=0.1; | |
1025 | th_pcb=0.16; | |
1026 | // | |
1027 | sm_thick = th_base + th_air + th_pcb + cell_depth + th_pcb + th_air + th_pcb; | |
1028 | // | |
1029 | th_lead=1.5; | |
1030 | th_steel=0.5; | |
1031 | // | |
1032 | zdist1 = -365.; | |
1033 | } | |
1034 | ||
1035 | ||
1036 | ||
1037 | ||
1038 | ||
1039 | ||
1040 | ||
1041 | ||
1042 | ||
1043 | ||
1044 | ||
1045 | ||
1046 | ||
ef61784c | 1047 |