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