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