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