Line data Source code
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 : /* $Id: AliPMDv1.cxx 18594 2007-05-15 13:28:06Z hristov $ */
16 :
17 : //
18 : ///////////////////////////////////////////////////////////////////////////////
19 : // //
20 : // Photon Multiplicity Detector Version 1 //
21 : // Bedanga Mohanty : February 14th 2006
22 : // //
23 : //Begin_Html
24 : /*
25 : <img src="picts/AliPMDv1Class.gif">
26 : */
27 : //End_Html
28 : // //
29 : ///////////////////////////////////////////////////////////////////////////////
30 : ////
31 :
32 : #include <Riostream.h>
33 : #include <TGeoManager.h>
34 : #include <TGeoGlobalMagField.h>
35 : #include <TVirtualMC.h>
36 :
37 : #include "AliConst.h"
38 : #include "AliLog.h"
39 : #include "AliMC.h"
40 : #include "AliMagF.h"
41 : #include "AliPMDv2008.h"
42 : #include "AliRun.h"
43 :
44 : const Int_t AliPMDv2008::fgkNcolUM1 = 48; // Number of cols in UM, type 1
45 : const Int_t AliPMDv2008::fgkNcolUM2 = 96; // Number of cols in UM, type 2
46 : const Int_t AliPMDv2008::fgkNrowUM1 = 96; // Number of rows in UM, type 1
47 : const Int_t AliPMDv2008::fgkNrowUM2 = 48; // Number of rows in UM, type 2
48 : const Float_t AliPMDv2008::fgkCellRadius = 0.25; // Radius of a hexagonal cell
49 : const Float_t AliPMDv2008::fgkCellWall = 0.02; // Thickness of cell Wall
50 : const Float_t AliPMDv2008::fgkCellDepth = 0.50; // Gas thickness
51 : const Float_t AliPMDv2008::fgkThBase = 0.2; // Thickness of Base plate
52 : const Float_t AliPMDv2008::fgkThBKP = 0.1; // Thickness of Back plane
53 : const Float_t AliPMDv2008::fgkThAir = 1.03; // Thickness of Air
54 : const Float_t AliPMDv2008::fgkThPCB = 0.16; // Thickness of PCB
55 : const Float_t AliPMDv2008::fgkThLead = 1.5; // Thickness of Pb
56 : const Float_t AliPMDv2008::fgkThSteel = 0.5; // Thickness of Steel
57 : const Float_t AliPMDv2008::fgkGap = 0.025; // Air Gap
58 : const Float_t AliPMDv2008::fgkZdist = 361.5; // z-position of the detector
59 : const Float_t AliPMDv2008::fgkSqroot3 = 1.7320508;// Square Root of 3
60 : const Float_t AliPMDv2008::fgkSqroot3by2 = 0.8660254;// Square Root of 3 by 2
61 : const Float_t AliPMDv2008::fgkSSBoundary = 0.3;
62 : const Float_t AliPMDv2008::fgkThSS = 1.03;
63 : const Float_t AliPMDv2008::fgkThG10 = 1.03;
64 12 : ClassImp(AliPMDv2008)
65 :
66 : //_____________________________________________________________________________
67 0 : AliPMDv2008::AliPMDv2008():
68 0 : fSMthick(0.),
69 0 : fDthick(0.),
70 0 : fSMLengthax(0.),
71 0 : fSMLengthay(0.),
72 0 : fSMLengthbx(0.),
73 0 : fSMLengthby(0.),
74 0 : fMedSens(0)
75 0 : {
76 : //
77 : // Default constructor
78 : //
79 0 : for (Int_t i = 0; i < 3; i++)
80 : {
81 0 : fDboxmm1[i] = 0.;
82 0 : fDboxmm12[i] = 0.;
83 0 : fDboxmm2[i] = 0.;
84 0 : fDboxmm22[i] = 0.;
85 : }
86 0 : }
87 :
88 : //_____________________________________________________________________________
89 : AliPMDv2008::AliPMDv2008(const char *name, const char *title):
90 0 : AliPMD(name,title),
91 0 : fSMthick(0.),
92 0 : fDthick(0.),
93 0 : fSMLengthax(0.),
94 0 : fSMLengthay(0.),
95 0 : fSMLengthbx(0.),
96 0 : fSMLengthby(0.),
97 0 : fMedSens(0)
98 0 : {
99 : //
100 : // Standard constructor
101 : //
102 0 : for (Int_t i = 0; i < 3; i++)
103 : {
104 0 : fDboxmm1[i] = 0.;
105 0 : fDboxmm12[i] = 0.;
106 0 : fDboxmm2[i] = 0.;
107 0 : fDboxmm22[i] = 0.;
108 : }
109 0 : }
110 :
111 : //_____________________________________________________________________________
112 : void AliPMDv2008::CreateGeometry()
113 : {
114 : // Create geometry for Photon Multiplicity Detector
115 :
116 0 : GetParameters();
117 0 : CreateSupermodule();
118 0 : CreatePMD();
119 0 : }
120 :
121 : //_____________________________________________________________________________
122 : void AliPMDv2008::CreateSupermodule()
123 : {
124 : //
125 : // Creates the geometry of the cells of PMD, places them in supermodule
126 : // which is a rectangular object.
127 : // Basic unit is ECAR, a hexagonal cell made of Ar+CO2, which is
128 : // placed inside another hexagonal cell made of Cu (ECCU) with larger
129 : // radius, compared to ECAR. The difference in radius gives the dimension
130 : // of half width of each cell wall.
131 : // These cells are placed in a rectangular strip which are of 2 types
132 : // EST1 and EST2
133 : // 2 types of unit modules are made EUM1 and EUM2 which contains these strips
134 : // placed repeatedly
135 : // Each supermodule (ESMA, ESMB), made of G10 is filled with following
136 : //components. They have 6 unit moudles inside them
137 : // ESMA, ESMB are placed in EPMD along with EMPB (Pb converter)
138 : // and EMFE (iron support)
139 :
140 :
141 : Int_t i,j;
142 : Int_t number;
143 0 : Int_t ihrotm,irotdm;
144 : Float_t xb, yb, zb;
145 :
146 0 : Int_t *idtmed = fIdtmed->GetArray()-599;
147 :
148 0 : AliMatrix(ihrotm, 90., 30., 90., 120., 0., 0.);
149 0 : AliMatrix(irotdm, 90., 180., 90., 270., 180., 0.);
150 :
151 : // STEP - I
152 : //******************************************************//
153 : // First create the sensitive medium of a hexagon cell (ECAR)
154 : // Inner hexagon filled with gas (Ar+CO2)
155 :
156 0 : Float_t hexd2[10] = {0.,360.,6,2,-0.25,0.,0.23,0.25,0.,0.23};
157 0 : hexd2[4] = -fgkCellDepth/2.;
158 0 : hexd2[7] = fgkCellDepth/2.;
159 0 : hexd2[6] = fgkCellRadius - fgkCellWall;
160 0 : hexd2[9] = fgkCellRadius - fgkCellWall;
161 :
162 0 : TVirtualMC::GetMC()->Gsvolu("ECAR", "PGON", idtmed[604], hexd2,10);
163 : //******************************************************//
164 :
165 : // STEP - II
166 : //******************************************************//
167 : // Place the sensitive medium inside a hexagon copper cell (ECCU)
168 : // Outer hexagon made of Copper
169 :
170 0 : Float_t hexd1[10] = {0.,360.,6,2,-0.25,0.,0.25,0.25,0.,0.25};
171 0 : hexd1[4] = -fgkCellDepth/2.;
172 0 : hexd1[7] = fgkCellDepth/2.;
173 0 : hexd1[6] = fgkCellRadius;
174 0 : hexd1[9] = fgkCellRadius;
175 :
176 0 : TVirtualMC::GetMC()->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10);
177 :
178 : // Place inner hex (sensitive volume) inside outer hex (copper)
179 :
180 0 : TVirtualMC::GetMC()->Gspos("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY");
181 : //******************************************************//
182 :
183 : // STEP - III
184 : //******************************************************//
185 : // Now create Rectangular TWO strips (EST1, EST2)
186 : // of 1 column and 48 or 96 cells length
187 :
188 : // volume for first strip EST1 made of AIR
189 :
190 0 : Float_t dbox1[3];
191 0 : dbox1[0] = fgkCellRadius/fgkSqroot3by2;
192 0 : dbox1[1] = fgkNrowUM1*fgkCellRadius;
193 0 : dbox1[2] = fgkCellDepth/2.;
194 :
195 0 : TVirtualMC::GetMC()->Gsvolu("EST1","BOX", idtmed[698], dbox1, 3);
196 :
197 : // volume for second strip EST2
198 :
199 :
200 0 : Float_t dbox2[3];
201 0 : dbox2[1] = fgkNrowUM2*fgkCellRadius;
202 0 : dbox2[0] = dbox1[0];
203 0 : dbox2[2] = dbox1[2];
204 :
205 0 : TVirtualMC::GetMC()->Gsvolu("EST2","BOX", idtmed[698], dbox2, 3);
206 :
207 : // Place hexagonal cells ECCU placed inside EST1
208 : xb = 0.;
209 : zb = 0.;
210 0 : yb = (dbox1[1]) - fgkCellRadius;
211 0 : for (i = 1; i <= fgkNrowUM1; ++i)
212 : {
213 : number = i;
214 0 : TVirtualMC::GetMC()->Gspos("ECCU", number, "EST1", xb,yb,zb, 0, "ONLY");
215 0 : yb -= (fgkCellRadius*2.);
216 : }
217 :
218 : // Place hexagonal cells ECCU placed inside EST2
219 : xb = 0.;
220 : zb = 0.;
221 0 : yb = (dbox2[1]) - fgkCellRadius;
222 0 : for (i = 1; i <= fgkNrowUM2; ++i)
223 : {
224 : number = i;
225 0 : TVirtualMC::GetMC()->Gspos("ECCU", number, "EST2", xb,yb,zb, 0, "ONLY");
226 : //PH cout << "ECCU in EST2 ==> " << number << "\t"<<xb << "\t"<<yb <<endl;
227 0 : yb -= (fgkCellRadius*2.);
228 : }
229 :
230 :
231 : //******************************************************//
232 :
233 :
234 : // STEP - IV
235 : //******************************************************//
236 : // 2 types of rectangular shaped unit modules EUM1 and EUM2 (defined by BOX)
237 : //---------------------------------EHC1 Start----------------------//
238 : // Create EHC1 : The honey combs for a unit module type 1
239 : // First step is to create a honey comb unit module.
240 : // This is named as EHC1, we will lay the EST1 strips of
241 : // honey comb cells inside it.
242 :
243 : //Dimensions of EHC1
244 : //X-dimension = Number of columns + cell radius
245 : //Y-dimension = Number of rows * cell radius/sqrt3by2 - (some factor)
246 : //Z-dimension = cell depth/2
247 :
248 0 : Float_t dbox3[3];
249 0 : dbox3[0] = (dbox1[0]*fgkNcolUM1)-(fgkCellRadius*fgkSqroot3*(fgkNcolUM1-1)/6.);
250 0 : dbox3[1] = dbox1[1]+fgkCellRadius/2.;
251 0 : dbox3[2] = fgkCellDepth/2.;
252 :
253 : //Create a BOX, Material AIR
254 0 : TVirtualMC::GetMC()->Gsvolu("EHC1","BOX", idtmed[698], dbox3, 3);
255 : // Place rectangular strips EST1 inside EHC1 unit module
256 0 : xb = dbox3[0]-dbox1[0];
257 :
258 0 : for (j = 1; j <= fgkNcolUM1; ++j)
259 : {
260 0 : if(j%2 == 0)
261 : {
262 : yb = -fgkCellRadius/2.0;
263 0 : }
264 : else
265 : {
266 : yb = fgkCellRadius/2.0;
267 : }
268 : number = j;
269 0 : TVirtualMC::GetMC()->Gspos("EST1",number, "EHC1", xb, yb , 0. , 0, "MANY");
270 : //The strips are being placed from top towards bottom of the module
271 : //This is because the first cell in a module in hardware is the top
272 : //left corner cell
273 0 : xb = (dbox3[0]-dbox1[0])-j*fgkCellRadius*fgkSqroot3;
274 :
275 : }
276 : //--------------------EHC1 done----------------------------------//
277 :
278 :
279 : //---------------------------------EHC2 Start----------------------//
280 : // Create EHC2 : The honey combs for a unit module type 2
281 : // First step is to create a honey comb unit module.
282 : // This is named as EHC2, we will lay the EST2 strips of
283 : // honey comb cells inside it.
284 :
285 : //Dimensions of EHC2
286 : //X-dimension = Number of columns + cell radius
287 : //Y-dimension = Number of rows * cell radius/sqrt3by2 - (some factor)
288 : //Z-dimension = cell depth/2
289 :
290 0 : dbox3[0] = (dbox1[0]*fgkNcolUM1)-(fgkCellRadius*fgkSqroot3*(fgkNcolUM1-1)/6.);
291 0 : dbox3[1] = dbox1[1]+fgkCellRadius/2.;
292 0 : dbox3[2] = fgkCellDepth/2.;
293 :
294 0 : Float_t dbox4[3];
295 :
296 0 : dbox4[0] =(dbox2[0]*fgkNcolUM2)-(fgkCellRadius*fgkSqroot3*(fgkNcolUM2-1)/6.);
297 0 : dbox4[1] = dbox2[1] + fgkCellRadius/2.;
298 0 : dbox4[2] = dbox3[2];
299 :
300 : //Create a BOX of AIR
301 0 : TVirtualMC::GetMC()->Gsvolu("EHC2","BOX", idtmed[698], dbox4, 3);
302 :
303 : // Place rectangular strips EST2 inside EHC2 unit module
304 0 : xb = dbox4[0]-dbox2[0];
305 0 : for (j = 1; j <= fgkNcolUM2; ++j)
306 : {
307 0 : if(j%2 == 0)
308 : {
309 : yb = -fgkCellRadius/2.0;
310 0 : }
311 : else
312 : {
313 : yb = +fgkCellRadius/2.0;
314 : }
315 : number = j;
316 0 : TVirtualMC::GetMC()->Gspos("EST2",number, "EHC2", xb, yb , 0. ,0, "MANY");
317 0 : xb = (dbox4[0]-dbox2[0])-j*fgkCellRadius*fgkSqroot3;
318 : }
319 :
320 :
321 : //--------------------EHC2 done----------------------------------//
322 :
323 :
324 : // Now the job is to assmeble an Unit module
325 : // It will have the following components
326 : // (a) Base plate of G10 of 0.2 cm
327 : // (b) Air gap of 0.05 cm
328 : // (c) Bottom PCB of 0.16 cm G10
329 : // (d) Honey comb 0f 0.5 cm
330 : // (e) Top PCB of 0.16 cm G10
331 : // (f) Air gap of 0.16 cm
332 : // (g) Back Plane of 0.1 cm G10
333 : // (h) Then all around then we have an air gap of 0.5mm
334 : // (i) Then all around 0.5mm thick G10 insulation
335 : // (h) Then all around Stainless Steel boundary channel 0.3 cm thick
336 : //Let us first create them one by one
337 : //---------------------------------------------------//
338 :
339 : // ---------------- Lets do it first for UM Type A -----//
340 :
341 : //--------------------------------------------------//
342 : //Bottom and Top PCB : EPCA
343 : //===========================
344 : // Make a 1.6mm thick G10 Bottom and Top PCB for Unit module A
345 : // X-dimension same as EHC1 - dbox3[0]
346 : // Y-dimension same as EHC1 - dbox3[1]
347 : // Z-dimension 0.16/2 = 0.08 cm
348 : //-------------------------------------------------//
349 0 : Float_t dboxPcbA[3];
350 0 : dboxPcbA[0] = dbox3[0];
351 0 : dboxPcbA[1] = dbox3[1];
352 0 : dboxPcbA[2] = fgkThPCB/2.;
353 :
354 : //Top and Bottom PCB is a BOX of Material G10
355 0 : TVirtualMC::GetMC()->Gsvolu("EPCA","BOX", idtmed[607], dboxPcbA, 3);
356 : //--------------------------------------------------------//
357 : //Back Plane : EBKA
358 : //==================
359 : // Make a 1.0mm thick Back Plane PCB for Unit module A
360 : // X-dimension same as EHC1 - dbox3[0]
361 : // Y-dimension same as EHC1 - dbox3[1]
362 : // Z-dimension 0.1/2 = 0.05 cm
363 : //------------------------------------------------------//
364 0 : Float_t dboxBPlaneA[3];
365 0 : dboxBPlaneA[0] = dbox3[0];
366 0 : dboxBPlaneA[1] = dbox3[1];
367 0 : dboxBPlaneA[2] = fgkThBKP/2.;
368 :
369 : //Back PLane PCB of MAterial G10
370 0 : TVirtualMC::GetMC()->Gsvolu("EBKA","BOX", idtmed[607], dboxBPlaneA, 3);
371 : //-------------------------------------------------------------//
372 :
373 : //---------- That was all in the Z -direction of Unit Module A----//
374 :
375 : // Now lets us construct the boundary arround the Unit Module --//
376 : // This boundary has
377 : // (a) 0.5 mm X and Y and 10.3 mm Z dimension AIR gap
378 : // (b) 0.5 mm X and Y and 10.3 mm Z dimension G10
379 : // (c) 3.0 mm X and Y and 12.3 mm Z dimension Stainless Steel
380 :
381 :
382 :
383 : //-------------------------------------------------//
384 : //AIR GAP between UM and Boundary : ECGA FOR PRESHOWER PLANE
385 : //==========================================================
386 : // Make a 10.3mm thick Air gap for Unit module A
387 : // X-dimension same as EHC1+0.05
388 : // Y-dimension same as EHC1+0.05
389 : // Z-dimension 1.03/2 = 0.515 cm
390 0 : Float_t dboxAir3A[3];
391 0 : dboxAir3A[0] = dbox3[0]+(2.0*fgkGap);
392 0 : dboxAir3A[1] = dbox3[1]+(2.0*fgkGap);
393 0 : dboxAir3A[2] = fgkThAir/2.;
394 :
395 : //FOR PRESHOWER
396 : //Air gap is a BOX of Material Air
397 0 : TVirtualMC::GetMC()->Gsvolu("ECGA","BOX", idtmed[698], dboxAir3A, 3);
398 :
399 : //FOR VETO
400 : //Air gap is a BOX of Material Air
401 0 : TVirtualMC::GetMC()->Gsvolu("ECVA","BOX", idtmed[698], dboxAir3A, 3);
402 : //-------------------------------------------------//
403 :
404 : //-------------------------------------------------//
405 : //G10 boundary between honeycomb and SS : EDGA
406 : //================================================
407 : // Make a 10.3mm thick G10 Boundary for Unit module A
408 : // X-dimension same as EHC1+Airgap+0.05
409 : // Y-dimension same as EHC1+Airgap+0.05
410 : // Z-dimension 1.03/2 = 0.515 cm
411 0 : Float_t dboxGGA[3];
412 0 : dboxGGA[0] = dboxAir3A[0]+(2.0*fgkGap);
413 0 : dboxGGA[1] = dboxAir3A[1]+(2.0*fgkGap);
414 0 : dboxGGA[2] = fgkThG10/2.;
415 :
416 : //FOR PRESHOWER
417 : //G10 BOX
418 0 : TVirtualMC::GetMC()->Gsvolu("EDGA","BOX", idtmed[607], dboxGGA, 3);
419 :
420 : //FOR VETO
421 : //G10 BOX
422 0 : TVirtualMC::GetMC()->Gsvolu("EDVA","BOX", idtmed[607], dboxGGA, 3);
423 :
424 : //-------------------------------------------------//
425 : //----------------------------------------------------------//
426 : //Stainless Steel Bounadry : ESSA
427 : //==================================
428 : // Make a 10.3mm thick Stainless Steel boundary for Unit module A
429 : // X-dimension same as EHC1 + Airgap + G10 + 0.3
430 : // Y-dimension same as EHC1 + Airgap + G10 + 0.3
431 : // Z-dimension 1.03/2 = 0.515 cm
432 : //------------------------------------------------------//
433 : // A Stainless Steel Boundary Channel to house the unit module
434 :
435 0 : Float_t dboxSS1[3];
436 0 : dboxSS1[0] = dboxGGA[0]+fgkSSBoundary;
437 0 : dboxSS1[1] = dboxGGA[1]+fgkSSBoundary;
438 0 : dboxSS1[2] = fgkThSS/2.;
439 :
440 : //FOR PRESHOWER
441 :
442 : //Stainless Steel boundary - Material Stainless Steel
443 0 : TVirtualMC::GetMC()->Gsvolu("ESSA","BOX", idtmed[618], dboxSS1, 3);
444 :
445 : //FOR VETO
446 : //Stainless Steel boundary - Material Stainless Steel
447 0 : TVirtualMC::GetMC()->Gsvolu("ESVA","BOX", idtmed[618], dboxSS1, 3);
448 :
449 : //----------------------------------------------------------------//
450 :
451 : //----------------------------------------------------------------//
452 : // Here we need to place the volume in order ESSA -> EDGA -> ECGA
453 : // this makes the SS boundary and the 0.5mm thick FR4 insulation in place,
454 : // and the air volume ECGA acts as mother for the rest of components.
455 : // The above placeemnt is done at (0.,0.,0.) relative coordiante
456 : // Now we place bottom PCB, honeycomb, top PCB in this volume. We donot place
457 : // unnecessary air volumes now. Just leave the gap as we are placing them
458 : // in air only. This also reduces the number of volumes for geant to track.
459 :
460 : // Tree structure for different volumes
461 : //
462 : // EUM1
463 : // |
464 : // --------------------
465 : // | | |
466 : // EBPA ESSA EBKA
467 : // |
468 : // EDGA
469 : // |
470 : // ECGA
471 : // |
472 : // --------------------
473 : // | | |
474 : // EPCA(1) EHC1 EPCA(2)
475 : // (bottom) | (top PCB)
476 : // |
477 : // Sensitive volume
478 : // (gas)
479 : //
480 :
481 :
482 : //FOR VETO
483 : //Creating the side channels
484 : // SS boundary channel, followed by G10 and Air Gap
485 0 : TVirtualMC::GetMC()->Gspos("EDVA", 1, "ESVA", 0., 0., 0., 0, "ONLY");
486 0 : TVirtualMC::GetMC()->Gspos("ECVA", 1, "EDVA", 0., 0., 0., 0, "ONLY");
487 :
488 : //FOR PRESHOWER
489 0 : TVirtualMC::GetMC()->Gspos("EDGA", 1, "ESSA", 0., 0., 0., 0, "ONLY");
490 0 : TVirtualMC::GetMC()->Gspos("ECGA", 1, "EDGA", 0., 0., 0., 0, "ONLY");
491 :
492 : // now other components, using Bedanga's code, but changing the values.
493 : //Positioning Bottom PCB, Honey Comb abd Top PCB in AIR
494 :
495 : //For veto plane
496 : //Positioning the Bottom 0.16 cm PCB
497 0 : Float_t zbpcb = -dboxAir3A[2] + (2.0*fgkGap) + fgkThPCB/2.;
498 0 : TVirtualMC::GetMC()->Gspos("EPCA", 1, "ECVA", 0., 0., zbpcb, 0, "ONLY");
499 : //Positioning the Honey Comb 0.5 cm
500 0 : Float_t zhc = zbpcb + fgkThPCB/2. + fgkCellDepth/2.;
501 0 : TVirtualMC::GetMC()->Gspos("EHC1", 1, "ECVA", 0., 0., zhc, 0, "ONLY");
502 : //Positioning the Top PCB 0.16 cm
503 0 : Float_t ztpcb = zhc + fgkCellDepth/2 + fgkThPCB/2.;
504 0 : TVirtualMC::GetMC()->Gspos("EPCA", 2, "ECVA", 0., 0., ztpcb, 0, "ONLY");
505 :
506 :
507 : //For Preshower plane the ordering is reversed
508 : //Positioning the Bottom 0.16 cm PCB
509 0 : zbpcb = -dboxAir3A[2] + fgkThPCB + fgkThPCB/2.;
510 0 : TVirtualMC::GetMC()->Gspos("EPCA", 1, "ECGA", 0., 0., zbpcb, 0, "ONLY");
511 : //Positioning the Honey Comb 0.5 cm
512 0 : zhc = zbpcb + fgkThPCB/2. + fgkCellDepth/2.;
513 0 : TVirtualMC::GetMC()->Gspos("EHC1", 1, "ECGA", 0., 0., zhc, 0, "ONLY");
514 : //Positioning the Top PCB 0.16 cm
515 0 : ztpcb = zhc + fgkCellDepth/2 + fgkThPCB/2.;
516 0 : TVirtualMC::GetMC()->Gspos("EPCA", 2, "ECGA", 0., 0., ztpcb, 0, "ONLY");
517 :
518 :
519 :
520 :
521 : //--------------Now let us construct final UM ---------------//
522 : // We will do it as follows :
523 : // (i) First make a UM of air. which will have dimensions
524 : // of the SS boundary Channel (in x,y) and of height 13.3mm
525 : //(ii) Then we will place all the components
526 :
527 : //----------------------------------------------------------//
528 : // A unit module type A of Air
529 : // Dimensions of Unit Module same as SS boundary channel
530 0 : Float_t dboxUM1[3];
531 0 : dboxUM1[0] = dboxSS1[0];
532 0 : dboxUM1[1] = dboxSS1[1];
533 0 : dboxUM1[2] = fgkThSS/2. +0.15; // 0.15 added to accomodate Base Plate at
534 : // the bottom and the backplane PCB at the top.
535 :
536 : //FOR PRESHOWER
537 : //Create a Unit module of above dimensions Material : AIR
538 0 : TVirtualMC::GetMC()->Gsvolu("EUM1","BOX", idtmed[698], dboxUM1, 3);
539 : //FOR VETO
540 0 : TVirtualMC::GetMC()->Gsvolu("EUV1","BOX", idtmed[698], dboxUM1, 3);
541 :
542 : //----------------------------------------------------------------//
543 :
544 : //BASE PLATE : EBPA
545 : //==================
546 : // Make a 2mm thick G10 Base plate for Unit module A
547 : // Base plate is as big as the final UM dimensions that is as
548 : // SS boundary channel
549 0 : Float_t dboxBaseA[3];
550 0 : dboxBaseA[0] = dboxSS1[0];
551 0 : dboxBaseA[1] = dboxSS1[1];
552 0 : dboxBaseA[2] = fgkThBase/2.;
553 :
554 : //Base Blate is a G10 BOX
555 0 : TVirtualMC::GetMC()->Gsvolu("EBPA","BOX", idtmed[607], dboxBaseA, 3);
556 : //----------------------------------------------------//
557 :
558 : //FOR VETO
559 : //- Placing of all components of UM in AIR BOX EUM1--//
560 : //(1) FIRST PUT THE BASE PLATE
561 0 : Float_t zbaseplate = -dboxUM1[2] + fgkThBase/2.;
562 0 : TVirtualMC::GetMC()->Gspos("EBPA", 1, "EUV1", 0., 0., zbaseplate, 0, "ONLY");
563 :
564 : //(2) NEXT PLACING the SS BOX
565 0 : Float_t zss = zbaseplate + fgkThBase/2. + fgkThSS/2.;
566 0 : TVirtualMC::GetMC()->Gspos("ESVA", 1, "EUV1", 0., 0., zss, 0, "ONLY");
567 :
568 : // (3) Positioning the Backplane PCB 0.1 cm
569 0 : Float_t zbkp = zss + fgkThSS/2. + fgkThBKP/2.;
570 0 : TVirtualMC::GetMC()->Gspos("EBKA", 1, "EUV1", 0., 0., zbkp, 0, "ONLY");
571 :
572 : //FOR PRESHOWER
573 : // (3) Positioning the Backplane PCB 0.1 cm
574 0 : zbkp = -dboxUM1[2] + fgkThBKP/2.;
575 0 : TVirtualMC::GetMC()->Gspos("EBKA", 1, "EUM1", 0., 0., zbkp, 0, "ONLY");
576 :
577 : //(2) NEXT PLACING the SS BOX
578 0 : zss = zbkp + fgkThBKP/2. + fgkThSS/2.;
579 0 : TVirtualMC::GetMC()->Gspos("ESSA", 1, "EUM1", 0., 0., zss, 0, "ONLY");
580 :
581 : //(1) FIRST PUT THE BASE PLATE
582 0 : zbaseplate = zss + fgkThSS/2 + fgkThBase/2.;
583 0 : TVirtualMC::GetMC()->Gspos("EBPA", 1, "EUM1", 0., 0., zbaseplate, 0, "ONLY");
584 : //-------------------- UM Type A completed ------------------------//
585 :
586 :
587 :
588 : //-------------------- Lets do the same thing for UM type B -------//
589 : //--------------------------------------------------//
590 : //Bottom and Top PCB : EPCB
591 : //===========================
592 : // Make a 1.6mm thick G10 Bottom and Top PCB for Unit module B
593 : // X-dimension same as EHC2 - dbox4[0]
594 : // Y-dimension same as EHC2 - dbox4[1]
595 : // Z-dimension 0.16/2 = 0.08 cm
596 : //-------------------------------------------------//
597 0 : Float_t dboxPcbB[3];
598 0 : dboxPcbB[0] = dbox4[0];
599 0 : dboxPcbB[1] = dbox4[1];
600 0 : dboxPcbB[2] = fgkThPCB/2.;
601 :
602 : //Top and Bottom PCB is a BOX of Material G10
603 0 : TVirtualMC::GetMC()->Gsvolu("EPCB","BOX", idtmed[607], dboxPcbB, 3);
604 : //--------------------------------------------------------//
605 : //Back Plane : EBKB
606 : //==================
607 : // Make a 1.0mm thick Back Plane PCB for Unit module B
608 : // X-dimension same as EHC2 - dbox4[0]
609 : // Y-dimension same as EHC2 - dbox4[1]
610 : // Z-dimension 0.1/2 = 0.05 cm
611 : //------------------------------------------------------//
612 0 : Float_t dboxBPlaneB[3];
613 0 : dboxBPlaneB[0] = dbox4[0];
614 0 : dboxBPlaneB[1] = dbox4[1];
615 0 : dboxBPlaneB[2] = fgkThBKP/2.;
616 :
617 : //Back PLane PCB of MAterial G10
618 0 : TVirtualMC::GetMC()->Gsvolu("EBKB","BOX", idtmed[607], dboxBPlaneB, 3);
619 : //-------------------------------------------------------------//
620 :
621 : //---------- That was all in the Z -direction of Unit Module B----//
622 :
623 : // Now lets us construct the boundary arround the Unit Module --//
624 : // This boundary has
625 : // (a) 0.5 mm X and Y and 10.3 mm Z dimension AIR gap
626 : // (b) 0.5 mm X and Y and 10.3 mm Z dimension G10
627 : // (c) 3.0 mm X and Y and 12.3 mm Z dimension Stainless Steel
628 :
629 : //-------------------------------------------------//
630 : //AIR GAP between UM and Boundary : ECGB
631 : //================================================
632 : // Make a 10.3mm thick Air gap for Unit module B
633 : // X-dimension same as EHC2+0.05
634 : // Y-dimension same as EHC2+0.05
635 : // Z-dimension 1.03/2 = 0.515 cm
636 0 : Float_t dboxAir3B[3];
637 0 : dboxAir3B[0] = dbox4[0]+(2.0*fgkGap);
638 0 : dboxAir3B[1] = dbox4[1]+(2.0*fgkGap);
639 0 : dboxAir3B[2] = fgkThAir/2.;
640 :
641 : //PRESHOWER
642 : //Air gap is a BOX of Material Air
643 0 : TVirtualMC::GetMC()->Gsvolu("ECGB","BOX", idtmed[698], dboxAir3B, 3);
644 : //VETO
645 0 : TVirtualMC::GetMC()->Gsvolu("ECVB","BOX", idtmed[698], dboxAir3B, 3);
646 :
647 : //-------------------------------------------------//
648 :
649 : //-------------------------------------------------//
650 : //G10 boundary between honeycomb and SS : EDGB
651 : //================================================
652 : // Make a 10.3mm thick G10 Boundary for Unit module B
653 : // X-dimension same as EHC2+Airgap+0.05
654 : // Y-dimension same as EHC2+Airgap+0.05
655 : // Z-dimension 1.03/2 = 0.515 cm
656 0 : Float_t dboxGGB[3];
657 0 : dboxGGB[0] = dboxAir3B[0]+(2.0*fgkGap);
658 0 : dboxGGB[1] = dboxAir3B[1]+(2.0*fgkGap);
659 0 : dboxGGB[2] = fgkThG10/2.;
660 :
661 : //PRESHOWER
662 : //G10 BOX
663 0 : TVirtualMC::GetMC()->Gsvolu("EDGB","BOX", idtmed[607], dboxGGB, 3);
664 : //VETO
665 0 : TVirtualMC::GetMC()->Gsvolu("EDVB","BOX", idtmed[607], dboxGGB, 3);
666 : //-------------------------------------------------//
667 : //----------------------------------------------------------//
668 : //Stainless Steel Bounadry : ESSB
669 : //==================================
670 : // Make a 10.3mm thick Stainless Steel boundary for Unit module B
671 : // X-dimension same as EHC2 + Airgap + G10 + 0.3
672 : // Y-dimension same as EHC2 + Airgap + G10 + 0.3
673 : // Z-dimension 1.03/2 = 0.515 cm
674 : //------------------------------------------------------//
675 : // A Stainless Steel Boundary Channel to house the unit module
676 :
677 0 : Float_t dboxSS2[3];
678 0 : dboxSS2[0] = dboxGGB[0] + fgkSSBoundary;
679 0 : dboxSS2[1] = dboxGGB[1] + fgkSSBoundary;
680 0 : dboxSS2[2] = fgkThSS/2.;
681 :
682 : //PRESHOWER
683 : //Stainless Steel boundary - Material Stainless Steel
684 0 : TVirtualMC::GetMC()->Gsvolu("ESSB","BOX", idtmed[618], dboxSS2, 3);
685 : //VETO
686 0 : TVirtualMC::GetMC()->Gsvolu("ESVB","BOX", idtmed[618], dboxSS2, 3);
687 : //----------------------------------------------------------------//
688 :
689 : //----------------------------------------------------------------//
690 : // Here we need to place the volume in order ESSB -> EDGB -> ECGB
691 : // this makes the SS boiundary and the 0.5mm thick FR4 insulation in place,
692 : // and the air volume ECGB acts as mother for the rest of components.
693 : // The above placeemnt is done at (0.,0.,0.) relative coordiante
694 : // Now we place bottom PCB, honeycomb, top PCB in this volume. We donot place
695 : // unnecessary air volumes now. Just leave the gap as we are placing them
696 : // in air only. This also reduces the number of volumes for geant to track.
697 :
698 : // Tree structure for different volumes
699 : //
700 : // EUM2
701 : // |
702 : // --------------------
703 : // | | |
704 : // EBPB ESSB EBKB
705 : // |
706 : // EDGB
707 : // |
708 : // ECGB
709 : // |
710 : // --------------------
711 : // | | |
712 : // EPCB(1) EHC2 EPCB(2)
713 : // (bottom) | (top PCB)
714 : // |
715 : // Sensitive volume
716 : // (gas)
717 : //
718 :
719 : //PRESHOWER
720 : //Creating the side channels
721 : // SS boundary channel, followed by G10 and Air Gap
722 0 : TVirtualMC::GetMC()->Gspos("EDGB", 1, "ESSB", 0., 0., 0., 0, "ONLY");
723 0 : TVirtualMC::GetMC()->Gspos("ECGB", 1, "EDGB", 0., 0., 0., 0, "ONLY");
724 : //VETO
725 0 : TVirtualMC::GetMC()->Gspos("EDVB", 1, "ESVB", 0., 0., 0., 0, "ONLY");
726 0 : TVirtualMC::GetMC()->Gspos("ECVB", 1, "EDVB", 0., 0., 0., 0, "ONLY");
727 :
728 : // now other components, using Bedang's code, but changing the values.
729 : //Positioning Bottom PCB, Honey Comb abd Top PCB in AIR
730 :
731 : //VETO
732 : //Positioning the Bottom 0.16 cm PCB
733 0 : Float_t zbpcb2 = -dboxAir3B[2] + (2.0*fgkGap) + fgkThPCB/2.;
734 0 : TVirtualMC::GetMC()->Gspos("EPCB", 1, "ECVB", 0., 0., zbpcb2, 0, "ONLY");
735 : //Positioning the Honey Comb 0.5 cm
736 0 : Float_t zhc2 = zbpcb2 + fgkThPCB/2. + fgkCellDepth/2.;
737 0 : TVirtualMC::GetMC()->Gspos("EHC2", 1, "ECVB", 0., 0., zhc2, 0, "ONLY");
738 : //Positioning the Top PCB 0.16 cm
739 0 : Float_t ztpcb2 = zhc2 + fgkCellDepth/2 + fgkThPCB/2.;
740 0 : TVirtualMC::GetMC()->Gspos("EPCB", 2, "ECVB", 0., 0., ztpcb2, 0, "ONLY");
741 :
742 : //PRESHOWER
743 : //For preshower plane the ordering is reversed
744 : //Positioning the Bottom 0.16 cm PCB
745 0 : zbpcb2 = -dboxAir3B[2] + fgkThPCB + fgkThPCB/2.;
746 0 : TVirtualMC::GetMC()->Gspos("EPCB", 1, "ECGB", 0., 0., zbpcb2, 0, "ONLY");
747 : //Positioning the Honey Comb 0.5 cm
748 0 : zhc2 = zbpcb2 + fgkThPCB/2. + fgkCellDepth/2.;
749 0 : TVirtualMC::GetMC()->Gspos("EHC2", 1, "ECGB", 0., 0., zhc2, 0, "ONLY");
750 : //Positioning the Top PCB 0.16 cm
751 0 : ztpcb2 = zhc2 + fgkCellDepth/2 + fgkThPCB/2.;
752 0 : TVirtualMC::GetMC()->Gspos("EPCB", 2, "ECGB", 0., 0., ztpcb2, 0, "ONLY");
753 :
754 :
755 :
756 : //--------------Now let us construct final UM ---------------//
757 : // We will do it as follows :
758 : // (i) First make a UM of air. which will have dimensions
759 : // of the SS boundary Channel (in x,y) and of height 13.3mm
760 : //(ii) Then we will place all the components
761 :
762 : //----------------------------------------------------------//
763 : // A unit module type B of Air
764 : // Dimensions of Unit Module same as SS boundary channel
765 :
766 0 : Float_t dboxUM2[3];
767 0 : dboxUM2[0] = dboxSS2[0];
768 0 : dboxUM2[1] = dboxSS2[1];
769 0 : dboxUM2[2] = fgkThSS/2. +0.15; // 0.15 added to accomodate Base Plate at
770 : // the bottom and the backplane PCB at the top.
771 :
772 : //PRESHOWER
773 : //Create a Unit module of above dimensions Material : AIR
774 0 : TVirtualMC::GetMC()->Gsvolu("EUM2","BOX", idtmed[698], dboxUM2, 3);
775 :
776 : //VETO
777 0 : TVirtualMC::GetMC()->Gsvolu("EUV2","BOX", idtmed[698], dboxUM2, 3);
778 : //----------------------------------------------------------------//
779 :
780 : //BASE PLATE : EBPB
781 : //==================
782 : // Make a 2mm thick G10 Base plate for Unit module B
783 : // Base plate is as big as the final UM dimensions that is as
784 : // SS boundary channel
785 0 : Float_t dboxBaseB[3];
786 0 : dboxBaseB[0] = dboxSS2[0];
787 0 : dboxBaseB[1] = dboxSS2[1];
788 0 : dboxBaseB[2] = fgkThBase/2.;
789 :
790 : //Base Blate is a G10 BOX
791 0 : TVirtualMC::GetMC()->Gsvolu("EBPB","BOX", idtmed[607], dboxBaseB, 3);
792 : //----------------------------------------------------//
793 :
794 : //VETO
795 : //- Placing of all components of UM in AIR BOX EUM2--//
796 : //(1) FIRST PUT THE BASE PLATE
797 0 : Float_t zbaseplate2 = -dboxUM2[2] + fgkThBase/2.;
798 0 : TVirtualMC::GetMC()->Gspos("EBPB", 1, "EUV2", 0., 0., zbaseplate2, 0, "ONLY");
799 :
800 : //(2) NEXT PLACING the SS BOX
801 0 : Float_t zss2 = zbaseplate2 + fgkThBase/2. + fgkThSS/2.;
802 0 : TVirtualMC::GetMC()->Gspos("ESVB", 1, "EUV2", 0., 0., zss2, 0, "ONLY");
803 :
804 : // (3) Positioning the Backplane PCB 0.1 cm
805 0 : Float_t zbkp2 = zss2 + fgkThSS/2. + fgkThBKP/2.;
806 0 : TVirtualMC::GetMC()->Gspos("EBKB", 1, "EUV2", 0., 0., zbkp2, 0, "ONLY");
807 :
808 :
809 :
810 : //FOR PRESHOWER
811 : // (3) Positioning the Backplane PCB 0.1 cm
812 0 : zbkp2 = -dboxUM2[2] + fgkThBKP/2.;
813 0 : TVirtualMC::GetMC()->Gspos("EBKB", 1, "EUM2", 0., 0., zbkp2, 0, "ONLY");
814 :
815 : //(2) NEXT PLACING the SS BOX
816 0 : zss2 = zbkp2 + fgkThBKP/2. + fgkThSS/2.;
817 0 : TVirtualMC::GetMC()->Gspos("ESSB", 1, "EUM2", 0., 0., zss2, 0, "ONLY");
818 :
819 : //(1) FIRST PUT THE BASE PLATE
820 0 : zbaseplate2 = zss2 + fgkThSS/2 + fgkThBase/2.;
821 0 : TVirtualMC::GetMC()->Gspos("EBPB", 1, "EUM2", 0., 0., zbaseplate2, 0, "ONLY");
822 : //-------------------- UM Type B completed ------------------------//
823 :
824 :
825 : //--- Now we need to make Lead plates of UM dimension -----//
826 :
827 : /**************************/
828 : //----------------------------------------------------------//
829 : // The lead convertor is of unit module size
830 : // Dimensions of Unit Module same as SS boundary channel
831 :
832 0 : Float_t dboxPba[3];
833 0 : dboxPba[0] = dboxUM1[0];
834 0 : dboxPba[1] = dboxUM1[1];
835 0 : dboxPba[2] = fgkThLead/2.;
836 : // Lead of UM dimension
837 0 : TVirtualMC::GetMC()->Gsvolu("EPB1","BOX", idtmed[600], dboxPba, 3);
838 :
839 0 : Float_t dboxPbb[3];
840 0 : dboxPbb[0] = dboxUM2[0];
841 0 : dboxPbb[1] = dboxUM2[1];
842 0 : dboxPbb[2] = fgkThLead/2.;
843 : // Lead of UM dimension
844 0 : TVirtualMC::GetMC()->Gsvolu("EPB2","BOX", idtmed[600], dboxPbb, 3);
845 :
846 : //----------------------------------------------------------------//
847 :
848 : // 2 types of Rectangular shaped supermodules (BOX)
849 : //each with 6 unit modules
850 :
851 : // volume for SUPERMODULE ESMA
852 : //Space added to provide a gapping for HV between UM's
853 : //There is a gap of 0.15 cm between two Modules (UMs)
854 : // in x-direction and 0.1cm along y-direction
855 :
856 0 : Float_t dboxSM1[3];
857 0 : dboxSM1[0] = 3.0*dboxUM1[0] + (2.0*0.075);
858 0 : dboxSM1[1] = 2.0*dboxUM1[1] + 0.05;
859 0 : dboxSM1[2] = dboxUM1[2];
860 :
861 : //FOR PRESHOWER
862 0 : TVirtualMC::GetMC()->Gsvolu("ESMA","BOX", idtmed[698], dboxSM1, 3);
863 :
864 : //FOR VETO
865 0 : TVirtualMC::GetMC()->Gsvolu("EMVA","BOX", idtmed[698], dboxSM1, 3);
866 :
867 : //Position the 6 unit modules in EMSA
868 : Float_t xa1,xa2,xa3,ya1,ya2;
869 0 : xa1 = dboxSM1[0] - dboxUM1[0];
870 0 : xa2 = xa1 - dboxUM1[0] - 0.15 - dboxUM1[0];
871 0 : xa3 = xa2 - dboxUM1[0] - 0.15 - dboxUM1[0];
872 0 : ya1 = dboxSM1[1] - dboxUM1[1];
873 0 : ya2 = ya1 - dboxUM1[1] - 0.1 - dboxUM1[1];
874 :
875 : //PRESHOWER
876 : // TVirtualMC::GetMC()->Gspos("EUM1", 1, "ESMA", xa1, ya1, 0., 0, "ONLY"); // BKN
877 0 : TVirtualMC::GetMC()->Gspos("EUM1", 2, "ESMA", xa2, ya1, 0., 0, "ONLY");
878 0 : TVirtualMC::GetMC()->Gspos("EUM1", 3, "ESMA", xa3, ya1, 0., 0, "ONLY");
879 0 : TVirtualMC::GetMC()->Gspos("EUM1", 4, "ESMA", xa1, ya2, 0., 0, "ONLY");
880 0 : TVirtualMC::GetMC()->Gspos("EUM1", 5, "ESMA", xa2, ya2, 0., 0, "ONLY");
881 0 : TVirtualMC::GetMC()->Gspos("EUM1", 6, "ESMA", xa3, ya2, 0., 0, "ONLY");
882 :
883 : //VETO
884 0 : TVirtualMC::GetMC()->Gspos("EUV1", 1, "EMVA", xa1, ya1, 0., 0, "ONLY");
885 0 : TVirtualMC::GetMC()->Gspos("EUV1", 2, "EMVA", xa2, ya1, 0., 0, "ONLY");
886 0 : TVirtualMC::GetMC()->Gspos("EUV1", 3, "EMVA", xa3, ya1, 0., 0, "ONLY");
887 0 : TVirtualMC::GetMC()->Gspos("EUV1", 4, "EMVA", xa1, ya2, 0., 0, "ONLY");
888 0 : TVirtualMC::GetMC()->Gspos("EUV1", 5, "EMVA", xa2, ya2, 0., 0, "ONLY");
889 0 : TVirtualMC::GetMC()->Gspos("EUV1", 6, "EMVA", xa3, ya2, 0., 0, "ONLY");
890 :
891 :
892 : // volume for SUPERMODULE ESMB
893 : //Space is added to provide a gapping for HV between UM's
894 0 : Float_t dboxSM2[3];
895 0 : dboxSM2[0] = 2.0*dboxUM2[0] + 0.075;
896 0 : dboxSM2[1] = 3.0*dboxUM2[1] + (2.0*0.05);
897 0 : dboxSM2[2] = dboxUM2[2];
898 :
899 : //PRESHOWER
900 0 : TVirtualMC::GetMC()->Gsvolu("ESMB","BOX", idtmed[698], dboxSM2, 3);
901 : //VETO
902 0 : TVirtualMC::GetMC()->Gsvolu("EMVB","BOX", idtmed[698], dboxSM2, 3);
903 :
904 : //Position the 6 unit modules in EMSB
905 : Float_t xb1,xb2,yb1,yb2,yb3;
906 0 : xb1 = dboxSM2[0] - dboxUM2[0];
907 0 : xb2 = xb1 - dboxUM2[0] - 0.15 - dboxUM2[0];
908 0 : yb1 = dboxSM2[1] - dboxUM2[1];
909 0 : yb2 = yb1 - dboxUM2[1] - 0.1 - dboxUM2[1];
910 0 : yb3 = yb2 - dboxUM2[1] - 0.1 - dboxUM2[1];
911 :
912 :
913 : //PRESHOWER
914 : // TVirtualMC::GetMC()->Gspos("EUM2", 1, "ESMB", xb1, yb1, 0., 0, "ONLY"); // BKN
915 : // TVirtualMC::GetMC()->Gspos("EUM2", 2, "ESMB", xb2, yb1, 0., 0, "ONLY");
916 0 : TVirtualMC::GetMC()->Gspos("EUM2", 3, "ESMB", xb1, yb2, 0., 0, "ONLY");
917 0 : TVirtualMC::GetMC()->Gspos("EUM2", 4, "ESMB", xb2, yb2, 0., 0, "ONLY");
918 0 : TVirtualMC::GetMC()->Gspos("EUM2", 5, "ESMB", xb1, yb3, 0., 0, "ONLY");
919 0 : TVirtualMC::GetMC()->Gspos("EUM2", 6, "ESMB", xb2, yb3, 0., 0, "ONLY");
920 :
921 : //VETO
922 0 : TVirtualMC::GetMC()->Gspos("EUV2", 1, "EMVB", xb1, yb1, 0., 0, "ONLY");
923 0 : TVirtualMC::GetMC()->Gspos("EUV2", 2, "EMVB", xb2, yb1, 0., 0, "ONLY");
924 0 : TVirtualMC::GetMC()->Gspos("EUV2", 3, "EMVB", xb1, yb2, 0., 0, "ONLY");
925 0 : TVirtualMC::GetMC()->Gspos("EUV2", 4, "EMVB", xb2, yb2, 0., 0, "ONLY");
926 0 : TVirtualMC::GetMC()->Gspos("EUV2", 5, "EMVB", xb1, yb3, 0., 0, "ONLY");
927 0 : TVirtualMC::GetMC()->Gspos("EUV2", 6, "EMVB", xb2, yb3, 0., 0, "ONLY");
928 :
929 : // Make smiliar stucture for lead as for PMD plane
930 : //================================================
931 :
932 : // 2 types of Rectangular shaped supermodules (BOX)
933 : //each with 6 unit modules
934 :
935 : // volume for SUPERMODULE ESMPbA
936 : //Space added to provide a gapping for HV between UM's
937 :
938 0 : Float_t dboxSMPb1[3];
939 0 : dboxSMPb1[0] = 3.0*dboxUM1[0] + (2.0*0.075);
940 0 : dboxSMPb1[1] = 2.0*dboxUM1[1] + 0.05;
941 0 : dboxSMPb1[2] = fgkThLead/2.;
942 :
943 0 : TVirtualMC::GetMC()->Gsvolu("ESPA","BOX", idtmed[698], dboxSMPb1, 3);
944 :
945 :
946 : //Position the 6 unit modules in ESMPbA
947 : Float_t xpa1,xpa2,xpa3,ypa1,ypa2;
948 0 : xpa1 = -dboxSMPb1[0] + dboxUM1[0];
949 0 : xpa2 = xpa1 + dboxUM1[0] + 0.15 + dboxUM1[0];
950 0 : xpa3 = xpa2 + dboxUM1[0] + 0.15 + dboxUM1[0];
951 0 : ypa1 = dboxSMPb1[1] - dboxUM1[1];
952 0 : ypa2 = ypa1 - dboxUM1[1] - 0.1 - dboxUM1[1];
953 :
954 :
955 0 : TVirtualMC::GetMC()->Gspos("EPB1", 1, "ESPA", xpa1, ypa1, 0., 0, "ONLY");
956 0 : TVirtualMC::GetMC()->Gspos("EPB1", 2, "ESPA", xpa2, ypa1, 0., 0, "ONLY");
957 0 : TVirtualMC::GetMC()->Gspos("EPB1", 3, "ESPA", xpa3, ypa1, 0., 0, "ONLY");
958 0 : TVirtualMC::GetMC()->Gspos("EPB1", 4, "ESPA", xpa1, ypa2, 0., 0, "ONLY");
959 0 : TVirtualMC::GetMC()->Gspos("EPB1", 5, "ESPA", xpa2, ypa2, 0., 0, "ONLY");
960 0 : TVirtualMC::GetMC()->Gspos("EPB1", 6, "ESPA", xpa3, ypa2, 0., 0, "ONLY");
961 :
962 :
963 : // volume for SUPERMODULE ESMPbB
964 : //Space is added to provide a gapping for HV between UM's
965 0 : Float_t dboxSMPb2[3];
966 0 : dboxSMPb2[0] = 2.0*dboxUM2[0] + 0.075;
967 0 : dboxSMPb2[1] = 3.0*dboxUM2[1] + (2.0*0.05);
968 0 : dboxSMPb2[2] = fgkThLead/2.;
969 :
970 0 : TVirtualMC::GetMC()->Gsvolu("ESPB","BOX", idtmed[698], dboxSMPb2, 3);
971 :
972 : //Position the 6 unit modules in ESMPbB
973 : Float_t xpb1,xpb2,ypb1,ypb2,ypb3;
974 0 : xpb1 = -dboxSMPb2[0] + dboxUM2[0];
975 0 : xpb2 = xpb1 + dboxUM2[0] + 0.15 + dboxUM2[0];
976 0 : ypb1 = dboxSMPb2[1] - dboxUM2[1];
977 0 : ypb2 = ypb1 - dboxUM2[1] - 0.1 - dboxUM2[1];
978 0 : ypb3 = ypb2 - dboxUM2[1] - 0.1 - dboxUM2[1];
979 :
980 :
981 0 : TVirtualMC::GetMC()->Gspos("EPB2", 1, "ESPB", xpb1, ypb1, 0., 0, "ONLY");
982 0 : TVirtualMC::GetMC()->Gspos("EPB2", 2, "ESPB", xpb2, ypb1, 0., 0, "ONLY");
983 0 : TVirtualMC::GetMC()->Gspos("EPB2", 3, "ESPB", xpb1, ypb2, 0., 0, "ONLY");
984 0 : TVirtualMC::GetMC()->Gspos("EPB2", 4, "ESPB", xpb2, ypb2, 0., 0, "ONLY");
985 0 : TVirtualMC::GetMC()->Gspos("EPB2", 5, "ESPB", xpb1, ypb3, 0., 0, "ONLY");
986 0 : TVirtualMC::GetMC()->Gspos("EPB2", 6, "ESPB", xpb2, ypb3, 0., 0, "ONLY");
987 :
988 :
989 : //---------------------------------------------------
990 : /// ALICE PMD FEE BOARDS IMPLEMENTATION
991 : // Dt: 25th February 2006
992 : // - M.M. Mondal, S.K. Prasad and P.K. Netrakanti
993 : //---------------------------------------------------
994 :
995 : //FEE boards
996 : // It is FR4 board of length 7cm
997 : // breadth of 2.4 cm and thickness 0.1cm
998 0 : Float_t dboxFEE[3];
999 0 : dboxFEE[0] = 0.05;
1000 0 : dboxFEE[1] = 3.50;
1001 0 : dboxFEE[2] = 1.20;
1002 :
1003 0 : TVirtualMC::GetMC()->Gsvolu("EFEE","BOX", idtmed[607], dboxFEE, 3);
1004 :
1005 : //Mother volume to accomodate FEE boards
1006 : // It should have the dimension
1007 : // as the back plane or the
1008 : //corresponding UM
1009 : //TYPE A
1010 : //------------------------------------------------------//
1011 :
1012 0 : Float_t dboxFEEBPlaneA[3];
1013 0 : dboxFEEBPlaneA[0] = dboxBPlaneA[0]; //dbox3[0];
1014 0 : dboxFEEBPlaneA[1] = dboxBPlaneA[1];//dbox3[1];
1015 0 : dboxFEEBPlaneA[2] = 1.2;
1016 :
1017 : //Volume of same dimension as Back PLane of Material AIR
1018 0 : TVirtualMC::GetMC()->Gsvolu("EFBA","BOX", idtmed[698], dboxFEEBPlaneA, 3);
1019 :
1020 : //TYPE B
1021 0 : Float_t dboxFEEBPlaneB[3];
1022 0 : dboxFEEBPlaneB[0] = dboxBPlaneB[0]; //dbox4[0];
1023 0 : dboxFEEBPlaneB[1] = dboxBPlaneB[1];//dbox4[1];
1024 0 : dboxFEEBPlaneB[2] = 1.2;
1025 :
1026 : //Back PLane PCB of MAterial G10
1027 0 : TVirtualMC::GetMC()->Gsvolu("EFBB","BOX", idtmed[698], dboxFEEBPlaneB, 3);
1028 :
1029 : //Placing the FEE boards in the Mother volume of AIR
1030 :
1031 : //Type A
1032 :
1033 : Float_t xFee; // X-position of FEE board
1034 : Float_t yFee; // Y-position of FEE board
1035 : Float_t zFee = 0.0; // Z-position of FEE board
1036 :
1037 : Float_t xA = 0.25; //distance from the border to 1st FEE board
1038 : Float_t yA = 4.00; //distance from the border to 1st FEE board
1039 : Float_t xSepa = 1.70; //Distance between two FEE boards
1040 : Float_t ySepa = 8.00; //Distance between two FEE boards
1041 :
1042 :
1043 : // FEE Boards EFEE placed inside EFBA
1044 : number = 1;
1045 0 : yFee = dboxFEEBPlaneA[1] - yA;
1046 0 : for (i = 1; i <= 6; ++i)
1047 : {
1048 0 : xFee = -dboxFEEBPlaneA[0] + xA;
1049 0 : for (j = 1; j <= 12; ++j)
1050 : {
1051 0 : TVirtualMC::GetMC()->Gspos("EFEE", number, "EFBA", xFee,yFee,zFee, 0, "ONLY");
1052 0 : xFee += xSepa;
1053 0 : number += 1;
1054 : }
1055 0 : yFee -= ySepa;
1056 : }
1057 : // FEE Boards EFEE placed inside EFBB
1058 : number = 1;
1059 0 : yFee = dboxFEEBPlaneB[1] - yA;
1060 0 : for (i = 1; i <= 3; ++i)
1061 : {
1062 0 : xFee = -dboxFEEBPlaneB[0] + xA;
1063 0 : for (j = 1; j <= 24; ++j)
1064 : {
1065 0 : TVirtualMC::GetMC()->Gspos("EFEE", number, "EFBB", xFee,yFee,zFee, 0, "ONLY");
1066 0 : xFee += xSepa;
1067 0 : number += 1;
1068 : }
1069 0 : yFee -= ySepa;
1070 : }
1071 :
1072 :
1073 : //Distance between the two backplanes of two UMs
1074 : //in x-direction is 0.92 and ydirection is 0.95
1075 0 : Float_t dboxEFSA[3];
1076 0 : dboxEFSA[0] = 3.0*dboxFEEBPlaneA[0] + 0.92;
1077 0 : dboxEFSA[1] = 2.0*dboxFEEBPlaneA[1] + (0.95/2.0);
1078 0 : dboxEFSA[2] = dboxFEEBPlaneA[2];
1079 :
1080 : //Type A
1081 0 : TVirtualMC::GetMC()->Gsvolu("EFSA","BOX", idtmed[698],dboxEFSA, 3);
1082 :
1083 : //Distance between the two backplanes of two UMs
1084 : //in x-direction is 0.92 and ydirection is 0.95
1085 0 : Float_t dboxEFSB[3];
1086 0 : dboxEFSB[0] = 2.0*dboxFEEBPlaneB[0] + (0.938/2.0);
1087 0 : dboxEFSB[1] = 3.0*dboxFEEBPlaneB[1] + 1.05;
1088 0 : dboxEFSB[2] = dboxFEEBPlaneB[2];
1089 :
1090 : //Type A
1091 0 : TVirtualMC::GetMC()->Gsvolu("EFSB","BOX", idtmed[698],dboxEFSB, 3);
1092 :
1093 :
1094 : Float_t xfs1,xfs2,xfs3,yfs1,yfs2,yfs3;
1095 0 : xfs1 = -dboxEFSA[0] + dboxFEEBPlaneA[0];
1096 0 : xfs2 = xfs1 + dboxFEEBPlaneA[0] + 0.92 + dboxFEEBPlaneA[0];
1097 0 : xfs3 = xfs2 + dboxFEEBPlaneA[0] + 0.92 + dboxFEEBPlaneA[0];
1098 0 : yfs1 = dboxEFSA[1] - dboxFEEBPlaneA[1];
1099 0 : yfs2 = yfs1 - dboxFEEBPlaneA[1] - 0.95 - dboxFEEBPlaneA[1];
1100 :
1101 :
1102 :
1103 : // TVirtualMC::GetMC()->Gspos("EFBA", 1, "EFSA", xfs1, yfs1, 0., 0, "ONLY"); // BKN
1104 0 : TVirtualMC::GetMC()->Gspos("EFBA", 2, "EFSA", xfs2, yfs1, 0., 0, "ONLY");
1105 0 : TVirtualMC::GetMC()->Gspos("EFBA", 3, "EFSA", xfs3, yfs1, 0., 0, "ONLY");
1106 0 : TVirtualMC::GetMC()->Gspos("EFBA", 4, "EFSA", xfs1, yfs2, 0., 0, "ONLY");
1107 0 : TVirtualMC::GetMC()->Gspos("EFBA", 5, "EFSA", xfs2, yfs2, 0., 0, "ONLY");
1108 0 : TVirtualMC::GetMC()->Gspos("EFBA", 6, "EFSA", xfs3, yfs2, 0., 0, "ONLY");
1109 :
1110 :
1111 : //Type B positioning
1112 :
1113 0 : xfs1 = -dboxEFSB[0] + dboxFEEBPlaneB[0];
1114 0 : xfs2 = xfs1 + dboxFEEBPlaneB[0] + 0.938 + dboxFEEBPlaneB[0];
1115 0 : yfs1 = dboxEFSB[1] - dboxFEEBPlaneB[1];
1116 0 : yfs2 = yfs1 - dboxFEEBPlaneB[1] - 1.05 - dboxFEEBPlaneB[1];
1117 0 : yfs3 = yfs2 - dboxFEEBPlaneB[1] - 1.05 - dboxFEEBPlaneB[1];
1118 :
1119 :
1120 :
1121 : // TVirtualMC::GetMC()->Gspos("EFBB", 1, "EFSB", xfs1, yfs1, 0., 0, "ONLY"); // BKN
1122 : // TVirtualMC::GetMC()->Gspos("EFBB", 2, "EFSB", xfs2, yfs1, 0., 0, "ONLY"); // BKN
1123 0 : TVirtualMC::GetMC()->Gspos("EFBB", 3, "EFSB", xfs1, yfs2, 0., 0, "ONLY");
1124 0 : TVirtualMC::GetMC()->Gspos("EFBB", 4, "EFSB", xfs2, yfs2, 0., 0, "ONLY");
1125 0 : TVirtualMC::GetMC()->Gspos("EFBB", 5, "EFSB", xfs1, yfs3, 0., 0, "ONLY");
1126 0 : TVirtualMC::GetMC()->Gspos("EFBB", 6, "EFSB", xfs2, yfs3, 0., 0, "ONLY");
1127 :
1128 :
1129 0 : }
1130 :
1131 : //_____________________________________________________________________________
1132 :
1133 : void AliPMDv2008::CreatePMD()
1134 : {
1135 : //
1136 : // Create final detector from supermodules
1137 : // -- Author : Bedanga and Viyogi June 2003
1138 :
1139 : Float_t zp;
1140 0 : Int_t jhrot12,jhrot13, irotdm;
1141 0 : Int_t *idtmed = fIdtmed->GetArray()-599;
1142 :
1143 : //VOLUMES Names : begining with "E" for all PMD volumes,
1144 :
1145 : // --- DEFINE Iron volumes for SM A
1146 : // Fe Support
1147 0 : Float_t dboxFea[3];
1148 0 : dboxFea[0] = fSMLengthax;
1149 0 : dboxFea[1] = fSMLengthay;
1150 0 : dboxFea[2] = fgkThSteel/2.;
1151 :
1152 0 : TVirtualMC::GetMC()->Gsvolu("EFEA","BOX", idtmed[618], dboxFea, 3);
1153 :
1154 : // --- DEFINE Iron volumes for SM B
1155 :
1156 : // Fe Support
1157 0 : Float_t dboxFeb[3];
1158 0 : dboxFeb[0] = fSMLengthbx;
1159 0 : dboxFeb[1] = fSMLengthby;
1160 0 : dboxFeb[2] = fgkThSteel/2.;
1161 :
1162 0 : TVirtualMC::GetMC()->Gsvolu("EFEB","BOX", idtmed[618], dboxFeb, 3);
1163 :
1164 0 : AliMatrix(irotdm, 90., 0., 90., 90., 180., 0.);
1165 0 : AliMatrix(jhrot12, 90., 180., 90., 270., 0., 0.);
1166 0 : AliMatrix(jhrot13, 90., 240., 90., 330., 0., 0.);
1167 :
1168 : // Gaspmd, the dimension of RECTANGULAR mother volume of PMD,
1169 : // Four mother volumes EPM1,EPM2 for A-type and
1170 : // volumes EPM3 and EPM4 for B-type. Four to create a hole
1171 : // and avoid overlap with beam pipe
1172 :
1173 0 : Float_t gaspmd[3];
1174 0 : gaspmd[0] = fSMLengthax;
1175 0 : gaspmd[1] = fSMLengthay;
1176 0 : gaspmd[2] = fSMthick;
1177 :
1178 0 : TVirtualMC::GetMC()->Gsvolu("EPM1", "BOX", idtmed[698], gaspmd, 3);
1179 0 : TVirtualMC::GetMC()->Gsvolu("EPM2", "BOX", idtmed[698], gaspmd, 3);
1180 :
1181 : //Complete detector for Type A
1182 : //Position Super modules type A for both CPV and PMD in EPMD
1183 : Float_t zpsa,zpba,zfea,zcva,zfee;
1184 :
1185 : // zpsa = - gaspmd[2] + fSMthick/2.;
1186 : // -2.5 is given to place PMD at -361.5
1187 : // BM : In future after putting proper electronics
1188 : // -2.5 will be replaced by -gaspmd[2]
1189 :
1190 : //TYPE A
1191 : //Fee board
1192 :
1193 : // This part is commented for the time being by BKN
1194 :
1195 0 : zfee=-gaspmd[2] + 1.2;
1196 :
1197 : /*
1198 : TVirtualMC::GetMC()->Gspos("EFSA", 1, "EPM1", 0., 0., zfee, 0, "ONLY");
1199 : TVirtualMC::GetMC()->Gspos("EFSA", 2, "EPM2", 0., 0., zfee, jhrot12, "ONLY");
1200 : */
1201 :
1202 : //VETO
1203 :
1204 0 : zcva = zfee + 1.2 + fDthick;
1205 :
1206 : /*
1207 : TVirtualMC::GetMC()->Gspos("EMVA", 1, "EPM1", 0., 0., zcva, 0, "ONLY");
1208 : TVirtualMC::GetMC()->Gspos("EMVA", 2, "EPM2", 0., 0., zcva, jhrot12, "ONLY");
1209 : */
1210 :
1211 :
1212 :
1213 : //Iron support
1214 0 : zfea = zcva + fDthick + fgkThSteel/2.;
1215 0 : TVirtualMC::GetMC()->Gspos("EFEA", 1, "EPM1", 0., 0., zfea, 0, "ONLY");
1216 : //TVirtualMC::GetMC()->Gspos("EFEA", 2, "EPM2", 0., 0., zfea, 0, "ONLY");
1217 : //Lead
1218 0 : zpba=zfea+fgkThSteel/2.+ fgkThLead/2.;
1219 0 : TVirtualMC::GetMC()->Gspos("ESPA", 1, "EPM1", 0., 0., zpba, 0, "ONLY");
1220 : //TVirtualMC::GetMC()->Gspos("ESPA", 2, "EPM2", 0., 0., zpba, 0, "ONLY");
1221 : //Preshower
1222 0 : zpsa = zpba + fgkThLead/2. + fDthick;
1223 0 : TVirtualMC::GetMC()->Gspos("ESMA", 1, "EPM1", 0., 0., zpsa, 0, "ONLY");
1224 : //TVirtualMC::GetMC()->Gspos("ESMA", 2, "EPM2", 0., 0., zpsa, jhrot12, "ONLY");
1225 : //FEE boards
1226 0 : zfee=zpsa + fDthick + 1.2;
1227 0 : TVirtualMC::GetMC()->Gspos("EFSA", 3, "EPM1", 0., 0., zfee, 0, "ONLY");
1228 : //TVirtualMC::GetMC()->Gspos("EFSA", 4, "EPM2", 0., 0., zfee, jhrot12, "ONLY");
1229 :
1230 :
1231 : //TYPE - B
1232 0 : gaspmd[0] = fSMLengthbx;
1233 0 : gaspmd[1] = fSMLengthby;
1234 0 : gaspmd[2] = fSMthick;
1235 :
1236 0 : TVirtualMC::GetMC()->Gsvolu("EPM3", "BOX", idtmed[698], gaspmd, 3);
1237 0 : TVirtualMC::GetMC()->Gsvolu("EPM4", "BOX", idtmed[698], gaspmd, 3);
1238 :
1239 : //Complete detector for Type B
1240 : //Position Super modules type B for both CPV and PMD in EPMD
1241 : Float_t zpsb,zpbb,zfeb,zcvb;
1242 : // zpsb = - gaspmd[2] + fSMthick/2.;
1243 : // -2.5 is given to place PMD at -361.5
1244 : // BM: In future after putting proper electronics
1245 : // -2.5 will be replaced by -gaspmd[2]
1246 :
1247 : //Fee board
1248 :
1249 0 : zfee=-gaspmd[2] + 1.2;
1250 :
1251 : /*
1252 : TVirtualMC::GetMC()->Gspos("EFSB", 5, "EPM3", 0., 0., zfee, 0, "ONLY");
1253 : TVirtualMC::GetMC()->Gspos("EFSB", 6, "EPM4", 0., 0., zfee, jhrot12, "ONLY");
1254 : */
1255 :
1256 0 : zcvb= zfee + 1.2 + fDthick;
1257 :
1258 : //VETO
1259 : /*
1260 : TVirtualMC::GetMC()->Gspos("EMVB", 3, "EPM3", 0., 0., zcvb, 0, "ONLY");
1261 : TVirtualMC::GetMC()->Gspos("EMVB", 4, "EPM4", 0., 0., zcvb, jhrot12, "ONLY");
1262 : */
1263 :
1264 : //IRON SUPPORT
1265 0 : zfeb= zcvb + fDthick + fgkThSteel/2.;
1266 : //TVirtualMC::GetMC()->Gspos("EFEB", 3, "EPM3", 0., 0., zfeb, 0, "ONLY");
1267 0 : TVirtualMC::GetMC()->Gspos("EFEB", 4, "EPM4", 0., 0., zfeb, 0, "ONLY");
1268 : //LEAD
1269 0 : zpbb= zfeb + fgkThSteel/2.+ fgkThLead/2.;
1270 : //TVirtualMC::GetMC()->Gspos("ESPB", 3, "EPM3", 0., 0., zpbb, 0, "ONLY");
1271 0 : TVirtualMC::GetMC()->Gspos("ESPB", 4, "EPM4", 0., 0., zpbb, 0, "ONLY");
1272 : //PRESHOWER
1273 0 : zpsb = zpbb + fgkThLead/2.+ fDthick;
1274 : //TVirtualMC::GetMC()->Gspos("ESMB", 3, "EPM3", 0., 0., zpsb, 0, "ONLY");
1275 0 : TVirtualMC::GetMC()->Gspos("ESMB", 4, "EPM4", 0., 0., zpsb, jhrot12, "ONLY");
1276 : //FEE boards
1277 0 : zfee=zpsb + fDthick + 1.2;
1278 : //TVirtualMC::GetMC()->Gspos("EFSB", 7, "EPM3", 0., 0., zfee, 0, "ONLY");
1279 0 : TVirtualMC::GetMC()->Gspos("EFSB", 8, "EPM4", 0., 0., zfee, jhrot12, "ONLY");
1280 :
1281 :
1282 : // --- Place the EPMD in ALICE
1283 : //Z-distance of PMD from Interaction Point
1284 : zp = fgkZdist;
1285 :
1286 : //X and Y-positions of the PMD planes
1287 : Float_t xfinal,yfinal;
1288 : Float_t xsmb,ysmb;
1289 : Float_t xsma,ysma;
1290 :
1291 0 : xfinal = fSMLengthax + 0.48/2 + fSMLengthbx;
1292 0 : yfinal = fSMLengthay + 0.20/2 + fSMLengthby;
1293 :
1294 :
1295 0 : xsma = xfinal - fSMLengthax;
1296 0 : ysma = yfinal - fSMLengthay;
1297 0 : xsmb = -xfinal + fSMLengthbx;
1298 0 : ysmb = yfinal - fSMLengthby;
1299 :
1300 :
1301 : //Position Full PMD in ALICE
1302 : //
1303 : // EPM1 EPM3
1304 : //
1305 : // EPM4 EPM2
1306 : // (rotated (rotated EPM1)
1307 : // EPM3)
1308 : //
1309 0 : TVirtualMC::GetMC()->Gspos("EPM1", 1, "ALIC", xsma,ysma,zp, 0, "ONLY");
1310 0 : TVirtualMC::GetMC()->Gspos("EPM2", 1, "ALIC", -xsma,-ysma,zp, 0, "ONLY");
1311 0 : TVirtualMC::GetMC()->Gspos("EPM3", 1, "ALIC", xsmb,ysmb,zp, 0, "ONLY");
1312 0 : TVirtualMC::GetMC()->Gspos("EPM4", 1, "ALIC", -xsmb,-ysmb,zp, 0, "ONLY");
1313 0 : }
1314 :
1315 :
1316 : //_____________________________________________________________________________
1317 : void AliPMDv2008::CreateMaterials()
1318 : {
1319 : // Create materials for the PMD
1320 : //
1321 : // ORIGIN : Y. P. VIYOGI
1322 : //
1323 : // cout << " Inside create materials " << endl;
1324 :
1325 0 : Int_t isxfld = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ();
1326 0 : Float_t sxmgmx = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
1327 :
1328 : // --- Define the various materials for GEANT ---
1329 :
1330 0 : AliMaterial(1, "Pb $", 207.19, 82., 11.35, .56, 18.5);
1331 :
1332 : // Argon
1333 :
1334 : Float_t dAr = 0.001782; // --- Ar density in g/cm3 ---
1335 0 : Float_t x0Ar = 19.55 / dAr;
1336 0 : AliMaterial(2, "Argon$", 39.95, 18., dAr, x0Ar, 6.5e4);
1337 :
1338 : // --- CO2 ---
1339 :
1340 0 : Float_t aCO2[2] = { 12.,16. };
1341 0 : Float_t zCO2[2] = { 6.,8. };
1342 0 : Float_t wCO2[2] = { 1.,2. };
1343 : Float_t dCO2 = 0.001977;
1344 0 : AliMixture(3, "CO2 $", aCO2, zCO2, dCO2, -2, wCO2);
1345 :
1346 0 : AliMaterial(4, "Al $", 26.98, 13., 2.7, 8.9, 18.5);
1347 :
1348 : // ArCO2
1349 :
1350 0 : Float_t aArCO2[3] = {39.948,12.0107,15.9994};
1351 0 : Float_t zArCO2[3] = {18.,6.,8.};
1352 0 : Float_t wArCO2[3] = {0.7,0.08,0.22};
1353 : Float_t dArCO2 = dAr * 0.7 + dCO2 * 0.3;
1354 0 : AliMixture(5, "ArCO2$", aArCO2, zArCO2, dArCO2, 3, wArCO2);
1355 :
1356 0 : AliMaterial(6, "Fe $", 55.85, 26., 7.87, 1.76, 18.5);
1357 :
1358 : // G10
1359 :
1360 0 : Float_t aG10[4]={1.,12.011,15.9994,28.086};
1361 0 : Float_t zG10[4]={1.,6.,8.,14.};
1362 0 : Float_t wG10[4]={0.15201,0.10641,0.49444,0.24714};
1363 0 : AliMixture(8,"G10",aG10,zG10,1.7,4,wG10);
1364 :
1365 0 : AliMaterial(15, "Cu $", 63.54, 29., 8.96, 1.43, 15.);
1366 :
1367 : // Steel
1368 0 : Float_t aSteel[4] = { 55.847,51.9961,58.6934,28.0855 };
1369 0 : Float_t zSteel[4] = { 26.,24.,28.,14. };
1370 0 : Float_t wSteel[4] = { .715,.18,.1,.005 };
1371 : Float_t dSteel = 7.88;
1372 0 : AliMixture(19, "STAINLESS STEEL$", aSteel, zSteel, dSteel, 4, wSteel);
1373 :
1374 : //Air
1375 :
1376 0 : Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
1377 0 : Float_t zAir[4]={6.,7.,8.,18.};
1378 0 : Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
1379 : Float_t dAir1 = 1.20479E-10;
1380 : Float_t dAir = 1.20479E-3;
1381 0 : AliMixture(98, "Vacum$", aAir, zAir, dAir1, 4, wAir);
1382 0 : AliMixture(99, "Air $", aAir, zAir, dAir , 4, wAir);
1383 :
1384 : // Define tracking media
1385 0 : AliMedium(1, "Pb conv.$", 1, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
1386 0 : AliMedium(4, "Al $", 4, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
1387 0 : AliMedium(5, "ArCO2 $", 5, 1, 0, isxfld, sxmgmx, .1, .1, .10, .1);
1388 0 : AliMedium(6, "Fe $", 6, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
1389 0 : AliMedium(8, "G10plate$", 8, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
1390 0 : AliMedium(15, "Cu $", 15, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
1391 0 : AliMedium(19, "S steel$", 19, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
1392 0 : AliMedium(98, "Vacuum $", 98, 0, 0, isxfld, sxmgmx, 1., .1, .10, 10);
1393 0 : AliMedium(99, "Air gaps$", 99, 0, 0, isxfld, sxmgmx, 1., .1, .10, .1);
1394 :
1395 0 : AliDebug(1,"Outside create materials");
1396 :
1397 0 : }
1398 :
1399 : //_____________________________________________________________________________
1400 : void AliPMDv2008::Init()
1401 : {
1402 : //
1403 : // Initialises PMD detector after it has been built
1404 : //
1405 :
1406 : //
1407 0 : AliDebug(2,"Inside Init");
1408 0 : AliDebug(2,"PMD simulation package (v1) initialised");
1409 0 : AliDebug(2,"parameters of pmd");
1410 0 : AliDebug(2,Form("%10.2f %10.2f %10.2f %10.2f\n",
1411 : fgkCellRadius,fgkCellWall,fgkCellDepth,fgkZdist));
1412 0 : Int_t *idtmed = fIdtmed->GetArray()-599;
1413 0 : fMedSens=idtmed[605-1];
1414 : // --- Generate explicitly delta rays in the iron, aluminium and lead ---
1415 : // Gstpar removed from here and all energy cut-offs moved to galice.cuts
1416 : // Visualization of volumes
1417 0 : gGeoManager->SetVolumeAttribute("ECAR", "SEEN", 0);
1418 0 : gGeoManager->SetVolumeAttribute("ECCU", "SEEN", 0);
1419 0 : gGeoManager->SetVolumeAttribute("ECCU", "COLO", 4);
1420 0 : gGeoManager->SetVolumeAttribute("EST1", "SEEN", 0);
1421 0 : gGeoManager->SetVolumeAttribute("EST2", "SEEN", 0);
1422 0 : gGeoManager->SetVolumeAttribute("EHC1", "SEEN", 0);
1423 0 : gGeoManager->SetVolumeAttribute("EHC2", "SEEN", 0);
1424 0 : gGeoManager->SetVolumeAttribute("EPCA", "SEEN", 0);
1425 0 : gGeoManager->SetVolumeAttribute("EBKA", "SEEN", 0);
1426 0 : gGeoManager->SetVolumeAttribute("ECGA", "SEEN", 0);
1427 0 : gGeoManager->SetVolumeAttribute("ECVA", "SEEN", 0);
1428 0 : gGeoManager->SetVolumeAttribute("EDGA", "SEEN", 0);
1429 0 : gGeoManager->SetVolumeAttribute("EDVA", "SEEN", 0);
1430 0 : gGeoManager->SetVolumeAttribute("ESSA", "SEEN", 0);
1431 0 : gGeoManager->SetVolumeAttribute("ESVA", "SEEN", 0);
1432 0 : gGeoManager->SetVolumeAttribute("EUM1", "SEEN", 0);
1433 0 : gGeoManager->SetVolumeAttribute("EUV1", "SEEN", 0);
1434 0 : gGeoManager->SetVolumeAttribute("EBPA", "SEEN", 0);
1435 0 : gGeoManager->SetVolumeAttribute("EPCB", "SEEN", 0);
1436 0 : gGeoManager->SetVolumeAttribute("EBKB", "SEEN", 0);
1437 0 : gGeoManager->SetVolumeAttribute("ECGB", "SEEN", 0);
1438 0 : gGeoManager->SetVolumeAttribute("ECVB", "SEEN", 0);
1439 0 : gGeoManager->SetVolumeAttribute("EDGB", "SEEN", 0);
1440 0 : gGeoManager->SetVolumeAttribute("EDVB", "SEEN", 0);
1441 0 : gGeoManager->SetVolumeAttribute("ESSB", "SEEN", 0);
1442 0 : gGeoManager->SetVolumeAttribute("ESVB", "SEEN", 0);
1443 0 : gGeoManager->SetVolumeAttribute("EUM2", "SEEN", 0);
1444 0 : gGeoManager->SetVolumeAttribute("EUV2", "SEEN", 0);
1445 0 : gGeoManager->SetVolumeAttribute("EBPB", "SEEN", 0);
1446 0 : gGeoManager->SetVolumeAttribute("EPB1", "SEEN", 0);
1447 0 : gGeoManager->SetVolumeAttribute("EPB2", "SEEN", 0);
1448 0 : gGeoManager->SetVolumeAttribute("ESMA", "SEEN", 0);
1449 0 : gGeoManager->SetVolumeAttribute("EMVA", "SEEN", 0);
1450 0 : gGeoManager->SetVolumeAttribute("ESMB", "SEEN", 0);
1451 0 : gGeoManager->SetVolumeAttribute("EMVB", "SEEN", 0);
1452 0 : gGeoManager->SetVolumeAttribute("ESPA", "SEEN", 0);
1453 0 : gGeoManager->SetVolumeAttribute("ESPB", "SEEN", 0);
1454 0 : gGeoManager->SetVolumeAttribute("EFEE", "SEEN", 0);
1455 0 : gGeoManager->SetVolumeAttribute("EFEE", "COLO", 4);
1456 0 : gGeoManager->SetVolumeAttribute("EFBA", "SEEN", 0);
1457 0 : gGeoManager->SetVolumeAttribute("EFBB", "SEEN", 0);
1458 0 : gGeoManager->SetVolumeAttribute("EFSA", "SEEN", 0);
1459 0 : gGeoManager->SetVolumeAttribute("EFSB", "SEEN", 0);
1460 0 : gGeoManager->SetVolumeAttribute("EFEA", "SEEN", 0);
1461 0 : gGeoManager->SetVolumeAttribute("EFEB", "SEEN", 0);
1462 0 : gGeoManager->SetVolumeAttribute("EPM1", "SEEN", 1);
1463 0 : gGeoManager->SetVolumeAttribute("EPM2", "SEEN", 1);
1464 0 : gGeoManager->SetVolumeAttribute("EPM3", "SEEN", 1);
1465 0 : gGeoManager->SetVolumeAttribute("EPM4", "SEEN", 1);
1466 0 : }
1467 :
1468 : //_____________________________________________________________________________
1469 : void AliPMDv2008::StepManager()
1470 : {
1471 : //
1472 : // Called at each step in the PMD
1473 : //
1474 :
1475 0 : Int_t copy;
1476 0 : Float_t hits[5], destep;
1477 0 : Float_t center[3] = {0,0,0};
1478 0 : Int_t vol[6];
1479 :
1480 0 : if(TVirtualMC::GetMC()->CurrentMedium() == fMedSens && (destep = TVirtualMC::GetMC()->Edep())) {
1481 :
1482 0 : TVirtualMC::GetMC()->CurrentVolID(copy);
1483 0 : vol[0] = copy;
1484 :
1485 0 : TVirtualMC::GetMC()->CurrentVolOffID(1,copy);
1486 0 : vol[1] = copy;
1487 :
1488 0 : TVirtualMC::GetMC()->CurrentVolOffID(2,copy);
1489 0 : vol[2] = copy;
1490 :
1491 0 : TVirtualMC::GetMC()->CurrentVolOffID(3,copy);
1492 0 : vol[3] = copy;
1493 :
1494 0 : TVirtualMC::GetMC()->CurrentVolOffID(4,copy);
1495 0 : vol[4] = copy;
1496 :
1497 0 : TVirtualMC::GetMC()->CurrentVolOffID(5,copy);
1498 0 : vol[5] = copy;
1499 :
1500 :
1501 0 : TVirtualMC::GetMC()->Gdtom(center,hits,1);
1502 0 : hits[3] = destep*1e9; //Number in eV
1503 :
1504 : // this is for pile-up events
1505 0 : hits[4] = TVirtualMC::GetMC()->TrackTime();
1506 :
1507 0 : AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
1508 :
1509 0 : }
1510 0 : }
1511 :
1512 :
1513 : //------------------------------------------------------------------------
1514 : // Get parameters
1515 :
1516 : void AliPMDv2008::GetParameters()
1517 : {
1518 : // This gives all the parameters of the detector
1519 : // such as Length of Supermodules, type A, type B,
1520 : // thickness of the Supermodule
1521 : //
1522 :
1523 0 : fSMLengthax = 32.7434;
1524 : //The total length in X is due to the following components
1525 : // Factor 3 is because of 3 module length in X for this type
1526 : // fgkNcolUM1*fgkCellRadius (48 x 0.25): Total span of each module in X
1527 : // fgkCellRadius/2. : There is offset of 1/2 cell
1528 : // 0.05+0.05 : Insulation gaps etc
1529 : // fgkSSBoundary (0.3) : Boundary frame
1530 : // double XA = 3.0*((fgkCellRadius/fgkSqroot3by2*fgkNcolUM1)-(fgkCellRadius*fgkSqroot3*(fgkNcolUM1-1)/6.)+(2.0*fgkGap)+(2.0*fgkGap)+fgkSSBoundary) + (2.0*0.075);
1531 :
1532 0 : fSMLengthbx = 42.5886;
1533 : //The total length in X is due to the following components
1534 : // Factor 2 is because of 2 module length in X for this type
1535 : // fgkNcolUM2*fgkCellRadius (96 x 0.25): Total span of each module in X
1536 : // fgkCellRadius/2. : There is offset of 1/2 cell
1537 : // 0.05+0.05 : Insulation gaps etc
1538 : // fgkSSBoundary (0.3) : Boundary frame
1539 : //double XB = 2.0*((fgkCellRadius/fgkSqroot3by2*fgkNcolUM2)-(fgkCellRadius*fgkSqroot3*(fgkNcolUM2-1)/6.)+(2.0*fgkGap)+(2.0*fgkGap)+fgkSSBoundary) + 0.075;
1540 :
1541 :
1542 :
1543 0 : fSMLengthay = 49.1;
1544 : //The total length in Y is due to the following components
1545 : // Factor 2 is because of 2 module length in Y for this type
1546 : // fgkCellRadius/fgkSqroot3by2)*fgkNrowUM1 (0.25/sqrt3/2 * 96): Total span of each module in Y
1547 : // of strips
1548 : // 0.05+0.05 : Insulation gaps etc
1549 : // fgkSSBoundary (0.3) : Boundary frame
1550 : // double YA = 2.0*(fgkNrowUM1*fgkCellRadius+fgkCellRadius/2.+(2.0*fgkGap)+(2.0*fgkGap)+fgkSSBoundary) + 0.05;
1551 :
1552 0 : fSMLengthby = 37.675;
1553 : //The total length in Y is due to the following components
1554 : // Factor 3 is because of 3 module length in Y for this type
1555 : // fgkCellRadius/fgkSqroot3by2)*fgkNrowUM2 (0.25/sqrt3/2 * 48): Total span of each module in Y
1556 : // of strips
1557 : // 0.05+0.05 : Insulation gaps etc
1558 : // fgkSSBoundary (0.3) : Boundary frame
1559 : //double YB = 3.0*((fgkNrowUM2*fgkCellRadius + fgkCellRadius/2.)+(2.0*fgkGap)+(2.0*fgkGap)+fgkSSBoundary) + (2.0*0.05);
1560 :
1561 :
1562 : //Thickness of a pre/veto plane
1563 0 : fDthick = fgkThSS/2. +0.15;
1564 :
1565 : //Thickness of the PMD ; 2.4 added for FEE boards
1566 0 : fSMthick = 2.0*(fgkThSS/2. +0.15)
1567 : +fgkThSteel/2.+fgkThLead/2.0 + 2.4;
1568 :
1569 :
1570 :
1571 0 : }
1572 : // ---------------------------------------------------------------
1573 : void AliPMDv2008::AddAlignableVolumes() const
1574 : {
1575 : //
1576 : // Create entries for alignable volumes associating the symbolic volume
1577 : // name with the corresponding volume path. Needs to be syncronized with
1578 : // eventual changes in the geometry.
1579 : //
1580 0 : SetSectorAlignable();
1581 :
1582 0 : }
1583 : // ----------------------------------------------------------------
1584 : void AliPMDv2008::SetSectorAlignable() const
1585 : {
1586 : //
1587 :
1588 0 : TString vpsector = "ALIC_1/EPM";
1589 0 : TString vpappend = "_1";
1590 :
1591 0 : TString snsector="PMD/Sector";
1592 :
1593 0 : TString volpath, symname;
1594 :
1595 0 : for(Int_t cnt=1; cnt<=4; cnt++){
1596 0 : volpath = vpsector;
1597 0 : volpath += cnt;
1598 0 : volpath += vpappend;
1599 0 : symname = snsector;
1600 0 : symname += cnt;
1601 0 : if(!gGeoManager->SetAlignableEntry(symname.Data(),volpath.Data()))
1602 : {
1603 0 : AliFatal("Unable to set alignable entry!");
1604 : }
1605 : }
1606 0 : }
1607 : // ------------------------------------------------------------------
|