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