]>
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 | **************************************************************************/ | |
b1952773 | 15 | /* |
16 | $Log$ | |
d1f5ecc3 | 17 | Revision 1.23 2003/10/01 05:07:51 bnandi |
18 | New geometry in new Alice Coordinate system | |
19 | ||
b1952773 | 20 | New rectangular geometry for ALICE PMD - Bedanga Mohanty and Y. P. Viyogi |
21 | June 2003 | |
22 | */ | |
c4561145 | 23 | // |
24 | /////////////////////////////////////////////////////////////////////////////// | |
25 | // // | |
26 | // Photon Multiplicity Detector Version 1 // | |
27 | // // | |
28 | //Begin_Html | |
29 | /* | |
30 | <img src="picts/AliPMDv1Class.gif"> | |
31 | */ | |
32 | //End_Html | |
33 | // // | |
34 | /////////////////////////////////////////////////////////////////////////////// | |
35 | //// | |
36 | ||
88cb7938 | 37 | #include "AliPMDv1.h" |
38 | #include "AliRun.h" | |
b1952773 | 39 | #include "AliConst.h" |
40 | #include "AliMagF.h" | |
41 | #include "iostream.h" | |
c4561145 | 42 | |
b1952773 | 43 | static Int_t ncol_um1,ncol_um2, nrow_um1, nrow_um2; |
44 | static Int_t kdet; | |
45 | static Float_t sm_length_ax,sm_length_ay; | |
46 | static Float_t sm_length_bx,sm_length_by; | |
47 | static Float_t zdist, zdist1; | |
48 | static Float_t sm_thick, cell_radius, cell_wall, cell_depth; | |
49 | static Float_t boundary, th_base, th_air, th_pcb; | |
50 | static Float_t th_lead, th_steel; | |
c4561145 | 51 | |
52 | ClassImp(AliPMDv1) | |
53 | ||
54 | //_____________________________________________________________________________ | |
55 | AliPMDv1::AliPMDv1() | |
56 | { | |
57 | // | |
58 | // Default constructor | |
59 | // | |
60 | fMedSens=0; | |
61 | } | |
62 | ||
63 | //_____________________________________________________________________________ | |
64 | AliPMDv1::AliPMDv1(const char *name, const char *title) | |
65 | : AliPMD(name,title) | |
66 | { | |
67 | // | |
68 | // Standard constructor | |
69 | // | |
70 | fMedSens=0; | |
71 | } | |
72 | ||
73 | //_____________________________________________________________________________ | |
74 | void AliPMDv1::CreateGeometry() | |
75 | { | |
b1952773 | 76 | // Create geometry for Photon Multiplicity Detector |
77 | ||
c4561145 | 78 | GetParameters(); |
79 | CreateSupermodule(); | |
80 | CreatePMD(); | |
81 | } | |
82 | ||
83 | //_____________________________________________________________________________ | |
84 | void AliPMDv1::CreateSupermodule() | |
85 | { | |
b1952773 | 86 | // |
87 | // Creates the geometry of the cells of PMD, places them in supermodule | |
88 | // which is a rectangular object. | |
89 | // Basic unit is ECAR, a hexagonal cell made of Ar+CO2, which is | |
90 | // placed inside another hexagonal cell made of Cu (ECCU) with larger | |
91 | // radius, compared to ECAR. The difference in radius gives the dimension | |
92 | // of half width of each cell wall. | |
93 | // These cells are placed in a rectangular strip which are of 2 types | |
94 | // EST1 and EST2 | |
95 | // 2 types of unit modules are made EUM1 and EUM2 which contains these strips | |
96 | // placed repeatedly | |
97 | // Each supermodule (ESMA, ESMB), made of G10 is filled with following | |
98 | //components. They have 9 unit moudles inside them | |
99 | // ESMA, ESMB are placed in EPMD along with EMPB (Pb converter) | |
c4561145 | 100 | // and EMFE (iron support) |
101 | ||
c4561145 | 102 | |
b1952773 | 103 | Int_t i,j; |
c4561145 | 104 | Float_t xb, yb, zb; |
105 | Int_t number; | |
106 | Int_t ihrotm,irotdm; | |
107 | const Float_t root3_2 = TMath::Sqrt(3.) /2.; | |
b1952773 | 108 | const Float_t root3 = TMath::Sqrt(3.); |
c4561145 | 109 | Int_t *idtmed = fIdtmed->GetArray()-599; |
110 | ||
111 | AliMatrix(ihrotm, 90., 30., 90., 120., 0., 0.); | |
112 | AliMatrix(irotdm, 90., 180., 90., 270., 180., 0.); | |
113 | ||
114 | zdist = TMath::Abs(zdist1); | |
115 | ||
b1952773 | 116 | // First create the sensitive medium of a hexagon cell (ECAR) |
c4561145 | 117 | // Inner hexagon filled with gas (Ar+CO2) |
b1952773 | 118 | |
c4561145 | 119 | Float_t hexd2[10] = {0.,360.,6,2,-0.25,0.,0.23,0.25,0.,0.23}; |
b1952773 | 120 | hexd2[4] = -cell_depth/2.; |
121 | hexd2[7] = cell_depth/2.; | |
122 | hexd2[6] = cell_radius - cell_wall; | |
123 | hexd2[9] = cell_radius - cell_wall; | |
c4561145 | 124 | |
125 | gMC->Gsvolu("ECAR", "PGON", idtmed[604], hexd2,10); | |
126 | gMC->Gsatt("ECAR", "SEEN", 0); | |
b1952773 | 127 | |
128 | // Place the sensitive medium inside a hexagon copper cell (ECCU) | |
c4561145 | 129 | // Outer hexagon made of Copper |
b1952773 | 130 | |
c4561145 | 131 | Float_t hexd1[10] = {0.,360.,6,2,-0.25,0.,0.25,0.25,0.,0.25}; |
b1952773 | 132 | hexd1[4] = -cell_depth/2.; |
133 | hexd1[7] = cell_depth/2.; | |
134 | hexd1[6] = cell_radius; | |
135 | hexd1[9] = cell_radius; | |
c4561145 | 136 | |
137 | gMC->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10); | |
b1952773 | 138 | gMC->Gsatt("ECCU", "SEEN", 0); |
c4561145 | 139 | |
b1952773 | 140 | // Place inner hex (sensitive volume) inside outer hex (copper) |
141 | ||
142 | gMC->Gsposp("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY", hexd2, 10); | |
143 | ||
144 | // Now create Rectangular TWO strips (EST1, EST2) | |
145 | // of 1 column and 48 or 96 cells length | |
c4561145 | 146 | |
b1952773 | 147 | // volume for first strip EST1 made of AIR |
c4561145 | 148 | |
b1952773 | 149 | Float_t dbox1[3]; |
150 | dbox1[0] = ncol_um1*cell_radius; | |
151 | dbox1[1] = cell_radius/root3_2; | |
152 | dbox1[2] = cell_depth/2.; | |
153 | ||
154 | gMC->Gsvolu("EST1","BOX", idtmed[698], dbox1, 3); | |
155 | gMC->Gsatt("EST1", "SEEN", 0); | |
c4561145 | 156 | |
b1952773 | 157 | // volume for second strip EST2 |
c4561145 | 158 | |
b1952773 | 159 | Float_t dbox2[3]; |
160 | dbox2[0] = ncol_um2*cell_radius; | |
161 | dbox2[1] = dbox1[1]; | |
162 | dbox2[2] = dbox1[2]; | |
c4561145 | 163 | |
b1952773 | 164 | gMC->Gsvolu("EST2","BOX", idtmed[698], dbox2, 3); |
165 | gMC->Gsatt("EST2", "SEEN", 0); | |
c4561145 | 166 | |
b1952773 | 167 | // Place hexagonal cells ECCU placed inside EST1 |
168 | yb = 0.; | |
169 | zb = 0.; | |
170 | xb = -(dbox1[0]) + cell_radius; | |
171 | for (i = 1; i <= ncol_um1; ++i) | |
172 | { | |
173 | number = i; | |
174 | gMC->Gsposp("ECCU", number, "EST1", xb,yb,zb, ihrotm, "ONLY", hexd1,10); | |
175 | xb += (cell_radius*2.); | |
176 | } | |
177 | // Place hexagonal cells ECCU placed inside EST2 | |
178 | yb = 0.; | |
179 | zb = 0.; | |
180 | xb = -(dbox2[0]) + cell_radius; | |
181 | for (i = 1; i <= ncol_um2; ++i) | |
182 | { | |
183 | number = i; | |
184 | gMC->Gsposp("ECCU", number, "EST2", xb,yb,zb, ihrotm, "ONLY", hexd1,10); | |
185 | xb += (cell_radius*2.); | |
186 | } | |
c4561145 | 187 | |
c4561145 | 188 | |
189 | ||
b1952773 | 190 | // 2 types of rectangular shaped unit modules EUM1 and EUM2 (defined by BOX) |
c4561145 | 191 | |
b1952773 | 192 | // Create EUM1 |
c4561145 | 193 | |
b1952773 | 194 | Float_t dbox3[3]; |
195 | dbox3[0] = dbox1[0]+cell_radius/2.; | |
196 | dbox3[1] = (dbox1[1]*nrow_um1)-(cell_radius*root3*(nrow_um1-1)/6.); | |
197 | dbox3[2] = cell_depth/2.; | |
198 | ||
199 | gMC->Gsvolu("EUM1","BOX", idtmed[698], dbox3, 3); | |
200 | gMC->Gsatt("EUM1", "SEEN", 1); | |
201 | ||
202 | // Place rectangular strips EST1 inside EUM1 unit module | |
c4561145 | 203 | |
b1952773 | 204 | yb = -dbox3[1]+dbox1[1]; |
205 | for (j = 1; j <= nrow_um1; ++j) | |
206 | { | |
207 | if(j%2 == 0) | |
208 | { | |
209 | xb =cell_radius/2.0; | |
210 | } | |
211 | else | |
212 | { | |
213 | xb = -cell_radius/2.0; | |
214 | } | |
215 | number = j; | |
216 | gMC->Gsposp("EST1",number, "EUM1", xb, yb , 0. , 0, "MANY",dbox1,3); | |
217 | yb = (-dbox3[1]+dbox1[1])+j*1.0*cell_radius*root3; | |
c4561145 | 218 | } |
c4561145 | 219 | |
b1952773 | 220 | // Create EUM2 |
c4561145 | 221 | |
b1952773 | 222 | Float_t dbox4[3]; |
223 | dbox4[0] = dbox2[0]+cell_radius/2.; | |
224 | dbox4[1] =(dbox2[1]*nrow_um2)-(cell_radius*root3*(nrow_um2-1)/6.); | |
225 | dbox4[2] = dbox3[2]; | |
c4561145 | 226 | |
b1952773 | 227 | gMC->Gsvolu("EUM2","BOX", idtmed[698], dbox4, 3); |
228 | gMC->Gsatt("EUM2", "SEEN", 1); | |
c4561145 | 229 | |
b1952773 | 230 | // Place rectangular strips EST2 inside EUM2 unit module |
c4561145 | 231 | |
b1952773 | 232 | yb = -dbox4[1]+dbox2[1]; |
233 | for (j = 1; j <= nrow_um2; ++j) | |
234 | { | |
235 | if(j%2 == 0) | |
236 | { | |
237 | xb =cell_radius/2.0; | |
238 | } | |
239 | else | |
240 | { | |
241 | xb = -cell_radius/2.0; | |
242 | } | |
243 | number = j; | |
244 | gMC->Gsposp("EST2",number, "EUM2", xb, yb , 0. , 0, "MANY",dbox2,3); | |
245 | yb = (-dbox4[1]+dbox2[1])+j*1.0*cell_radius*root3; | |
246 | } | |
c4561145 | 247 | |
b1952773 | 248 | // 2 types of Rectangular shaped supermodules (BOX) |
249 | //each with 6 unit modules | |
250 | ||
251 | // volume for SUPERMODULE ESMA | |
252 | //Space added to provide a gapping for HV between UM's | |
253 | ||
254 | Float_t dbox_sm1[3]; | |
255 | dbox_sm1[0] = 3.0*dbox3[0]+(2.0*0.025); | |
256 | dbox_sm1[1] = 2.0*dbox3[1]+0.025; | |
257 | dbox_sm1[2] = cell_depth/2.; | |
258 | ||
259 | gMC->Gsvolu("ESMA","BOX", idtmed[698], dbox_sm1, 3); | |
260 | gMC->Gsatt("ESMA", "SEEN", 1); | |
261 | ||
262 | //Position the 6 unit modules in EMSA | |
263 | Float_t x_a1,x_a2,x_a3,y_a1,y_a2; | |
264 | x_a1 = -dbox_sm1[0] + dbox3[0]; | |
265 | x_a2 = 0.; | |
266 | x_a3 = dbox_sm1[0] - dbox3[0]; | |
267 | y_a1 = dbox_sm1[1] - dbox3[1]; | |
268 | y_a2 = -dbox_sm1[1] + dbox3[1]; | |
269 | ||
270 | gMC->Gsposp("EUM1", 1, "ESMA", x_a1, y_a1, 0., 0, "ONLY",dbox3,3); | |
271 | gMC->Gsposp("EUM1", 2, "ESMA", x_a2, y_a1, 0., 0, "ONLY",dbox3,3); | |
272 | gMC->Gsposp("EUM1", 3, "ESMA", x_a3, y_a1, 0., 0, "ONLY",dbox3,3); | |
273 | gMC->Gsposp("EUM1", 4, "ESMA", x_a1, y_a2, 0., 0, "ONLY",dbox3,3); | |
274 | gMC->Gsposp("EUM1", 5, "ESMA", x_a2, y_a2, 0., 0, "ONLY",dbox3,3); | |
275 | gMC->Gsposp("EUM1", 6, "ESMA", x_a3, y_a2, 0., 0, "ONLY",dbox3,3); | |
276 | ||
277 | ||
278 | // volume for SUPERMODULE ESMB | |
279 | //Space is added to provide a gapping for HV between UM's | |
280 | Float_t dbox_sm2[3]; | |
281 | dbox_sm2[0] = 2.0*dbox4[0]+0.025; | |
282 | dbox_sm2[1] = 3.0*dbox4[1]+(2.0*0.025); | |
283 | dbox_sm2[2] = cell_depth/2.; | |
284 | ||
285 | gMC->Gsvolu("ESMB","BOX", idtmed[698], dbox_sm2, 3); | |
286 | gMC->Gsatt("ESMB", "SEEN", 1); | |
287 | ||
288 | //Position the 6 unit modules in EMSB | |
289 | Float_t x_b1,x_b2,y_b1,y_b2,y_b3; | |
290 | x_b1 = -dbox_sm2[0] +dbox4[0]; | |
291 | x_b2 = dbox_sm2[0]-dbox4[0]; | |
292 | y_b1 =dbox_sm2[1]-dbox4[1]; | |
293 | y_b2 = 0.; | |
294 | y_b3 = -dbox_sm2[1]+dbox4[1]; | |
295 | ||
296 | gMC->Gsposp("EUM2", 1, "ESMB", x_b1, y_b1, 0., 0, "ONLY",dbox4,3); | |
297 | gMC->Gsposp("EUM2", 2, "ESMB", x_b2, y_b1, 0., 0, "ONLY",dbox4,3); | |
298 | gMC->Gsposp("EUM2", 3, "ESMB", x_b1, y_b2, 0., 0, "ONLY",dbox4,3); | |
299 | gMC->Gsposp("EUM2", 4, "ESMB", x_b2, y_b2, 0., 0, "ONLY",dbox4,3); | |
300 | gMC->Gsposp("EUM2", 5, "ESMB", x_b1, y_b3, 0., 0, "ONLY",dbox4,3); | |
301 | gMC->Gsposp("EUM2", 6, "ESMB", x_b2, y_b3, 0., 0, "ONLY",dbox4,3); | |
302 | ||
303 | ||
304 | // Make a 3mm thick G10 Base plate for ESMA | |
305 | Float_t dbox_g1a[3]; | |
306 | dbox_g1a[0] = dbox_sm1[0]; | |
307 | dbox_g1a[1] = dbox_sm1[1]; | |
308 | dbox_g1a[2] = th_base/2.; | |
309 | ||
310 | gMC->Gsvolu("EBPA","BOX", idtmed[607], dbox_g1a, 3); | |
311 | gMC->Gsatt("EBPA", "SEEN", 1); | |
312 | ||
313 | // Make a 1.6mm thick G10 PCB for ESMA | |
314 | Float_t dbox_g2a[3]; | |
315 | dbox_g2a[0] = dbox_sm1[0]; | |
316 | dbox_g2a[1] = dbox_sm1[1]; | |
317 | dbox_g2a[2] = th_pcb/2.; | |
318 | ||
319 | gMC->Gsvolu("EPCA","BOX", idtmed[607], dbox_g2a, 3); | |
320 | gMC->Gsatt("EPCA", "SEEN", 1); | |
321 | ||
322 | ||
323 | // Make a Full module EFPA of AIR to place EBPA, | |
324 | // 1mm AIR, EPCA, ESMA,EPCA for PMD | |
325 | ||
326 | Float_t dbox_alla[3]; | |
327 | dbox_alla[0] = dbox_sm1[0]; | |
328 | dbox_alla[1] = dbox_sm1[1]; | |
329 | dbox_alla[2] = (th_base+0.1+th_pcb+dbox_sm1[2]+th_pcb)/2.; | |
330 | ||
331 | gMC->Gsvolu("EFPA","BOX", idtmed[698], dbox_alla, 3); | |
332 | gMC->Gsatt("EFPA", "SEEN", 1); | |
333 | ||
334 | ||
335 | // Make a Full module EFCA of AIR to place EBPA, | |
336 | // 1mm AIR, EPCA, ESMA,EPC for CPV | |
337 | Float_t dbox_alla2[3]; | |
338 | dbox_alla2[0] = dbox_sm1[0]; | |
339 | dbox_alla2[1] = dbox_sm1[1]; | |
340 | dbox_alla2[2] = (th_base+0.1+th_pcb+dbox_sm1[2]+th_pcb)/2.; | |
341 | ||
342 | gMC->Gsvolu("EFCA","BOX", idtmed[698], dbox_alla2, 3); | |
343 | gMC->Gsatt("EFCA", "SEEN", 1); | |
344 | ||
345 | // Now place everything in EFPA for PMD | |
346 | ||
347 | Float_t z_bpa,z_pcba1,z_pcba2,z_sma; | |
348 | z_pcba1 = - dbox_alla[2]+th_pcb/2.0; | |
349 | gMC->Gsposp("EPCA", 1, "EFPA", 0., 0., z_pcba1, 0, "ONLY",dbox_g2a,3); | |
350 | z_sma = z_pcba1+dbox_sm1[2]; | |
351 | gMC->Gsposp("ESMA", 1, "EFPA", 0., 0., z_sma, 0, "ONLY",dbox_sm1,3); | |
352 | z_pcba2 = z_sma+th_pcb/2.0; | |
353 | gMC->Gsposp("EPCA", 2, "EFPA", 0., 0., z_pcba2, 0, "ONLY",dbox_g2a,3); | |
354 | z_bpa = z_pcba2+0.1+th_base/2.0; // 0.1 for 0.1 mm Air gap | |
355 | gMC->Gsposp("EBPA", 1, "EFPA", 0., 0., z_bpa, 0, "ONLY",dbox_g1a,3); | |
356 | ||
357 | // Now place everything in EFCA for CPV | |
358 | ||
359 | Float_t z_bpa2,z_pcba12,z_pcba22,z_sma2; | |
360 | z_bpa2 = - dbox_alla2[2]+th_base/2.0; | |
361 | gMC->Gsposp("EBPA", 1, "EFCA", 0., 0., z_bpa2, 0, "ONLY",dbox_g1a,3); | |
362 | z_pcba12 = z_bpa2+0.1+th_pcb/2.0; | |
363 | gMC->Gsposp("EPCA", 1, "EFCA", 0., 0., z_pcba12, 0, "ONLY",dbox_g2a,3); | |
364 | z_sma2 = z_pcba12+dbox_sm1[2]; | |
365 | gMC->Gsposp("ESMA", 1, "EFCA", 0., 0., z_sma2, 0, "ONLY",dbox_sm1,3); | |
366 | z_pcba22 = z_sma2+th_pcb/2.0; | |
367 | gMC->Gsposp("EPCA", 2, "EFCA", 0., 0., z_pcba22, 0, "ONLY",dbox_g2a,3); | |
c4561145 | 368 | |
369 | ||
c4561145 | 370 | |
b1952773 | 371 | // Make a 3mm thick G10 Base plate for ESMB |
372 | Float_t dbox_g1b[3]; | |
373 | dbox_g1b[0] = dbox_sm2[0]; | |
374 | dbox_g1b[1] = dbox_sm2[1]; | |
375 | dbox_g1b[2] = th_base/2.; | |
376 | ||
377 | gMC->Gsvolu("EBPB","BOX", idtmed[607], dbox_g1b, 3); | |
378 | gMC->Gsatt("EBPB", "SEEN", 1); | |
379 | ||
380 | // Make a 1.6mm thick G10 PCB for ESMB | |
381 | Float_t dbox_g2b[3]; | |
382 | dbox_g2b[0] = dbox_sm2[0]; | |
383 | dbox_g2b[1] = dbox_sm2[1]; | |
384 | dbox_g2b[2] = th_pcb/2.; | |
c4561145 | 385 | |
b1952773 | 386 | gMC->Gsvolu("EPCB","BOX", idtmed[607], dbox_g2b, 3); |
387 | gMC->Gsatt("EPCB", "SEEN", 1); | |
c4561145 | 388 | |
c4561145 | 389 | |
b1952773 | 390 | // Make a Full module EFPB of AIR to place EBPB, |
391 | //1mm AIR, EPCB, ESMB,EPCB for PMD | |
392 | Float_t dbox_allb[3]; | |
393 | dbox_allb[0] = dbox_sm2[0]; | |
394 | dbox_allb[1] = dbox_sm2[1]; | |
395 | dbox_allb[2] = (th_base+0.1+th_pcb+dbox_sm2[2]+th_pcb)/2.; | |
c4561145 | 396 | |
b1952773 | 397 | gMC->Gsvolu("EFPB","BOX", idtmed[698], dbox_allb, 3); |
398 | gMC->Gsatt("EFPB", "SEEN", 1); | |
c4561145 | 399 | |
b1952773 | 400 | // Make a Full module EFCB of AIR to place EBPB, |
401 | //1mm AIR, EPCB, ESMB,EPCB for CPV | |
402 | Float_t dbox_allb2[3]; | |
403 | dbox_allb2[0] = dbox_sm2[0]; | |
404 | dbox_allb2[1] = dbox_sm2[1]; | |
405 | dbox_allb2[2] = (th_base+0.1+th_pcb+dbox_sm2[2]+th_pcb)/2.; | |
c4561145 | 406 | |
b1952773 | 407 | gMC->Gsvolu("EFCB","BOX", idtmed[698], dbox_allb2, 3); |
408 | gMC->Gsatt("EFCB", "SEEN", 1); | |
c4561145 | 409 | |
c4561145 | 410 | |
b1952773 | 411 | // Now place everything in EFPB for PMD |
c4561145 | 412 | |
b1952773 | 413 | Float_t z_bpb,z_pcbb1,z_pcbb2,z_smb; |
414 | z_pcbb1 = - dbox_allb[2]+th_pcb/2.0; | |
415 | gMC->Gsposp("EPCB", 1, "EFPB", 0., 0., z_pcbb1, 0, "ONLY",dbox_g2b,3); | |
416 | z_smb = z_pcbb1+dbox_sm2[2]; | |
417 | gMC->Gsposp("ESMB", 1, "EFPB", 0., 0., z_smb, 0, "ONLY",dbox_sm2,3); | |
418 | z_pcbb2 = z_smb+th_pcb/2.0; | |
419 | gMC->Gsposp("EPCB", 2, "EFPB", 0., 0., z_pcbb2, 0, "ONLY",dbox_g2b,3); | |
420 | z_bpb = z_pcbb2+0.1+th_base/2.0; // 0.1 for 0.1 mm Air gap | |
421 | gMC->Gsposp("EBPB", 1, "EFPB", 0., 0., z_bpb, 0, "ONLY",dbox_g1b,3); | |
c4561145 | 422 | |
c4561145 | 423 | |
b1952773 | 424 | // Now place everything in EFCB for CPV |
425 | ||
426 | Float_t z_bpb2,z_pcbb12,z_pcbb22,z_smb2; | |
427 | z_bpb2 = - dbox_allb2[2]+th_base/2.0; | |
428 | gMC->Gsposp("EBPB", 1, "EFCB", 0., 0., z_bpb2, 0, "ONLY",dbox_g1b,3); | |
429 | z_pcbb12 = z_bpb2+0.1+th_pcb/2.0; | |
430 | gMC->Gsposp("EPCB", 1, "EFCB", 0., 0., z_pcbb12, 0, "ONLY",dbox_g2b,3); | |
431 | z_smb2 = z_pcbb12+dbox_sm2[2]; | |
432 | gMC->Gsposp("ESMB", 1, "EFCB", 0., 0., z_smb2, 0, "ONLY",dbox_sm2,3); | |
433 | z_pcbb22 = z_smb2+th_pcb/2.0; | |
434 | gMC->Gsposp("EPCB", 2, "EFCB", 0., 0., z_pcbb22, 0, "ONLY",dbox_g2b,3); | |
c4561145 | 435 | |
c4561145 | 436 | |
b1952773 | 437 | // Master MODULE EMPA of aluminum for PMD |
438 | //Float_t dbox_mm1[3]; | |
439 | dbox_mm1[0] = dbox_sm1[0]+boundary; | |
440 | dbox_mm1[1] = dbox_sm1[1]+boundary; | |
441 | dbox_mm1[2] = dbox_alla[2]; | |
c4561145 | 442 | |
b1952773 | 443 | gMC->Gsvolu("EMPA","BOX", idtmed[603], dbox_mm1, 3); |
444 | gMC->Gsatt("EMPA", "SEEN", 1); | |
c4561145 | 445 | |
b1952773 | 446 | // Master MODULE EMCA of aluminum for CPV |
447 | //Float_t dbox_mm12[3]; | |
448 | dbox_mm12[0] = dbox_sm1[0]+boundary; | |
449 | dbox_mm12[1] = dbox_sm1[1]+boundary; | |
450 | dbox_mm12[2] = dbox_alla[2]; | |
c4561145 | 451 | |
b1952773 | 452 | gMC->Gsvolu("EMCA","BOX", idtmed[603], dbox_mm12, 3); |
453 | gMC->Gsatt("EMCA", "SEEN", 1); | |
c4561145 | 454 | |
455 | ||
b1952773 | 456 | //Position EFMA inside EMMA for PMD and CPV |
457 | gMC->Gsposp("EFPA", 1, "EMPA", 0., 0., 0., 0, "ONLY",dbox_alla,3); | |
458 | gMC->Gsposp("EFCA", 1, "EMCA", 0., 0., 0., 0, "ONLY",dbox_alla2,3); | |
c4561145 | 459 | |
c4561145 | 460 | |
b1952773 | 461 | // Master MODULE EMPB of aluminum for PMD |
462 | //Float_t dbox_mm2[3]; | |
463 | dbox_mm2[0] = dbox_sm2[0]+boundary; | |
464 | dbox_mm2[1] = dbox_sm2[1]+boundary; | |
465 | dbox_mm2[2] = dbox_allb[2]; | |
c4561145 | 466 | |
b1952773 | 467 | gMC->Gsvolu("EMPB","BOX", idtmed[603], dbox_mm2, 3); |
468 | gMC->Gsatt("EMPB", "SEEN", 1); | |
c4561145 | 469 | |
b1952773 | 470 | // Master MODULE EMCB of aluminum for CPV |
471 | //Float_t dbox_mm22[3]; | |
472 | dbox_mm22[0] = dbox_sm2[0]+boundary; | |
473 | dbox_mm22[1] = dbox_sm2[1]+boundary; | |
474 | dbox_mm22[2] = dbox_allb[2]; | |
c4561145 | 475 | |
b1952773 | 476 | gMC->Gsvolu("EMCB","BOX", idtmed[603], dbox_mm22, 3); |
477 | gMC->Gsatt("EMCB", "SEEN", 1); | |
c4561145 | 478 | |
b1952773 | 479 | |
480 | //Position EFMB inside EMMB | |
481 | gMC->Gsposp("EFPB", 1, "EMPB", 0., 0., 0., 0, "ONLY",dbox_allb,3); | |
482 | gMC->Gsposp("EFCB", 1, "EMCB", 0., 0., 0., 0, "ONLY",dbox_allb2,3); | |
c4561145 | 483 | |
484 | } | |
485 | ||
486 | //_____________________________________________________________________________ | |
487 | ||
488 | void AliPMDv1::CreatePMD() | |
489 | { | |
b1952773 | 490 | |
c4561145 | 491 | // |
492 | // Create final detector from supermodules | |
b1952773 | 493 | // -- Author : Bedanga and Viyogi June 2003 |
c4561145 | 494 | |
495 | Float_t xp, yp, zp; | |
c4561145 | 496 | Int_t jhrot12,jhrot13, irotdm; |
c4561145 | 497 | Int_t *idtmed = fIdtmed->GetArray()-599; |
498 | ||
b1952773 | 499 | //VOLUMES Names : begining with "E" for all PMD volumes, |
500 | ||
501 | // --- DEFINE Iron, and lead volumes for SM A | |
502 | ||
503 | Float_t dbox_pba[3]; | |
504 | dbox_pba[0] = sm_length_ax; | |
505 | dbox_pba[1] = sm_length_ay; | |
506 | dbox_pba[2] = th_lead/2.; | |
c4561145 | 507 | |
b1952773 | 508 | gMC->Gsvolu("EPBA","BOX", idtmed[600], dbox_pba, 3); |
509 | gMC->Gsatt ("EPBA", "SEEN", 0); | |
c4561145 | 510 | |
b1952773 | 511 | // Fe Support |
512 | Float_t dbox_fea[3]; | |
513 | dbox_fea[0] = sm_length_ax; | |
514 | dbox_fea[1] = sm_length_ay; | |
515 | dbox_fea[2] = th_steel/2.; | |
c4561145 | 516 | |
b1952773 | 517 | gMC->Gsvolu("EFEA","BOX", idtmed[618], dbox_fea, 3); |
518 | gMC->Gsatt ("EFEA", "SEEN", 0); | |
c4561145 | 519 | |
b1952773 | 520 | // --- DEFINE Iron, and lead volumes for SM B |
521 | ||
522 | Float_t dbox_pbb[3]; | |
523 | dbox_pbb[0] = sm_length_bx; | |
524 | dbox_pbb[1] = sm_length_by; | |
525 | dbox_pbb[2] = th_lead/2.; | |
526 | ||
527 | gMC->Gsvolu("EPBB","BOX", idtmed[600], dbox_pbb, 3); | |
528 | gMC->Gsatt ("EPBB", "SEEN", 0); | |
529 | ||
530 | // Fe Support | |
531 | Float_t dbox_feb[3]; | |
532 | dbox_feb[0] = sm_length_bx; | |
533 | dbox_feb[1] = sm_length_by; | |
534 | dbox_feb[2] = th_steel/2.; | |
535 | ||
536 | gMC->Gsvolu("EFEB","BOX", idtmed[618], dbox_feb, 3); | |
537 | gMC->Gsatt ("EFEB", "SEEN", 0); | |
c4561145 | 538 | |
c4561145 | 539 | |
b1952773 | 540 | // Gaspmd, the dimension of RECTANGULAR mother volume of PMD, |
c4561145 | 541 | |
b1952773 | 542 | Float_t gaspmd[3] = {81.5,94.5,7.}; |
543 | gaspmd[0] = sm_length_ax+sm_length_bx; | |
544 | gaspmd[1] = sm_length_ay+sm_length_by; | |
c4561145 | 545 | |
c4561145 | 546 | |
b1952773 | 547 | gMC->Gsvolu("EPMD", "BOX", idtmed[698], gaspmd, 3); |
548 | gMC->Gsatt("EPMD", "SEEN", 1); | |
c4561145 | 549 | |
550 | AliMatrix(irotdm, 90., 0., 90., 90., 180., 0.); | |
551 | ||
b1952773 | 552 | AliMatrix(jhrot12, 90., 180., 90., 270., 0., 0.); |
c4561145 | 553 | AliMatrix(jhrot13, 90., 240., 90., 330., 0., 0.); |
554 | ||
b1952773 | 555 | Float_t x_sma,y_sma; |
556 | Float_t x_smb,y_smb; | |
557 | x_sma = -(sm_length_bx)/1.0; | |
558 | y_sma = sm_length_by; | |
559 | x_smb = -sm_length_ax; | |
560 | y_smb = -sm_length_ay; | |
561 | ||
562 | //Complete detector for Type A | |
563 | //Position Super modules type A for both CPV and PMD in EPMD | |
564 | Float_t z_psa,z_pba,z_fea,z_cva; | |
565 | z_psa = - gaspmd[3] + sm_thick/2.; | |
566 | ||
567 | gMC->Gsposp("EMPA", 1, "EPMD", x_sma, y_sma, z_psa, 0, "ONLY",dbox_mm1,3); | |
568 | gMC->Gsposp("EMPA", 2, "EPMD", -x_sma, -y_sma, z_psa, jhrot12, "ONLY",dbox_mm1,3); | |
569 | z_pba=z_psa+sm_thick/2.+dbox_pba[2]; | |
570 | gMC->Gsposp("EPBA", 1, "EPMD", x_sma, y_sma, z_pba, 0, "ONLY",dbox_pba,3); | |
571 | gMC->Gsposp("EPBA", 2, "EPMD", -x_sma, -y_sma, z_pba, 0, "ONLY",dbox_pba,3); | |
572 | z_fea=z_pba+dbox_pba[2]+dbox_fea[2]; | |
573 | gMC->Gsposp("EFEA", 1, "EPMD", x_sma, y_sma, z_fea, 0, "ONLY",dbox_fea,3); | |
574 | gMC->Gsposp("EFEA", 2, "EPMD", -x_sma, -y_sma, z_fea, 0, "ONLY",dbox_fea,3); | |
575 | z_cva=z_fea+dbox_fea[2]+sm_thick/2.; | |
576 | gMC->Gsposp("EMCA", 1, "EPMD", x_sma, y_sma, z_cva, 0, "ONLY",dbox_mm12,3); | |
577 | gMC->Gsposp("EMCA", 2, "EPMD", -x_sma,-y_sma, z_cva, jhrot12, "ONLY",dbox_mm12,3); | |
578 | ||
579 | //Complete detector for Type B | |
580 | //Position Super modules type B for both CPV and PMD in EPMD | |
581 | Float_t z_psb,z_pbb,z_feb,z_cvb; | |
582 | z_psb = - gaspmd[3] + sm_thick/2.; | |
583 | ||
584 | gMC->Gsposp("EMPB", 3, "EPMD", x_smb, y_smb, z_psb, 0, "ONLY",dbox_mm2,3); | |
585 | gMC->Gsposp("EMPB", 4, "EPMD", -x_smb, -y_smb, z_psb, jhrot12, "ONLY",dbox_mm2,3); | |
586 | z_pbb=z_psb+sm_thick/2.+dbox_pbb[2]; | |
587 | gMC->Gsposp("EPBB", 3, "EPMD", x_smb, y_smb, z_pbb, 0, "ONLY",dbox_pbb,3); | |
588 | gMC->Gsposp("EPBB", 4, "EPMD", -x_smb, -y_smb, z_pbb, 0, "ONLY",dbox_pbb,3); | |
589 | z_feb=z_pbb+dbox_pbb[2]+dbox_feb[2]; | |
590 | gMC->Gsposp("EFEB", 3, "EPMD", x_smb, y_smb, z_feb, 0, "ONLY",dbox_feb,3); | |
591 | gMC->Gsposp("EFEB", 4, "EPMD", -x_smb, -y_smb, z_feb, 0, "ONLY",dbox_feb,3); | |
592 | z_cvb=z_feb+dbox_feb[2]+sm_thick/2.; | |
593 | gMC->Gsposp("EMCB", 3, "EPMD", x_smb, y_smb, z_cvb, 0, "ONLY",dbox_mm22,3); | |
594 | gMC->Gsposp("EMCB", 4, "EPMD", -x_smb,-y_smb, z_cvb, jhrot12, "ONLY",dbox_mm22,3); | |
c4561145 | 595 | |
c4561145 | 596 | // --- Place the EPMD in ALICE |
597 | xp = 0.; | |
598 | yp = 0.; | |
599 | zp = zdist1; | |
b1952773 | 600 | |
601 | //Position Full PMD in ALICE | |
602 | gMC->Gsposp("EPMD", 1, "ALIC", xp,yp,zp, 0, "ONLY",gaspmd,3); | |
603 | ||
c4561145 | 604 | } |
605 | ||
606 | ||
607 | //_____________________________________________________________________________ | |
608 | void AliPMDv1::DrawModule() | |
609 | { | |
b1952773 | 610 | cout << " Inside Draw Modules " << endl; |
c4561145 | 611 | // |
612 | // Draw a shaded view of the Photon Multiplicity Detector | |
613 | // | |
614 | ||
615 | gMC->Gsatt("*", "seen", -1); | |
616 | gMC->Gsatt("alic", "seen", 0); | |
617 | // | |
618 | // Set the visibility of the components | |
619 | // | |
620 | gMC->Gsatt("ECAR","seen",0); | |
621 | gMC->Gsatt("ECCU","seen",1); | |
b1952773 | 622 | gMC->Gsatt("EST1","seen",1); |
623 | gMC->Gsatt("EST2","seen",1); | |
624 | gMC->Gsatt("EUM1","seen",1); | |
625 | gMC->Gsatt("EUM2","seen",1); | |
626 | gMC->Gsatt("ESMA","seen",1); | |
627 | gMC->Gsatt("EPMD","seen",1); | |
c4561145 | 628 | // |
629 | gMC->Gdopt("hide", "on"); | |
630 | gMC->Gdopt("shad", "on"); | |
631 | gMC->Gsatt("*", "fill", 7); | |
632 | gMC->SetClipBox("."); | |
633 | gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000); | |
634 | gMC->DefaultRange(); | |
635 | gMC->Gdraw("alic", 40, 30, 0, 22, 20.5, .02, .02); | |
636 | gMC->Gdhead(1111, "Photon Multiplicity Detector Version 1"); | |
637 | ||
638 | //gMC->Gdman(17, 5, "MAN"); | |
639 | gMC->Gdopt("hide", "off"); | |
b1952773 | 640 | |
641 | cout << " Outside Draw Modules " << endl; | |
c4561145 | 642 | } |
643 | ||
644 | //_____________________________________________________________________________ | |
645 | void AliPMDv1::CreateMaterials() | |
646 | { | |
b1952773 | 647 | cout << " Inside create materials " << endl; |
c4561145 | 648 | // |
649 | // Create materials for the PMD | |
650 | // | |
651 | // ORIGIN : Y. P. VIYOGI | |
652 | // | |
653 | ||
654 | // --- The Argon- CO2 mixture --- | |
655 | Float_t ag[2] = { 39.95 }; | |
656 | Float_t zg[2] = { 18. }; | |
b1952773 | 657 | Float_t wg[2] = { .7,.3 }; |
c4561145 | 658 | Float_t dar = .001782; // --- Ar density in g/cm3 --- |
659 | // --- CO2 --- | |
660 | Float_t ac[2] = { 12.,16. }; | |
661 | Float_t zc[2] = { 6.,8. }; | |
662 | Float_t wc[2] = { 1.,2. }; | |
663 | Float_t dc = .001977; | |
664 | Float_t dco = .002; // --- CO2 density in g/cm3 --- | |
665 | ||
666 | Float_t absl, radl, a, d, z; | |
667 | Float_t dg; | |
668 | Float_t x0ar; | |
c4561145 | 669 | Float_t buf[1]; |
670 | Int_t nbuf; | |
671 | Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 }; | |
672 | Float_t zsteel[4] = { 26.,24.,28.,14. }; | |
673 | Float_t wsteel[4] = { .715,.18,.1,.005 }; | |
674 | ||
675 | Int_t *idtmed = fIdtmed->GetArray()-599; | |
676 | Int_t isxfld = gAlice->Field()->Integ(); | |
677 | Float_t sxmgmx = gAlice->Field()->Max(); | |
678 | ||
679 | // --- Define the various materials for GEANT --- | |
680 | AliMaterial(1, "Pb $", 207.19, 82., 11.35, .56, 18.5); | |
681 | x0ar = 19.55 / dar; | |
682 | AliMaterial(2, "Argon$", 39.95, 18., dar, x0ar, 6.5e4); | |
683 | AliMixture(3, "CO2 $", ac, zc, dc, -2, wc); | |
684 | AliMaterial(4, "Al $", 26.98, 13., 2.7, 8.9, 18.5); | |
685 | AliMaterial(6, "Fe $", 55.85, 26., 7.87, 1.76, 18.5); | |
686 | AliMaterial(7, "W $", 183.85, 74., 19.3, .35, 10.3); | |
687 | AliMaterial(8, "G10 $", 20., 10., 1.7, 19.4, 999.); | |
688 | AliMaterial(9, "SILIC$", 28.09, 14., 2.33, 9.36, 45.); | |
689 | AliMaterial(10, "Be $", 9.01, 4., 1.848, 35.3, 36.7); | |
690 | AliMaterial(15, "Cu $", 63.54, 29., 8.96, 1.43, 15.); | |
691 | AliMaterial(16, "C $", 12.01, 6., 2.265, 18.8, 49.9); | |
692 | AliMaterial(17, "POLYCARBONATE $", 20., 10., 1.2, 34.6, 999.); | |
693 | AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel); | |
694 | // AliMaterial(31, "Xenon$", 131.3, 54., dxe, x0xe, 6.5e4); | |
695 | ||
696 | AliMaterial(96, "MYLAR$", 8.73, 4.55, 1.39, 28.7, 62.); | |
697 | AliMaterial(97, "CONCR$", 20., 10., 2.5, 10.7, 40.); | |
698 | AliMaterial(98, "Vacum$", 1e-9, 1e-9, 1e-9, 1e16, 1e16); | |
699 | AliMaterial(99, "Air $", 14.61, 7.3, .0012, 30420., 67500.); | |
700 | ||
701 | // define gas-mixtures | |
702 | ||
b1952773 | 703 | char namate[21]; |
c4561145 | 704 | gMC->Gfmate((*fIdmate)[3], namate, a, z, d, radl, absl, buf, nbuf); |
705 | ag[1] = a; | |
706 | zg[1] = z; | |
707 | dg = (dar * 4 + dco) / 5; | |
708 | AliMixture(5, "ArCO2$", ag, zg, dg, 2, wg); | |
709 | ||
710 | // Define tracking media | |
711 | AliMedium(1, "Pb conv.$", 1, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1); | |
712 | AliMedium(7, "W conv.$", 7, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1); | |
713 | AliMedium(8, "G10plate$", 8, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1); | |
714 | AliMedium(4, "Al $", 4, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1); | |
715 | AliMedium(6, "Fe $", 6, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1); | |
716 | AliMedium(5, "ArCO2 $", 5, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1); | |
717 | AliMedium(9, "SILICON $", 9, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1); | |
718 | AliMedium(10, "Be $", 10, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1); | |
719 | AliMedium(98, "Vacuum $", 98, 0, 0, isxfld, sxmgmx, 1., .1, .1, 10); | |
720 | AliMedium(99, "Air gaps$", 99, 0, 0, isxfld, sxmgmx, 1., .1, .1, .1); | |
721 | AliMedium(15, "Cu $", 15, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1); | |
722 | AliMedium(16, "C $", 16, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1); | |
723 | AliMedium(17, "PLOYCARB$", 17, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1); | |
724 | AliMedium(19, " S steel$", 19, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1); | |
725 | // AliMedium(31, "Xenon $", 31, 1, 0, isxfld, sxmgmx, .1, .1, .1, .1); | |
726 | ||
727 | // --- Generate explicitly delta rays in the iron, aluminium and lead --- | |
728 | gMC->Gstpar(idtmed[600], "LOSS", 3.); | |
729 | gMC->Gstpar(idtmed[600], "DRAY", 1.); | |
730 | ||
731 | gMC->Gstpar(idtmed[603], "LOSS", 3.); | |
732 | gMC->Gstpar(idtmed[603], "DRAY", 1.); | |
733 | ||
734 | gMC->Gstpar(idtmed[604], "LOSS", 3.); | |
735 | gMC->Gstpar(idtmed[604], "DRAY", 1.); | |
736 | ||
737 | gMC->Gstpar(idtmed[605], "LOSS", 3.); | |
738 | gMC->Gstpar(idtmed[605], "DRAY", 1.); | |
739 | ||
740 | gMC->Gstpar(idtmed[606], "LOSS", 3.); | |
741 | gMC->Gstpar(idtmed[606], "DRAY", 1.); | |
742 | ||
743 | gMC->Gstpar(idtmed[607], "LOSS", 3.); | |
744 | gMC->Gstpar(idtmed[607], "DRAY", 1.); | |
745 | ||
746 | // --- Energy cut-offs in the Pb and Al to gain time in tracking --- | |
747 | // --- without affecting the hit patterns --- | |
748 | gMC->Gstpar(idtmed[600], "CUTGAM", 1e-4); | |
749 | gMC->Gstpar(idtmed[600], "CUTELE", 1e-4); | |
750 | gMC->Gstpar(idtmed[600], "CUTNEU", 1e-4); | |
751 | gMC->Gstpar(idtmed[600], "CUTHAD", 1e-4); | |
752 | gMC->Gstpar(idtmed[605], "CUTGAM", 1e-4); | |
753 | gMC->Gstpar(idtmed[605], "CUTELE", 1e-4); | |
754 | gMC->Gstpar(idtmed[605], "CUTNEU", 1e-4); | |
755 | gMC->Gstpar(idtmed[605], "CUTHAD", 1e-4); | |
756 | gMC->Gstpar(idtmed[606], "CUTGAM", 1e-4); | |
757 | gMC->Gstpar(idtmed[606], "CUTELE", 1e-4); | |
758 | gMC->Gstpar(idtmed[606], "CUTNEU", 1e-4); | |
759 | gMC->Gstpar(idtmed[606], "CUTHAD", 1e-4); | |
760 | gMC->Gstpar(idtmed[603], "CUTGAM", 1e-4); | |
761 | gMC->Gstpar(idtmed[603], "CUTELE", 1e-4); | |
762 | gMC->Gstpar(idtmed[603], "CUTNEU", 1e-4); | |
763 | gMC->Gstpar(idtmed[603], "CUTHAD", 1e-4); | |
764 | gMC->Gstpar(idtmed[609], "CUTGAM", 1e-4); | |
765 | gMC->Gstpar(idtmed[609], "CUTELE", 1e-4); | |
766 | gMC->Gstpar(idtmed[609], "CUTNEU", 1e-4); | |
767 | gMC->Gstpar(idtmed[609], "CUTHAD", 1e-4); | |
768 | ||
769 | // --- Prevent particles stopping in the gas due to energy cut-off --- | |
770 | gMC->Gstpar(idtmed[604], "CUTGAM", 1e-5); | |
771 | gMC->Gstpar(idtmed[604], "CUTELE", 1e-5); | |
772 | gMC->Gstpar(idtmed[604], "CUTNEU", 1e-5); | |
773 | gMC->Gstpar(idtmed[604], "CUTHAD", 1e-5); | |
774 | gMC->Gstpar(idtmed[604], "CUTMUO", 1e-5); | |
b1952773 | 775 | |
776 | cout << " Outside create materials " << endl; | |
777 | ||
c4561145 | 778 | } |
779 | ||
780 | //_____________________________________________________________________________ | |
781 | void AliPMDv1::Init() | |
782 | { | |
783 | // | |
784 | // Initialises PMD detector after it has been built | |
785 | // | |
b1952773 | 786 | |
c4561145 | 787 | Int_t i; |
788 | kdet=1; | |
789 | // | |
b1952773 | 790 | cout << " Inside Init " << endl; |
1592ac65 | 791 | if(fDebug) { |
792 | printf("\n%s: ",ClassName()); | |
793 | for(i=0;i<35;i++) printf("*"); | |
794 | printf(" PMD_INIT "); | |
795 | for(i=0;i<35;i++) printf("*"); | |
796 | printf("\n%s: ",ClassName()); | |
797 | printf(" PMD simulation package (v1) initialised\n"); | |
798 | printf("%s: parameters of pmd\n",ClassName()); | |
dee197d3 | 799 | printf("%s: %10.2f %10.2f %10.2f \ |
1592ac65 | 800 | %10.2f\n",ClassName(),cell_radius,cell_wall,cell_depth,zdist1 ); |
801 | printf("%s: ",ClassName()); | |
802 | for(i=0;i<80;i++) printf("*"); | |
803 | printf("\n"); | |
804 | } | |
c4561145 | 805 | |
806 | Int_t *idtmed = fIdtmed->GetArray()-599; | |
807 | fMedSens=idtmed[605-1]; | |
b1952773 | 808 | |
c4561145 | 809 | } |
810 | ||
811 | //_____________________________________________________________________________ | |
812 | void AliPMDv1::StepManager() | |
813 | { | |
814 | // | |
815 | // Called at each step in the PMD | |
816 | // | |
b1952773 | 817 | |
c4561145 | 818 | Int_t copy; |
819 | Float_t hits[4], destep; | |
820 | Float_t center[3] = {0,0,0}; | |
b1952773 | 821 | Int_t vol[8]; //5 |
822 | //const char *namep; | |
c4561145 | 823 | |
824 | if(gMC->GetMedium() == fMedSens && (destep = gMC->Edep())) { | |
825 | ||
826 | gMC->CurrentVolID(copy); | |
c4561145 | 827 | //namep=gMC->CurrentVolName(); |
b1952773 | 828 | //printf("Current vol is %s \n",namep); |
c4561145 | 829 | vol[0]=copy; |
c4561145 | 830 | |
b1952773 | 831 | gMC->CurrentVolOffID(1,copy); |
c4561145 | 832 | //namep=gMC->CurrentVolOffName(1); |
833 | //printf("Current vol 11 is %s \n",namep); | |
c4561145 | 834 | vol[1]=copy; |
c4561145 | 835 | |
b1952773 | 836 | gMC->CurrentVolOffID(2,copy); |
c4561145 | 837 | //namep=gMC->CurrentVolOffName(2); |
838 | //printf("Current vol 22 is %s \n",namep); | |
c4561145 | 839 | vol[2]=copy; |
840 | ||
841 | // if(strncmp(namep,"EHC1",4))vol[2]=1; | |
842 | ||
843 | gMC->CurrentVolOffID(3,copy); | |
c4561145 | 844 | //namep=gMC->CurrentVolOffName(3); |
845 | //printf("Current vol 33 is %s \n",namep); | |
c4561145 | 846 | vol[3]=copy; |
c4561145 | 847 | |
b1952773 | 848 | gMC->CurrentVolOffID(4,copy); |
c4561145 | 849 | //namep=gMC->CurrentVolOffName(4); |
850 | //printf("Current vol 44 is %s \n",namep); | |
c4561145 | 851 | vol[4]=copy; |
c4561145 | 852 | |
b1952773 | 853 | gMC->CurrentVolOffID(5,copy); |
854 | //namep=gMC->CurrentVolOffName(5); | |
855 | //printf("Current vol 55 is %s \n",namep); | |
856 | vol[5]=copy; | |
857 | ||
858 | gMC->CurrentVolOffID(6,copy); | |
859 | //namep=gMC->CurrentVolOffName(6); | |
860 | //printf("Current vol 66 is %s \n",namep); | |
861 | vol[6]=copy; | |
862 | ||
863 | gMC->CurrentVolOffID(7,copy); | |
864 | //namep=gMC->CurrentVolOffName(7); | |
865 | //printf("Current vol 77 is %s \n",namep); | |
866 | vol[7]=copy; | |
867 | ||
868 | ||
869 | //printf("volume number %4d %4d %4d %4d %4d %4d %4d %4d %10.3f \n",vol[0],vol[1],vol[2],vol[3],vol[4],vol[5],vol[6],vol[7],destep*1000000); | |
870 | ||
c4561145 | 871 | gMC->Gdtom(center,hits,1); |
872 | hits[3] = destep*1e9; //Number in eV | |
d1f5ecc3 | 873 | AddHit(gAlice->GetCurrentTrackNumber(), vol, hits); |
b1952773 | 874 | |
c4561145 | 875 | } |
876 | } | |
877 | ||
878 | ||
879 | //------------------------------------------------------------------------ | |
880 | // Get parameters | |
881 | ||
882 | void AliPMDv1::GetParameters() | |
883 | { | |
b1952773 | 884 | const Float_t root3 = TMath::Sqrt(3.); |
885 | const Float_t root3_2 = TMath::Sqrt(3.) /2.; | |
886 | // | |
c4561145 | 887 | cell_radius=0.25; |
888 | cell_wall=0.02; | |
889 | cell_depth=0.25 * 2.; | |
890 | // | |
b1952773 | 891 | ncol_um1 = 48; |
892 | ncol_um2 = 96; | |
893 | nrow_um1 = 96;//each strip has 1 row | |
894 | nrow_um2 = 48;//each strip has 1 row | |
895 | // | |
896 | sm_length_ax = (3.0*(ncol_um1*cell_radius+cell_radius/2.)+(2.0*0.025)) + 0.7; | |
897 | sm_length_bx = 2.0*(ncol_um2*cell_radius+cell_radius/2.)+0.025+0.7; | |
898 | ||
899 | sm_length_ay = 2.0*(((cell_radius/root3_2)*nrow_um1)-(cell_radius*root3*(nrow_um1-1)/6.))+0.025+0.7; | |
900 | sm_length_by = 3.0*(((cell_radius/root3_2)*nrow_um2)-(cell_radius*root3*(nrow_um2-1)/6.))+(2.0*0.025)+0.7; | |
901 | // | |
902 | boundary=0.7; | |
903 | // | |
904 | th_base=0.3; | |
905 | th_air=0.1; | |
906 | th_pcb=0.16; | |
907 | // | |
908 | sm_thick = th_base + th_air + th_pcb + cell_depth + th_pcb + th_air + th_pcb; | |
909 | // | |
910 | th_lead=1.5; | |
911 | th_steel=0.5; | |
912 | ||
913 | zdist1 = 361.5; | |
ef61784c | 914 | |
b1952773 | 915 | } |