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