]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PMD/AliPMDv1.cxx
Some cleanup in the makefiles
[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
24c5571f 22//---------------------------------------------------
23// ALICE PMD FEE BOARDS IMPLEMENTATION
24// Dt: 25th February 2006
25// M.M. Mondal, S.K. Prasad and P.K. Netrakanti
26//---------------------------------------------------
27// Create final detector from Unit Modules
28// Author : Bedanga and Viyogi June 2003
29//---------------------------------------------------
30// Modified by
31// Dr. Y.P. Viyogi and Ranbir Singh
32// Dt: 2nd February 2009
33//
c4561145 34//Begin_Html
35/*
36<img src="picts/AliPMDv1Class.gif">
37*/
38//End_Html
39// //
24c5571f 40/////////////////////////////////////////////////////////////////////////////
c4561145 41////
42
cad3294f 43#include <Riostream.h>
44#include <TGeoGlobalMagField.h>
788c3ee6 45#include <TVirtualMC.h>
bff3a244 46
47#include "AliConst.h"
4951e003 48#include "AliLog.h"
bff3a244 49#include "AliMC.h"
50#include "AliMagF.h"
51#include "AliPMDv1.h"
52#include "AliRun.h"
c1446131 53#include "AliTrackReference.h"
c4561145 54
24c5571f 55const Int_t AliPMDv1::fgkNcolUM1 = 48; // Number of cols in UM, type 1
56const Int_t AliPMDv1::fgkNcolUM2 = 96; // Number of cols in UM, type 2
57const Int_t AliPMDv1::fgkNrowUM1 = 96; // Number of rows in UM, type 1
58const Int_t AliPMDv1::fgkNrowUM2 = 48; // Number of rows in UM, type 2
5c3a1290 59const Float_t AliPMDv1::fgkCellRadius = 0.25; // Radius of a hexagonal cell
60const Float_t AliPMDv1::fgkCellWall = 0.02; // Thickness of cell Wall
61const Float_t AliPMDv1::fgkCellDepth = 0.50; // Gas thickness
24c5571f 62const Float_t AliPMDv1::fgkThPCB = 0.16; // Thickness of PCB
5c3a1290 63const Float_t AliPMDv1::fgkThLead = 1.5; // Thickness of Pb
64const Float_t AliPMDv1::fgkThSteel = 0.5; // Thickness of Steel
65const Float_t AliPMDv1::fgkGap = 0.025; // Air Gap
66const Float_t AliPMDv1::fgkZdist = 361.5; // z-position of the detector
67const Float_t AliPMDv1::fgkSqroot3 = 1.7320508;// Square Root of 3
68const Float_t AliPMDv1::fgkSqroot3by2 = 0.8660254;// Square Root of 3 by 2
f117e3aa 69const Float_t AliPMDv1::fgkSSBoundary = 0.3;
24c5571f 70const Float_t AliPMDv1::fgkThSS = 1.23; // Old thickness of SS frame was 1.03
71const Float_t AliPMDv1::fgkThTopG10 = 0.33;
72const Float_t AliPMDv1::fgkThBotG10 = 0.4;
73
74
c4561145 75ClassImp(AliPMDv1)
76
a48edddd 77//_____________________________________________________________________________
78AliPMDv1::AliPMDv1():
79 fSMthick(0.),
24c5571f 80 fSMthickpmd(0.),
a48edddd 81 fDthick(0.),
82 fSMLengthax(0.),
83 fSMLengthay(0.),
84 fSMLengthbx(0.),
85 fSMLengthby(0.),
86 fMedSens(0)
c4561145 87{
24c5571f 88
c4561145 89 // Default constructor
24c5571f 90
a48edddd 91 for (Int_t i = 0; i < 3; i++)
92 {
93 fDboxmm1[i] = 0.;
94 fDboxmm12[i] = 0.;
95 fDboxmm2[i] = 0.;
96 fDboxmm22[i] = 0.;
97 }
24c5571f 98 for (Int_t i = 0; i < 48; i++)
99 {
100 fModStatus[i] = 1;
101 }
102
c4561145 103}
104
105//_____________________________________________________________________________
a48edddd 106AliPMDv1::AliPMDv1(const char *name, const char *title):
107 AliPMD(name,title),
108 fSMthick(0.),
24c5571f 109 fSMthickpmd(0.),
a48edddd 110 fDthick(0.),
111 fSMLengthax(0.),
112 fSMLengthay(0.),
113 fSMLengthbx(0.),
114 fSMLengthby(0.),
115 fMedSens(0)
c4561145 116{
24c5571f 117
c4561145 118 // Standard constructor
24c5571f 119
a48edddd 120 for (Int_t i = 0; i < 3; i++)
121 {
122 fDboxmm1[i] = 0.;
123 fDboxmm12[i] = 0.;
124 fDboxmm2[i] = 0.;
125 fDboxmm22[i] = 0.;
126 }
24c5571f 127 for (Int_t i = 0; i < 48; i++)
128 {
129 fModStatus[i] = 1;
130 }
c4561145 131}
132
24c5571f 133
134
135
c4561145 136//_____________________________________________________________________________
137void AliPMDv1::CreateGeometry()
138{
b1952773 139 // Create geometry for Photon Multiplicity Detector
140
c4561145 141 GetParameters();
142 CreateSupermodule();
143 CreatePMD();
144}
145
146//_____________________________________________________________________________
147void AliPMDv1::CreateSupermodule()
148{
b1952773 149 //
24c5571f 150 // Creates the geometry of the cells of PMD, places them in modules
151 // which are rectangular objects.
b1952773 152 // Basic unit is ECAR, a hexagonal cell made of Ar+CO2, which is
153 // placed inside another hexagonal cell made of Cu (ECCU) with larger
154 // radius, compared to ECAR. The difference in radius gives the dimension
155 // of half width of each cell wall.
156 // These cells are placed in a rectangular strip which are of 2 types
24c5571f 157 // EST1 and EST2.
158 // Two types of honeycomb EHC1 & EHC2 are made using strips EST1 & EST2.
159 // 4 types of unit modules are made EUM1 & EUM2 for PRESHOWER Plane and
160 // EUV1 & EUV2 for VETO Plane which contains strips placed repeatedly
161 //
162 // These unit moules are then placed inside EPM1, EPM2, EPM3 and EPM4 along
163 // with lead convertor ELDA & ELDB and Iron Supports EFE1, EFE2, EFE3 and EFE4
164 // They have 6 unit moudles inside them in each plane. Therefore, total of 48
165 // unit modules in both the planes (PRESHOWER Plane & VETO Plane). The numbering
166 // of unit modules is from 0 to 47.
167 //
168 // Steel channels (ECHA & ECHB) are also placed which are used to place the unit modules
169 //
170 // In order to account for the extra material around and on the detector, Girders (EGDR),
171 // girder's Carriage (EXGD), eight Aluminium boxes (ESV1,2,3,4 & EVV1,2,3,4) along with
172 // LVDBs (ELVD), cables (ECB1,2,3,4), and ELMBs (ELMB) are being placed in approximations.
173 //
174 // Four FR4 sheets (ECC1,2,3,4) are placed parallel to the PMD on both sides, which perform
175 // as cooling encloser
176
177 // NOTE:- VOLUME Names : begining with "E" for all PMD volumes
c4561145 178
b1952773 179 Int_t i,j;
c4561145 180 Int_t number;
181 Int_t ihrotm,irotdm;
3cdb4e97 182 Float_t xb, yb, zb;
183
c4561145 184 Int_t *idtmed = fIdtmed->GetArray()-599;
185
186 AliMatrix(ihrotm, 90., 30., 90., 120., 0., 0.);
187 AliMatrix(irotdm, 90., 180., 90., 270., 180., 0.);
188
24c5571f 189 //******************************************************//
190 // STEP - I //
f117e3aa 191 //******************************************************//
b1952773 192 // First create the sensitive medium of a hexagon cell (ECAR)
c4561145 193 // Inner hexagon filled with gas (Ar+CO2)
24c5571f 194 // Integer assigned to Ar+CO2 medium is 604
195
c4561145 196 Float_t hexd2[10] = {0.,360.,6,2,-0.25,0.,0.23,0.25,0.,0.23};
3cdb4e97 197 hexd2[4] = -fgkCellDepth/2.;
198 hexd2[7] = fgkCellDepth/2.;
199 hexd2[6] = fgkCellRadius - fgkCellWall;
200 hexd2[9] = fgkCellRadius - fgkCellWall;
c4561145 201
202 gMC->Gsvolu("ECAR", "PGON", idtmed[604], hexd2,10);
f117e3aa 203
24c5571f 204 //******************************************************//
205 // STEP - II //
f117e3aa 206 //******************************************************//
b1952773 207 // Place the sensitive medium inside a hexagon copper cell (ECCU)
c4561145 208 // Outer hexagon made of Copper
24c5571f 209 // Integer assigned to Cu medium is 614
b1952773 210
c4561145 211 Float_t hexd1[10] = {0.,360.,6,2,-0.25,0.,0.25,0.25,0.,0.25};
3cdb4e97 212 hexd1[4] = -fgkCellDepth/2.;
213 hexd1[7] = fgkCellDepth/2.;
214 hexd1[6] = fgkCellRadius;
215 hexd1[9] = fgkCellRadius;
24c5571f 216
c4561145 217 gMC->Gsvolu("ECCU", "PGON", idtmed[614], hexd1,10);
c4561145 218
b1952773 219 // Place inner hex (sensitive volume) inside outer hex (copper)
220
a978c9e3 221 gMC->Gspos("ECAR", 1, "ECCU", 0., 0., 0., 0, "ONLY");
f117e3aa 222
f117e3aa 223 //******************************************************//
24c5571f 224 // STEP - III //
225 //******************************************************//
226 // Now create Two types of Rectangular strips (EST1, EST2)
227 // of 1 column and 96 or 48 cells length
c4561145 228
b1952773 229 // volume for first strip EST1 made of AIR
24c5571f 230 // Integer assigned to Air medium is 698
231 // strip type-1 is of 1 column and 96 rows i.e. of 96 cells length
c4561145 232
b1952773 233 Float_t dbox1[3];
f117e3aa 234 dbox1[0] = fgkCellRadius/fgkSqroot3by2;
235 dbox1[1] = fgkNrowUM1*fgkCellRadius;
3cdb4e97 236 dbox1[2] = fgkCellDepth/2.;
b1952773 237
238 gMC->Gsvolu("EST1","BOX", idtmed[698], dbox1, 3);
c4561145 239
c4561145 240
24c5571f 241 // volume for second strip EST2
242 // strip type-2 is of 1 column and 48 rows i.e. of 48 cells length
f117e3aa 243
b1952773 244 Float_t dbox2[3];
f117e3aa 245 dbox2[1] = fgkNrowUM2*fgkCellRadius;
246 dbox2[0] = dbox1[0];
b1952773 247 dbox2[2] = dbox1[2];
c4561145 248
b1952773 249 gMC->Gsvolu("EST2","BOX", idtmed[698], dbox2, 3);
c4561145 250
b1952773 251 // Place hexagonal cells ECCU placed inside EST1
24c5571f 252
f117e3aa 253 xb = 0.;
b1952773 254 zb = 0.;
f117e3aa 255 yb = (dbox1[1]) - fgkCellRadius;
256 for (i = 1; i <= fgkNrowUM1; ++i)
a978c9e3 257 {
258 number = i;
f117e3aa 259 gMC->Gspos("ECCU", number, "EST1", xb,yb,zb, 0, "ONLY");
260 yb -= (fgkCellRadius*2.);
a978c9e3 261 }
f117e3aa 262
b1952773 263 // Place hexagonal cells ECCU placed inside EST2
f117e3aa 264 xb = 0.;
a978c9e3 265 zb = 0.;
f117e3aa 266 yb = (dbox2[1]) - fgkCellRadius;
267 for (i = 1; i <= fgkNrowUM2; ++i)
a978c9e3 268 {
269 number = i;
f117e3aa 270 gMC->Gspos("ECCU", number, "EST2", xb,yb,zb, 0, "ONLY");
f117e3aa 271 yb -= (fgkCellRadius*2.);
a978c9e3 272 }
24c5571f 273
274
f117e3aa 275 //******************************************************//
24c5571f 276 // STEP - IV //
f117e3aa 277 //******************************************************//
24c5571f 278 // Create EHC1 : The honey combs for a unit module type-1
279 //-------------------------EHC1 Start-------------------//
280
f117e3aa 281 // First step is to create a honey comb unit module.
24c5571f 282 // This is named as EHC1 and is a volume of Air
283 // we will lay the EST1 strips of honey comb cells inside it.
a978c9e3 284
24c5571f 285 // Dimensions of EHC1
286 // X-dimension = (dbox1[0]*fgkNcolUM1)-(fgkCellRadius*fgkSqroot3*(fgkNcolUM1-1)/6.)+ 0.15+0.05+0.05;
287 // Y-dimension = Number of rows * cell radius/sqrt3by2 + 0.15+0.05+0.05;
288 // 0.15cm is the extension in honeycomb on both side of X and Y, 0.05 for air gap and 0.05
289 // for G10 boundary around, which are now merged in the dimensions of EHC1
290 // Z-dimension = cell depth/2
291
292 Float_t ehcExt = 0.15;
293 Float_t ehcAround = 0.05 + 0.05;;
f117e3aa 294
b1952773 295 Float_t dbox3[3];
24c5571f 296 dbox3[0] = (dbox1[0]*fgkNcolUM1)-
297 (fgkCellRadius*fgkSqroot3*(fgkNcolUM1-1)/6.) + ehcExt + ehcAround;
298 dbox3[1] = dbox1[1]+fgkCellRadius/2. + ehcExt + ehcAround;
3cdb4e97 299 dbox3[2] = fgkCellDepth/2.;
24c5571f 300
f117e3aa 301 //Create a BOX, Material AIR
302 gMC->Gsvolu("EHC1","BOX", idtmed[698], dbox3, 3);
f117e3aa 303 // Place rectangular strips EST1 inside EHC1 unit module
304 xb = dbox3[0]-dbox1[0];
b1952773 305
f117e3aa 306 for (j = 1; j <= fgkNcolUM1; ++j)
b1952773 307 {
308 if(j%2 == 0)
309 {
f117e3aa 310 yb = -fgkCellRadius/2.0;
b1952773 311 }
312 else
313 {
f117e3aa 314 yb = fgkCellRadius/2.0;
b1952773 315 }
316 number = j;
24c5571f 317 gMC->Gspos("EST1",number, "EHC1", xb - 0.25, yb , 0. , 0, "MANY");
318
f117e3aa 319 //The strips are being placed from top towards bottom of the module
320 //This is because the first cell in a module in hardware is the top
321 //left corner cell
24c5571f 322
f117e3aa 323 xb = (dbox3[0]-dbox1[0])-j*fgkCellRadius*fgkSqroot3;
24c5571f 324
c4561145 325 }
24c5571f 326
327 //--------------------EHC1 done----------------------------------------//
328
329
330
331 //--------------------------------EHC2 Start---------------------------//
332 // Create EHC2 : The honey combs for a unit module type-2
f117e3aa 333 // First step is to create a honey comb unit module.
334 // This is named as EHC2, we will lay the EST2 strips of
335 // honey comb cells inside it.
24c5571f 336
337 // Dimensions of EHC2
338 // X-dimension = (dbox2[0]*fgkNcolUM2)-(fgkCellRadius*fgkSqroot3*(fgkNcolUM2-1)/6.)+ 0.15+0.05+0.05;
339 // Y-dimension = Number of rows * cell radius/sqrt3by2 + 0.15+0.05+0.05;
340 // 0.15cm is the extension in honeycomb on both side of X and Y, 0.05 for air gap and 0.05
341 // for G10 boundary around, which are now merged in the dimensions of EHC2
342 // Z-dimension = cell depth/2
343
344
b1952773 345 Float_t dbox4[3];
24c5571f 346
347 dbox4[0] =(dbox2[0]*fgkNcolUM2)-
348 (fgkCellRadius*fgkSqroot3*(fgkNcolUM2-1)/6.) + ehcExt + ehcAround;
349 dbox4[1] = dbox2[1] + fgkCellRadius/2. + ehcExt + ehcAround;
b1952773 350 dbox4[2] = dbox3[2];
a978c9e3 351
f117e3aa 352 //Create a BOX of AIR
353 gMC->Gsvolu("EHC2","BOX", idtmed[698], dbox4, 3);
24c5571f 354
f117e3aa 355 // Place rectangular strips EST2 inside EHC2 unit module
356 xb = dbox4[0]-dbox2[0];
a978c9e3 357
24c5571f 358 for (j = 1; j <= fgkNcolUM2; ++j)
359 {
360 if(j%2 == 0)
361 {
362 yb = -fgkCellRadius/2.0;
363 }
364 else
365 {
366 yb = +fgkCellRadius/2.0;
367 }
368 number = j;
369 gMC->Gspos("EST2",number, "EHC2", xb - 0.25, yb , 0. ,0, "MANY");
370 xb = (dbox4[0]-dbox2[0])-j*fgkCellRadius*fgkSqroot3;
371 }
372
373
374 //----------------------------EHC2 done-------------------------------//
f117e3aa 375
24c5571f 376 //====================================================================//
377
f117e3aa 378 // Now the job is to assmeble an Unit module
379 // It will have the following components
24c5571f 380 // (a) Base plate of G10 of 0.2cm
381 // (b) Air gap of 0.08cm
382 // (c) Bottom PCB of 0.16cm G10
383 // (d) Honey comb 0f 0.5cm
384 // (e) Top PCB of 0.16cm G10
385 // (f) Back Plane of 0.1cm G10
386 // (g) Then all around then we have an air gap of 0.05cm
387 // (h) Then all around 0.05cm thick G10 insulation
388 // (i) Then all around Stainless Steel boundary channel 0.3 cm thick
389
390 // In order to reduce the number of volumes and simplify the geometry
391 // following steps are performed:
392 // (I) Base Plate(0.2cm), Air gap(0.04cm) and Bottom PCB(0.16cm)
393 // are taken together as a G10 Plate EDGA (0.4cm)
394 // (II) Back Plane(0.1cm), Air Gap(0.04cm) and Top PCB(0.16cm) and extra
395 // clearance 0.03cm are taken together as G10 Plate EEGA(0.33cm)
396 // (III) The all around Air gap(0.05cm) and G10 boundary(0.05cm) are already
397 // merged in the dimension of EHC1, EHC2, EDGA and EEGA. Therefore, no
398 // separate volumes for all around materials
399
f117e3aa 400 //Let us first create them one by one
24c5571f 401 //--------------------------------------------------------------------//
402
403 // ---------------- Lets do it first for UM Long Type -----//
404 // 4mm G10 Box : Bottom PCB + Air Gap + Base Plate
405 //================================================
406 // Make a 4mm thick G10 Box for Unit module Long Type
407 // X-dimension is EHC1 - ehcExt
408 // Y-dimension is EHC1 - ehcExt
409 // EHC1 was extended 0.15cm(ehcExt) on both sides
410 // Z-dimension 0.4/2 = 0.2 cm
411 // Integer assigned to G10 medium is 607
f117e3aa 412
24c5571f 413 Float_t dboxCGA[3];
414 dboxCGA[0] = dbox3[0] - ehcExt;
415 dboxCGA[1] = dbox3[1] - ehcExt;
416 dboxCGA[2] = fgkThBotG10/2.;
417
418 //Create a G10 BOX
419 gMC->Gsvolu("EDGA","BOX", idtmed[607], dboxCGA, 3);
f117e3aa 420
f117e3aa 421 //-------------------------------------------------//
24c5571f 422 // 3.3mm G10 Box : Top PCB + Air GAp + Back Plane
423 //================================================
424 // Make a 3.3mm thick G10 Box for Unit module Long Type
425 // X-dimension is EHC1 - ehcExt
426 // Y-dimension is EHC1 - ehcExt
427 // EHC1 was extended 0.15cm(ehcExt) on both sides
428 // Z-dimension 0.33/2 = 0.165 cm
429
430 Float_t dboxEEGA[3];
431 dboxEEGA[0] = dboxCGA[0];
432 dboxEEGA[1] = dboxCGA[1];
433 dboxEEGA[2] = fgkThTopG10/2.;
434
435 //Create a G10 BOX
436 gMC->Gsvolu("EEGA","BOX", idtmed[607], dboxEEGA, 3);
437
438
439 //----------------------------------------------------------//
440 //Stainless Steel Bounadry : EUM1 & EUV1
441 //
442 // Make a 3.63cm thick Stainless Steel boundary for Unit module Long Type
443 // 3.63cm equivalent to EDGA(0.4cm)+EHC1(0.5cm)+EEGA(0.33cm)+FEE Board(2.4cm)
444 // X-dimension is EEGA + fgkSSBoundary
445 // Y-dimension is EEGA + fgkSSBoundary
446 // Z-dimension 1.23/2 + 2.4/2.
447 // FEE Boards are 2.4cm thick
448 // Integer assigned to Stainless Steel medium is 618
f117e3aa 449 //------------------------------------------------------//
24c5571f 450 // A Stainless Steel Boundary Channel to house the unit module
451 // along with the FEE Boards
f117e3aa 452
24c5571f 453 Float_t dboxSS1[3];
454 dboxSS1[0] = dboxCGA[0]+fgkSSBoundary;
455 dboxSS1[1] = dboxCGA[1]+fgkSSBoundary;
456 dboxSS1[2] = fgkThSS/2.+ 2.4/2.;
457
458 //FOR PRESHOWER
459 //Stainless Steel boundary - Material Stainless Steel
460 gMC->Gsvolu("EUM1","BOX", idtmed[618], dboxSS1, 3);
461
462 //FOR VETO
463 //Stainless Steel boundary - Material Stainless Steel
464 gMC->Gsvolu("EUV1","BOX", idtmed[618], dboxSS1, 3);
465
466 //--------------------------------------------------------------------//
f117e3aa 467
f117e3aa 468
24c5571f 469
f117e3aa 470
24c5571f 471 // ============ PMD FEE BOARDS IMPLEMENTATION ======================//
472
473 // FEE board
474 // It is FR4 board of length * breadth :: 7cm * 2.4 cm
475 // and thickness 0.2cm
476 // Material medium is same as G10
f117e3aa 477
24c5571f 478 Float_t dboxFEE[3];
479 dboxFEE[0] = 0.2/2.;
480 dboxFEE[1] = 7.0/2.;
481 dboxFEE[2] = 2.4/2.;
f117e3aa 482
24c5571f 483 gMC->Gsvolu("EFEE","BOX", idtmed[607], dboxFEE, 3);
f117e3aa 484
24c5571f 485 // Now to create the Mother volume to accomodate FEE boards
486 // It should have the dimension few mm smaller than the back plane
487 // But, we have taken it as big as EUM1 or EUV1
488 // It is to compensate the Stainless Steel medium of EUM1 or EUV1
f117e3aa 489
24c5571f 490 // Create Mother volume of Air : Long TYPE
f117e3aa 491
24c5571f 492 Float_t dboxFEEBPlaneA[3];
493 dboxFEEBPlaneA[0] = dboxSS1[0];
494 dboxFEEBPlaneA[1] = dboxSS1[1];
495 dboxFEEBPlaneA[2] = 2.4/2.;
496
497 //Volume of same dimension as EUM1 or EUV1 of Material AIR
498 gMC->Gsvolu("EFBA","BOX", idtmed[698], dboxFEEBPlaneA, 3);
499
500 //Placing the FEE boards in the Mother volume of AIR
501
f117e3aa 502
24c5571f 503 Float_t xFee; // X-position of FEE board
504 Float_t yFee; // Y-position of FEE board
505 Float_t zFee = 0.0; // Z-position of FEE board
506
507 Float_t xA = 0.5; //distance from the border to 1st FEE board/Translator
508 Float_t yA = 4.00; //distance from the border to 1st FEE board
509 Float_t xSepa = 1.70; //Distance between two FEE boards in X-side
510 Float_t ySepa = 8.00; //Distance between two FEE boards in Y-side
511
512
513
514 // FEE Boards EFEE placed inside EFBA
515
516 yFee = dboxFEEBPlaneA[1] - yA - 0.1 - 0.3;
517 // 0.1cm and 0.3cm are subtracted to shift the FEE Boards on their actual positions
518 // As the positions are changed, because we have taken the dimension of EFBA equal
519 // to the dimension of EUM1 or EUV1
520 number = 1;
521 // The loop for six rows of FEE Board
522 for (i = 1; i <= 6; ++i)
523 {
524 // First we place the translator board
525 xFee = -dboxFEEBPlaneA[0] + xA + 0.1 +0.3;
526
527 gMC->Gspos("EFEE", number, "EFBA", xFee,yFee,zFee, 0, "ONLY");
528
529 // The first FEE board is 11mm from the translator board
530 xFee += 1.1;
531 number += 1;
532
533 for (j = 1; j <= 12; ++j)
534 {
535 gMC->Gspos("EFEE", number, "EFBA", xFee,yFee,zFee, 0, "ONLY");
536 xFee += xSepa;
537 number += 1;
538 }
539 yFee -= ySepa;
540 }
541
542
543 // Now Place EEGA, EDGA, EHC1 and EFBA in EUM1 & EUV1 to complete the unit module
544
545
546 // FOR PRE SHOWER //
547 // Placing of all components of UM in AIR BOX EUM1 //
548
549 //(1) FIRST PUT the 4mm G10 Box : EDGA
550 Float_t zedga = -dboxSS1[2] + fgkThBotG10/2.;
551 gMC->Gspos("EDGA", 1, "EUM1", 0., 0., zedga, 0, "ONLY");
552
553 //(2) NEXT PLACING the Honeycomb EHC1
554 Float_t zehc1 = zedga + fgkThBotG10/2. + fgkCellDepth/2.;
555 gMC->Gspos("EHC1", 1, "EUM1", 0., 0., zehc1, 0, "ONLY");
556
557 //(3) NEXT PLACING the 3.3mm G10 Box : EEGA
558 Float_t zeega = zehc1 + fgkCellDepth/2. + fgkThTopG10/2.;
559 gMC->Gspos("EEGA", 1, "EUM1", 0., 0., zeega, 0, "ONLY");
560
561 //(4) NEXT PLACING the FEE BOARD : EFBA
562 Float_t zfeeboardA = zeega + fgkThTopG10/2. +1.2;
563 gMC->Gspos("EFBA", 1, "EUM1", 0., 0., zfeeboardA, 0, "ONLY");
564
565 // FOR VETO //
566 // Placing of all components of UM in AIR BOX EUV1 //
567
568 //(1) FIRST PUT the FEE BOARD : EFBA
569 zfeeboardA = -dboxSS1[2] + 1.2;
570 gMC->Gspos("EFBA", 1, "EUV1", 0., 0., zfeeboardA, 0, "ONLY");
571
572 //(2) FIRST PLACING the 3.3mm G10 Box : EEGA
573 zeega = zfeeboardA + 1.2 + fgkThTopG10/2.;
574 gMC->Gspos("EEGA", 1, "EUV1", 0., 0., zeega, 0, "ONLY");
575
576 //(3) NEXT PLACING the Honeycomb EHC1
577 zehc1 = zeega + fgkThTopG10/2 + fgkCellDepth/2.;
578 gMC->Gspos("EHC1", 1, "EUV1", 0., 0., zehc1, 0, "ONLY");
579
580 //(4) NEXT PUT THE 4mm G10 Box : EDGA
581 zedga = zehc1 + fgkCellDepth/2.+ fgkThBotG10/2.;
582 gMC->Gspos("EDGA", 1, "EUV1", 0., 0., zedga, 0, "ONLY");
583
f117e3aa 584
24c5571f 585 //=================== LONG TYPE COMPLETED =========================//
586 //------------ Lets do the same thing for UM Short Type -------------//
587 // 4mm G10 Box : Bottom PCB + Air Gap + Base Plate
588 //================================================
589 // Make a 4mm thick G10 Box for Unit module ShortType
590 // X-dimension is EHC2 - ehcExt
591 // Y-dimension is EHC2 - ehcExt
592 // EHC2 was extended 0.15cm(ehcExt) on both sides
593 // Z-dimension 0.4/2 = 0.2 cm
594 // Integer assigned to G10 medium is 607
595
596 Float_t dboxCGB[3];
597 dboxCGB[0] = dbox4[0] - ehcExt;
598 dboxCGB[1] = dbox4[1] - ehcExt;
599 dboxCGB[2] = 0.4/2.;
600
601 //Create a G10 BOX
602 gMC->Gsvolu("EDGB","BOX", idtmed[607], dboxCGB, 3);
603
604 //-------------------------------------------------//
605 // 3.3mm G10 Box : PCB + Air Gap + Back Plane
606 //================================================
607 // Make a 3.3mm thick G10 Box for Unit module Short Type
608 // X-dimension is EHC2 - ehcExt
609 // Y-dimension is EHC2 - ehcExt
610 // EHC2 was extended 0.15cm(ehcExt) on both sides
611 // Z-dimension 0.33/2 = 0.165 cm
612
613 Float_t dboxEEGB[3];
614 dboxEEGB[0] = dboxCGB[0];
615 dboxEEGB[1] = dboxCGB[1];
616 dboxEEGB[2] = 0.33/2.;
617
618 // Create a G10 BOX
619 gMC->Gsvolu("EEGB","BOX", idtmed[607], dboxEEGB, 3);
620
621
622 //Stainless Steel Bounadry : EUM2 & EUV2
f117e3aa 623 //==================================
24c5571f 624 // Make a 3.63cm thick Stainless Steel boundary for Unit module Short Type
625 // 3.63cm equivalent to EDGB(0.4cm)+EHC2(0.5cm)+EEGB(0.33cm)+FEE Board(2.4cm)
626 // X-dimension is EEGB + fgkSSBoundary
627 // Y-dimension is EEGB + fgkSSBoundary
628 // Z-dimension 1.23/2 + 2.4/2.
629 // FEE Boards are 2.4cm thick
630 // Integer assigned to Stainless Steel medium is 618
f117e3aa 631 //------------------------------------------------------//
632 // A Stainless Steel Boundary Channel to house the unit module
24c5571f 633 // along with the FEE Boards
f117e3aa 634
24c5571f 635
636 Float_t dboxSS2[3];
637 dboxSS2[0] = dboxCGB[0] + fgkSSBoundary;
638 dboxSS2[1] = dboxCGB[1] + fgkSSBoundary;
639 dboxSS2[2] = fgkThSS/2.+ 2.4/2.;
640
641 //PRESHOWER
f117e3aa 642 //Stainless Steel boundary - Material Stainless Steel
24c5571f 643 gMC->Gsvolu("EUM2","BOX", idtmed[618], dboxSS2, 3);
644
645 //VETO
f117e3aa 646 //Stainless Steel boundary - Material Stainless Steel
24c5571f 647 gMC->Gsvolu("EUV2","BOX", idtmed[618], dboxSS2, 3);
648
f117e3aa 649 //----------------------------------------------------------------//
24c5571f 650 //NOW THE FEE BOARD IMPLEMENTATION
651
652 // To create the Mother volume to accomodate FEE boards
653 // It should have the dimension few mm smaller than the back plane
654 // But, we have taken it as big as EUM2 or EUV2
655 // It is to compensate the Stainless Steel medium of EUM2 or EUV2
f117e3aa 656
24c5571f 657 // Create Mother volume of Air : SHORT TYPE
658 //------------------------------------------------------//
f117e3aa 659
660
24c5571f 661 Float_t dboxFEEBPlaneB[3];
662 dboxFEEBPlaneB[0] = dboxSS2[0];
663 dboxFEEBPlaneB[1] = dboxSS2[1];
664 dboxFEEBPlaneB[2] = 2.4/2.;
665
666 //Volume of same dimension as EUM2 or EUV2 of Material AIR
667 gMC->Gsvolu("EFBB","BOX", idtmed[698], dboxFEEBPlaneB, 3);
668
669
670 // FEE Boards EFEE placed inside EFBB
671
672 yFee = dboxFEEBPlaneB[1] - yA -0.1 -0.3;
673 // 0.1cm and 0.3cm are subtracted to shift the FEE Boards on their actual positions
674 // As the positions are changed, because we have taken the dimension of EFBB equal
675 // to the dimension of EUM2 or EUV2
676 number = 1;
677 for (i = 1; i <= 3; ++i)
678 {
679 xFee = -dboxFEEBPlaneB[0] + xA + 0.1 +0.3;
680
681 //First we place the translator board
682 gMC->Gspos("EFEE", number, "EFBB", xFee,yFee,zFee, 0, "ONLY");
683 // The first FEE board is 11mm from the translator board
684 xFee+=1.1;
685 number+=1;
686
687 for (j = 1; j <= 12; ++j)
688 {
689 gMC->Gspos("EFEE", number, "EFBB", xFee,yFee,zFee, 0, "ONLY");
690 xFee += xSepa;
691 number += 1;
692 }
693
694 //Now we place Bridge Board
695 xFee = xFee - xSepa + 0.8 ;
696 //Bridge Board is at a distance 8mm from FEE board
697 gMC->Gspos("EFEE", number, "EFBB", xFee,yFee,zFee, 0, "ONLY");
698
699 number+=1;
700 xFee+=0.8;
701
702 for (j = 1; j <= 12; ++j)
703 {
704 gMC->Gspos("EFEE", number, "EFBB", xFee,yFee,zFee, 0, "ONLY");
705 xFee += xSepa;
706 number += 1;
707 }
708 yFee -= ySepa;
709 }
710
711
712
713 // Now Place EEGB, EDGB, EHC2 and EFBB in EUM2 & EUV2 to complete the unit module
714
715 // FOR PRE SHOWER
716 //- Placing of all components of UM in AIR BOX EUM2--//
717 //(1) FIRST PUT the G10 Box : EDGB
718 Float_t zedgb = -dboxSS2[2] + 0.4/2.;
719 gMC->Gspos("EDGB", 1, "EUM2", 0., 0., zedgb, 0, "ONLY");
720
721 //(2) NEXT PLACING the Honeycomb EHC2
722 Float_t zehc2 = zedgb + 0.4/2. + fgkCellDepth/2.;
723 gMC->Gspos("EHC2", 1, "EUM2", 0., 0., zehc2, 0, "ONLY");
724
725 //(3) NEXT PLACING the G10 Box : EEGB
726 Float_t zeegb = zehc2 + fgkCellDepth/2. + 0.33/2.;
727 gMC->Gspos("EEGB", 1, "EUM2", 0., 0., zeegb, 0, "ONLY");
728
729 //(4) NEXT PLACING FEE BOARDS : EFBB
730 Float_t zfeeboardB = zeegb + 0.33/2.+1.2;
731 gMC->Gspos("EFBB", 1, "EUM2", 0., 0., zfeeboardB, 0, "ONLY");
732
733 // FOR VETO
734 // Placing of all components of UM in AIR BOX EUV2 //
735
736 //(1) FIRST PUT the FEE BOARD : EUV2
737 zfeeboardB = -dboxSS2[2] + 1.2;
738 gMC->Gspos("EFBB", 1, "EUV2", 0., 0., zfeeboardB, 0, "ONLY");
739
740 //(2) FIRST PLACING the G10 Box : EEGB
741 zeegb = zfeeboardB + 1.2 + 0.33/2.;
742 gMC->Gspos("EEGB", 1, "EUV2", 0., 0., zeegb, 0, "ONLY");
743
744 //(3) NEXT PLACING the Honeycomb EHC2
745 zehc2 = zeegb + 0.33/2. + fgkCellDepth/2.;
746 gMC->Gspos("EHC2", 1, "EUV2", 0., 0., zehc2, 0, "ONLY");
747
748 //(4) NEXT PUT THE G10 Box : EDGB
749 zedgb = zehc2 + fgkCellDepth/2.+ 0.4/2.;
750 gMC->Gspos("EDGB", 1, "EUV2", 0., 0., zedgb, 0, "ONLY");
751
752
753 //===================================================================//
754 //---------------------- UM Type B completed ------------------------//
755
756}
757
758//_______________________________________________________________________
759
760void AliPMDv1::CreatePMD()
761{
762 // Create final detector from Unit Modules
763 // -- Author : Bedanga and Viyogi June 2003
764
765
766 Float_t zp = fgkZdist; //Z-distance of PMD from Interaction Point
767
768 Int_t jhrot12,jhrot13, irotdm;
769 Int_t *idtmed = fIdtmed->GetArray()-599;
770
771 AliMatrix(irotdm, 90., 0., 90., 90., 180., 0.);
772 AliMatrix(jhrot12, 90., 180., 90., 270., 0., 0.);
773 AliMatrix(jhrot13, 90., 240., 90., 330., 0., 0.);
774
775 // Now We Will Calculate Position Co-ordinates of EUM1 & EUV1 in EPM1 & EPM2
776
777 Float_t dbox1[3];
778 dbox1[0] = fgkCellRadius/fgkSqroot3by2;
779 dbox1[1] = fgkNrowUM1*fgkCellRadius;
780 dbox1[2] = fgkCellDepth/2.;
781
782 Float_t dbox3[3];
783 dbox3[0] = (dbox1[0]*fgkNcolUM1)-
784 (fgkCellRadius*fgkSqroot3*(fgkNcolUM1-1)/6.) + 0.15 + 0.05 + 0.05;
785 dbox3[1] = dbox1[1]+fgkCellRadius/2. + 0.15 + 0.05 + 0.05;
786 dbox3[2] = fgkCellDepth/2.;
787
788 Float_t dboxCGA[3];
789 dboxCGA[0] = dbox3[0] - 0.15;
790 dboxCGA[1] = dbox3[1] - 0.15;
791 dboxCGA[2] = 0.4/2.;
792
793 Float_t dboxSS1[3];
794 dboxSS1[0] = dboxCGA[0]+fgkSSBoundary;
795 dboxSS1[1] = dboxCGA[1]+fgkSSBoundary;
796 dboxSS1[2] = fgkThSS/2.;
f117e3aa 797
c2518432 798 Float_t dboxUM1[3];
799 dboxUM1[0] = dboxSS1[0];
800 dboxUM1[1] = dboxSS1[1];
24c5571f 801 dboxUM1[2] = fgkThSS/2. + 1.2;
f117e3aa 802
24c5571f 803 Float_t dboxSM1[3];
804 dboxSM1[0] = fSMLengthax + 0.05; // 0.05cm for the ESC1,2
805 dboxSM1[1] = fSMLengthay;
806 dboxSM1[2] = dboxUM1[2];
807
808 // Position co-ordinates of the unit modules in EPM1 & EPM2
809 Float_t xa1,xa2,xa3,ya1,ya2;
810 xa1 = dboxSM1[0] - dboxUM1[0];
811 xa2 = xa1 - dboxUM1[0] - 0.1 - dboxUM1[0];
812 xa3 = xa2 - dboxUM1[0] - 0.1 - dboxUM1[0];
813 ya1 = dboxSM1[1] - 0.2 - dboxUM1[1];
814 ya2 = ya1 - dboxUM1[1] - 0.3 - dboxUM1[1];
815
816 // Next to Calculate Position Co-ordinates of EUM2 & EUV2 in EPM3 & EPM4
817
818 Float_t dbox2[3];
819 dbox2[1] = fgkNrowUM2*fgkCellRadius;
820 dbox2[0] = dbox1[0];
821 dbox2[2] = dbox1[2];
822
823 Float_t dbox4[3];
824 dbox4[0] =(dbox2[0]*fgkNcolUM2)-
825 (fgkCellRadius*fgkSqroot3*(fgkNcolUM2-1)/6.) + 0.15 + 0.05 + 0.05;
826 dbox4[1] = dbox2[1] + fgkCellRadius/2. + 0.15 + 0.05 + 0.05;
827 dbox4[2] = dbox3[2];
828
829 Float_t dboxCGB[3];
830 dboxCGB[0] = dbox4[0] - 0.15;
831 dboxCGB[1] = dbox4[1] - 0.15;
832 dboxCGB[2] = 0.4/2.;
833
834 Float_t dboxSS2[3];
835 dboxSS2[0] = dboxCGB[0] + fgkSSBoundary;
836 dboxSS2[1] = dboxCGB[1] + fgkSSBoundary;
837 dboxSS2[2] = fgkThSS/2.;
838
839 Float_t dboxUM2[3];
840 dboxUM2[0] = dboxSS2[0];
841 dboxUM2[1] = dboxSS2[1];
842 dboxUM2[2] = fgkThSS/2. + 2.4/2.; // 2.4 cm is added for FEE Board thickness
f117e3aa 843
24c5571f 844 Float_t dboxSM2[3];
845 dboxSM2[0] = fSMLengthbx + 0.05; // 0.05cm for the ESC3,4
846 dboxSM2[1] = fSMLengthby;
847 dboxSM2[2] = dboxUM2[2];
848
849 // Position co-ordinates of the unit modules in EPM3 & EPM4
850 // Space is added to provide a gapping for HV between UM's
851 Float_t xb1,xb2,yb1,yb2,yb3;
852 xb1 = dboxSM2[0] - 0.1 - dboxUM2[0];
853 xb2 = xb1 - dboxUM2[0] - 0.1 - dboxUM2[0];
854 yb1 = dboxSM2[1] - 0.2 - dboxUM2[1];
954e52e8 855 yb2 = yb1 - dboxUM2[1] - 0.2 - dboxUM2[1];
856 yb3 = yb2 - dboxUM2[1] - 0.3- dboxUM2[1];
857
24c5571f 858
859 // Create Volumes for Lead(Pb) Plates
860
861 // Lead Plate For LONG TYPE
862 // X-dimension of Lead Plate = 3*(X-dimension of EUM1 or EUV1) + gap provided between unit modules
863 // Y-dimension of Lead Plate = 2*(Y-dimension of EUM1 or EUV1) + thickness of SS channels
864 // + tolerance
865 // Z-demension of Lead Plate = 1.5cm
866 // Integer assigned to Pb-medium is 600
867
868 Float_t dboxLeadA[3];
869 dboxLeadA[0] = fSMLengthax;
870 dboxLeadA[1] = fSMLengthay;
871 dboxLeadA[2] = fgkThLead/2.;
872
873 gMC->Gsvolu("ELDA","BOX", idtmed[600], dboxLeadA, 3);
874
875 //LEAD Plate For SHORT TYPE
876 // X-dimension of Lead Plate = 2*(X-dimension of EUM2 or EUV2) + gap provided between unit modules
877 // Y-dimension of Lead Plate = 3*(Y-dimension of EUM2 or EUV2) + thickness of SS channels
878 // + tolerance
879 // Z-demension of Lead Plate = 1.5cm
880 // Integer assigned to Pb-medium is 600
881
882 Float_t dboxLeadB[3];
883 dboxLeadB[0] = fSMLengthbx;
884 dboxLeadB[1] = fSMLengthby;
885 dboxLeadB[2] = fgkThLead/2.;
886
887 gMC->Gsvolu("ELDB","BOX", idtmed[600], dboxLeadB, 3);
888
889 //=========== CREATE MOTHER VOLUMES FOR PMD ===========================/
890
891 Float_t serviceX = 23.2;
892 Float_t serviceYa = 5.2;
893 Float_t serviceYb = 9.8;
894 Float_t serviceXext = 16.0;
895
896 // Five Mother Volumes of PMD are Created
897 // Two Volumes EPM1 & EPM2 of Long Type
898 // Other Two Volumes EPM3 & EPM4 for Short Type
899 // Fifth Volume EFGD for Girders and its Carriage
900 // Four Volmes EPM1, EPM2, EPM3 & EPM4 are Placed such that
901 // to create a hole and avoid overlap with Beam Pipe
902
903 // Create Volume FOR EPM1
904 // X-dimension = fSMLengthax + Extended Iron Support(23.2cm) +
905 // Extension in Module(16cm) for full coverage of Detector + 1mm thick SS-Plate
906 // Y-dimension = fSMLengthay + Extended Iron Support(5.2cm)
907 // Z-dimension = fSMthick/2.; fSMthick=17cm is full profile of PMD in Z-Side
908 // Note:- EPM1 is a Volume of Air
909
910 Float_t gaspmd1[3];
911 gaspmd1[0] = fSMLengthax + serviceX/2.+ serviceXext/2. + 0.05; //0.05cm for the thickness of
912 gaspmd1[1] = fSMLengthay + serviceYa/2.; //SS-plate for cooling encloser
913 gaspmd1[2] = fSMthick/2.;
914
915 gMC->Gsvolu("EPM1", "BOX", idtmed[698], gaspmd1, 3);
916
917
918 // Create Volume FOR EPM2
919
920 // X-dimension = fSMLengthax + Extended Iron Support(23.2cm) +
921 // Extension in Module(16cm) for full coverage of Detector + 1mm thick SS-Plate
922 // Y-dimension = fSMLengthay + Extended Iron Support(9.8cm)
923 // Z-dimension = fSMthick/2.; fSMthick=17cm is full profile of PMD in Z-Side
924 // Note:- EPM2 is a Volume of Air
925
926 Float_t gaspmd2[3];
927 gaspmd2[0] = fSMLengthax + serviceX/2. + serviceXext/2. + 0.05; //0.05cm for the thickness of
928 gaspmd2[1] = fSMLengthay + serviceYb/2.; //SS-plate for cooling encloser
929 gaspmd2[2] = fSMthick/2.;
930
931 gMC->Gsvolu("EPM2", "BOX", idtmed[698], gaspmd2, 3);
932
933 // Create Volume FOR EPM3
f117e3aa 934
24c5571f 935 // X-dimension = fSMLengthbx + Extended Iron Support(23.2cm) +
936 // Extension in Module(16cm) for full coverage of Detector
937 // Y-dimension = fSMLengthby + Extended Iron Support(5.2cm)
938 // Z-dimension = fSMthick/2.; fSMthick=17cm is full profile of PMD in Z-Side
939 // Note:- EPM3 is a Volume of Air
940
941
942 Float_t gaspmd3[3];
943 gaspmd3[0] = fSMLengthbx + serviceX/2. + serviceXext/2.+ 0.05; //0.05cm for the thickness of
944 gaspmd3[1] = fSMLengthby + serviceYa/2.; //SS-plate for cooling encloser
945 gaspmd3[2] = fSMthick/2.;
946
947 gMC->Gsvolu("EPM3", "BOX", idtmed[698], gaspmd3, 3);
948
949 // Create Volume FOR EPM4
950
951 // X-dimension = fSMLengthbx + Extended Iron Support(23.2cm) +
952 // Extension in Module(16cm) for full coverage of Detector
953 // Y-dimension = fSMLengthby + Extended Iron Support(9.8cm)
954 // Z-dimension = fSMthick/2.; fSMthick=17cm is full profile of PMD in Z-Side
955 // Note:- EPM4 is a Volume of Air
f117e3aa 956
24c5571f 957 Float_t gaspmd4[3];
958 gaspmd4[0] = fSMLengthbx + serviceX/2. + serviceXext/2.+ 0.05; //0.05cm for the thickness of
959 gaspmd4[1] = fSMLengthby + serviceYb/2.; //SS-plate for cooling encloser
960 gaspmd4[2] = fSMthick/2.;
f117e3aa 961
24c5571f 962 gMC->Gsvolu("EPM4", "BOX", idtmed[698], gaspmd4, 3);
963
964 // Create the Fifth Mother Volume of Girders and its Carriage
965 //-------------------------------------------------------------//
966 // Create the Girders
967
968 // X-dimension = 238.7cm
969 // Y-dimension = 12.0cm
970 // Z-dimension = 7.0cm
971 // Girders are the Volume of Iron
972 // And the Integer Assigned to SS is 618
973
974 Float_t grdr[3];
975 grdr[0] = 238.7/2.;
976 grdr[1] = 12.0/2.;
977 grdr[2] = 7.0/2.;
978
979 gMC->Gsvolu("EGDR", "BOX", idtmed[618], grdr, 3);
980
981 // Create Air Strip for Girders as the Girders are hollow
982 // Girders are 1cm thick in Y and Z on both sides
983
984 Float_t airgrdr[3];
985 airgrdr[0] = grdr[0];
986 airgrdr[1] = grdr[1] - 1.0;
987 airgrdr[2] = grdr[2] - 1.0;
988
989 gMC->Gsvolu("EAIR", "BOX", idtmed[698], airgrdr, 3);
f117e3aa 990
24c5571f 991 // Positioning the air strip EAIR in girder EGDR
992 gMC->Gspos("EAIR", 1, "EGDR", 0., 0., 0., 0, "ONLY");
f117e3aa 993
24c5571f 994 // Create the Carriage for Girders
995 // Originally, Carriage is divided in two parts
996 // 64.6cm on -X side, 44.2cm on +X side and 8.2cm is the gap between two
997 // In approximation we have taken these together as a single Volume
998 // With X = 64.6cm + 44.2cm + 8.2cm
999 // Y-dimension = 4.7cm
1000 // Z-dimension = 18.5cm
1001 // Carriage is a Volume of SS
1002
1003 Float_t xgrdr[3];
1004 xgrdr[0] = (64.6 + 44.2 + 8.2)/2.;
1005 xgrdr[1] = 4.7/2.;
1006 xgrdr[2] = 18.5/2.;
f117e3aa 1007
24c5571f 1008 gMC->Gsvolu("EXGD", "BOX", idtmed[618], xgrdr, 3);
1009
1010 // Create Air Strip for the Carriage EXGD as it is hollow
1011 // Carriage is 1cm thick in Y on one side and in Z on both sides
f117e3aa 1012
24c5571f 1013 Float_t xairgrdr[3];
1014 xairgrdr[0] = xgrdr[0];
1015 xairgrdr[1] = xgrdr[1] - 0.5;
1016 xairgrdr[2] = xgrdr[2] - 1.0;
f117e3aa 1017
24c5571f 1018 gMC->Gsvolu("EXIR", "BOX", idtmed[698], xairgrdr, 3);
1019
1020 // Positioning the air strip EXIR in CArriage EXGD
1021 gMC->Gspos("EXIR", 1, "EXGD", 0., -0.05, 0., 0, "ONLY");
1022
1023 // Now Create the master volume of air containing Girders & Carriage
1024
1025 // X-dimension = same as X-dimension of Girders(EGDR)
1026 // Y-dimension = Y of Girder(EGDR) + Y of Carriage(EXGD) + gap between two
1027 // Z-dimenson = same as Z of Carriage(EXGD)
1028 // Note:- It is a volume of Air
f117e3aa 1029
24c5571f 1030 Float_t fulgrdr[3];
1031 fulgrdr[0] = 238.7/2.;
1032 fulgrdr[1] = 17.5/2.;
1033 fulgrdr[2] = 18.5/2.;
f117e3aa 1034
24c5571f 1035 gMC->Gsvolu("EFGD", "BOX", idtmed[698], fulgrdr, 3);
f117e3aa 1036
24c5571f 1037 // Positioning the EGDR and EXGD in EFGD
1038
1039 gMC->Gspos("EXGD", 1, "EFGD", 0., 6.4, 0., 0, "ONLY");
1040 gMC->Gspos("EGDR", 1, "EFGD", 0., -2.75, -5.75, 0, "ONLY");
1041 gMC->Gspos("EGDR", 2, "EFGD", 0., -2.75, 5.75, 0, "ONLY");
1042
1043 //=========== Mother Volumes are Created ============================//
1044
1045 // Create the Volume of 1mm thick SS-Plate for cooling encloser
1046 // These are placed on the side close to the Beam Pipe
1047 // SS-Plate is perpendicular to the plane of Detector
1048
1049 // For LONG TYPE
1050
1051 // For EPM1
1052 // X-dimension = 0.1cm
1053 // Y-dimension = same as Y of EPM1
1054 // Z-dimension = Y of EPM1 - 0.1; 0.1cm is subtracted as 1mm thick
1055 // FR4 sheets for the detector encloser placed on both sides
1056 // It is a Volume of SS
1057 // Integer assigned to SS is 618
1058
1059 Float_t sscoolencl1[3];
1060 sscoolencl1[0] = 0.05;
1061 sscoolencl1[1] = gaspmd1[1];
1062 sscoolencl1[2] = gaspmd1[2] - 0.2/2.;
1063
1064 gMC->Gsvolu("ESC1", "BOX", idtmed[618], sscoolencl1, 3);
1065
1066 // Placement of ESC1 in EPM1
1067 gMC->Gspos("ESC1", 1, "EPM1", -gaspmd1[0] + 0.05, 0., 0., 0, "ONLY");
1068
1069
1070 // For EPM2
1071 // X-dimension = 0.1cm
1072 // Y-dimension = same as Y of EPM2
1073 // Z-dimension = Y of EPM2 - 0.1; 0.1cm is subtracted as 1mm thick
1074 // FR4 sheets for the detector encloser placed on both sides
1075 // It is a Volume of SS
1076
1077 Float_t sscoolencl2[3];
1078 sscoolencl2[0] = 0.05;
1079 sscoolencl2[1] = gaspmd2[1];
1080 sscoolencl2[2] = gaspmd2[2] - 0.2/2.;
1081
1082 gMC->Gsvolu("ESC2", "BOX", idtmed[618], sscoolencl2, 3);
1083
1084 // Placement of ESC2 in EPM2
1085 gMC->Gspos("ESC2", 1, "EPM2", gaspmd2[0] - 0.05 , 0., 0., 0, "ONLY");
1086
1087 // For SHORT TYPE
1088
1089 // For EPM3
1090 // X-dimension = 0.1cm
1091 // Y-dimension = same as Y of EPM3
1092 // Z-dimension = Y of EPM3 - 0.1; 0.1cm is subtracted as 1mm thick
1093 // FR4 sheets for the detector encloser placed on both sides
1094 // It is a Volume of SS
f117e3aa 1095
24c5571f 1096 Float_t sscoolencl3[3];
1097 sscoolencl3[0] = 0.05;
1098 sscoolencl3[1] = gaspmd3[1];
1099 sscoolencl3[2] = gaspmd3[2] - 0.2/2.;
f117e3aa 1100
24c5571f 1101 gMC->Gsvolu("ESC3", "BOX", idtmed[618], sscoolencl3, 3);
f117e3aa 1102
24c5571f 1103 // Placement of ESC3 in EPM3
1104 gMC->Gspos("ESC3", 1, "EPM3", gaspmd3[0] - 0.05 , 0., 0., 0, "ONLY");
f117e3aa 1105
f117e3aa 1106
24c5571f 1107 // For EPM4
1108 // X-dimension = 0.1cm
1109 // Y-dimension = same as Y of EPM4
1110 // Z-dimension = Y of EPM4 - 0.1; 0.1cm is subtracted as 1mm thick
1111 // FR4 sheets for the detector encloser placed on both sides
1112 // It is a Volume of SS
1113
1114 Float_t sscoolencl4[3];
1115 sscoolencl4[0] = 0.05;
1116 sscoolencl4[1] = gaspmd4[1];
1117 sscoolencl4[2] = gaspmd4[2] - 0.2/2.;
f117e3aa 1118
24c5571f 1119 gMC->Gsvolu("ESC4", "BOX", idtmed[618], sscoolencl4, 3);
f117e3aa 1120
24c5571f 1121 // Placement of ESC4 in EPM4
1122 gMC->Gspos("ESC4", 1, "EPM4", -gaspmd4[0] + 0.05 , 0., 0., 0, "ONLY");
f117e3aa 1123
24c5571f 1124 //======== CREATE SS SUPPORTS FOR EPM1, EPM2, EPM3 & EPM4 =========//
1125 // --- DEFINE SS volumes for EPM1 & EPM2 ---
c2518432 1126
24c5571f 1127 // Create SS Support For EPM1
1128
1129 // X-dimension = fSMLengthax + Extended Iron Support(23.2cm)
1130 // Y-dimension = fSMLengthay + Extended Iron Support(5.2cm)
1131 // Z-dimension = thickness of Iron support(0.5cm)
1132 // It is a Volume of SS
1133 // Integer assigned to SS is 618
1134
1135 Float_t dboxFea1[3];
1136 dboxFea1[0] = fSMLengthax + serviceX/2.;
1137 dboxFea1[1] = fSMLengthay + serviceYa/2.;
1138 dboxFea1[2] = fgkThSteel/2.;
f117e3aa 1139
24c5571f 1140 gMC->Gsvolu("EFE1","BOX", idtmed[618], dboxFea1, 3);
f117e3aa 1141
f117e3aa 1142
24c5571f 1143 // Create SS Support For EPM2
f117e3aa 1144
24c5571f 1145 // X-dimension = fSMLengthax + Extended Iron Support(23.2cm)
1146 // Y-dimension = fSMLengthay + Extended Iron Support(9.8cm)
1147 // Z-dimension = thickness of Iron support(0.5cm)
1148 // It is a Volume of SS
1149 // Integer assigned to SS is 618
f117e3aa 1150
24c5571f 1151 Float_t dboxFea2[3];
1152 dboxFea2[0] = fSMLengthax + serviceX/2.;
1153 dboxFea2[1] = fSMLengthay + serviceYb/2.;
1154 dboxFea2[2] = fgkThSteel/2.;
1155
1156 gMC->Gsvolu("EFE2","BOX", idtmed[618], dboxFea2, 3);
f117e3aa 1157
24c5571f 1158 // Create SS Support For EPM3
f117e3aa 1159
24c5571f 1160 // X-dimension = fSMLengthbx + Extended Iron Support(23.2cm)
1161 // Y-dimension = fSMLengthby + Extended Iron Support(5.2cm)
1162 // Z-dimension = thickness of Iron support(0.5cm)
1163 // It is a Volume of SS
1164 // Integer assigned to SS is 618
f117e3aa 1165
24c5571f 1166 Float_t dboxFea3[3];
1167 dboxFea3[0] = fSMLengthbx + serviceX/2.;
1168 dboxFea3[1] = fSMLengthby + serviceYa/2.;
1169 dboxFea3[2] = fgkThSteel/2.;
1170
1171 gMC->Gsvolu("EFE3","BOX", idtmed[618], dboxFea3, 3);
f117e3aa 1172
24c5571f 1173 // Create SS Support For EPM4
c2518432 1174
24c5571f 1175 // X-dimension = fSMLengthbx + Extended Iron Support(23.2cm)
1176 // Y-dimension = fSMLengthby + Extended Iron Support(9.8cm)
1177 // Z-dimension = thickness of Iron support(0.5cm)
1178 // It is a Volume of SS
1179 // Integer assigned to SS is 618
1180
1181 Float_t dboxFea4[3];
1182 dboxFea4[0] = fSMLengthbx + serviceX/2.;
1183 dboxFea4[1] = fSMLengthby + serviceYb/2.;
1184 dboxFea4[2] = fgkThSteel/2.;
1185
1186 gMC->Gsvolu("EFE4","BOX", idtmed[618], dboxFea4, 3);
f117e3aa 1187
f117e3aa 1188
24c5571f 1189 //=============== Volumes for SS support are Completed =============//
1190
1191 // Create FR4 Sheets to enclose the PMD which are Placed parallel to the
1192 // plane of the detector. Four FR4 sheets are created with the dimensions
1193 // corresponding to the Iron Supports
1194 // This is cooling encloser.
1195
1196 // Create FR4 sheet ECC1
1197 // X-dimension = same as EFE1
1198 // Y-dimension = same as EFE1
1199 // Z-dimension = 0.1cm
1200 // FR4 medium is same as that of G10
1201 // Integer assigned to FR4 medium is 607
1202
1203 Float_t enclos1[3];
1204 enclos1[0] = dboxFea1[0];
1205 enclos1[1] = dboxFea1[1];
1206 enclos1[2] = 0.05;
f117e3aa 1207
24c5571f 1208 gMC->Gsvolu("ECC1", "BOX", idtmed[607], enclos1, 3);
1209
1210 // Create FR4 sheet ECC2
1211 // X-dimension = same as EFE2
1212 // Y-dimension = same as EFE2
1213 // Z-dimension = 0.1cm
1214
1215 Float_t enclos2[3];
1216 enclos2[0] = dboxFea2[0];
1217 enclos2[1] = dboxFea2[1];
1218 enclos2[2] = 0.05;
1219
1220 gMC->Gsvolu("ECC2", "BOX", idtmed[607], enclos2, 3);
1221
1222 // Create FR4 sheet ECC3
1223 // X-dimension = same as EFE3
1224 // Y-dimension = same as EFE3
1225 // Z-dimension = 0.1cm
1226
1227 Float_t enclos3[3];
1228 enclos3[0] = dboxFea3[0];
1229 enclos3[1] = dboxFea3[1];
1230 enclos3[2] = 0.05;
1231
1232 gMC->Gsvolu("ECC3", "BOX", idtmed[607], enclos3, 3);
f117e3aa 1233
24c5571f 1234 // Create FR4 sheet ECC4
1235 // X-dimension = same as EFE4
1236 // Y-dimension = same as EFE4
1237 // Z-dimension = 0.1cm
f117e3aa 1238
24c5571f 1239 Float_t enclos4[3];
1240 enclos4[0] = dboxFea4[0];
1241 enclos4[1] = dboxFea4[1];
1242 enclos4[2] = 0.05;
f117e3aa 1243
24c5571f 1244 gMC->Gsvolu("ECC4", "BOX", idtmed[607], enclos4, 3);
1245
1246 //--------------- FR4 SHEETS COMPLETED ---------------------------//
1247
1248 //------------- Create the SS-Channels(Horizontal Rails) to Place
1249 // Unit Modules on SS Support -------------------------------------//
1250
1251 // Two types of SS-Channels are created
1252 // as we have two types of modules
1253
1254 // Create SS-channel for Long Type
1255 // X-dimension = same as Lead Plate ELDA
1256 // Y-dimension = 0.1cm
1257 // Z-dimension = 2.0cm
1258 // Volume medium is SS
1259
1260 Float_t channel12[3];
1261 channel12[0] = fSMLengthax;
1262 channel12[1] = 0.05;
1263 channel12[2] = 2.0/2.;
1264
1265 gMC->Gsvolu("ECHA", "BOX", idtmed[618], channel12, 3);
f117e3aa 1266
24c5571f 1267 // Create SS-channel for Short Type
1268 // X-dimension = same as Lead Plate ELDB
1269 // Y-dimension = 0.1cm
1270 // Z-dimension = 2.0cm
1271 // Volume medium is SS
f117e3aa 1272
24c5571f 1273 Float_t channel34[3];
1274 channel34[0] = fSMLengthbx;
1275 channel34[1] = 0.05;
1276 channel34[2] = 2.0/2.;
f117e3aa 1277
24c5571f 1278 gMC->Gsvolu("ECHB", "BOX", idtmed[618], channel34, 3);
f117e3aa 1279
24c5571f 1280 //----------------- SS-Channels are Copmleted --------------------//
1281
1282 //========= POSITIONING OF SS SUPPORT AND LEAD PLATES IN QUADRANTS =====//
1283
1284 /**************** Z-Distances of different Components **********/
1285
1286 Float_t zcva,zfea,zpba,zpsa,zchanVeto,zchanPS, zelvdbVeto, zelvdbPS;
1287
1288
1289 zpba = - fgkThSteel/2.; //z-position of Pb plate
1290 zfea = fgkThLead/2.; //z-position of SS-Support
1291 zchanVeto = zpba - fgkThLead/2. - channel12[2]; //z-position of SS-channel on Veto
1292 zchanPS = zfea + fgkThSteel/2. + channel12[2]; //z-position of SS-channel on Preshower
1293 zpsa = zfea + fgkThSteel/2. + fDthick; //z-position of Preshower
1294 zcva = zpba - fgkThLead/2.- fDthick; //z-position of Veto
1295
1296 zelvdbVeto = zpba + fgkThLead/2. - 8.9/2.; //z-position of LVDBs on Veto side
1297 zelvdbPS = zfea + fgkThSteel/2. + 7.4/2.; //z-position of LVDBs on Preshower side
1298
1299 // FOR LONG TYPE
1300 Float_t xLead1,yLead1,zLead1, xLead2,yLead2,zLead2;
1301 Float_t xIron1,yIron1,zIron1, xIron2,yIron2,zIron2;
1302
1303
1304 xIron1 = - 16.0/2. + 0.1/2.; // half of 0.1cm is added as 1mm SS sheet is placed
1305 yIron1 = 0.;
1306 zIron1 = zfea;
1307
1308 xIron2 = 16.0/2. - 0.1/2.; // half of 0.1cm is added as 1mm SS sheet is placed
1309 yIron2 = 0.;
1310 zIron2 = zfea;
1311
1312
1313 xLead1 = xIron1 - 23.2/2.;
1314 yLead1 = -5.2/2.;
1315 zLead1 = zpba;
1316
1317 xLead2 =xIron2 + 23.2/2.;
1318 yLead2 = 9.8/2.;
1319 zLead2 = zpba;
1320
1321 gMC->Gspos("EFE1", 1, "EPM1", xIron1, yIron1, zfea, 0, "ONLY");
1322 gMC->Gspos("ELDA", 1, "EPM1", xLead1, yLead1, zpba, 0, "ONLY");
1323 gMC->Gspos("EFE2", 1, "EPM2", xIron2, yIron2, zfea, 0, "ONLY");
1324 gMC->Gspos("ELDA", 1, "EPM2", xLead2, yLead2, zpba, jhrot12, "ONLY");
1325
1326
1327 // FOR SHORT TYPE
1328 Float_t xLead3,yLead3,zLead3, xLead4,yLead4,zLead4;
1329 Float_t xIron3,yIron3,zIron3, xIron4,yIron4,zIron4;
1330
1331
1332 xIron3 = 16.0/2.- 0.1/2.; // half of 0.1cm is added as 1mm SS sheet is placed ;
1333 yIron3 = 0.;
1334 zIron3 = zfea;
1335
1336 xIron4 = - 16.0/2.+ 0.1/2.; // half of 0.1cm is added as 1mm SS sheet is placed;
1337 yIron4 = 0.;
1338 zIron4 = zfea;
1339
1340 xLead3 = xIron3 + 23.2/2.;
1341 yLead3 = -5.2/2.;
1342 zLead3 = zpba;
1343
1344 xLead4 = xIron4 - 23.2/2.;
1345 yLead4 = 9.8/2.;
1346 zLead4 = zpba;
1347
1348 gMC->Gspos("EFE3", 1, "EPM3", xIron3, yIron3, zfea, 0, "ONLY");
1349 gMC->Gspos("ELDB", 1, "EPM3", xLead3, yLead3, zpba, 0, "ONLY");
1350 gMC->Gspos("EFE4", 1, "EPM4", xIron4, yIron4, zfea, 0, "ONLY");
1351 gMC->Gspos("ELDB", 1, "EPM4", xLead4, yLead4, zpba, jhrot12, "ONLY");
1352
1353 //===================================================================//
1354 // Placement of FR4 sheets as encloser of full profile of PMD
1355
1356 gMC->Gspos("ECC1", 1, "EPM1", xIron1, yIron1, -8.45, 0, "ONLY");
1357 gMC->Gspos("ECC2", 1, "EPM2", xIron2, yIron2, -8.45, 0,"ONLY");
1358 gMC->Gspos("ECC3", 1, "EPM3", xIron3, yIron3, -8.45, 0,"ONLY");
1359 gMC->Gspos("ECC4", 1, "EPM4", xIron4, yIron4, -8.45, 0,"ONLY");
f117e3aa 1360
24c5571f 1361 gMC->Gspos("ECC1", 2, "EPM1", xIron1, yIron1, 8.45, 0, "ONLY");
1362 gMC->Gspos("ECC2", 2, "EPM2", xIron2, yIron2, 8.45, 0,"ONLY");
1363 gMC->Gspos("ECC3", 2, "EPM3", xIron3, yIron3, 8.45, 0,"ONLY");
1364 gMC->Gspos("ECC4", 2, "EPM4", xIron4, yIron4, 8.45, 0,"ONLY");
1365
1366 //----------------- NOW TO PLACE SS-CHANNELS -----------------------//
1367
1368 Float_t xchanepm11, ychanepm11,ychanepm12;
1369 Float_t xchanepm21, ychanepm21,ychanepm22;
1370 Float_t xchanepm31, ychanepm31,ychanepm32,ychanepm33,ychanepm34;
1371 Float_t xchanepm41, ychanepm41,ychanepm42,ychanepm43,ychanepm44;
1372
1373 xchanepm11 = xLead1;
1374 ychanepm11 = ya1 + yLead1 + dboxSS1[1] + 0.1 + 0.1/2.;
1375 ychanepm12 = ya1 + yLead1 - dboxSS1[1] - 0.1 - 0.1/2.;
1376
1377 xchanepm21 = xLead2;
1378 ychanepm21 = -ya1 + yLead2 - dboxSS1[1] - 0.1 - 0.1/2.;
1379 ychanepm22 = -ya1 + yLead2 + dboxSS1[1] + 0.1 + 0.1/2.;
1380
1381 gMC->Gspos("ECHA", 1, "EPM1", xchanepm11, ychanepm11, zchanPS, 0, "ONLY");
1382 gMC->Gspos("ECHA", 2, "EPM1", xchanepm11, ychanepm12, zchanPS, 0, "ONLY");
1383 gMC->Gspos("ECHA", 3, "EPM1", xchanepm11, ychanepm11, zchanVeto, 0, "ONLY");
1384 gMC->Gspos("ECHA", 4, "EPM1", xchanepm11, ychanepm12, zchanVeto, 0, "ONLY");
1385 gMC->Gspos("ECHA", 1, "EPM2", xchanepm21, ychanepm21, zchanPS, 0, "ONLY");
1386 gMC->Gspos("ECHA", 2, "EPM2", xchanepm21, ychanepm22, zchanPS, 0, "ONLY");
1387 gMC->Gspos("ECHA", 3, "EPM2", xchanepm21, ychanepm21, zchanVeto, 0, "ONLY");
1388 gMC->Gspos("ECHA", 4, "EPM2", xchanepm21, ychanepm22, zchanVeto, 0, "ONLY");
1389
1390 xchanepm31 = xLead3;
1391 ychanepm31 = yb1 + yLead3 + dboxSS2[1] + 0.1 + 0.1/2.;
1392 ychanepm32 = yb1 + yLead3 - dboxSS2[1] - 0.1 - 0.1/2.;
1393 ychanepm33 = yb3 + yLead3 + dboxSS2[1] + 0.1 + 0.1/2.;
1394 ychanepm34 = yb3 + yLead3 - dboxSS2[1] - 0.1 - 0.1/2.;
1395
1396 xchanepm41 = xLead4;
1397 ychanepm41 = -yb1 + yLead4 - dboxSS2[1] - 0.1 - 0.1/2.;
1398 ychanepm42 = -yb1 + yLead4 + dboxSS2[1] + 0.1 + 0.1/2.;
1399 ychanepm43 = -yb3 + yLead4 - dboxSS2[1] - 0.1 - 0.1/2.;
1400 ychanepm44 = -yb3 + yLead4 + dboxSS2[1] + 0.1 + 0.1/2.;
1401
1402
1403 gMC->Gspos("ECHB", 1, "EPM3", xchanepm31, ychanepm31, zchanPS, 0, "ONLY");
1404 gMC->Gspos("ECHB", 2, "EPM3", xchanepm31, ychanepm32, zchanPS, 0, "ONLY");
1405 gMC->Gspos("ECHB", 3, "EPM3", xchanepm31, ychanepm33, zchanPS, 0, "ONLY");
954e52e8 1406 gMC->Gspos("ECHB", 4, "EPM3", xchanepm31, ychanepm34 + 0.200005, zchanPS, 0, "ONLY");
1407 // Because of overlaping a factor 0.200005 is added in ychanepm34
1408
24c5571f 1409 gMC->Gspos("ECHB", 5, "EPM3", xchanepm31, ychanepm31, zchanVeto, 0, "ONLY");
1410 gMC->Gspos("ECHB", 6, "EPM3", xchanepm31, ychanepm32, zchanVeto, 0, "ONLY");
1411 gMC->Gspos("ECHB", 7, "EPM3", xchanepm31, ychanepm33, zchanVeto, 0, "ONLY");
954e52e8 1412 gMC->Gspos("ECHB", 8, "EPM3", xchanepm31, ychanepm34 + 0.200005, zchanVeto, 0, "ONLY");
1413 // Because of overlaping a factor 0.200005 is added in ychanepm34
24c5571f 1414
1415 gMC->Gspos("ECHB", 1, "EPM4", xchanepm41, ychanepm41, zchanPS, 0, "ONLY");
1416 gMC->Gspos("ECHB", 2, "EPM4", xchanepm41, ychanepm42, zchanPS, 0, "ONLY");
1417 gMC->Gspos("ECHB", 3, "EPM4", xchanepm41, ychanepm43, zchanPS, 0, "ONLY");
954e52e8 1418 gMC->Gspos("ECHB", 4, "EPM4", xchanepm41, ychanepm44 - 0.200002, zchanPS, 0, "ONLY");
1419 // Because of overlaping a factor 0.200002 is subtracted in ychanepm44
1420
24c5571f 1421 gMC->Gspos("ECHB", 5, "EPM4", xchanepm41, ychanepm41, zchanVeto, 0, "ONLY");
1422 gMC->Gspos("ECHB", 6, "EPM4", xchanepm41, ychanepm42, zchanVeto, 0, "ONLY");
1423 gMC->Gspos("ECHB", 7, "EPM4", xchanepm41, ychanepm43, zchanVeto, 0, "ONLY");
954e52e8 1424 gMC->Gspos("ECHB", 8, "EPM4", xchanepm41, ychanepm44 -0.200002, zchanVeto, 0, "ONLY");
1425 // Because of overlaping a factor 0.200002 is subtracted in ychanepm44
1426
24c5571f 1427 //================= Channel Placement Completed ======================//
1428 //============ Now to Create Al Box and then LVDBs and Cables //
1429 // are Placed inside it //
f117e3aa 1430
24c5571f 1431 // Eight Al Boxes are created, four on Preshower side
1432 // and four on Veto side
f117e3aa 1433
24c5571f 1434 // FOR PRESHOWER
f117e3aa 1435
24c5571f 1436 // First to Create hollow Al Box
1437 // there are two types of modules, therefore, two Al box of
1438 // long type and two of short type are created
f117e3aa 1439
24c5571f 1440 // For Long Type
1441 // X-dimension = 16.5cm
1442 // Y-dimension = same as EFE1
1443 // Z-dimension = 7.4cm
1444 // Integer assigned to Al medium is 603
c4561145 1445
24c5571f 1446 Float_t esvdA1[3];
1447 esvdA1[0]= 16.5/2.;
1448 esvdA1[1]= dboxFea1[1];
1449 esvdA1[2]= 7.4/2.;
1450
1451 gMC->Gsvolu("ESV1", "BOX", idtmed[603], esvdA1, 3);
1452 gMC->Gsvolu("ESV2", "BOX", idtmed[603], esvdA1, 3);
1453
1454 // Create Air strip for Al Boxes type-A
1455 // Al boxes are 3mm thick In X and Z on both sides
1456 // X-dimension = 16.5cm - 0.3cm
1457 // Y-dimension = same as EFE1
1458 // Z-dimension = 7.4cm - 0.3cm
1459
1460 Float_t eairA1[3];
1461 eairA1[0]= esvdA1[0] - 0.3;
1462 eairA1[1]= esvdA1[1];
1463 eairA1[2]= esvdA1[2] - 0.3;
1464
1465 gMC->Gsvolu("EIR1", "BOX", idtmed[698], eairA1, 3);
954e52e8 1466 gMC->Gsvolu("EIR2", "BOX", idtmed[698], eairA1, 3);
24c5571f 1467
954e52e8 1468 // Put air strips EIR1 & EIR2 inside ESV1 & ESV2 respectively
24c5571f 1469 gMC->Gspos("EIR1", 1, "ESV1", 0., 0., 0., 0, "ONLY");
954e52e8 1470 gMC->Gspos("EIR2", 1, "ESV2", 0., 0., 0., 0, "ONLY");
b1952773 1471
b1952773 1472
24c5571f 1473 // For Short Type
1474 // X-dimension = 16.5cm
1475 // Y-dimension = same as EFE3
1476 // Z-dimension = 7.4cm
1477
1478 Float_t esvdA2[3];
1479 esvdA2[0]= esvdA1[0];
1480 esvdA2[1]= dboxFea3[1];
1481 esvdA2[2]= esvdA1[2];
f117e3aa 1482
24c5571f 1483 gMC->Gsvolu("ESV3", "BOX", idtmed[603], esvdA2, 3);
1484 gMC->Gsvolu("ESV4", "BOX", idtmed[603], esvdA2, 3);
a978c9e3 1485
24c5571f 1486 // Create Air strip for Al Boxes type-B
1487 // Al boxes are 3mm thick In X and Z on both sides
1488 // X-dimension = 16.5cm - 0.3cm
1489 // Y-dimension = same as EFE3
1490 // Z-dimension = 7.4cm - 0.3cm
1491
1492 Float_t eairA2[3];
1493 eairA2[0]= esvdA2[0] - 0.3;
1494 eairA2[1]= esvdA2[1];
1495 eairA2[2]= esvdA2[2] - 0.3;
1496
954e52e8 1497 gMC->Gsvolu("EIR3", "BOX", idtmed[698], eairA2, 3);
1498 gMC->Gsvolu("EIR4", "BOX", idtmed[698], eairA2, 3);
24c5571f 1499
954e52e8 1500 // Put air strips EIR3 & EIR4 inside ESV3 & ESV4 respectively
1501 gMC->Gspos("EIR3", 1, "ESV3", 0., 0., 0., 0, "ONLY");
1502 gMC->Gspos("EIR4", 1, "ESV4", 0., 0., 0., 0, "ONLY");
24c5571f 1503
1504
1505 // FOR VETO
f117e3aa 1506
24c5571f 1507 // First to Create hollow Al Box
1508 // there are two types of modules, therefore, two Al box of
1509 // long type and two of short type are created
f117e3aa 1510
24c5571f 1511 // For Long Type
1512 // X-dimension = 16.5cm
1513 // Y-dimension = same as EFE1
1514 // Z-dimension = 8.9cm
1515 // Integer assigned to Al medium is 603
1516
1517 Float_t esvdB1[3];
1518 esvdB1[0]= 16.5/2.;
1519 esvdB1[1]= dboxFea1[1];
1520 esvdB1[2]= 8.9/2.;
1521
1522 gMC->Gsvolu("EVV1", "BOX", idtmed[603], esvdB1, 3);
1523 gMC->Gsvolu("EVV2", "BOX", idtmed[603], esvdB1, 3);
1524
1525 // Create Air strip for Al Boxes long type
1526 // Al boxes are 3mm thick In X and Z on both sides
1527 // X-dimension = 16.5cm - 0.3cm
1528 // Y-dimension = same as EFE1
1529 // Z-dimension = 8.9cm - 0.3cm
1530
1531 Float_t eairB1[3];
1532 eairB1[0]= esvdB1[0] - 0.3;
1533 eairB1[1]= esvdB1[1];
1534 eairB1[2]= esvdB1[2] - 0.3;
1535
954e52e8 1536 gMC->Gsvolu("EIR5", "BOX", idtmed[698], eairB1, 3);
1537 gMC->Gsvolu("EIR6", "BOX", idtmed[698], eairB1, 3);
24c5571f 1538
954e52e8 1539 // Put air strips EIR5 & EIR6 inside EVV1 & EVV2 respectively
1540 gMC->Gspos("EIR5", 1, "EVV1", 0., 0., 0., 0, "ONLY");
1541 gMC->Gspos("EIR6", 1, "EVV2", 0., 0., 0., 0, "ONLY");
b1952773 1542
f117e3aa 1543
24c5571f 1544 // For Short Type
1545 // X-dimension = 16.5cm
1546 // Y-dimension = same as EFE3
1547 // Z-dimension = 8.9cm
1548 // Integer assigned to Al medium is 603
1549
1550 Float_t esvdB2[3];
1551 esvdB2[0]= esvdB1[0];
1552 esvdB2[1]= dboxFea3[1];
1553 esvdB2[2]= esvdB1[2];
b1952773 1554
24c5571f 1555 gMC->Gsvolu("EVV3", "BOX", idtmed[603], esvdB2, 3);
1556 gMC->Gsvolu("EVV4", "BOX", idtmed[603], esvdB2, 3);
1557
1558
1559 // Create Air strip for Al Boxes short type
1560 // Al boxes are 3mm thick In X and Z on both sides
1561 // X-dimension = 16.5cm - 0.3cm
1562 // Y-dimension = same as EFE3
1563 // Z-dimension = 8.9cm - 0.3cm
1564
1565 Float_t eairB2[3];
1566 eairB2[0]= esvdB2[0] - 0.3;
1567 eairB2[1]= esvdB2[1];
1568 eairB2[2]= esvdB2[2] - 0.3;
1569
954e52e8 1570 gMC->Gsvolu("EIR7", "BOX", idtmed[698], eairB2, 3);
1571 gMC->Gsvolu("EIR8", "BOX", idtmed[698], eairB2, 3);
24c5571f 1572
954e52e8 1573 // Put air strips EIR7 & EIR8 inside EVV3 & EVV4 respectively
1574 gMC->Gspos("EIR7", 1, "EVV3", 0., 0., 0., 0, "ONLY");
1575 gMC->Gspos("EIR8", 1, "EVV4", 0., 0., 0., 0, "ONLY");
24c5571f 1576
1577 //------------ Al Boxes Completed ----------------------/
1578
1579 //--------------Now Create LVDBs----------------------/
1580
1581 // LVDBs are the volumes of G10
1582 // X-dimension = 10.0cm
1583 // Y-dimension = 8.0cm
1584 // Z-dimension = 0.2cm
1585 // Integer assigned to the G10 medium is 607
1586
1587 Float_t elvdb[3];
1588 elvdb[0]= 10.0/2.;
1589 elvdb[1]= 8.0/2.;
1590 elvdb[2]= 0.2/2.;
1591
1592 gMC->Gsvolu("ELVD", "BOX", idtmed[607], elvdb, 3);
1593
954e52e8 1594
1595 // Put the LVDBs inside Air Boxes
24c5571f 1596 Float_t yesvd = dboxFea1[1] - 25.0 - 4.0;
1597
1598 for(Int_t jj =1; jj<=6; jj++){
1599
954e52e8 1600 gMC->Gspos("ELVD", jj, "EIR1", 0., yesvd, 0., 0, "ONLY");
1601 gMC->Gspos("ELVD", jj, "EIR2", 0., yesvd, 0., 0, "ONLY");
1602
24c5571f 1603 yesvd = yesvd - 4.0 - 0.5 - 4.0;
1604
1605 }
1606
1607 yesvd = dboxFea3[1] - 15.0 - 4.0;
1608
1609 for(Int_t jj =1; jj<=6; jj++){
1610
954e52e8 1611 gMC->Gspos("ELVD", jj, "EIR3", 0., yesvd, 0., 0, "ONLY");
1612 gMC->Gspos("ELVD", jj, "EIR4", 0., yesvd, 0., 0, "ONLY");
1613
24c5571f 1614 yesvd = yesvd - 4.0 - 0.5 - 4.0;
1615 }
1616
1617 yesvd = dboxFea1[1] - 25.0 - 4.0;
1618
1619 for(Int_t jj =1; jj<=6; jj++){
1620
954e52e8 1621 gMC->Gspos("ELVD", jj, "EIR5", 0., yesvd, 0., 0, "ONLY");
1622 gMC->Gspos("ELVD", jj, "EIR6", 0., yesvd, 0., 0, "ONLY");
1623
24c5571f 1624 yesvd = yesvd - 4.0 - 0.5 - 4.0;
1625 }
1626
1627 yesvd = dboxFea3[1] - 15.0 - 4.0;
1628
1629 for(Int_t jj =1; jj<=6; jj++){
1630
954e52e8 1631 gMC->Gspos("ELVD", jj, "EIR7", 0., yesvd, 0., 0, "ONLY");
1632 gMC->Gspos("ELVD", jj, "EIR8", 0., yesvd, 0., 0, "ONLY");
1633
24c5571f 1634 yesvd = yesvd - 4.0 - 0.5 - 4.0;
1635 }
954e52e8 1636
24c5571f 1637
1638 //----------------- LVDBs Placement Completed--------------//
1639
1640 // ------------ Now Create Cables ------------------------//
1641
1642 // There are a number of cables
1643 // We have reduced the number of volumes to 4
1644 // And these 4 Volumes of Cables are placed repeatedly
1645 // in the four quadrants (EPM1,2,3,4)
1646 // The placement of Cables are in good approximations
1647 // The material medium for Cables is a mixture of Plastic
1648 // and Copper(Cu). Therefore, in a good approximation a mixture
1649 // is created and Integer assigned to this medium is 631
1650
1651 Float_t cable1[3];
1652 cable1[0] = 2.5/2.;
1653 cable1[1] = dboxFea1[1];
1654 cable1[2] = 2.4/2.;
1655
1656 gMC->Gsvolu("ECB1", "BOX", idtmed[631], cable1, 3);
1657
1658 Float_t cable2[3];
1659 cable2[0] = 2.5/2.;
1660 cable2[1] = dboxFea3[1];
1661 cable2[2] = 2.4/2.;
1662
1663 gMC->Gsvolu("ECB2", "BOX", idtmed[631], cable2, 3);
1664
1665 Float_t cable3[3];
1666 cable3[0] = 2.5/2.;
1667 cable3[1] = dboxFea3[1] - dboxUM2[1];
1668 cable3[2] = 2.4/2.;
1669
1670 gMC->Gsvolu("ECB3", "BOX", idtmed[631], cable3, 3);
1671
1672 Float_t cable4[3];
1673 cable4[0] = 2.5/2.;
1674 cable4[1] = dboxUM2[1];
1675 cable4[2] = 2.4/2.;
1676
1677 gMC->Gsvolu("ECB4", "BOX", idtmed[631], cable4, 3);
1678
1679 // Calculation of the co-ordinates of Cables
1680
1681 Float_t xcable11pm2, xcable12pm2, xcable2pm1, xcable2pm2, xcable21pm4, xcable22pm4;
1682 Float_t xcable3pm1, xcable3pm3, xcable3pm4, xcable4pm3;
1683
1684 Float_t ycable2pm1, ycable2pm2;
1685 Float_t ycable3pm1, ycable3pm3, ycable3pm4, ycable4pm3;
1686
1687 Float_t zcablePS, zcableVeto;
1688
1689 xcable2pm1 = esvdA1[0] - 3.0 - cable1[0];
1690 xcable3pm1 = xcable2pm1 - cable1[0] - 0.5 - cable1[0];
1691
1692 xcable11pm2 = -esvdA1[0]+ 3.0 + cable1[0];
1693 xcable12pm2 = xcable11pm2 + cable1[0] + 0.5 + cable1[0];
1694 xcable2pm2 = xcable12pm2 + cable1[0] + 0.5 + cable1[0];
1695
1696 xcable3pm3 = -esvdB1[0] + 3.0 + cable1[0];
1697 xcable4pm3 = xcable3pm3 + cable1[0] + 0.5 + cable1[0];
1698
1699 xcable21pm4 = esvdB1[0] - 3.0 - cable1[0];
1700 xcable22pm4 = xcable21pm4 - cable1[0] -0.5 - cable1[0];
1701 xcable3pm4 = xcable22pm4 - cable1[0] -0.5 -cable1[0];
1702
1703 ycable2pm1 = -(esvdA1[1] - esvdA2[1]);
1704 ycable3pm1 = -esvdA1[1] + cable3[1];
1705
1706 ycable2pm2 = -(esvdA1[1] - esvdA2[1]);
1707
1708 ycable3pm3 = -dboxUM2[1];
1709 ycable4pm3 = -esvdA2[1] + dboxUM2[1];
1710
1711 ycable3pm4 = -dboxUM2[1];
1712
1713 zcablePS = -esvdA1[2] + 0.3 + cable1[2];
1714 zcableVeto = esvdB1[2] - 0.3 - cable1[2];
954e52e8 1715
1716
1717
1718 // Placement of Cables in Air Boxes
1719 gMC->Gspos("ECB2", 1, "EIR1", xcable2pm1, ycable2pm1, zcablePS, 0, "ONLY");
1720 gMC->Gspos("ECB3", 1, "EIR1", xcable3pm1, ycable3pm1, zcablePS, 0, "ONLY");
1721 gMC->Gspos("ECB2", 1, "EIR5", xcable2pm1, ycable2pm1, zcableVeto, 0, "ONLY");
1722 gMC->Gspos("ECB3", 1, "EIR5", xcable3pm1, ycable3pm1, zcableVeto, 0, "ONLY");
1723
1724 gMC->Gspos("ECB1", 1, "EIR2", xcable11pm2, 0., zcablePS, 0, "ONLY");
1725 gMC->Gspos("ECB1", 2, "EIR2", xcable12pm2, 0., zcablePS, 0, "ONLY");
1726 gMC->Gspos("ECB2", 1, "EIR2", xcable2pm2, ycable2pm2, zcablePS, 0, "ONLY");
1727 gMC->Gspos("ECB1", 1, "EIR6", xcable11pm2, 0., zcableVeto, 0, "ONLY");
1728 gMC->Gspos("ECB1", 2, "EIR6", xcable12pm2, 0., zcableVeto, 0, "ONLY");
1729 gMC->Gspos("ECB2", 1, "EIR6", xcable2pm2, ycable2pm2, zcableVeto, 0, "ONLY");
24c5571f 1730
954e52e8 1731 gMC->Gspos("ECB3", 1, "EIR3", xcable3pm3, ycable3pm3, zcablePS, 0, "ONLY");
1732 gMC->Gspos("ECB4", 1, "EIR3", xcable4pm3, ycable4pm3, zcablePS, 0, "ONLY");
1733 gMC->Gspos("ECB3", 1, "EIR7", xcable3pm3, ycable3pm3, zcableVeto, 0, "ONLY");
1734 gMC->Gspos("ECB4", 1, "EIR7", xcable4pm3, ycable4pm3, zcableVeto, 0, "ONLY");
24c5571f 1735
954e52e8 1736 gMC->Gspos("ECB2", 1, "EIR4", xcable21pm4, 0., zcablePS, 0, "ONLY");
1737 gMC->Gspos("ECB2", 2, "EIR4", xcable22pm4, 0., zcablePS, 0, "ONLY");
1738 gMC->Gspos("ECB3", 1, "EIR4", xcable3pm4, ycable3pm4, zcablePS, 0, "ONLY");
1739 gMC->Gspos("ECB2", 1, "EIR8", xcable21pm4, 0., zcableVeto, 0, "ONLY");
1740 gMC->Gspos("ECB2", 2, "EIR8", xcable22pm4, 0., zcableVeto, 0, "ONLY");
1741 gMC->Gspos("ECB3", 1, "EIR8", xcable3pm4, ycable3pm4, zcableVeto, 0, "ONLY");
24c5571f 1742
1743
954e52e8 1744
24c5571f 1745 //=============== NOW POSITIONING THE Al Boxes IN EPM'S================//
1746
1747
1748 gMC->Gspos("ESV1", 1, "EPM1", dboxFea1[0] - esvdA1[0] - 8.0, 0., zelvdbPS, 0, "ONLY");
1749 gMC->Gspos("EVV1", 1, "EPM1", dboxFea1[0] - esvdB1[0] - 8.0, 0., zelvdbVeto, 0, "ONLY");
1750
1751 gMC->Gspos("ESV2", 1, "EPM2", -dboxFea2[0] + esvdA1[0] + 8.0, 2.3, zelvdbPS, 0, "ONLY");
1752 gMC->Gspos("EVV2", 1, "EPM2", -dboxFea2[0] + esvdB1[0] + 8.0, 2.3, zelvdbVeto, 0, "ONLY");
1753
1754 gMC->Gspos("ESV3", 1, "EPM3", -dboxFea3[0] + esvdA1[0] + 8.0, 0., zelvdbPS, 0, "ONLY");
1755 gMC->Gspos("EVV3", 1, "EPM3", -dboxFea3[0] + esvdB1[0] + 8.0, 0., zelvdbVeto, 0, "ONLY");
1756
1757 gMC->Gspos("ESV4", 1, "EPM4", dboxFea4[0] - esvdA1[0] - 8.0, 2.3, zelvdbPS, 0, "ONLY");
1758 gMC->Gspos("EVV4", 1, "EPM4", dboxFea4[0] - esvdB1[0] - 8.0, 2.3, zelvdbVeto, 0, "ONLY");
1759
1760 //==================================================================//
1761 //====================== LAST THING IS TO INSTALL ELMB ================//
1762
1763 // ELMB,s are the G10 Volumes
1764
1765 // First to create Air Volume to place ELMBs
1766 Float_t xelmb[3];
954e52e8 1767 xelmb[0] = 10.0;
1768 xelmb[1] = 4.0;
1769 xelmb[2] = 0.5;
24c5571f 1770
1771 gMC->Gsvolu("ELMB", "BOX", idtmed[698], xelmb, 3);
1772
1773 // There are more G10 Volumes
1774 // But in approximation, we reduced them to two
1775 // ELM1 & ELM2
1776
1777 Float_t xelmb1[3];
954e52e8 1778 xelmb1[0] = 9.7;
1779 xelmb1[1] = 3.6;
1780 xelmb1[2] = 0.1;
24c5571f 1781
1782 gMC->Gsvolu("ELM1", "BOX", idtmed[607], xelmb1, 3);
1783
1784 Float_t xelmb2[3];
954e52e8 1785 xelmb2[0] = 6.0;
1786 xelmb2[1] = 3.0;
1787 xelmb2[2] = 0.1;
24c5571f 1788
1789 gMC->Gsvolu("ELM2", "BOX", idtmed[607], xelmb2, 3);
1790
1791 /******** NOW POSITIONING THE G10 VOLUMES ELM1 & ELM2 IN ELMB **********/
1792
1793 gMC->Gspos("ELM1", 1, "ELMB", 0., 0., -0.3, 0, "ONLY");
1794 gMC->Gspos("ELM2", 1, "ELMB", 0., 0., 0.3, 0, "ONLY");
1795
1796 // Position co-ordinates of ELMBs in EPM2 & EPM4
1797
1798 Float_t xelmbepm2, xelmbepm4, yelmbepm2, yelmbepm4, zelmbPS, zelmbVeto;
1799
1800 xelmbepm2 = -gaspmd2[0] + 16.0 +23.2 + 2.5 + xelmb[0];
1801 xelmbepm4 = gaspmd4[0] - 16.0 -23.2 - 2.5 - xelmb[0];
1802
1803 yelmbepm2 = -gaspmd2[1] + 1.0 + xelmb[1];
1804 yelmbepm4 = -gaspmd4[1] + 1.0 + xelmb[1];
1805
1806 zelmbPS = zfea + fgkThSteel/2.+ xelmb[2];
1807 zelmbVeto = zfea - fgkThSteel/2.- xelmb[2];
1808
1809 /************ NOW PLACE ELMB'S IN EPM2 & EPM4 *********************/
1810
1811 // There are total of 14 ELMB volumes
1812 // three on both sides of EPM2 (total of 6)
1813 // and four on both sides of EPM4 (total of 8)
1814 // The ELMBs are placed at the bottom of
1815 // SS support, which is the extended part
1816
1817 // Placement of ELMBs on EPM2
1818 for(Int_t kk=1;kk<=3;kk++){
1819 gMC->Gspos("ELMB", kk, "EPM2", xelmbepm2, yelmbepm2, zelmbPS, 0, "ONLY");
1820 xelmbepm2 = xelmbepm2 + xelmb[0] + 0.5 + xelmb[0];
1821 }
1822
1823 xelmbepm2 = -gaspmd2[0] + 16.0 +23.2 + 2.5 + xelmb[0];
1824
1825 for(Int_t kk=4;kk<=6;kk++){
1826 gMC->Gspos("ELMB", kk, "EPM2", xelmbepm2, yelmbepm2, zelmbVeto, 0, "ONLY");
1827 xelmbepm2 = xelmbepm2 + xelmb[0] + 0.5 + xelmb[0];
1828 }
1829
1830 // Placement of ELMBs on EPM4
1831 for(Int_t kk=1;kk<=4;kk++){
1832 gMC->Gspos("ELMB", kk, "EPM4", xelmbepm4, yelmbepm4, zelmbPS, 0, "ONLY");
1833 xelmbepm4 = xelmbepm4 - xelmb[0] - 0.5 - xelmb[0];
1834 }
1835
1836 xelmbepm4 = gaspmd4[0] - 16.0 -23.2 - 2.5 - xelmb[0];
1837 for(Int_t kk=5;kk<=8;kk++){
1838 gMC->Gspos("ELMB", kk, "EPM4", xelmbepm4, yelmbepm4, zelmbVeto, 0, "ONLY");
1839 xelmbepm4 = xelmbepm4 - xelmb[0] - 0.5 - xelmb[0];
1840 }
b1952773 1841
24c5571f 1842 //========= Placement of ELMBs Completed ============================/
a978c9e3 1843
24c5571f 1844 // ------------- Now to Place Unit Modules in four quadrants
1845 // EPM1, EPM2, EPM3 & EPM4 ---------------------//
b1952773 1846
24c5571f 1847 // Position co-ordinates of Unit Modules
f117e3aa 1848
24c5571f 1849 Double_t xcord[24];
1850 Double_t ycord[24];
f117e3aa 1851
24c5571f 1852 xcord[0] = xa1;
1853 xcord[1] = xa2;
1854 xcord[2] = xa3;
1855 xcord[3] = xa1;
1856 xcord[4] = xa2;
1857 xcord[5] = xa3;
1858 xcord[6] = -xa1;
1859 xcord[7] = -xa2;
1860 xcord[8] = -xa3;
1861 xcord[9] = -xa1;
1862 xcord[10] = -xa2;
1863 xcord[11] = -xa3;
1864 xcord[12] = xb1;
1865 xcord[13] = xb2;
1866 xcord[14] = xb1;
1867 xcord[15] = xb2;
1868 xcord[16] = xb1;
1869 xcord[17] = xb2;
1870 xcord[18] = -xb1;
1871 xcord[19] = -xb2;
1872 xcord[20] = -xb1;
1873 xcord[21] = -xb2;
1874 xcord[22] = -xb1;
1875 xcord[23] = -xb2;
1876
24c5571f 1877 ycord[0] = ya1;
1878 ycord[1] = ya1;
1879 ycord[2] = ya1;
1880 ycord[3] = ya2;
1881 ycord[4] = ya2;
1882 ycord[5] = ya2;
1883 ycord[6] = -ya1;
1884 ycord[7] = -ya1;
1885 ycord[8] = -ya1;
1886 ycord[9] = -ya2;
1887 ycord[10] = -ya2;
1888 ycord[11] = -ya2;
1889 ycord[12] = yb1;
1890 ycord[13] = yb1;
1891 ycord[14] = yb2;
1892 ycord[15] = yb2;
954e52e8 1893 ycord[16] = yb3+0.100007; //Because of overlapping the factor 0.100007
1894 ycord[17] = yb3+0.100007; // is added
24c5571f 1895 ycord[18] = -yb1;
1896 ycord[19] = -yb1;
1897 ycord[20] = -yb2;
1898 ycord[21] = -yb2;
954e52e8 1899 ycord[22] = -yb3-0.100004; //Because of overlapping the factor 0.100007
1900 ycord[23] = -yb3-0.100004; // is added
1901
24c5571f 1902
1903 // Placement of unit modules EUM1 & EUV1(long type)
1904 // and EUM2 & EUV2(short type)
1905 // in the four quadrants EPM1, EPM2, EPM3 & EPM4
f117e3aa 1906
24c5571f 1907 for(Int_t ii=0;ii<=5;ii++){
1908 if(fModStatus[ii]){
1909 gMC->Gspos("EUM1", ii, "EPM1", xcord[ii]+xLead1,ycord[ii]+yLead1, zpsa, 0, "ONLY");
1910 }
1911 }
f117e3aa 1912
24c5571f 1913 for(Int_t ii=6;ii<=11;ii++){
1914 if(fModStatus[ii]) {
1915 gMC->Gspos("EUM1", ii, "EPM2", xcord[ii]+xLead2, ycord[ii]+yLead2, zpsa, jhrot12, "ONLY");
1916 }
1917 }
f117e3aa 1918
24c5571f 1919 for(Int_t ii=12;ii<=17;ii++){
1920 if(fModStatus[ii]) {
1921 gMC->Gspos("EUM2", ii, "EPM3", xcord[ii]+xLead3, ycord[ii]+yLead3, zpsa, 0, "ONLY");
1922 }
1923 }
f117e3aa 1924
24c5571f 1925 for(Int_t ii=18;ii<=23;ii++){
1926 if(fModStatus[ii]) {
1927 gMC->Gspos("EUM2", ii, "EPM4", xcord[ii]+xLead4, ycord[ii]+yLead4, zpsa, jhrot12, "ONLY");
f117e3aa 1928 }
24c5571f 1929 }
1930
1931 for(Int_t ii=24;ii<=29;ii++){
1932 if(fModStatus[ii]) {
1933 gMC->Gspos("EUV1", ii, "EPM1", xcord[ii-24]+xLead1, ycord[ii-24]+yLead1, zcva, 0, "ONLY");
f117e3aa 1934 }
24c5571f 1935 }
c4561145 1936
24c5571f 1937 for(Int_t ii=30;ii<=35;ii++){
1938 if(fModStatus[ii]) {
1939 gMC->Gspos("EUV1", ii, "EPM2", xcord[ii-24]+xLead2, ycord[ii-24]+yLead2, zcva, jhrot12, "ONLY");
1940 }
1941 }
c4561145 1942
24c5571f 1943 for(Int_t ii=36;ii<=41;ii++){
1944 if(fModStatus[ii]) {
1945 gMC->Gspos("EUV2", ii, "EPM3", xcord[ii-24]+xLead3, ycord[ii-24]+yLead3, zcva, 0, "ONLY");
1946 }
1947 }
b1952773 1948
24c5571f 1949 for(Int_t ii=42;ii<=47;ii++){
1950 if(fModStatus[ii]) {
1951 gMC->Gspos("EUV2", ii, "EPM4", xcord[ii-24]+xLead4, ycord[ii-24]+yLead4, zcva, jhrot12, "ONLY");
1952 }
1953 }
b1952773 1954
24c5571f 1955 //-------------- Placement of Unit Modules Completed ---------------//
1956
1957 // ========== PLACE THE EPMD IN ALICE ======================//
1958
1959 // Now the Job to assemble the five mother volumes of PMD in ALICE
1960
1961 // Z-distance of PMD from Interaction Point
f117e3aa 1962
3cdb4e97 1963 zp = fgkZdist;
24c5571f 1964
1965 // X and Y-positions of the EPM1, EPM2, EPM3 & EPM4
f117e3aa 1966 Float_t xfinal,yfinal;
24c5571f 1967 Float_t xsm1, xsm2, xsm3, xsm4;
1968 Float_t ysm1, ysm2, ysm3, ysm4;
f117e3aa 1969
24c5571f 1970 xfinal = (fSMLengthax + serviceX/2. + serviceXext/2. + 0.05) + 0.48/2. +
1971 (fSMLengthbx + serviceX/2. + serviceXext/2.+ 0.05);
f117e3aa 1972
24c5571f 1973 //Extra width of the SS plate on Support Structure on X-side and 1mm thick SS for cooling encloser
1974 //Extra width of the SS plate on Support Structure on X-side for B-Type
1975
1976 yfinal = (fSMLengthay + serviceYa/2.)+ 0.20/2 + (fSMLengthby + serviceYb/2.);
f117e3aa 1977
24c5571f 1978 //serviceYa is the Extra width of the SS plate on Support Structur on Y-side for EPM1 & EPM3
1979 //serviceYb is the Extra width of the SS plate on Support Structur on Y-side for EPM2 & EPM4
1980
1981
1982 xsm1 = xfinal - (fSMLengthax + serviceX/2. + serviceXext/2. + 0.05);
1983 ysm1 = yfinal - (fSMLengthay + serviceYa/2.) - 2.3;
1984
1985 xsm2 = -xfinal + (fSMLengthax + serviceX/2. + serviceXext/2. + 0.05);
1986 ysm2 = -yfinal + (fSMLengthay + serviceYb/2.) - 2.3;
1987
1988 xsm3 = -xfinal + (fSMLengthbx + serviceX/2. + serviceXext/2. + 0.05);
1989 ysm3 = yfinal - (fSMLengthby + serviceYa/2.) - 2.3;
1990
1991 xsm4 = xfinal - (fSMLengthbx + serviceX/2. + serviceXext/2. + 0.05);
1992 ysm4 = -yfinal + (fSMLengthby + serviceYb/2.) - 2.3;
1993
1994 //Position Full PMD in ALICE
1995 //
1996 // EPM1 EPM3
1997 //
1998 // EPM4 EPM2
1999 // (rotated EPM3) (rotated EPM1)
2000 //
2001 // EFGD
2002 // (Girders and its Carriage)
2003
2004 gMC->Gspos("EPM1", 1, "ALIC", xsm1,ysm1,zp, 0, "ONLY");
2005 gMC->Gspos("EPM2", 1, "ALIC", xsm2,ysm2,zp, 0, "ONLY");
954e52e8 2006
24c5571f 2007 gMC->Gspos("EPM3", 1, "ALIC", xsm3,ysm3,zp, 0, "ONLY");
2008 gMC->Gspos("EPM4", 1, "ALIC", xsm4,ysm4,zp, 0, "ONLY");
2009
2010 gMC->Gspos("EFGD", 1, "ALIC", 0., yfinal + fulgrdr[1], zp, 0, "ONLY");
c4561145 2011}
2012
c4561145 2013//_____________________________________________________________________________
24c5571f 2014
36031625 2015void AliPMDv1::DrawModule() const
c4561145 2016{
c4561145 2017 // Draw a shaded view of the Photon Multiplicity Detector
2018 //
36031625 2019 // cout << " Inside Draw Modules " << endl;
24c5571f 2020
2021 // Set everything unseen
c4561145 2022 gMC->Gsatt("*", "seen", -1);
24c5571f 2023
2024 // Set ALIC mother transparent
2025 gMC->Gsatt("ALIC", "seen", 0);
c4561145 2026 //
2027 // Set the visibility of the components
2028 //
2029 gMC->Gsatt("ECAR","seen",0);
2030 gMC->Gsatt("ECCU","seen",1);
b1952773 2031 gMC->Gsatt("EST1","seen",1);
2032 gMC->Gsatt("EST2","seen",1);
2033 gMC->Gsatt("EUM1","seen",1);
2034 gMC->Gsatt("EUM2","seen",1);
24c5571f 2035
b1952773 2036 gMC->Gsatt("EPMD","seen",1);
24c5571f 2037
c4561145 2038 //
2039 gMC->Gdopt("hide", "on");
2040 gMC->Gdopt("shad", "on");
2041 gMC->Gsatt("*", "fill", 7);
2042 gMC->SetClipBox(".");
2043 gMC->SetClipBox("*", 0, 3000, -3000, 3000, -6000, 6000);
2044 gMC->DefaultRange();
24c5571f 2045 gMC->Gdraw("ALIC", 40, 30, 0, 22, 20.5, .02, .02);
c4561145 2046 gMC->Gdhead(1111, "Photon Multiplicity Detector Version 1");
24c5571f 2047
c4561145 2048 //gMC->Gdman(17, 5, "MAN");
2049 gMC->Gdopt("hide", "off");
24c5571f 2050
bff3a244 2051 AliDebug(1,"Outside Draw Modules");
c4561145 2052}
2053
2054//_____________________________________________________________________________
24c5571f 2055
c4561145 2056void AliPMDv1::CreateMaterials()
2057{
c4561145 2058 // Create materials for the PMD
2059 //
2060 // ORIGIN : Y. P. VIYOGI
2061 //
36031625 2062 // cout << " Inside create materials " << endl;
24c5571f 2063
cad3294f 2064 Int_t isxfld = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ();
2065 Float_t sxmgmx = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
c4561145 2066
2067 // --- Define the various materials for GEANT ---
24c5571f 2068
c4561145 2069 AliMaterial(1, "Pb $", 207.19, 82., 11.35, .56, 18.5);
f017d70a 2070
2071 // Argon
24c5571f 2072
f017d70a 2073 Float_t dAr = 0.001782; // --- Ar density in g/cm3 ---
2074 Float_t x0Ar = 19.55 / dAr;
2075 AliMaterial(2, "Argon$", 39.95, 18., dAr, x0Ar, 6.5e4);
24c5571f 2076
f017d70a 2077 // --- CO2 ---
24c5571f 2078
f017d70a 2079 Float_t aCO2[2] = { 12.,16. };
2080 Float_t zCO2[2] = { 6.,8. };
2081 Float_t wCO2[2] = { 1.,2. };
2082 Float_t dCO2 = 0.001977;
2083 AliMixture(3, "CO2 $", aCO2, zCO2, dCO2, -2, wCO2);
24c5571f 2084
c4561145 2085 AliMaterial(4, "Al $", 26.98, 13., 2.7, 8.9, 18.5);
24c5571f 2086
f017d70a 2087 // ArCO2
24c5571f 2088
f017d70a 2089 Float_t aArCO2[3] = {39.948,12.0107,15.9994};
2090 Float_t zArCO2[3] = {18.,6.,8.};
2091 Float_t wArCO2[3] = {0.7,0.08,0.22};
2092 Float_t dArCO2 = dAr * 0.7 + dCO2 * 0.3;
2093 AliMixture(5, "ArCO2$", aArCO2, zArCO2, dArCO2, 3, wArCO2);
24c5571f 2094
c4561145 2095 AliMaterial(6, "Fe $", 55.85, 26., 7.87, 1.76, 18.5);
24c5571f 2096
f017d70a 2097 // G10
c4561145 2098
f017d70a 2099 Float_t aG10[4]={1.,12.011,15.9994,28.086};
2100 Float_t zG10[4]={1.,6.,8.,14.};
d49fe99a 2101 Float_t wG10[4]={0.15201,0.10641,0.49444,0.24714};
f017d70a 2102 AliMixture(8,"G10",aG10,zG10,1.7,4,wG10);
c4561145 2103
f017d70a 2104 AliMaterial(15, "Cu $", 63.54, 29., 8.96, 1.43, 15.);
24c5571f 2105
f017d70a 2106 // Steel
2107 Float_t aSteel[4] = { 55.847,51.9961,58.6934,28.0855 };
2108 Float_t zSteel[4] = { 26.,24.,28.,14. };
2109 Float_t wSteel[4] = { .715,.18,.1,.005 };
2110 Float_t dSteel = 7.88;
2111 AliMixture(19, "STAINLESS STEEL$", aSteel, zSteel, dSteel, 4, wSteel);
24c5571f 2112
2113
2114 // --- CH2 : PLASTIC ---
2115
2116 Float_t aCH2[2] = { 12.,1.};
2117 Float_t zCH2[2] = { 6.,1.};
2118 Float_t wCH2[2] = { 1.,2.};
2119 Float_t dCH2 = 0.95;
2120 AliMixture(31, "CH2 $", aCH2, zCH2, dCH2, -2, wCH2);
2121
2122 // --- CABLES : 80% Plastic and 20% Copper ---
2123
2124 Float_t aCABLE[3] = { 12.,1.,63.5 };
2125 Float_t zCABLE[3] = { 6.,1.,29. };
2126 Float_t wCABLE[3] = { 0.6857, 0.1143, 0.2};
2127 Float_t dCABLE = dCH2*0.8 + 8.96*0.2;
2128 AliMixture(32, "CABLE $", aCABLE, zCABLE, dCABLE, 3, wCABLE);
f017d70a 2129
24c5571f 2130
2131
f017d70a 2132 //Air
24c5571f 2133
f017d70a 2134 Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
2135 Float_t zAir[4]={6.,7.,8.,18.};
2136 Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
2137 Float_t dAir1 = 1.20479E-10;
2138 Float_t dAir = 1.20479E-3;
2139 AliMixture(98, "Vacum$", aAir, zAir, dAir1, 4, wAir);
2140 AliMixture(99, "Air $", aAir, zAir, dAir , 4, wAir);
24c5571f 2141
c4561145 2142 // Define tracking media
f017d70a 2143 AliMedium(1, "Pb conv.$", 1, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
2144 AliMedium(4, "Al $", 4, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
2145 AliMedium(5, "ArCO2 $", 5, 1, 0, isxfld, sxmgmx, .1, .1, .10, .1);
2146 AliMedium(6, "Fe $", 6, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
2147 AliMedium(8, "G10plate$", 8, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
2148 AliMedium(15, "Cu $", 15, 0, 0, isxfld, sxmgmx, .1, .1, .01, .1);
2149 AliMedium(19, "S steel$", 19, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
24c5571f 2150 AliMedium(32, "CABLE $", 32, 0, 0, isxfld, sxmgmx, 1., .1, .01, .1);
f017d70a 2151 AliMedium(98, "Vacuum $", 98, 0, 0, isxfld, sxmgmx, 1., .1, .10, 10);
2152 AliMedium(99, "Air gaps$", 99, 0, 0, isxfld, sxmgmx, 1., .1, .10, .1);
c4561145 2153
7235aed2 2154 AliDebug(1,"Outside create materials");
24c5571f 2155
7235aed2 2156}
2157
2158//_____________________________________________________________________________
24c5571f 2159
7235aed2 2160void AliPMDv1::Init()
2161{
2162 //
2163 // Initialises PMD detector after it has been built
2164 //
24c5571f 2165
7235aed2 2166 //
2167 AliDebug(2,"Inside Init");
2168 AliDebug(2,"PMD simulation package (v1) initialised");
2169 AliDebug(2,"parameters of pmd");
2170 AliDebug(2,Form("%10.2f %10.2f %10.2f %10.2f\n",
2171 fgkCellRadius,fgkCellWall,fgkCellDepth,fgkZdist));
2172 Int_t *idtmed = fIdtmed->GetArray()-599;
2173 fMedSens=idtmed[605-1];
c4561145 2174 // --- Generate explicitly delta rays in the iron, aluminium and lead ---
2175 gMC->Gstpar(idtmed[600], "LOSS", 3.);
2176 gMC->Gstpar(idtmed[600], "DRAY", 1.);
2177
2178 gMC->Gstpar(idtmed[603], "LOSS", 3.);
2179 gMC->Gstpar(idtmed[603], "DRAY", 1.);
2180
2181 gMC->Gstpar(idtmed[604], "LOSS", 3.);
2182 gMC->Gstpar(idtmed[604], "DRAY", 1.);
2183
2184 gMC->Gstpar(idtmed[605], "LOSS", 3.);
2185 gMC->Gstpar(idtmed[605], "DRAY", 1.);
2186
c4561145 2187 gMC->Gstpar(idtmed[607], "LOSS", 3.);
2188 gMC->Gstpar(idtmed[607], "DRAY", 1.);
2189
2190 // --- Energy cut-offs in the Pb and Al to gain time in tracking ---
2191 // --- without affecting the hit patterns ---
2192 gMC->Gstpar(idtmed[600], "CUTGAM", 1e-4);
2193 gMC->Gstpar(idtmed[600], "CUTELE", 1e-4);
2194 gMC->Gstpar(idtmed[600], "CUTNEU", 1e-4);
2195 gMC->Gstpar(idtmed[600], "CUTHAD", 1e-4);
f017d70a 2196
c4561145 2197 gMC->Gstpar(idtmed[605], "CUTGAM", 1e-4);
2198 gMC->Gstpar(idtmed[605], "CUTELE", 1e-4);
2199 gMC->Gstpar(idtmed[605], "CUTNEU", 1e-4);
2200 gMC->Gstpar(idtmed[605], "CUTHAD", 1e-4);
f017d70a 2201
c4561145 2202 gMC->Gstpar(idtmed[603], "CUTGAM", 1e-4);
2203 gMC->Gstpar(idtmed[603], "CUTELE", 1e-4);
2204 gMC->Gstpar(idtmed[603], "CUTNEU", 1e-4);
2205 gMC->Gstpar(idtmed[603], "CUTHAD", 1e-4);
24c5571f 2206
2207 // gMC->Gstpar(idtmed[609], "CUTGAM", 1e-4);
2208 // gMC->Gstpar(idtmed[609], "CUTELE", 1e-4);
2209 // gMC->Gstpar(idtmed[609], "CUTNEU", 1e-4);
2210 // gMC->Gstpar(idtmed[609], "CUTHAD", 1e-4);
2211
c4561145 2212 // --- Prevent particles stopping in the gas due to energy cut-off ---
2213 gMC->Gstpar(idtmed[604], "CUTGAM", 1e-5);
2214 gMC->Gstpar(idtmed[604], "CUTELE", 1e-5);
2215 gMC->Gstpar(idtmed[604], "CUTNEU", 1e-5);
2216 gMC->Gstpar(idtmed[604], "CUTHAD", 1e-5);
2217 gMC->Gstpar(idtmed[604], "CUTMUO", 1e-5);
24c5571f 2218
8d6dc7c8 2219 // Visualization of volumes
2220 gMC->Gsatt("ECAR", "SEEN", 0);
24c5571f 2221 gMC->Gsatt("ECCU", "SEEN", 1);
8d6dc7c8 2222 gMC->Gsatt("ECCU", "COLO", 4);
2223 gMC->Gsatt("EST1", "SEEN", 0);
2224 gMC->Gsatt("EST2", "SEEN", 0);
2225 gMC->Gsatt("EHC1", "SEEN", 0);
2226 gMC->Gsatt("EHC2", "SEEN", 0);
24c5571f 2227 gMC->Gsatt("EDGA", "SEEN", 1);
2228 gMC->Gsatt("EDGB", "SEEN", 1);
2229 gMC->Gsatt("EEGA", "SEEN", 1);
2230 gMC->Gsatt("EEGB", "SEEN", 1);
8d6dc7c8 2231 gMC->Gsatt("EUM1", "SEEN", 0);
2232 gMC->Gsatt("EUV1", "SEEN", 0);
8d6dc7c8 2233 gMC->Gsatt("EUM2", "SEEN", 0);
2234 gMC->Gsatt("EUV2", "SEEN", 0);
24c5571f 2235
2236
8d6dc7c8 2237 gMC->Gsatt("EFEE", "SEEN", 0);
2238 gMC->Gsatt("EFEE", "COLO", 4);
24c5571f 2239 gMC->Gsatt("EFBA", "SEEN", 1);
2240 gMC->Gsatt("EFBA", "COLO", 4);
8d6dc7c8 2241 gMC->Gsatt("EFBB", "SEEN", 0);
24c5571f 2242 gMC->Gsatt("EFBB", "COLO", 4);
2243
2244 gMC->Gsatt("ELDA", "SEEN", 0);
2245 gMC->Gsatt("ELDB", "SEEN", 0);
2246
2247 gMC->Gsatt("EFE1", "SEEN", 0);
2248 gMC->Gsatt("EFE2", "SEEN", 0);
2249 gMC->Gsatt("EFE3", "SEEN", 0);
2250 gMC->Gsatt("EFE4", "SEEN", 0);
2251
2252 gMC->Gsatt("ESC1", "SEEN", 0);
2253 gMC->Gsatt("ECC1", "COLO", 2);
2254 gMC->Gsatt("ESC2", "SEEN", 0);
2255 gMC->Gsatt("ECC2", "COLO", 2);
2256 gMC->Gsatt("ESC3", "SEEN", 0);
2257 gMC->Gsatt("ECC3", "COLO", 2);
2258 gMC->Gsatt("ESC4", "SEEN", 0);
2259 gMC->Gsatt("ECC4", "COLO", 2);
2260
2261 gMC->Gsatt("ECC1", "SEEN", 0);
2262 gMC->Gsatt("ECC2", "SEEN", 0);
2263 gMC->Gsatt("ECC3", "SEEN", 0);
2264 gMC->Gsatt("ECC4", "SEEN", 0);
2265
8d6dc7c8 2266 gMC->Gsatt("EPM1", "SEEN", 1);
2267 gMC->Gsatt("EPM2", "SEEN", 1);
2268 gMC->Gsatt("EPM3", "SEEN", 1);
2269 gMC->Gsatt("EPM4", "SEEN", 1);
24c5571f 2270
2271 gMC->Gsatt("ECB1", "SEEN", 0);
2272 gMC->Gsatt("ECB2", "SEEN", 0);
2273 gMC->Gsatt("ECB3", "SEEN", 0);
2274 gMC->Gsatt("ECB4", "SEEN", 0);
2275
2276 gMC->Gsatt("ELMB", "SEEN", 0);
2277
2278 gMC->Gsatt("ESV1", "SEEN", 0);
2279 gMC->Gsatt("ESV2", "SEEN", 0);
2280 gMC->Gsatt("ESV3", "SEEN", 0);
2281 gMC->Gsatt("ESV4", "SEEN", 0);
2282
2283 gMC->Gsatt("EVV1", "SEEN", 0);
2284 gMC->Gsatt("EVV2", "SEEN", 0);
2285 gMC->Gsatt("EVV3", "SEEN", 0);
2286 gMC->Gsatt("EVV4", "SEEN", 0);
2287
2288 gMC->Gsatt("EFGD", "SEEN", 0);
c4561145 2289}
2290
2291//_____________________________________________________________________________
24c5571f 2292
c4561145 2293void AliPMDv1::StepManager()
2294{
2295 //
2296 // Called at each step in the PMD
2297 //
24c5571f 2298
c4561145 2299 Int_t copy;
954e52e8 2300 Float_t hits[5], destep;
c4561145 2301 Float_t center[3] = {0,0,0};
24c5571f 2302 Int_t vol[6];
2303 //const char *namep;
2304 // printf("Current vol is ******** %s \n",namep);
f335f3e7 2305 if(gMC->CurrentMedium() == fMedSens && (destep = gMC->Edep())) {
24c5571f 2306
c4561145 2307 gMC->CurrentVolID(copy);
24c5571f 2308 //namep=gMC->CurrentVolName();
2309 // printf("Current vol is %s \n",namep);
c4561145 2310 vol[0]=copy;
24c5571f 2311
b1952773 2312 gMC->CurrentVolOffID(1,copy);
c4561145 2313 //namep=gMC->CurrentVolOffName(1);
f117e3aa 2314 // printf("Current vol 11 is %s \n",namep);
c4561145 2315 vol[1]=copy;
24c5571f 2316
b1952773 2317 gMC->CurrentVolOffID(2,copy);
c4561145 2318 //namep=gMC->CurrentVolOffName(2);
24c5571f 2319 // printf("Current vol 22 is %s \n",namep);
c4561145 2320 vol[2]=copy;
24c5571f 2321
c4561145 2322 gMC->CurrentVolOffID(3,copy);
24c5571f 2323 //namep=gMC->CurrentVolOffName(3);
2324 // printf("Current vol 33 is %s \n",namep);
c4561145 2325 vol[3]=copy;
24c5571f 2326
b1952773 2327 gMC->CurrentVolOffID(4,copy);
24c5571f 2328 //namep=gMC->CurrentVolOffName(4);
f117e3aa 2329 // printf("Current vol 44 is %s \n",namep);
c4561145 2330 vol[4]=copy;
24c5571f 2331
b1952773 2332 gMC->CurrentVolOffID(5,copy);
24c5571f 2333 //namep=gMC->CurrentVolOffName(5);
2334 //printf("Current vol 55 is %s \n",namep);
b1952773 2335 vol[5]=copy;
2336
24c5571f 2337
2338 // printf("volume number %4d %4d %4d %4d %4d %4d %10.3f \n",vol[0],vol[1],vol[2],vol[3],vol[4],vol[5],destep*1000000);// edep in MeV
2339
b1952773 2340
c4561145 2341 gMC->Gdtom(center,hits,1);
2342 hits[3] = destep*1e9; //Number in eV
954e52e8 2343
2344 // this is for pile-up events
2345 hits[4] = gMC->TrackTime();
2346
5d12ce38 2347 AddHit(gAlice->GetMCApp()->GetCurrentTrackNumber(), vol, hits);
c1446131 2348
2349 AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kPMD);
2350
c4561145 2351 }
2352}
2353
24c5571f 2354
c4561145 2355//------------------------------------------------------------------------
2356// Get parameters
2357
2358void AliPMDv1::GetParameters()
2359{
36031625 2360 // This gives all the parameters of the detector
3cdb4e97 2361 // such as Length of Supermodules, type A, type B,
2362 // thickness of the Supermodule
b1952773 2363 //
36031625 2364
f117e3aa 2365 fSMLengthax = 32.7434;
2366 //The total length in X is due to the following components
2367 // Factor 3 is because of 3 module length in X for this type
2368 // fgkNcolUM1*fgkCellRadius (48 x 0.25): Total span of each module in X
2369 // fgkCellRadius/2. : There is offset of 1/2 cell
2370 // 0.05+0.05 : Insulation gaps etc
2371 // fgkSSBoundary (0.3) : Boundary frame
2372 // double XA = 3.0*((fgkCellRadius/fgkSqroot3by2*fgkNcolUM1)-(fgkCellRadius*fgkSqroot3*(fgkNcolUM1-1)/6.)+(2.0*fgkGap)+(2.0*fgkGap)+fgkSSBoundary) + (2.0*0.075);
24c5571f 2373
2374 fSMLengthbx = 42.6136;
f117e3aa 2375 //The total length in X is due to the following components
2376 // Factor 2 is because of 2 module length in X for this type
2377 // fgkNcolUM2*fgkCellRadius (96 x 0.25): Total span of each module in X
2378 // fgkCellRadius/2. : There is offset of 1/2 cell
2379 // 0.05+0.05 : Insulation gaps etc
2380 // fgkSSBoundary (0.3) : Boundary frame
24c5571f 2381 //double XB = 2.0*((fgkCellRadius/fgkSqroot3by2*fgkNcolUM2)-(fgkCellRadius*fgkSqroot3*(fgkNcolUM2-1)/6.)+(2.0*fgkGap)+(2.0*fgkGap)+fgkSSBoundary) + 0.1;
2382
f117e3aa 2383
24c5571f 2384
2385 fSMLengthay = 49.35;
f117e3aa 2386 //The total length in Y is due to the following components
2387 // Factor 2 is because of 2 module length in Y for this type
2388 // fgkCellRadius/fgkSqroot3by2)*fgkNrowUM1 (0.25/sqrt3/2 * 96): Total span of each module in Y
2389 // of strips
2390 // 0.05+0.05 : Insulation gaps etc
2391 // fgkSSBoundary (0.3) : Boundary frame
24c5571f 2392 // 0.6cm is the channel width plus tolerance
2393 // double YA = 2.0*(fgkNrowUM1*fgkCellRadius+fgkCellRadius/2.+(2.0*fgkGap)+(2.0*fgkGap)+fgkSSBoundary) + 0.6/2.;
2394
2395 fSMLengthby = 37.925;
f117e3aa 2396 //The total length in Y is due to the following components
2397 // Factor 3 is because of 3 module length in Y for this type
2398 // fgkCellRadius/fgkSqroot3by2)*fgkNrowUM2 (0.25/sqrt3/2 * 48): Total span of each module in Y
2399 // of strips
2400 // 0.05+0.05 : Insulation gaps etc
2401 // fgkSSBoundary (0.3) : Boundary frame
24c5571f 2402 // 10mm is the channel width plus tolerance
2403 //double YB = 3.0*((fgkNrowUM2*fgkCellRadius + fgkCellRadius/2.)+(2.0*fgkGap)+(2.0*fgkGap)+fgkSSBoundary) + 1.0/2.;
2404
2405
f117e3aa 2406 //Thickness of a pre/veto plane
24c5571f 2407 fDthick = fgkThSS/2. + 1.2; // 1.2 added as FEE Board are now assembled with pre/veto
2408
f117e3aa 2409 //Thickness of the PMD ; 2.4 added for FEE boards
24c5571f 2410 fSMthickpmd = 2.0*(fgkThSS/2.) +fgkThSteel/2.+fgkThLead/2.0 + 2.4/2.;
2411
2412 fSMthick = 17.; //17 cm is the full profile of PMD
2413
36031625 2414
b1952773 2415}
24c5571f 2416
2417
4b6f3b17 2418// ---------------------------------------------------------------
2419void AliPMDv1::AddAlignableVolumes() const
2420{
2421 //
2422 // Create entries for alignable volumes associating the symbolic volume
2423 // name with the corresponding volume path. Needs to be syncronized with
2424 // eventual changes in the geometry.
2425 //
2426 SetSectorAlignable();
24c5571f 2427
4b6f3b17 2428}
2429// ----------------------------------------------------------------
2430void AliPMDv1::SetSectorAlignable() const
2431{
3cf8979e 2432 //
24c5571f 2433
4b6f3b17 2434 TString vpsector = "ALIC_1/EPM";
2435 TString vpappend = "_1";
2436
2437 TString snsector="PMD/Sector";
24c5571f 2438
4b6f3b17 2439 TString volpath, symname;
2440
2441 for(Int_t cnt=1; cnt<=4; cnt++){
24c5571f 2442 //for(Int_t cnt=1; cnt<=4; cnt++){
4b6f3b17 2443 volpath = vpsector;
2444 volpath += cnt;
2445 volpath += vpappend;
2446 symname = snsector;
2447 symname += cnt;
3cf8979e 2448 if(!gGeoManager->SetAlignableEntry(symname.Data(),volpath.Data()))
2449 {
2450 AliFatal("Unable to set alignable entry!");
2451 }
4b6f3b17 2452 }
2453}
2454// ------------------------------------------------------------------
24c5571f 2455void AliPMDv1::SetCpvOff()
2456{
2457 // Set the entire CPV plane off
2458
2459 for (Int_t imodule = 24; imodule < 48; imodule++)
2460 fModStatus[imodule] = 0;
2461}
2462// ------------------------------------------------------------------
2463void AliPMDv1::SetPreOff()
2464{
2465 // Set the entire Preshower plane off
2466
2467 for (Int_t imodule = 0; imodule < 24; imodule++)
2468 fModStatus[imodule] = 0;
2469
2470}
2471// ------------------------------------------------------------------
2472void AliPMDv1::SetModuleOff(Int_t imodule)
2473{
2474 // Set the individual module off
2475
2476 fModStatus[imodule] = 0;
2477
2478}