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