]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PMD/AliPMDv2008.cxx
Fix funny signs in combo boxes
[u/mrichter/AliRoot.git] / PMD / AliPMDv2008.cxx
CommitLineData
8417fa6a 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// //
1f7f8a9c 20// Photon Multiplicity Detector Version 1 //
21// Bedanga Mohanty : February 14th 2006
8417fa6a 22// //
23//Begin_Html
24/*
25<img src="picts/AliPMDv1Class.gif">
26*/
27//End_Html
28// //
29///////////////////////////////////////////////////////////////////////////////
30////
31
f7a1cc68 32#include <Riostream.h>
dd6416aa 33#include <TGeoManager.h>
f7a1cc68 34#include <TGeoGlobalMagField.h>
8417fa6a 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
1f7f8a9c 44const Int_t AliPMDv2008::fgkNcolUM1 = 48; // Number of cols in UM, type 1
45const Int_t AliPMDv2008::fgkNcolUM2 = 96; // Number of cols in UM, type 2
46const Int_t AliPMDv2008::fgkNrowUM1 = 96; // Number of rows in UM, type 1
47const Int_t AliPMDv2008::fgkNrowUM2 = 48; // Number of rows in UM, type 2
48const Float_t AliPMDv2008::fgkCellRadius = 0.25; // Radius of a hexagonal cell
49const Float_t AliPMDv2008::fgkCellWall = 0.02; // Thickness of cell Wall
50const Float_t AliPMDv2008::fgkCellDepth = 0.50; // Gas thickness
51const Float_t AliPMDv2008::fgkThBase = 0.2; // Thickness of Base plate
52const Float_t AliPMDv2008::fgkThBKP = 0.1; // Thickness of Back plane
53const Float_t AliPMDv2008::fgkThAir = 1.03; // Thickness of Air
54const Float_t AliPMDv2008::fgkThPCB = 0.16; // Thickness of PCB
55const Float_t AliPMDv2008::fgkThLead = 1.5; // Thickness of Pb
56const Float_t AliPMDv2008::fgkThSteel = 0.5; // Thickness of Steel
57const Float_t AliPMDv2008::fgkGap = 0.025; // Air Gap
58const Float_t AliPMDv2008::fgkZdist = 361.5; // z-position of the detector
59const Float_t AliPMDv2008::fgkSqroot3 = 1.7320508;// Square Root of 3
60const Float_t AliPMDv2008::fgkSqroot3by2 = 0.8660254;// Square Root of 3 by 2
61const Float_t AliPMDv2008::fgkSSBoundary = 0.3;
62const Float_t AliPMDv2008::fgkThSS = 1.03;
63const Float_t AliPMDv2008::fgkThG10 = 1.03;
8417fa6a 64ClassImp(AliPMDv2008)
65
66//_____________________________________________________________________________
67AliPMDv2008::AliPMDv2008():
68 fSMthick(0.),
69 fDthick(0.),
70 fSMLengthax(0.),
71 fSMLengthay(0.),
72 fSMLengthbx(0.),
73 fSMLengthby(0.),
74 fMedSens(0)
75{
76 //
77 // Default constructor
78 //
79 for (Int_t i = 0; i < 3; i++)
80 {
81 fDboxmm1[i] = 0.;
82 fDboxmm12[i] = 0.;
83 fDboxmm2[i] = 0.;
84 fDboxmm22[i] = 0.;
85 }
86}
87
88//_____________________________________________________________________________
89AliPMDv2008::AliPMDv2008(const char *name, const char *title):
90 AliPMD(name,title),
91 fSMthick(0.),
92 fDthick(0.),
93 fSMLengthax(0.),
94 fSMLengthay(0.),
95 fSMLengthbx(0.),
96 fSMLengthby(0.),
97 fMedSens(0)
98{
99 //
100 // Standard constructor
101 //
102 for (Int_t i = 0; i < 3; i++)
103 {
104 fDboxmm1[i] = 0.;
105 fDboxmm12[i] = 0.;
106 fDboxmm2[i] = 0.;
107 fDboxmm22[i] = 0.;
108 }
109}
110
111//_____________________________________________________________________________
112void AliPMDv2008::CreateGeometry()
113{
114 // Create geometry for Photon Multiplicity Detector
115
116 GetParameters();
117 CreateSupermodule();
118 CreatePMD();
119}
120
121//_____________________________________________________________________________
122void 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 Int_t ihrotm,irotdm;
144 Float_t xb, yb, zb;
145
146 Int_t *idtmed = fIdtmed->GetArray()-599;
147
148 AliMatrix(ihrotm, 90., 30., 90., 120., 0., 0.);
149 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 Float_t hexd2[10] = {0.,360.,6,2,-0.25,0.,0.23,0.25,0.,0.23};
157 hexd2[4] = -fgkCellDepth/2.;
158 hexd2[7] = fgkCellDepth/2.;
159 hexd2[6] = fgkCellRadius - fgkCellWall;
160 hexd2[9] = fgkCellRadius - fgkCellWall;
161
2942f542 162 TVirtualMC::GetMC()->Gsvolu("ECAR", "PGON", idtmed[604], hexd2,10);
8417fa6a 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 Float_t hexd1[10] = {0.,360.,6,2,-0.25,0.,0.25,0.25,0.,0.25};
171 hexd1[4] = -fgkCellDepth/2.;
172 hexd1[7] = fgkCellDepth/2.;
173 hexd1[6] = fgkCellRadius;
174 hexd1[9] = fgkCellRadius;
175
2942f542 176 TVirtualMC::GetMC()->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10);
8417fa6a 177
178 // Place inner hex (sensitive volume) inside outer hex (copper)
179
2942f542 180 TVirtualMC::GetMC()->Gspos("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY");
8417fa6a 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 Float_t dbox1[3];
191 dbox1[0] = fgkCellRadius/fgkSqroot3by2;
192 dbox1[1] = fgkNrowUM1*fgkCellRadius;
193 dbox1[2] = fgkCellDepth/2.;
194
2942f542 195 TVirtualMC::GetMC()->Gsvolu("EST1","BOX", idtmed[698], dbox1, 3);
8417fa6a 196
197 // volume for second strip EST2
198
199
200 Float_t dbox2[3];
201 dbox2[1] = fgkNrowUM2*fgkCellRadius;
202 dbox2[0] = dbox1[0];
203 dbox2[2] = dbox1[2];
204
2942f542 205 TVirtualMC::GetMC()->Gsvolu("EST2","BOX", idtmed[698], dbox2, 3);
8417fa6a 206
207 // Place hexagonal cells ECCU placed inside EST1
208 xb = 0.;
209 zb = 0.;
210 yb = (dbox1[1]) - fgkCellRadius;
211 for (i = 1; i <= fgkNrowUM1; ++i)
212 {
213 number = i;
2942f542 214 TVirtualMC::GetMC()->Gspos("ECCU", number, "EST1", xb,yb,zb, 0, "ONLY");
8417fa6a 215 yb -= (fgkCellRadius*2.);
216 }
217
218 // Place hexagonal cells ECCU placed inside EST2
219 xb = 0.;
220 zb = 0.;
221 yb = (dbox2[1]) - fgkCellRadius;
222 for (i = 1; i <= fgkNrowUM2; ++i)
223 {
224 number = i;
2942f542 225 TVirtualMC::GetMC()->Gspos("ECCU", number, "EST2", xb,yb,zb, 0, "ONLY");
8417fa6a 226 //PH cout << "ECCU in EST2 ==> " << number << "\t"<<xb << "\t"<<yb <<endl;
227 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 Float_t dbox3[3];
249 dbox3[0] = (dbox1[0]*fgkNcolUM1)-(fgkCellRadius*fgkSqroot3*(fgkNcolUM1-1)/6.);
250 dbox3[1] = dbox1[1]+fgkCellRadius/2.;
251 dbox3[2] = fgkCellDepth/2.;
252
253 //Create a BOX, Material AIR
2942f542 254 TVirtualMC::GetMC()->Gsvolu("EHC1","BOX", idtmed[698], dbox3, 3);
8417fa6a 255 // Place rectangular strips EST1 inside EHC1 unit module
256 xb = dbox3[0]-dbox1[0];
257
258 for (j = 1; j <= fgkNcolUM1; ++j)
259 {
260 if(j%2 == 0)
261 {
262 yb = -fgkCellRadius/2.0;
263 }
264 else
265 {
266 yb = fgkCellRadius/2.0;
267 }
268 number = j;
2942f542 269 TVirtualMC::GetMC()->Gspos("EST1",number, "EHC1", xb, yb , 0. , 0, "MANY");
8417fa6a 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 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 dbox3[0] = (dbox1[0]*fgkNcolUM1)-(fgkCellRadius*fgkSqroot3*(fgkNcolUM1-1)/6.);
291 dbox3[1] = dbox1[1]+fgkCellRadius/2.;
292 dbox3[2] = fgkCellDepth/2.;
293
294 Float_t dbox4[3];
295
296 dbox4[0] =(dbox2[0]*fgkNcolUM2)-(fgkCellRadius*fgkSqroot3*(fgkNcolUM2-1)/6.);
297 dbox4[1] = dbox2[1] + fgkCellRadius/2.;
298 dbox4[2] = dbox3[2];
299
300 //Create a BOX of AIR
2942f542 301 TVirtualMC::GetMC()->Gsvolu("EHC2","BOX", idtmed[698], dbox4, 3);
8417fa6a 302
303 // Place rectangular strips EST2 inside EHC2 unit module
304 xb = dbox4[0]-dbox2[0];
305 for (j = 1; j <= fgkNcolUM2; ++j)
306 {
307 if(j%2 == 0)
308 {
309 yb = -fgkCellRadius/2.0;
310 }
311 else
312 {
313 yb = +fgkCellRadius/2.0;
314 }
315 number = j;
2942f542 316 TVirtualMC::GetMC()->Gspos("EST2",number, "EHC2", xb, yb , 0. ,0, "MANY");
8417fa6a 317 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 Float_t dboxPcbA[3];
350 dboxPcbA[0] = dbox3[0];
351 dboxPcbA[1] = dbox3[1];
352 dboxPcbA[2] = fgkThPCB/2.;
353
354 //Top and Bottom PCB is a BOX of Material G10
2942f542 355 TVirtualMC::GetMC()->Gsvolu("EPCA","BOX", idtmed[607], dboxPcbA, 3);
8417fa6a 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 Float_t dboxBPlaneA[3];
365 dboxBPlaneA[0] = dbox3[0];
366 dboxBPlaneA[1] = dbox3[1];
367 dboxBPlaneA[2] = fgkThBKP/2.;
368
369 //Back PLane PCB of MAterial G10
2942f542 370 TVirtualMC::GetMC()->Gsvolu("EBKA","BOX", idtmed[607], dboxBPlaneA, 3);
8417fa6a 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 Float_t dboxAir3A[3];
391 dboxAir3A[0] = dbox3[0]+(2.0*fgkGap);
392 dboxAir3A[1] = dbox3[1]+(2.0*fgkGap);
393 dboxAir3A[2] = fgkThAir/2.;
394
395 //FOR PRESHOWER
396 //Air gap is a BOX of Material Air
2942f542 397 TVirtualMC::GetMC()->Gsvolu("ECGA","BOX", idtmed[698], dboxAir3A, 3);
8417fa6a 398
399 //FOR VETO
400 //Air gap is a BOX of Material Air
2942f542 401 TVirtualMC::GetMC()->Gsvolu("ECVA","BOX", idtmed[698], dboxAir3A, 3);
8417fa6a 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 Float_t dboxGGA[3];
412 dboxGGA[0] = dboxAir3A[0]+(2.0*fgkGap);
413 dboxGGA[1] = dboxAir3A[1]+(2.0*fgkGap);
414 dboxGGA[2] = fgkThG10/2.;
415
416 //FOR PRESHOWER
417 //G10 BOX
2942f542 418 TVirtualMC::GetMC()->Gsvolu("EDGA","BOX", idtmed[607], dboxGGA, 3);
8417fa6a 419
420 //FOR VETO
421 //G10 BOX
2942f542 422 TVirtualMC::GetMC()->Gsvolu("EDVA","BOX", idtmed[607], dboxGGA, 3);
8417fa6a 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 Float_t dboxSS1[3];
436 dboxSS1[0] = dboxGGA[0]+fgkSSBoundary;
437 dboxSS1[1] = dboxGGA[1]+fgkSSBoundary;
438 dboxSS1[2] = fgkThSS/2.;
439
440 //FOR PRESHOWER
441
442 //Stainless Steel boundary - Material Stainless Steel
2942f542 443 TVirtualMC::GetMC()->Gsvolu("ESSA","BOX", idtmed[618], dboxSS1, 3);
8417fa6a 444
445 //FOR VETO
446 //Stainless Steel boundary - Material Stainless Steel
2942f542 447 TVirtualMC::GetMC()->Gsvolu("ESVA","BOX", idtmed[618], dboxSS1, 3);
8417fa6a 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
2942f542 485 TVirtualMC::GetMC()->Gspos("EDVA", 1, "ESVA", 0., 0., 0., 0, "ONLY");
486 TVirtualMC::GetMC()->Gspos("ECVA", 1, "EDVA", 0., 0., 0., 0, "ONLY");
8417fa6a 487
488//FOR PRESHOWER
2942f542 489 TVirtualMC::GetMC()->Gspos("EDGA", 1, "ESSA", 0., 0., 0., 0, "ONLY");
490 TVirtualMC::GetMC()->Gspos("ECGA", 1, "EDGA", 0., 0., 0., 0, "ONLY");
8417fa6a 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 Float_t zbpcb = -dboxAir3A[2] + (2.0*fgkGap) + fgkThPCB/2.;
2942f542 498 TVirtualMC::GetMC()->Gspos("EPCA", 1, "ECVA", 0., 0., zbpcb, 0, "ONLY");
8417fa6a 499 //Positioning the Honey Comb 0.5 cm
500 Float_t zhc = zbpcb + fgkThPCB/2. + fgkCellDepth/2.;
2942f542 501 TVirtualMC::GetMC()->Gspos("EHC1", 1, "ECVA", 0., 0., zhc, 0, "ONLY");
8417fa6a 502 //Positioning the Top PCB 0.16 cm
503 Float_t ztpcb = zhc + fgkCellDepth/2 + fgkThPCB/2.;
2942f542 504 TVirtualMC::GetMC()->Gspos("EPCA", 2, "ECVA", 0., 0., ztpcb, 0, "ONLY");
8417fa6a 505
506
507 //For Preshower plane the ordering is reversed
508 //Positioning the Bottom 0.16 cm PCB
509 zbpcb = -dboxAir3A[2] + fgkThPCB + fgkThPCB/2.;
2942f542 510 TVirtualMC::GetMC()->Gspos("EPCA", 1, "ECGA", 0., 0., zbpcb, 0, "ONLY");
8417fa6a 511 //Positioning the Honey Comb 0.5 cm
512 zhc = zbpcb + fgkThPCB/2. + fgkCellDepth/2.;
2942f542 513 TVirtualMC::GetMC()->Gspos("EHC1", 1, "ECGA", 0., 0., zhc, 0, "ONLY");
8417fa6a 514 //Positioning the Top PCB 0.16 cm
515 ztpcb = zhc + fgkCellDepth/2 + fgkThPCB/2.;
2942f542 516 TVirtualMC::GetMC()->Gspos("EPCA", 2, "ECGA", 0., 0., ztpcb, 0, "ONLY");
8417fa6a 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 Float_t dboxUM1[3];
531 dboxUM1[0] = dboxSS1[0];
532 dboxUM1[1] = dboxSS1[1];
533 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
2942f542 538 TVirtualMC::GetMC()->Gsvolu("EUM1","BOX", idtmed[698], dboxUM1, 3);
8417fa6a 539 //FOR VETO
2942f542 540 TVirtualMC::GetMC()->Gsvolu("EUV1","BOX", idtmed[698], dboxUM1, 3);
8417fa6a 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 Float_t dboxBaseA[3];
550 dboxBaseA[0] = dboxSS1[0];
551 dboxBaseA[1] = dboxSS1[1];
552 dboxBaseA[2] = fgkThBase/2.;
553
554 //Base Blate is a G10 BOX
2942f542 555 TVirtualMC::GetMC()->Gsvolu("EBPA","BOX", idtmed[607], dboxBaseA, 3);
8417fa6a 556 //----------------------------------------------------//
557
558 //FOR VETO
559 //- Placing of all components of UM in AIR BOX EUM1--//
560 //(1) FIRST PUT THE BASE PLATE
561 Float_t zbaseplate = -dboxUM1[2] + fgkThBase/2.;
2942f542 562 TVirtualMC::GetMC()->Gspos("EBPA", 1, "EUV1", 0., 0., zbaseplate, 0, "ONLY");
8417fa6a 563
564 //(2) NEXT PLACING the SS BOX
565 Float_t zss = zbaseplate + fgkThBase/2. + fgkThSS/2.;
2942f542 566 TVirtualMC::GetMC()->Gspos("ESVA", 1, "EUV1", 0., 0., zss, 0, "ONLY");
8417fa6a 567
568 // (3) Positioning the Backplane PCB 0.1 cm
569 Float_t zbkp = zss + fgkThSS/2. + fgkThBKP/2.;
2942f542 570 TVirtualMC::GetMC()->Gspos("EBKA", 1, "EUV1", 0., 0., zbkp, 0, "ONLY");
8417fa6a 571
572 //FOR PRESHOWER
573 // (3) Positioning the Backplane PCB 0.1 cm
574 zbkp = -dboxUM1[2] + fgkThBKP/2.;
2942f542 575 TVirtualMC::GetMC()->Gspos("EBKA", 1, "EUM1", 0., 0., zbkp, 0, "ONLY");
8417fa6a 576
577 //(2) NEXT PLACING the SS BOX
578 zss = zbkp + fgkThBKP/2. + fgkThSS/2.;
2942f542 579 TVirtualMC::GetMC()->Gspos("ESSA", 1, "EUM1", 0., 0., zss, 0, "ONLY");
8417fa6a 580
581 //(1) FIRST PUT THE BASE PLATE
582 zbaseplate = zss + fgkThSS/2 + fgkThBase/2.;
2942f542 583 TVirtualMC::GetMC()->Gspos("EBPA", 1, "EUM1", 0., 0., zbaseplate, 0, "ONLY");
8417fa6a 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 Float_t dboxPcbB[3];
598 dboxPcbB[0] = dbox4[0];
599 dboxPcbB[1] = dbox4[1];
600 dboxPcbB[2] = fgkThPCB/2.;
601
602 //Top and Bottom PCB is a BOX of Material G10
2942f542 603 TVirtualMC::GetMC()->Gsvolu("EPCB","BOX", idtmed[607], dboxPcbB, 3);
8417fa6a 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 Float_t dboxBPlaneB[3];
613 dboxBPlaneB[0] = dbox4[0];
614 dboxBPlaneB[1] = dbox4[1];
615 dboxBPlaneB[2] = fgkThBKP/2.;
616
617 //Back PLane PCB of MAterial G10
2942f542 618 TVirtualMC::GetMC()->Gsvolu("EBKB","BOX", idtmed[607], dboxBPlaneB, 3);
8417fa6a 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 Float_t dboxAir3B[3];
637 dboxAir3B[0] = dbox4[0]+(2.0*fgkGap);
638 dboxAir3B[1] = dbox4[1]+(2.0*fgkGap);
639 dboxAir3B[2] = fgkThAir/2.;
640
641 //PRESHOWER
642 //Air gap is a BOX of Material Air
2942f542 643 TVirtualMC::GetMC()->Gsvolu("ECGB","BOX", idtmed[698], dboxAir3B, 3);
8417fa6a 644 //VETO
2942f542 645 TVirtualMC::GetMC()->Gsvolu("ECVB","BOX", idtmed[698], dboxAir3B, 3);
8417fa6a 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 Float_t dboxGGB[3];
657 dboxGGB[0] = dboxAir3B[0]+(2.0*fgkGap);
658 dboxGGB[1] = dboxAir3B[1]+(2.0*fgkGap);
659 dboxGGB[2] = fgkThG10/2.;
660
661 //PRESHOWER
662 //G10 BOX
2942f542 663 TVirtualMC::GetMC()->Gsvolu("EDGB","BOX", idtmed[607], dboxGGB, 3);
8417fa6a 664 //VETO
2942f542 665 TVirtualMC::GetMC()->Gsvolu("EDVB","BOX", idtmed[607], dboxGGB, 3);
8417fa6a 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 Float_t dboxSS2[3];
678 dboxSS2[0] = dboxGGB[0] + fgkSSBoundary;
679 dboxSS2[1] = dboxGGB[1] + fgkSSBoundary;
680 dboxSS2[2] = fgkThSS/2.;
681
682 //PRESHOWER
683 //Stainless Steel boundary - Material Stainless Steel
2942f542 684 TVirtualMC::GetMC()->Gsvolu("ESSB","BOX", idtmed[618], dboxSS2, 3);
8417fa6a 685 //VETO
2942f542 686 TVirtualMC::GetMC()->Gsvolu("ESVB","BOX", idtmed[618], dboxSS2, 3);
8417fa6a 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
2942f542 722 TVirtualMC::GetMC()->Gspos("EDGB", 1, "ESSB", 0., 0., 0., 0, "ONLY");
723 TVirtualMC::GetMC()->Gspos("ECGB", 1, "EDGB", 0., 0., 0., 0, "ONLY");
8417fa6a 724 //VETO
2942f542 725 TVirtualMC::GetMC()->Gspos("EDVB", 1, "ESVB", 0., 0., 0., 0, "ONLY");
726 TVirtualMC::GetMC()->Gspos("ECVB", 1, "EDVB", 0., 0., 0., 0, "ONLY");
8417fa6a 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 Float_t zbpcb2 = -dboxAir3B[2] + (2.0*fgkGap) + fgkThPCB/2.;
2942f542 734 TVirtualMC::GetMC()->Gspos("EPCB", 1, "ECVB", 0., 0., zbpcb2, 0, "ONLY");
8417fa6a 735 //Positioning the Honey Comb 0.5 cm
736 Float_t zhc2 = zbpcb2 + fgkThPCB/2. + fgkCellDepth/2.;
2942f542 737 TVirtualMC::GetMC()->Gspos("EHC2", 1, "ECVB", 0., 0., zhc2, 0, "ONLY");
8417fa6a 738 //Positioning the Top PCB 0.16 cm
739 Float_t ztpcb2 = zhc2 + fgkCellDepth/2 + fgkThPCB/2.;
2942f542 740 TVirtualMC::GetMC()->Gspos("EPCB", 2, "ECVB", 0., 0., ztpcb2, 0, "ONLY");
8417fa6a 741
742 //PRESHOWER
743 //For preshower plane the ordering is reversed
744 //Positioning the Bottom 0.16 cm PCB
745 zbpcb2 = -dboxAir3B[2] + fgkThPCB + fgkThPCB/2.;
2942f542 746 TVirtualMC::GetMC()->Gspos("EPCB", 1, "ECGB", 0., 0., zbpcb2, 0, "ONLY");
8417fa6a 747 //Positioning the Honey Comb 0.5 cm
748 zhc2 = zbpcb2 + fgkThPCB/2. + fgkCellDepth/2.;
2942f542 749 TVirtualMC::GetMC()->Gspos("EHC2", 1, "ECGB", 0., 0., zhc2, 0, "ONLY");
8417fa6a 750 //Positioning the Top PCB 0.16 cm
751 ztpcb2 = zhc2 + fgkCellDepth/2 + fgkThPCB/2.;
2942f542 752 TVirtualMC::GetMC()->Gspos("EPCB", 2, "ECGB", 0., 0., ztpcb2, 0, "ONLY");
8417fa6a 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 Float_t dboxUM2[3];
767 dboxUM2[0] = dboxSS2[0];
768 dboxUM2[1] = dboxSS2[1];
769 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
2942f542 774 TVirtualMC::GetMC()->Gsvolu("EUM2","BOX", idtmed[698], dboxUM2, 3);
8417fa6a 775
776 //VETO
2942f542 777 TVirtualMC::GetMC()->Gsvolu("EUV2","BOX", idtmed[698], dboxUM2, 3);
8417fa6a 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 Float_t dboxBaseB[3];
786 dboxBaseB[0] = dboxSS2[0];
787 dboxBaseB[1] = dboxSS2[1];
788 dboxBaseB[2] = fgkThBase/2.;
789
790 //Base Blate is a G10 BOX
2942f542 791 TVirtualMC::GetMC()->Gsvolu("EBPB","BOX", idtmed[607], dboxBaseB, 3);
8417fa6a 792 //----------------------------------------------------//
793
794 //VETO
795 //- Placing of all components of UM in AIR BOX EUM2--//
796 //(1) FIRST PUT THE BASE PLATE
797 Float_t zbaseplate2 = -dboxUM2[2] + fgkThBase/2.;
2942f542 798 TVirtualMC::GetMC()->Gspos("EBPB", 1, "EUV2", 0., 0., zbaseplate2, 0, "ONLY");
8417fa6a 799
800 //(2) NEXT PLACING the SS BOX
801 Float_t zss2 = zbaseplate2 + fgkThBase/2. + fgkThSS/2.;
2942f542 802 TVirtualMC::GetMC()->Gspos("ESVB", 1, "EUV2", 0., 0., zss2, 0, "ONLY");
8417fa6a 803
804 // (3) Positioning the Backplane PCB 0.1 cm
805 Float_t zbkp2 = zss2 + fgkThSS/2. + fgkThBKP/2.;
2942f542 806 TVirtualMC::GetMC()->Gspos("EBKB", 1, "EUV2", 0., 0., zbkp2, 0, "ONLY");
8417fa6a 807
808
809
810 //FOR PRESHOWER
811 // (3) Positioning the Backplane PCB 0.1 cm
812 zbkp2 = -dboxUM2[2] + fgkThBKP/2.;
2942f542 813 TVirtualMC::GetMC()->Gspos("EBKB", 1, "EUM2", 0., 0., zbkp2, 0, "ONLY");
8417fa6a 814
815 //(2) NEXT PLACING the SS BOX
816 zss2 = zbkp2 + fgkThBKP/2. + fgkThSS/2.;
2942f542 817 TVirtualMC::GetMC()->Gspos("ESSB", 1, "EUM2", 0., 0., zss2, 0, "ONLY");
8417fa6a 818
819 //(1) FIRST PUT THE BASE PLATE
820 zbaseplate2 = zss2 + fgkThSS/2 + fgkThBase/2.;
2942f542 821 TVirtualMC::GetMC()->Gspos("EBPB", 1, "EUM2", 0., 0., zbaseplate2, 0, "ONLY");
8417fa6a 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 Float_t dboxPba[3];
833 dboxPba[0] = dboxUM1[0];
834 dboxPba[1] = dboxUM1[1];
835 dboxPba[2] = fgkThLead/2.;
836 // Lead of UM dimension
2942f542 837 TVirtualMC::GetMC()->Gsvolu("EPB1","BOX", idtmed[600], dboxPba, 3);
8417fa6a 838
839 Float_t dboxPbb[3];
840 dboxPbb[0] = dboxUM2[0];
841 dboxPbb[1] = dboxUM2[1];
842 dboxPbb[2] = fgkThLead/2.;
843 // Lead of UM dimension
2942f542 844 TVirtualMC::GetMC()->Gsvolu("EPB2","BOX", idtmed[600], dboxPbb, 3);
8417fa6a 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 Float_t dboxSM1[3];
857 dboxSM1[0] = 3.0*dboxUM1[0] + (2.0*0.075);
858 dboxSM1[1] = 2.0*dboxUM1[1] + 0.05;
859 dboxSM1[2] = dboxUM1[2];
860
861 //FOR PRESHOWER
2942f542 862 TVirtualMC::GetMC()->Gsvolu("ESMA","BOX", idtmed[698], dboxSM1, 3);
8417fa6a 863
864 //FOR VETO
2942f542 865 TVirtualMC::GetMC()->Gsvolu("EMVA","BOX", idtmed[698], dboxSM1, 3);
8417fa6a 866
867 //Position the 6 unit modules in EMSA
868 Float_t xa1,xa2,xa3,ya1,ya2;
869 xa1 = dboxSM1[0] - dboxUM1[0];
870 xa2 = xa1 - dboxUM1[0] - 0.15 - dboxUM1[0];
871 xa3 = xa2 - dboxUM1[0] - 0.15 - dboxUM1[0];
872 ya1 = dboxSM1[1] - dboxUM1[1];
873 ya2 = ya1 - dboxUM1[1] - 0.1 - dboxUM1[1];
874
875 //PRESHOWER
2942f542 876 // TVirtualMC::GetMC()->Gspos("EUM1", 1, "ESMA", xa1, ya1, 0., 0, "ONLY"); // BKN
877 TVirtualMC::GetMC()->Gspos("EUM1", 2, "ESMA", xa2, ya1, 0., 0, "ONLY");
878 TVirtualMC::GetMC()->Gspos("EUM1", 3, "ESMA", xa3, ya1, 0., 0, "ONLY");
879 TVirtualMC::GetMC()->Gspos("EUM1", 4, "ESMA", xa1, ya2, 0., 0, "ONLY");
880 TVirtualMC::GetMC()->Gspos("EUM1", 5, "ESMA", xa2, ya2, 0., 0, "ONLY");
881 TVirtualMC::GetMC()->Gspos("EUM1", 6, "ESMA", xa3, ya2, 0., 0, "ONLY");
8417fa6a 882
883 //VETO
2942f542 884 TVirtualMC::GetMC()->Gspos("EUV1", 1, "EMVA", xa1, ya1, 0., 0, "ONLY");
885 TVirtualMC::GetMC()->Gspos("EUV1", 2, "EMVA", xa2, ya1, 0., 0, "ONLY");
886 TVirtualMC::GetMC()->Gspos("EUV1", 3, "EMVA", xa3, ya1, 0., 0, "ONLY");
887 TVirtualMC::GetMC()->Gspos("EUV1", 4, "EMVA", xa1, ya2, 0., 0, "ONLY");
888 TVirtualMC::GetMC()->Gspos("EUV1", 5, "EMVA", xa2, ya2, 0., 0, "ONLY");
889 TVirtualMC::GetMC()->Gspos("EUV1", 6, "EMVA", xa3, ya2, 0., 0, "ONLY");
8417fa6a 890
891
892 // volume for SUPERMODULE ESMB
893 //Space is added to provide a gapping for HV between UM's
894 Float_t dboxSM2[3];
895 dboxSM2[0] = 2.0*dboxUM2[0] + 0.075;
896 dboxSM2[1] = 3.0*dboxUM2[1] + (2.0*0.05);
897 dboxSM2[2] = dboxUM2[2];
898
899 //PRESHOWER
2942f542 900 TVirtualMC::GetMC()->Gsvolu("ESMB","BOX", idtmed[698], dboxSM2, 3);
8417fa6a 901 //VETO
2942f542 902 TVirtualMC::GetMC()->Gsvolu("EMVB","BOX", idtmed[698], dboxSM2, 3);
8417fa6a 903
904 //Position the 6 unit modules in EMSB
905 Float_t xb1,xb2,yb1,yb2,yb3;
906 xb1 = dboxSM2[0] - dboxUM2[0];
907 xb2 = xb1 - dboxUM2[0] - 0.15 - dboxUM2[0];
908 yb1 = dboxSM2[1] - dboxUM2[1];
909 yb2 = yb1 - dboxUM2[1] - 0.1 - dboxUM2[1];
910 yb3 = yb2 - dboxUM2[1] - 0.1 - dboxUM2[1];
911
912
913 //PRESHOWER
2942f542 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 TVirtualMC::GetMC()->Gspos("EUM2", 3, "ESMB", xb1, yb2, 0., 0, "ONLY");
917 TVirtualMC::GetMC()->Gspos("EUM2", 4, "ESMB", xb2, yb2, 0., 0, "ONLY");
918 TVirtualMC::GetMC()->Gspos("EUM2", 5, "ESMB", xb1, yb3, 0., 0, "ONLY");
919 TVirtualMC::GetMC()->Gspos("EUM2", 6, "ESMB", xb2, yb3, 0., 0, "ONLY");
8417fa6a 920
921 //VETO
2942f542 922 TVirtualMC::GetMC()->Gspos("EUV2", 1, "EMVB", xb1, yb1, 0., 0, "ONLY");
923 TVirtualMC::GetMC()->Gspos("EUV2", 2, "EMVB", xb2, yb1, 0., 0, "ONLY");
924 TVirtualMC::GetMC()->Gspos("EUV2", 3, "EMVB", xb1, yb2, 0., 0, "ONLY");
925 TVirtualMC::GetMC()->Gspos("EUV2", 4, "EMVB", xb2, yb2, 0., 0, "ONLY");
926 TVirtualMC::GetMC()->Gspos("EUV2", 5, "EMVB", xb1, yb3, 0., 0, "ONLY");
927 TVirtualMC::GetMC()->Gspos("EUV2", 6, "EMVB", xb2, yb3, 0., 0, "ONLY");
8417fa6a 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 Float_t dboxSMPb1[3];
939 dboxSMPb1[0] = 3.0*dboxUM1[0] + (2.0*0.075);
940 dboxSMPb1[1] = 2.0*dboxUM1[1] + 0.05;
941 dboxSMPb1[2] = fgkThLead/2.;
942
2942f542 943 TVirtualMC::GetMC()->Gsvolu("ESPA","BOX", idtmed[698], dboxSMPb1, 3);
8417fa6a 944
945
946 //Position the 6 unit modules in ESMPbA
947 Float_t xpa1,xpa2,xpa3,ypa1,ypa2;
948 xpa1 = -dboxSMPb1[0] + dboxUM1[0];
949 xpa2 = xpa1 + dboxUM1[0] + 0.15 + dboxUM1[0];
950 xpa3 = xpa2 + dboxUM1[0] + 0.15 + dboxUM1[0];
951 ypa1 = dboxSMPb1[1] - dboxUM1[1];
952 ypa2 = ypa1 - dboxUM1[1] - 0.1 - dboxUM1[1];
953
954
2942f542 955 TVirtualMC::GetMC()->Gspos("EPB1", 1, "ESPA", xpa1, ypa1, 0., 0, "ONLY");
956 TVirtualMC::GetMC()->Gspos("EPB1", 2, "ESPA", xpa2, ypa1, 0., 0, "ONLY");
957 TVirtualMC::GetMC()->Gspos("EPB1", 3, "ESPA", xpa3, ypa1, 0., 0, "ONLY");
958 TVirtualMC::GetMC()->Gspos("EPB1", 4, "ESPA", xpa1, ypa2, 0., 0, "ONLY");
959 TVirtualMC::GetMC()->Gspos("EPB1", 5, "ESPA", xpa2, ypa2, 0., 0, "ONLY");
960 TVirtualMC::GetMC()->Gspos("EPB1", 6, "ESPA", xpa3, ypa2, 0., 0, "ONLY");
8417fa6a 961
962
963 // volume for SUPERMODULE ESMPbB
964 //Space is added to provide a gapping for HV between UM's
965 Float_t dboxSMPb2[3];
966 dboxSMPb2[0] = 2.0*dboxUM2[0] + 0.075;
967 dboxSMPb2[1] = 3.0*dboxUM2[1] + (2.0*0.05);
968 dboxSMPb2[2] = fgkThLead/2.;
969
2942f542 970 TVirtualMC::GetMC()->Gsvolu("ESPB","BOX", idtmed[698], dboxSMPb2, 3);
8417fa6a 971
972 //Position the 6 unit modules in ESMPbB
973 Float_t xpb1,xpb2,ypb1,ypb2,ypb3;
974 xpb1 = -dboxSMPb2[0] + dboxUM2[0];
975 xpb2 = xpb1 + dboxUM2[0] + 0.15 + dboxUM2[0];
976 ypb1 = dboxSMPb2[1] - dboxUM2[1];
977 ypb2 = ypb1 - dboxUM2[1] - 0.1 - dboxUM2[1];
978 ypb3 = ypb2 - dboxUM2[1] - 0.1 - dboxUM2[1];
979
980
2942f542 981 TVirtualMC::GetMC()->Gspos("EPB2", 1, "ESPB", xpb1, ypb1, 0., 0, "ONLY");
982 TVirtualMC::GetMC()->Gspos("EPB2", 2, "ESPB", xpb2, ypb1, 0., 0, "ONLY");
983 TVirtualMC::GetMC()->Gspos("EPB2", 3, "ESPB", xpb1, ypb2, 0., 0, "ONLY");
984 TVirtualMC::GetMC()->Gspos("EPB2", 4, "ESPB", xpb2, ypb2, 0., 0, "ONLY");
985 TVirtualMC::GetMC()->Gspos("EPB2", 5, "ESPB", xpb1, ypb3, 0., 0, "ONLY");
986 TVirtualMC::GetMC()->Gspos("EPB2", 6, "ESPB", xpb2, ypb3, 0., 0, "ONLY");
8417fa6a 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 Float_t dboxFEE[3];
999 dboxFEE[0] = 0.05;
1000 dboxFEE[1] = 3.50;
1001 dboxFEE[2] = 1.20;
1002
2942f542 1003 TVirtualMC::GetMC()->Gsvolu("EFEE","BOX", idtmed[607], dboxFEE, 3);
8417fa6a 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 Float_t dboxFEEBPlaneA[3];
1013 dboxFEEBPlaneA[0] = dboxBPlaneA[0]; //dbox3[0];
1014 dboxFEEBPlaneA[1] = dboxBPlaneA[1];//dbox3[1];
1015 dboxFEEBPlaneA[2] = 1.2;
1016
1017 //Volume of same dimension as Back PLane of Material AIR
2942f542 1018 TVirtualMC::GetMC()->Gsvolu("EFBA","BOX", idtmed[698], dboxFEEBPlaneA, 3);
8417fa6a 1019
1020 //TYPE B
1021 Float_t dboxFEEBPlaneB[3];
1022 dboxFEEBPlaneB[0] = dboxBPlaneB[0]; //dbox4[0];
1023 dboxFEEBPlaneB[1] = dboxBPlaneB[1];//dbox4[1];
1024 dboxFEEBPlaneB[2] = 1.2;
1025
1026 //Back PLane PCB of MAterial G10
2942f542 1027 TVirtualMC::GetMC()->Gsvolu("EFBB","BOX", idtmed[698], dboxFEEBPlaneB, 3);
8417fa6a 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 yFee = dboxFEEBPlaneA[1] - yA;
1046 for (i = 1; i <= 6; ++i)
1047 {
1048 xFee = -dboxFEEBPlaneA[0] + xA;
1049 for (j = 1; j <= 12; ++j)
1050 {
2942f542 1051 TVirtualMC::GetMC()->Gspos("EFEE", number, "EFBA", xFee,yFee,zFee, 0, "ONLY");
8417fa6a 1052 xFee += xSepa;
1053 number += 1;
1054 }
1055 yFee -= ySepa;
1056 }
1057 // FEE Boards EFEE placed inside EFBB
1058 number = 1;
1059 yFee = dboxFEEBPlaneB[1] - yA;
1060 for (i = 1; i <= 3; ++i)
1061 {
1062 xFee = -dboxFEEBPlaneB[0] + xA;
1063 for (j = 1; j <= 24; ++j)
1064 {
2942f542 1065 TVirtualMC::GetMC()->Gspos("EFEE", number, "EFBB", xFee,yFee,zFee, 0, "ONLY");
8417fa6a 1066 xFee += xSepa;
1067 number += 1;
1068 }
1069 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 Float_t dboxEFSA[3];
1076 dboxEFSA[0] = 3.0*dboxFEEBPlaneA[0] + 0.92;
1077 dboxEFSA[1] = 2.0*dboxFEEBPlaneA[1] + (0.95/2.0);
1078 dboxEFSA[2] = dboxFEEBPlaneA[2];
1079
1080 //Type A
2942f542 1081 TVirtualMC::GetMC()->Gsvolu("EFSA","BOX", idtmed[698],dboxEFSA, 3);
8417fa6a 1082
1083 //Distance between the two backplanes of two UMs
1084 //in x-direction is 0.92 and ydirection is 0.95
1085 Float_t dboxEFSB[3];
1086 dboxEFSB[0] = 2.0*dboxFEEBPlaneB[0] + (0.938/2.0);
1087 dboxEFSB[1] = 3.0*dboxFEEBPlaneB[1] + 1.05;
1088 dboxEFSB[2] = dboxFEEBPlaneB[2];
1089
1090 //Type A
2942f542 1091 TVirtualMC::GetMC()->Gsvolu("EFSB","BOX", idtmed[698],dboxEFSB, 3);
8417fa6a 1092
1093
1094 Float_t xfs1,xfs2,xfs3,yfs1,yfs2,yfs3;
1095 xfs1 = -dboxEFSA[0] + dboxFEEBPlaneA[0];
1096 xfs2 = xfs1 + dboxFEEBPlaneA[0] + 0.92 + dboxFEEBPlaneA[0];
1097 xfs3 = xfs2 + dboxFEEBPlaneA[0] + 0.92 + dboxFEEBPlaneA[0];
1098 yfs1 = dboxEFSA[1] - dboxFEEBPlaneA[1];
1099 yfs2 = yfs1 - dboxFEEBPlaneA[1] - 0.95 - dboxFEEBPlaneA[1];
1100
1101
1102
2942f542 1103 // TVirtualMC::GetMC()->Gspos("EFBA", 1, "EFSA", xfs1, yfs1, 0., 0, "ONLY"); // BKN
1104 TVirtualMC::GetMC()->Gspos("EFBA", 2, "EFSA", xfs2, yfs1, 0., 0, "ONLY");
1105 TVirtualMC::GetMC()->Gspos("EFBA", 3, "EFSA", xfs3, yfs1, 0., 0, "ONLY");
1106 TVirtualMC::GetMC()->Gspos("EFBA", 4, "EFSA", xfs1, yfs2, 0., 0, "ONLY");
1107 TVirtualMC::GetMC()->Gspos("EFBA", 5, "EFSA", xfs2, yfs2, 0., 0, "ONLY");
1108 TVirtualMC::GetMC()->Gspos("EFBA", 6, "EFSA", xfs3, yfs2, 0., 0, "ONLY");
8417fa6a 1109
1110
1111 //Type B positioning
1112
1113 xfs1 = -dboxEFSB[0] + dboxFEEBPlaneB[0];
1114 xfs2 = xfs1 + dboxFEEBPlaneB[0] + 0.938 + dboxFEEBPlaneB[0];
1115 yfs1 = dboxEFSB[1] - dboxFEEBPlaneB[1];
1116 yfs2 = yfs1 - dboxFEEBPlaneB[1] - 1.05 - dboxFEEBPlaneB[1];
1117 yfs3 = yfs2 - dboxFEEBPlaneB[1] - 1.05 - dboxFEEBPlaneB[1];
1118
1119
1120
2942f542 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 TVirtualMC::GetMC()->Gspos("EFBB", 3, "EFSB", xfs1, yfs2, 0., 0, "ONLY");
1124 TVirtualMC::GetMC()->Gspos("EFBB", 4, "EFSB", xfs2, yfs2, 0., 0, "ONLY");
1125 TVirtualMC::GetMC()->Gspos("EFBB", 5, "EFSB", xfs1, yfs3, 0., 0, "ONLY");
1126 TVirtualMC::GetMC()->Gspos("EFBB", 6, "EFSB", xfs2, yfs3, 0., 0, "ONLY");
8417fa6a 1127
1128
1129}
1130
1131//_____________________________________________________________________________
1132
1133void AliPMDv2008::CreatePMD()
1134{
1135 //
1136 // Create final detector from supermodules
1137 // -- Author : Bedanga and Viyogi June 2003
1138
1139 Float_t zp;
1140 Int_t jhrot12,jhrot13, irotdm;
1141 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 Float_t dboxFea[3];
1148 dboxFea[0] = fSMLengthax;
1149 dboxFea[1] = fSMLengthay;
1150 dboxFea[2] = fgkThSteel/2.;
1151
2942f542 1152 TVirtualMC::GetMC()->Gsvolu("EFEA","BOX", idtmed[618], dboxFea, 3);
8417fa6a 1153
1154 // --- DEFINE Iron volumes for SM B
1155
1156 // Fe Support
1157 Float_t dboxFeb[3];
1158 dboxFeb[0] = fSMLengthbx;
1159 dboxFeb[1] = fSMLengthby;
1160 dboxFeb[2] = fgkThSteel/2.;
1161
2942f542 1162 TVirtualMC::GetMC()->Gsvolu("EFEB","BOX", idtmed[618], dboxFeb, 3);
8417fa6a 1163
1164 AliMatrix(irotdm, 90., 0., 90., 90., 180., 0.);
1165 AliMatrix(jhrot12, 90., 180., 90., 270., 0., 0.);
1166 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 Float_t gaspmd[3];
1174 gaspmd[0] = fSMLengthax;
1175 gaspmd[1] = fSMLengthay;
1176 gaspmd[2] = fSMthick;
1177
2942f542 1178 TVirtualMC::GetMC()->Gsvolu("EPM1", "BOX", idtmed[698], gaspmd, 3);
1179 TVirtualMC::GetMC()->Gsvolu("EPM2", "BOX", idtmed[698], gaspmd, 3);
8417fa6a 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 zfee=-gaspmd[2] + 1.2;
1196
1197 /*
2942f542 1198 TVirtualMC::GetMC()->Gspos("EFSA", 1, "EPM1", 0., 0., zfee, 0, "ONLY");
1199 TVirtualMC::GetMC()->Gspos("EFSA", 2, "EPM2", 0., 0., zfee, jhrot12, "ONLY");
8417fa6a 1200 */
1201
1202 //VETO
1203
1204 zcva = zfee + 1.2 + fDthick;
1205
1206 /*
2942f542 1207 TVirtualMC::GetMC()->Gspos("EMVA", 1, "EPM1", 0., 0., zcva, 0, "ONLY");
1208 TVirtualMC::GetMC()->Gspos("EMVA", 2, "EPM2", 0., 0., zcva, jhrot12, "ONLY");
8417fa6a 1209 */
1210
1211
1212
1213 //Iron support
1214 zfea = zcva + fDthick + fgkThSteel/2.;
2942f542 1215 TVirtualMC::GetMC()->Gspos("EFEA", 1, "EPM1", 0., 0., zfea, 0, "ONLY");
1216 //TVirtualMC::GetMC()->Gspos("EFEA", 2, "EPM2", 0., 0., zfea, 0, "ONLY");
8417fa6a 1217 //Lead
1218 zpba=zfea+fgkThSteel/2.+ fgkThLead/2.;
2942f542 1219 TVirtualMC::GetMC()->Gspos("ESPA", 1, "EPM1", 0., 0., zpba, 0, "ONLY");
1220 //TVirtualMC::GetMC()->Gspos("ESPA", 2, "EPM2", 0., 0., zpba, 0, "ONLY");
8417fa6a 1221 //Preshower
1222 zpsa = zpba + fgkThLead/2. + fDthick;
2942f542 1223 TVirtualMC::GetMC()->Gspos("ESMA", 1, "EPM1", 0., 0., zpsa, 0, "ONLY");
1224 //TVirtualMC::GetMC()->Gspos("ESMA", 2, "EPM2", 0., 0., zpsa, jhrot12, "ONLY");
8417fa6a 1225 //FEE boards
1226 zfee=zpsa + fDthick + 1.2;
2942f542 1227 TVirtualMC::GetMC()->Gspos("EFSA", 3, "EPM1", 0., 0., zfee, 0, "ONLY");
1228 //TVirtualMC::GetMC()->Gspos("EFSA", 4, "EPM2", 0., 0., zfee, jhrot12, "ONLY");
8417fa6a 1229
1230
1231 //TYPE - B
1232 gaspmd[0] = fSMLengthbx;
1233 gaspmd[1] = fSMLengthby;
1234 gaspmd[2] = fSMthick;
1235
2942f542 1236 TVirtualMC::GetMC()->Gsvolu("EPM3", "BOX", idtmed[698], gaspmd, 3);
1237 TVirtualMC::GetMC()->Gsvolu("EPM4", "BOX", idtmed[698], gaspmd, 3);
8417fa6a 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 zfee=-gaspmd[2] + 1.2;
1250
1251 /*
2942f542 1252 TVirtualMC::GetMC()->Gspos("EFSB", 5, "EPM3", 0., 0., zfee, 0, "ONLY");
1253 TVirtualMC::GetMC()->Gspos("EFSB", 6, "EPM4", 0., 0., zfee, jhrot12, "ONLY");
8417fa6a 1254 */
1255
1256 zcvb= zfee + 1.2 + fDthick;
1257
1258 //VETO
1259 /*
2942f542 1260 TVirtualMC::GetMC()->Gspos("EMVB", 3, "EPM3", 0., 0., zcvb, 0, "ONLY");
1261 TVirtualMC::GetMC()->Gspos("EMVB", 4, "EPM4", 0., 0., zcvb, jhrot12, "ONLY");
8417fa6a 1262 */
1263
1264 //IRON SUPPORT
1265 zfeb= zcvb + fDthick + fgkThSteel/2.;
2942f542 1266 //TVirtualMC::GetMC()->Gspos("EFEB", 3, "EPM3", 0., 0., zfeb, 0, "ONLY");
1267 TVirtualMC::GetMC()->Gspos("EFEB", 4, "EPM4", 0., 0., zfeb, 0, "ONLY");
8417fa6a 1268 //LEAD
1269 zpbb= zfeb + fgkThSteel/2.+ fgkThLead/2.;
2942f542 1270 //TVirtualMC::GetMC()->Gspos("ESPB", 3, "EPM3", 0., 0., zpbb, 0, "ONLY");
1271 TVirtualMC::GetMC()->Gspos("ESPB", 4, "EPM4", 0., 0., zpbb, 0, "ONLY");
8417fa6a 1272 //PRESHOWER
1273 zpsb = zpbb + fgkThLead/2.+ fDthick;
2942f542 1274 //TVirtualMC::GetMC()->Gspos("ESMB", 3, "EPM3", 0., 0., zpsb, 0, "ONLY");
1275 TVirtualMC::GetMC()->Gspos("ESMB", 4, "EPM4", 0., 0., zpsb, jhrot12, "ONLY");
8417fa6a 1276 //FEE boards
1277 zfee=zpsb + fDthick + 1.2;
2942f542 1278 //TVirtualMC::GetMC()->Gspos("EFSB", 7, "EPM3", 0., 0., zfee, 0, "ONLY");
1279 TVirtualMC::GetMC()->Gspos("EFSB", 8, "EPM4", 0., 0., zfee, jhrot12, "ONLY");
8417fa6a 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 xfinal = fSMLengthax + 0.48/2 + fSMLengthbx;
1292 yfinal = fSMLengthay + 0.20/2 + fSMLengthby;
1293
1294
1295 xsma = xfinal - fSMLengthax;
1296 ysma = yfinal - fSMLengthay;
1297 xsmb = -xfinal + fSMLengthbx;
1298 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//
2942f542 1309 TVirtualMC::GetMC()->Gspos("EPM1", 1, "ALIC", xsma,ysma,zp, 0, "ONLY");
1310 TVirtualMC::GetMC()->Gspos("EPM2", 1, "ALIC", -xsma,-ysma,zp, 0, "ONLY");
1311 TVirtualMC::GetMC()->Gspos("EPM3", 1, "ALIC", xsmb,ysmb,zp, 0, "ONLY");
1312 TVirtualMC::GetMC()->Gspos("EPM4", 1, "ALIC", -xsmb,-ysmb,zp, 0, "ONLY");
8417fa6a 1313}
1314
1315
8417fa6a 1316//_____________________________________________________________________________
1317void AliPMDv2008::CreateMaterials()
1318{
1319 // Create materials for the PMD
1320 //
1321 // ORIGIN : Y. P. VIYOGI
1322 //
1323 // cout << " Inside create materials " << endl;
1324
f7a1cc68 1325 Int_t isxfld = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ();
1326 Float_t sxmgmx = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
8417fa6a 1327
1328 // --- Define the various materials for GEANT ---
1329
1330 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 Float_t x0Ar = 19.55 / dAr;
1336 AliMaterial(2, "Argon$", 39.95, 18., dAr, x0Ar, 6.5e4);
1337
1338 // --- CO2 ---
1339
1340 Float_t aCO2[2] = { 12.,16. };
1341 Float_t zCO2[2] = { 6.,8. };
1342 Float_t wCO2[2] = { 1.,2. };
1343 Float_t dCO2 = 0.001977;
1344 AliMixture(3, "CO2 $", aCO2, zCO2, dCO2, -2, wCO2);
1345
1346 AliMaterial(4, "Al $", 26.98, 13., 2.7, 8.9, 18.5);
1347
1348 // ArCO2
1349
1350 Float_t aArCO2[3] = {39.948,12.0107,15.9994};
1351 Float_t zArCO2[3] = {18.,6.,8.};
1352 Float_t wArCO2[3] = {0.7,0.08,0.22};
1353 Float_t dArCO2 = dAr * 0.7 + dCO2 * 0.3;
1354 AliMixture(5, "ArCO2$", aArCO2, zArCO2, dArCO2, 3, wArCO2);
1355
1356 AliMaterial(6, "Fe $", 55.85, 26., 7.87, 1.76, 18.5);
1357
1358 // G10
1359
1360 Float_t aG10[4]={1.,12.011,15.9994,28.086};
1361 Float_t zG10[4]={1.,6.,8.,14.};
1362 Float_t wG10[4]={0.15201,0.10641,0.49444,0.24714};
1363 AliMixture(8,"G10",aG10,zG10,1.7,4,wG10);
1364
1365 AliMaterial(15, "Cu $", 63.54, 29., 8.96, 1.43, 15.);
1366
1367 // Steel
1368 Float_t aSteel[4] = { 55.847,51.9961,58.6934,28.0855 };
1369 Float_t zSteel[4] = { 26.,24.,28.,14. };
1370 Float_t wSteel[4] = { .715,.18,.1,.005 };
1371 Float_t dSteel = 7.88;
1372 AliMixture(19, "STAINLESS STEEL$", aSteel, zSteel, dSteel, 4, wSteel);
1373
1374 //Air
1375
1376 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
1377 Float_t zAir[4]={6.,7.,8.,18.};
1378 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 AliMixture(98, "Vacum$", aAir, zAir, dAir1, 4, wAir);
1382 AliMixture(99, "Air $", aAir, zAir, dAir , 4, wAir);
1383
1384 // Define tracking media
1385 AliMedium(1, "Pb conv.$", 1, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
1386 AliMedium(4, "Al $", 4, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
1387 AliMedium(5, "ArCO2 $", 5, 1, 0, isxfld, sxmgmx, .1, .1, .10, .1);
1388 AliMedium(6, "Fe $", 6, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
1389 AliMedium(8, "G10plate$", 8, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
1390 AliMedium(15, "Cu $", 15, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
1391 AliMedium(19, "S steel$", 19, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
1392 AliMedium(98, "Vacuum $", 98, 0, 0, isxfld, sxmgmx, 1., .1, .10, 10);
1393 AliMedium(99, "Air gaps$", 99, 0, 0, isxfld, sxmgmx, 1., .1, .10, .1);
1394
1395 AliDebug(1,"Outside create materials");
1396
1397}
1398
1399//_____________________________________________________________________________
1400void AliPMDv2008::Init()
1401{
1402 //
1403 // Initialises PMD detector after it has been built
1404 //
1405
1406 //
1407 AliDebug(2,"Inside Init");
1408 AliDebug(2,"PMD simulation package (v1) initialised");
1409 AliDebug(2,"parameters of pmd");
1410 AliDebug(2,Form("%10.2f %10.2f %10.2f %10.2f\n",
1411 fgkCellRadius,fgkCellWall,fgkCellDepth,fgkZdist));
1412 Int_t *idtmed = fIdtmed->GetArray()-599;
1413 fMedSens=idtmed[605-1];
1414 // --- Generate explicitly delta rays in the iron, aluminium and lead ---
5b9c7140 1415 // Gstpar removed from here and all energy cut-offs moved to galice.cuts
8417fa6a 1416 // Visualization of volumes
dd6416aa 1417 gGeoManager->SetVolumeAttribute("ECAR", "SEEN", 0);
1418 gGeoManager->SetVolumeAttribute("ECCU", "SEEN", 0);
1419 gGeoManager->SetVolumeAttribute("ECCU", "COLO", 4);
1420 gGeoManager->SetVolumeAttribute("EST1", "SEEN", 0);
1421 gGeoManager->SetVolumeAttribute("EST2", "SEEN", 0);
1422 gGeoManager->SetVolumeAttribute("EHC1", "SEEN", 0);
1423 gGeoManager->SetVolumeAttribute("EHC2", "SEEN", 0);
1424 gGeoManager->SetVolumeAttribute("EPCA", "SEEN", 0);
1425 gGeoManager->SetVolumeAttribute("EBKA", "SEEN", 0);
1426 gGeoManager->SetVolumeAttribute("ECGA", "SEEN", 0);
1427 gGeoManager->SetVolumeAttribute("ECVA", "SEEN", 0);
1428 gGeoManager->SetVolumeAttribute("EDGA", "SEEN", 0);
1429 gGeoManager->SetVolumeAttribute("EDVA", "SEEN", 0);
1430 gGeoManager->SetVolumeAttribute("ESSA", "SEEN", 0);
1431 gGeoManager->SetVolumeAttribute("ESVA", "SEEN", 0);
1432 gGeoManager->SetVolumeAttribute("EUM1", "SEEN", 0);
1433 gGeoManager->SetVolumeAttribute("EUV1", "SEEN", 0);
1434 gGeoManager->SetVolumeAttribute("EBPA", "SEEN", 0);
1435 gGeoManager->SetVolumeAttribute("EPCB", "SEEN", 0);
1436 gGeoManager->SetVolumeAttribute("EBKB", "SEEN", 0);
1437 gGeoManager->SetVolumeAttribute("ECGB", "SEEN", 0);
1438 gGeoManager->SetVolumeAttribute("ECVB", "SEEN", 0);
1439 gGeoManager->SetVolumeAttribute("EDGB", "SEEN", 0);
1440 gGeoManager->SetVolumeAttribute("EDVB", "SEEN", 0);
1441 gGeoManager->SetVolumeAttribute("ESSB", "SEEN", 0);
1442 gGeoManager->SetVolumeAttribute("ESVB", "SEEN", 0);
1443 gGeoManager->SetVolumeAttribute("EUM2", "SEEN", 0);
1444 gGeoManager->SetVolumeAttribute("EUV2", "SEEN", 0);
1445 gGeoManager->SetVolumeAttribute("EBPB", "SEEN", 0);
1446 gGeoManager->SetVolumeAttribute("EPB1", "SEEN", 0);
1447 gGeoManager->SetVolumeAttribute("EPB2", "SEEN", 0);
1448 gGeoManager->SetVolumeAttribute("ESMA", "SEEN", 0);
1449 gGeoManager->SetVolumeAttribute("EMVA", "SEEN", 0);
1450 gGeoManager->SetVolumeAttribute("ESMB", "SEEN", 0);
1451 gGeoManager->SetVolumeAttribute("EMVB", "SEEN", 0);
1452 gGeoManager->SetVolumeAttribute("ESPA", "SEEN", 0);
1453 gGeoManager->SetVolumeAttribute("ESPB", "SEEN", 0);
1454 gGeoManager->SetVolumeAttribute("EFEE", "SEEN", 0);
1455 gGeoManager->SetVolumeAttribute("EFEE", "COLO", 4);
1456 gGeoManager->SetVolumeAttribute("EFBA", "SEEN", 0);
1457 gGeoManager->SetVolumeAttribute("EFBB", "SEEN", 0);
1458 gGeoManager->SetVolumeAttribute("EFSA", "SEEN", 0);
1459 gGeoManager->SetVolumeAttribute("EFSB", "SEEN", 0);
1460 gGeoManager->SetVolumeAttribute("EFEA", "SEEN", 0);
1461 gGeoManager->SetVolumeAttribute("EFEB", "SEEN", 0);
1462 gGeoManager->SetVolumeAttribute("EPM1", "SEEN", 1);
1463 gGeoManager->SetVolumeAttribute("EPM2", "SEEN", 1);
1464 gGeoManager->SetVolumeAttribute("EPM3", "SEEN", 1);
1465 gGeoManager->SetVolumeAttribute("EPM4", "SEEN", 1);
8417fa6a 1466}
1467
1468//_____________________________________________________________________________
1469void AliPMDv2008::StepManager()
1470{
1471 //
1472 // Called at each step in the PMD
1473 //
1474
1475 Int_t copy;
db06ef51 1476 Float_t hits[5], destep;
8417fa6a 1477 Float_t center[3] = {0,0,0};
db06ef51 1478 Int_t vol[6];
8417fa6a 1479
2942f542 1480 if(TVirtualMC::GetMC()->CurrentMedium() == fMedSens && (destep = TVirtualMC::GetMC()->Edep())) {
8417fa6a 1481
2942f542 1482 TVirtualMC::GetMC()->CurrentVolID(copy);
db06ef51 1483 vol[0] = copy;
8417fa6a 1484
2942f542 1485 TVirtualMC::GetMC()->CurrentVolOffID(1,copy);
db06ef51 1486 vol[1] = copy;
8417fa6a 1487
2942f542 1488 TVirtualMC::GetMC()->CurrentVolOffID(2,copy);
db06ef51 1489 vol[2] = copy;
8417fa6a 1490
2942f542 1491 TVirtualMC::GetMC()->CurrentVolOffID(3,copy);
db06ef51 1492 vol[3] = copy;
8417fa6a 1493
2942f542 1494 TVirtualMC::GetMC()->CurrentVolOffID(4,copy);
db06ef51 1495 vol[4] = copy;
8417fa6a 1496
2942f542 1497 TVirtualMC::GetMC()->CurrentVolOffID(5,copy);
db06ef51 1498 vol[5] = copy;
8417fa6a 1499
1500
2942f542 1501 TVirtualMC::GetMC()->Gdtom(center,hits,1);
8417fa6a 1502 hits[3] = destep*1e9; //Number in eV
db06ef51 1503
1504 // this is for pile-up events
2942f542 1505 hits[4] = TVirtualMC::GetMC()->TrackTime();
db06ef51 1506
8417fa6a 1507 AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
1508
1509 }
1510}
1511
1512
1513//------------------------------------------------------------------------
1514// Get parameters
1515
1516void 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 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 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 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 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 fDthick = fgkThSS/2. +0.15;
1564
1565 //Thickness of the PMD ; 2.4 added for FEE boards
1566 fSMthick = 2.0*(fgkThSS/2. +0.15)
1567 +fgkThSteel/2.+fgkThLead/2.0 + 2.4;
1568
1569
1570
1571}
1572// ---------------------------------------------------------------
1573void 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 SetSectorAlignable();
1581
1582}
1583// ----------------------------------------------------------------
1584void AliPMDv2008::SetSectorAlignable() const
1585{
1f7f8a9c 1586 //
8417fa6a 1587
1588 TString vpsector = "ALIC_1/EPM";
1589 TString vpappend = "_1";
1590
1591 TString snsector="PMD/Sector";
1592
1593 TString volpath, symname;
1594
1595 for(Int_t cnt=1; cnt<=4; cnt++){
1596 volpath = vpsector;
1597 volpath += cnt;
1598 volpath += vpappend;
1599 symname = snsector;
1600 symname += cnt;
1601 if(!gGeoManager->SetAlignableEntry(symname.Data(),volpath.Data()))
1602 {
1603 AliFatal("Unable to set alignable entry!");
1604 }
1605 }
1606}
1607// ------------------------------------------------------------------