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