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