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