+ // Create SS Support For EPM1
+
+ // X-dimension = fSMLengthax + Extended Iron Support(23.2cm)
+ // Y-dimension = fSMLengthay + Extended Iron Support(5.2cm)
+ // Z-dimension = thickness of Iron support(0.5cm)
+ // It is a Volume of SS
+ // Integer assigned to SS is 618
+
+ Float_t dboxFea1[3];
+ dboxFea1[0] = fSMLengthax + serviceX/2.;
+ dboxFea1[1] = fSMLengthay + serviceYa/2.;
+ dboxFea1[2] = fgkThSteel/2.;
+
+ gMC->Gsvolu("EFE1","BOX", idtmed[618], dboxFea1, 3);
+
+
+ // Create SS Support For EPM2
+
+ // X-dimension = fSMLengthax + Extended Iron Support(23.2cm)
+ // Y-dimension = fSMLengthay + Extended Iron Support(9.8cm)
+ // Z-dimension = thickness of Iron support(0.5cm)
+ // It is a Volume of SS
+ // Integer assigned to SS is 618
+
+ Float_t dboxFea2[3];
+ dboxFea2[0] = fSMLengthax + serviceX/2.;
+ dboxFea2[1] = fSMLengthay + serviceYb/2.;
+ dboxFea2[2] = fgkThSteel/2.;
+
+ gMC->Gsvolu("EFE2","BOX", idtmed[618], dboxFea2, 3);
+
+ // Create SS Support For EPM3
+
+ // X-dimension = fSMLengthbx + Extended Iron Support(23.2cm)
+ // Y-dimension = fSMLengthby + Extended Iron Support(5.2cm)
+ // Z-dimension = thickness of Iron support(0.5cm)
+ // It is a Volume of SS
+ // Integer assigned to SS is 618
+
+ Float_t dboxFea3[3];
+ dboxFea3[0] = fSMLengthbx + serviceX/2.;
+ dboxFea3[1] = fSMLengthby + serviceYa/2.;
+ dboxFea3[2] = fgkThSteel/2.;
+
+ gMC->Gsvolu("EFE3","BOX", idtmed[618], dboxFea3, 3);
+
+ // Create SS Support For EPM4
+
+ // X-dimension = fSMLengthbx + Extended Iron Support(23.2cm)
+ // Y-dimension = fSMLengthby + Extended Iron Support(9.8cm)
+ // Z-dimension = thickness of Iron support(0.5cm)
+ // It is a Volume of SS
+ // Integer assigned to SS is 618
+
+ Float_t dboxFea4[3];
+ dboxFea4[0] = fSMLengthbx + serviceX/2.;
+ dboxFea4[1] = fSMLengthby + serviceYb/2.;
+ dboxFea4[2] = fgkThSteel/2.;
+
+ gMC->Gsvolu("EFE4","BOX", idtmed[618], dboxFea4, 3);
+
+
+ //=============== Volumes for SS support are Completed =============//
+
+ // Create FR4 Sheets to enclose the PMD which are Placed parallel to the
+ // plane of the detector. Four FR4 sheets are created with the dimensions
+ // corresponding to the Iron Supports
+ // This is cooling encloser.
+
+ // Create FR4 sheet ECC1
+ // X-dimension = same as EFE1
+ // Y-dimension = same as EFE1
+ // Z-dimension = 0.1cm
+ // FR4 medium is same as that of G10
+ // Integer assigned to FR4 medium is 607
+
+ Float_t enclos1[3];
+ enclos1[0] = dboxFea1[0];
+ enclos1[1] = dboxFea1[1];
+ enclos1[2] = 0.05;
+
+ gMC->Gsvolu("ECC1", "BOX", idtmed[607], enclos1, 3);
+
+ // Create FR4 sheet ECC2
+ // X-dimension = same as EFE2
+ // Y-dimension = same as EFE2
+ // Z-dimension = 0.1cm
+
+ Float_t enclos2[3];
+ enclos2[0] = dboxFea2[0];
+ enclos2[1] = dboxFea2[1];
+ enclos2[2] = 0.05;
+
+ gMC->Gsvolu("ECC2", "BOX", idtmed[607], enclos2, 3);
+
+ // Create FR4 sheet ECC3
+ // X-dimension = same as EFE3
+ // Y-dimension = same as EFE3
+ // Z-dimension = 0.1cm
+
+ Float_t enclos3[3];
+ enclos3[0] = dboxFea3[0];
+ enclos3[1] = dboxFea3[1];
+ enclos3[2] = 0.05;
+
+ gMC->Gsvolu("ECC3", "BOX", idtmed[607], enclos3, 3);
+
+ // Create FR4 sheet ECC4
+ // X-dimension = same as EFE4
+ // Y-dimension = same as EFE4
+ // Z-dimension = 0.1cm
+
+ Float_t enclos4[3];
+ enclos4[0] = dboxFea4[0];
+ enclos4[1] = dboxFea4[1];
+ enclos4[2] = 0.05;
+
+ gMC->Gsvolu("ECC4", "BOX", idtmed[607], enclos4, 3);
+
+ //--------------- FR4 SHEETS COMPLETED ---------------------------//
+
+ //------------- Create the SS-Channels(Horizontal Rails) to Place
+ // Unit Modules on SS Support -------------------------------------//
+
+ // Two types of SS-Channels are created
+ // as we have two types of modules
+
+ // Create SS-channel for Long Type
+ // X-dimension = same as Lead Plate ELDA
+ // Y-dimension = 0.1cm
+ // Z-dimension = 2.0cm
+ // Volume medium is SS
+
+ Float_t channel12[3];
+ channel12[0] = fSMLengthax;
+ channel12[1] = 0.05;
+ channel12[2] = 2.0/2.;
+
+ gMC->Gsvolu("ECHA", "BOX", idtmed[618], channel12, 3);
+
+ // Create SS-channel for Short Type
+ // X-dimension = same as Lead Plate ELDB
+ // Y-dimension = 0.1cm
+ // Z-dimension = 2.0cm
+ // Volume medium is SS
+
+ Float_t channel34[3];
+ channel34[0] = fSMLengthbx;
+ channel34[1] = 0.05;
+ channel34[2] = 2.0/2.;
+
+ gMC->Gsvolu("ECHB", "BOX", idtmed[618], channel34, 3);
+
+ //----------------- SS-Channels are Copmleted --------------------//
+
+ //========= POSITIONING OF SS SUPPORT AND LEAD PLATES IN QUADRANTS =====//
+
+ /**************** Z-Distances of different Components **********/
+
+ Float_t zcva,zfea,zpba,zpsa,zchanVeto,zchanPS, zelvdbVeto, zelvdbPS;
+
+
+ zpba = - fgkThSteel/2.; //z-position of Pb plate
+ zfea = fgkThLead/2.; //z-position of SS-Support
+ zchanVeto = zpba - fgkThLead/2. - channel12[2]; //z-position of SS-channel on Veto
+ zchanPS = zfea + fgkThSteel/2. + channel12[2]; //z-position of SS-channel on Preshower
+ zpsa = zfea + fgkThSteel/2. + fDthick; //z-position of Preshower
+ zcva = zpba - fgkThLead/2.- fDthick; //z-position of Veto
+
+ zelvdbVeto = zpba + fgkThLead/2. - 8.9/2.; //z-position of LVDBs on Veto side
+ zelvdbPS = zfea + fgkThSteel/2. + 7.4/2.; //z-position of LVDBs on Preshower side
+
+ // FOR LONG TYPE
+ Float_t xLead1,yLead1,zLead1, xLead2,yLead2,zLead2;
+ Float_t xIron1,yIron1,zIron1, xIron2,yIron2,zIron2;
+
+
+ xIron1 = - 16.0/2. + 0.1/2.; // half of 0.1cm is added as 1mm SS sheet is placed
+ yIron1 = 0.;
+ zIron1 = zfea;
+
+ xIron2 = 16.0/2. - 0.1/2.; // half of 0.1cm is added as 1mm SS sheet is placed
+ yIron2 = 0.;
+ zIron2 = zfea;
+
+
+ xLead1 = xIron1 - 23.2/2.;
+ yLead1 = -5.2/2.;
+ zLead1 = zpba;
+
+ xLead2 =xIron2 + 23.2/2.;
+ yLead2 = 9.8/2.;
+ zLead2 = zpba;
+
+ gMC->Gspos("EFE1", 1, "EPM1", xIron1, yIron1, zfea, 0, "ONLY");
+ gMC->Gspos("ELDA", 1, "EPM1", xLead1, yLead1, zpba, 0, "ONLY");
+ gMC->Gspos("EFE2", 1, "EPM2", xIron2, yIron2, zfea, 0, "ONLY");
+ gMC->Gspos("ELDA", 1, "EPM2", xLead2, yLead2, zpba, jhrot12, "ONLY");
+
+
+ // FOR SHORT TYPE
+ Float_t xLead3,yLead3,zLead3, xLead4,yLead4,zLead4;
+ Float_t xIron3,yIron3,zIron3, xIron4,yIron4,zIron4;
+
+
+ xIron3 = 16.0/2.- 0.1/2.; // half of 0.1cm is added as 1mm SS sheet is placed ;
+ yIron3 = 0.;
+ zIron3 = zfea;
+
+ xIron4 = - 16.0/2.+ 0.1/2.; // half of 0.1cm is added as 1mm SS sheet is placed;
+ yIron4 = 0.;
+ zIron4 = zfea;
+
+ xLead3 = xIron3 + 23.2/2.;
+ yLead3 = -5.2/2.;
+ zLead3 = zpba;
+
+ xLead4 = xIron4 - 23.2/2.;
+ yLead4 = 9.8/2.;
+ zLead4 = zpba;
+
+ gMC->Gspos("EFE3", 1, "EPM3", xIron3, yIron3, zfea, 0, "ONLY");
+ gMC->Gspos("ELDB", 1, "EPM3", xLead3, yLead3, zpba, 0, "ONLY");
+ gMC->Gspos("EFE4", 1, "EPM4", xIron4, yIron4, zfea, 0, "ONLY");
+ gMC->Gspos("ELDB", 1, "EPM4", xLead4, yLead4, zpba, jhrot12, "ONLY");
+
+ //===================================================================//
+ // Placement of FR4 sheets as encloser of full profile of PMD
+
+ gMC->Gspos("ECC1", 1, "EPM1", xIron1, yIron1, -8.45, 0, "ONLY");
+ gMC->Gspos("ECC2", 1, "EPM2", xIron2, yIron2, -8.45, 0,"ONLY");
+ gMC->Gspos("ECC3", 1, "EPM3", xIron3, yIron3, -8.45, 0,"ONLY");
+ gMC->Gspos("ECC4", 1, "EPM4", xIron4, yIron4, -8.45, 0,"ONLY");
+
+ gMC->Gspos("ECC1", 2, "EPM1", xIron1, yIron1, 8.45, 0, "ONLY");
+ gMC->Gspos("ECC2", 2, "EPM2", xIron2, yIron2, 8.45, 0,"ONLY");
+ gMC->Gspos("ECC3", 2, "EPM3", xIron3, yIron3, 8.45, 0,"ONLY");
+ gMC->Gspos("ECC4", 2, "EPM4", xIron4, yIron4, 8.45, 0,"ONLY");
+
+ //----------------- NOW TO PLACE SS-CHANNELS -----------------------//
+
+ Float_t xchanepm11, ychanepm11,ychanepm12;
+ Float_t xchanepm21, ychanepm21,ychanepm22;
+ Float_t xchanepm31, ychanepm31,ychanepm32,ychanepm33,ychanepm34;
+ Float_t xchanepm41, ychanepm41,ychanepm42,ychanepm43,ychanepm44;
+
+ xchanepm11 = xLead1;
+ ychanepm11 = ya1 + yLead1 + dboxSS1[1] + 0.1 + 0.1/2.;
+ ychanepm12 = ya1 + yLead1 - dboxSS1[1] - 0.1 - 0.1/2.;
+
+ xchanepm21 = xLead2;
+ ychanepm21 = -ya1 + yLead2 - dboxSS1[1] - 0.1 - 0.1/2.;
+ ychanepm22 = -ya1 + yLead2 + dboxSS1[1] + 0.1 + 0.1/2.;
+
+ gMC->Gspos("ECHA", 1, "EPM1", xchanepm11, ychanepm11, zchanPS, 0, "ONLY");
+ gMC->Gspos("ECHA", 2, "EPM1", xchanepm11, ychanepm12, zchanPS, 0, "ONLY");
+ gMC->Gspos("ECHA", 3, "EPM1", xchanepm11, ychanepm11, zchanVeto, 0, "ONLY");
+ gMC->Gspos("ECHA", 4, "EPM1", xchanepm11, ychanepm12, zchanVeto, 0, "ONLY");
+ gMC->Gspos("ECHA", 1, "EPM2", xchanepm21, ychanepm21, zchanPS, 0, "ONLY");
+ gMC->Gspos("ECHA", 2, "EPM2", xchanepm21, ychanepm22, zchanPS, 0, "ONLY");
+ gMC->Gspos("ECHA", 3, "EPM2", xchanepm21, ychanepm21, zchanVeto, 0, "ONLY");
+ gMC->Gspos("ECHA", 4, "EPM2", xchanepm21, ychanepm22, zchanVeto, 0, "ONLY");
+
+ xchanepm31 = xLead3;
+ ychanepm31 = yb1 + yLead3 + dboxSS2[1] + 0.1 + 0.1/2.;
+ ychanepm32 = yb1 + yLead3 - dboxSS2[1] - 0.1 - 0.1/2.;
+ ychanepm33 = yb3 + yLead3 + dboxSS2[1] + 0.1 + 0.1/2.;
+ ychanepm34 = yb3 + yLead3 - dboxSS2[1] - 0.1 - 0.1/2.;
+
+ xchanepm41 = xLead4;
+ ychanepm41 = -yb1 + yLead4 - dboxSS2[1] - 0.1 - 0.1/2.;
+ ychanepm42 = -yb1 + yLead4 + dboxSS2[1] + 0.1 + 0.1/2.;
+ ychanepm43 = -yb3 + yLead4 - dboxSS2[1] - 0.1 - 0.1/2.;
+ ychanepm44 = -yb3 + yLead4 + dboxSS2[1] + 0.1 + 0.1/2.;
+
+
+ gMC->Gspos("ECHB", 1, "EPM3", xchanepm31, ychanepm31, zchanPS, 0, "ONLY");
+ gMC->Gspos("ECHB", 2, "EPM3", xchanepm31, ychanepm32, zchanPS, 0, "ONLY");
+ gMC->Gspos("ECHB", 3, "EPM3", xchanepm31, ychanepm33, zchanPS, 0, "ONLY");
+ gMC->Gspos("ECHB", 4, "EPM3", xchanepm31, ychanepm34, zchanPS, 0, "ONLY");
+ gMC->Gspos("ECHB", 5, "EPM3", xchanepm31, ychanepm31, zchanVeto, 0, "ONLY");
+ gMC->Gspos("ECHB", 6, "EPM3", xchanepm31, ychanepm32, zchanVeto, 0, "ONLY");
+ gMC->Gspos("ECHB", 7, "EPM3", xchanepm31, ychanepm33, zchanVeto, 0, "ONLY");
+ gMC->Gspos("ECHB", 8, "EPM3", xchanepm31, ychanepm34, zchanVeto, 0, "ONLY");
+
+ gMC->Gspos("ECHB", 1, "EPM4", xchanepm41, ychanepm41, zchanPS, 0, "ONLY");
+ gMC->Gspos("ECHB", 2, "EPM4", xchanepm41, ychanepm42, zchanPS, 0, "ONLY");
+ gMC->Gspos("ECHB", 3, "EPM4", xchanepm41, ychanepm43, zchanPS, 0, "ONLY");
+ gMC->Gspos("ECHB", 4, "EPM4", xchanepm41, ychanepm44, zchanPS, 0, "ONLY");
+ gMC->Gspos("ECHB", 5, "EPM4", xchanepm41, ychanepm41, zchanVeto, 0, "ONLY");
+ gMC->Gspos("ECHB", 6, "EPM4", xchanepm41, ychanepm42, zchanVeto, 0, "ONLY");
+ gMC->Gspos("ECHB", 7, "EPM4", xchanepm41, ychanepm43, zchanVeto, 0, "ONLY");
+ gMC->Gspos("ECHB", 8, "EPM4", xchanepm41, ychanepm44, zchanVeto, 0, "ONLY");
+
+ //================= Channel Placement Completed ======================//
+ //============ Now to Create Al Box and then LVDBs and Cables //
+ // are Placed inside it //
+
+ // Eight Al Boxes are created, four on Preshower side
+ // and four on Veto side
+
+ // FOR PRESHOWER
+
+ // First to Create hollow Al Box
+ // there are two types of modules, therefore, two Al box of
+ // long type and two of short type are created
+
+ // For Long Type
+ // X-dimension = 16.5cm
+ // Y-dimension = same as EFE1
+ // Z-dimension = 7.4cm
+ // Integer assigned to Al medium is 603
+
+ Float_t esvdA1[3];
+ esvdA1[0]= 16.5/2.;
+ esvdA1[1]= dboxFea1[1];
+ esvdA1[2]= 7.4/2.;
+
+ gMC->Gsvolu("ESV1", "BOX", idtmed[603], esvdA1, 3);
+ gMC->Gsvolu("ESV2", "BOX", idtmed[603], esvdA1, 3);
+
+ // Create Air strip for Al Boxes type-A
+ // Al boxes are 3mm thick In X and Z on both sides
+ // X-dimension = 16.5cm - 0.3cm
+ // Y-dimension = same as EFE1
+ // Z-dimension = 7.4cm - 0.3cm
+
+ Float_t eairA1[3];
+ eairA1[0]= esvdA1[0] - 0.3;
+ eairA1[1]= esvdA1[1];
+ eairA1[2]= esvdA1[2] - 0.3;
+
+ gMC->Gsvolu("EIR1", "BOX", idtmed[698], eairA1, 3);
+
+ // Put air strip inside ESV1 & ESV2
+ gMC->Gspos("EIR1", 1, "ESV1", 0., 0., 0., 0, "ONLY");
+ gMC->Gspos("EIR1", 1, "ESV2", 0., 0., 0., 0, "ONLY");
+
+
+ // For Short Type
+ // X-dimension = 16.5cm
+ // Y-dimension = same as EFE3
+ // Z-dimension = 7.4cm
+
+ Float_t esvdA2[3];
+ esvdA2[0]= esvdA1[0];
+ esvdA2[1]= dboxFea3[1];
+ esvdA2[2]= esvdA1[2];
+
+ gMC->Gsvolu("ESV3", "BOX", idtmed[603], esvdA2, 3);
+ gMC->Gsvolu("ESV4", "BOX", idtmed[603], esvdA2, 3);
+
+ // Create Air strip for Al Boxes type-B
+ // Al boxes are 3mm thick In X and Z on both sides
+ // X-dimension = 16.5cm - 0.3cm
+ // Y-dimension = same as EFE3
+ // Z-dimension = 7.4cm - 0.3cm
+
+ Float_t eairA2[3];
+ eairA2[0]= esvdA2[0] - 0.3;
+ eairA2[1]= esvdA2[1];
+ eairA2[2]= esvdA2[2] - 0.3;
+
+ gMC->Gsvolu("EIR2", "BOX", idtmed[698], eairA2, 3);
+
+ // Put air strip inside ESV3 & ESV4
+ gMC->Gspos("EIR2", 1, "ESV3", 0., 0., 0., 0, "ONLY");
+ gMC->Gspos("EIR2", 1, "ESV4", 0., 0., 0., 0, "ONLY");
+
+
+ // FOR VETO
+
+ // First to Create hollow Al Box
+ // there are two types of modules, therefore, two Al box of
+ // long type and two of short type are created
+
+ // For Long Type
+ // X-dimension = 16.5cm
+ // Y-dimension = same as EFE1
+ // Z-dimension = 8.9cm
+ // Integer assigned to Al medium is 603
+
+ Float_t esvdB1[3];
+ esvdB1[0]= 16.5/2.;
+ esvdB1[1]= dboxFea1[1];
+ esvdB1[2]= 8.9/2.;
+
+ gMC->Gsvolu("EVV1", "BOX", idtmed[603], esvdB1, 3);
+ gMC->Gsvolu("EVV2", "BOX", idtmed[603], esvdB1, 3);
+
+ // Create Air strip for Al Boxes long type
+ // Al boxes are 3mm thick In X and Z on both sides
+ // X-dimension = 16.5cm - 0.3cm
+ // Y-dimension = same as EFE1
+ // Z-dimension = 8.9cm - 0.3cm
+
+ Float_t eairB1[3];
+ eairB1[0]= esvdB1[0] - 0.3;
+ eairB1[1]= esvdB1[1];
+ eairB1[2]= esvdB1[2] - 0.3;
+
+ gMC->Gsvolu("EIR3", "BOX", idtmed[698], eairB1, 3);
+
+ // Put air strip inside EVV1 & EVV2
+ gMC->Gspos("EIR3", 1, "EVV1", 0., 0., 0., 0, "ONLY");
+ gMC->Gspos("EIR3", 1, "EVV2", 0., 0., 0., 0, "ONLY");
+
+
+ // For Short Type
+ // X-dimension = 16.5cm
+ // Y-dimension = same as EFE3
+ // Z-dimension = 8.9cm
+ // Integer assigned to Al medium is 603
+
+ Float_t esvdB2[3];
+ esvdB2[0]= esvdB1[0];
+ esvdB2[1]= dboxFea3[1];
+ esvdB2[2]= esvdB1[2];
+
+ gMC->Gsvolu("EVV3", "BOX", idtmed[603], esvdB2, 3);
+ gMC->Gsvolu("EVV4", "BOX", idtmed[603], esvdB2, 3);
+
+
+ // Create Air strip for Al Boxes short type
+ // Al boxes are 3mm thick In X and Z on both sides
+ // X-dimension = 16.5cm - 0.3cm
+ // Y-dimension = same as EFE3
+ // Z-dimension = 8.9cm - 0.3cm
+
+ Float_t eairB2[3];
+ eairB2[0]= esvdB2[0] - 0.3;
+ eairB2[1]= esvdB2[1];
+ eairB2[2]= esvdB2[2] - 0.3;
+
+ gMC->Gsvolu("EIR4", "BOX", idtmed[698], eairB2, 3);
+
+ // Put air strip inside EVV3 & EVV4
+ gMC->Gspos("EIR4", 1, "EVV3", 0., 0., 0., 0, "ONLY");
+ gMC->Gspos("EIR4", 1, "EVV4", 0., 0., 0., 0, "ONLY");
+
+ //------------ Al Boxes Completed ----------------------/
+
+ //--------------Now Create LVDBs----------------------/
+
+ // LVDBs are the volumes of G10
+ // X-dimension = 10.0cm
+ // Y-dimension = 8.0cm
+ // Z-dimension = 0.2cm
+ // Integer assigned to the G10 medium is 607
+
+ Float_t elvdb[3];
+ elvdb[0]= 10.0/2.;
+ elvdb[1]= 8.0/2.;
+ elvdb[2]= 0.2/2.;
+
+ gMC->Gsvolu("ELVD", "BOX", idtmed[607], elvdb, 3);
+
+ // Put the LVDBs inside Al Boxes
+ Float_t yesvd = dboxFea1[1] - 25.0 - 4.0;
+
+ for(Int_t jj =1; jj<=6; jj++){
+
+ gMC->Gspos("ELVD", jj, "ESV1", 0., yesvd, 0., 0, "ONLY");
+ gMC->Gspos("ELVD", jj, "ESV2", 0., yesvd, 0., 0, "ONLY");
+
+ yesvd = yesvd - 4.0 - 0.5 - 4.0;
+
+ }
+
+ yesvd = dboxFea3[1] - 15.0 - 4.0;
+
+ for(Int_t jj =1; jj<=6; jj++){
+
+ gMC->Gspos("ELVD", jj, "ESV3", 0., yesvd, 0., 0, "ONLY");
+ gMC->Gspos("ELVD", jj, "ESV4", 0., yesvd, 0., 0, "ONLY");
+
+ yesvd = yesvd - 4.0 - 0.5 - 4.0;
+ }
+
+ yesvd = dboxFea1[1] - 25.0 - 4.0;
+
+ for(Int_t jj =1; jj<=6; jj++){
+
+ gMC->Gspos("ELVD", jj, "EVV1", 0., yesvd, 0., 0, "ONLY");
+ gMC->Gspos("ELVD", jj, "EVV2", 0., yesvd, 0., 0, "ONLY");
+
+ yesvd = yesvd - 4.0 - 0.5 - 4.0;
+ }
+
+ yesvd = dboxFea3[1] - 15.0 - 4.0;
+
+ for(Int_t jj =1; jj<=6; jj++){
+
+ gMC->Gspos("ELVD", jj, "EVV3", 0., yesvd, 0., 0, "ONLY");
+ gMC->Gspos("ELVD", jj, "EVV4", 0., yesvd, 0., 0, "ONLY");
+
+ yesvd = yesvd - 4.0 - 0.5 - 4.0;
+ }
+
+ //----------------- LVDBs Placement Completed--------------//
+
+ // ------------ Now Create Cables ------------------------//
+
+ // There are a number of cables
+ // We have reduced the number of volumes to 4
+ // And these 4 Volumes of Cables are placed repeatedly
+ // in the four quadrants (EPM1,2,3,4)
+ // The placement of Cables are in good approximations
+ // The material medium for Cables is a mixture of Plastic
+ // and Copper(Cu). Therefore, in a good approximation a mixture
+ // is created and Integer assigned to this medium is 631
+
+ Float_t cable1[3];
+ cable1[0] = 2.5/2.;
+ cable1[1] = dboxFea1[1];
+ cable1[2] = 2.4/2.;
+
+ gMC->Gsvolu("ECB1", "BOX", idtmed[631], cable1, 3);
+
+ Float_t cable2[3];
+ cable2[0] = 2.5/2.;
+ cable2[1] = dboxFea3[1];
+ cable2[2] = 2.4/2.;
+
+ gMC->Gsvolu("ECB2", "BOX", idtmed[631], cable2, 3);
+
+ Float_t cable3[3];
+ cable3[0] = 2.5/2.;
+ cable3[1] = dboxFea3[1] - dboxUM2[1];
+ cable3[2] = 2.4/2.;
+
+ gMC->Gsvolu("ECB3", "BOX", idtmed[631], cable3, 3);
+
+ Float_t cable4[3];
+ cable4[0] = 2.5/2.;
+ cable4[1] = dboxUM2[1];
+ cable4[2] = 2.4/2.;
+
+ gMC->Gsvolu("ECB4", "BOX", idtmed[631], cable4, 3);
+
+ // Calculation of the co-ordinates of Cables
+
+ Float_t xcable11pm2, xcable12pm2, xcable2pm1, xcable2pm2, xcable21pm4, xcable22pm4;
+ Float_t xcable3pm1, xcable3pm3, xcable3pm4, xcable4pm3;
+
+ Float_t ycable2pm1, ycable2pm2;
+ Float_t ycable3pm1, ycable3pm3, ycable3pm4, ycable4pm3;
+
+ Float_t zcablePS, zcableVeto;
+
+ xcable2pm1 = esvdA1[0] - 3.0 - cable1[0];
+ xcable3pm1 = xcable2pm1 - cable1[0] - 0.5 - cable1[0];
+
+ xcable11pm2 = -esvdA1[0]+ 3.0 + cable1[0];
+ xcable12pm2 = xcable11pm2 + cable1[0] + 0.5 + cable1[0];
+ xcable2pm2 = xcable12pm2 + cable1[0] + 0.5 + cable1[0];
+
+ xcable3pm3 = -esvdB1[0] + 3.0 + cable1[0];
+ xcable4pm3 = xcable3pm3 + cable1[0] + 0.5 + cable1[0];
+
+ xcable21pm4 = esvdB1[0] - 3.0 - cable1[0];
+ xcable22pm4 = xcable21pm4 - cable1[0] -0.5 - cable1[0];
+ xcable3pm4 = xcable22pm4 - cable1[0] -0.5 -cable1[0];
+
+ ycable2pm1 = -(esvdA1[1] - esvdA2[1]);
+ ycable3pm1 = -esvdA1[1] + cable3[1];
+
+ ycable2pm2 = -(esvdA1[1] - esvdA2[1]);
+
+ ycable3pm3 = -dboxUM2[1];
+ ycable4pm3 = -esvdA2[1] + dboxUM2[1];
+
+ ycable3pm4 = -dboxUM2[1];
+
+ zcablePS = -esvdA1[2] + 0.3 + cable1[2];
+ zcableVeto = esvdB1[2] - 0.3 - cable1[2];
+
+
+ // Placement of Cables in Al Boxes
+ gMC->Gspos("ECB2", 1, "ESV1", xcable2pm1, ycable2pm1, zcablePS, 0, "ONLY");
+ gMC->Gspos("ECB3", 1, "ESV1", xcable3pm1, ycable3pm1, zcablePS, 0, "ONLY");
+ gMC->Gspos("ECB2", 1, "EVV1", xcable2pm1, ycable2pm1, zcableVeto, 0, "ONLY");
+ gMC->Gspos("ECB3", 1, "EVV1", xcable3pm1, ycable3pm1, zcableVeto, 0, "ONLY");
+
+ gMC->Gspos("ECB1", 1, "ESV2", xcable11pm2, 0., zcablePS, 0, "ONLY");
+ gMC->Gspos("ECB1", 2, "ESV2", xcable12pm2, 0., zcablePS, 0, "ONLY");
+ gMC->Gspos("ECB2", 1, "ESV2", xcable2pm2, ycable2pm2, zcablePS, 0, "ONLY");
+ gMC->Gspos("ECB1", 1, "EVV2", xcable11pm2, 0., zcableVeto, 0, "ONLY");
+ gMC->Gspos("ECB1", 2, "EVV2", xcable12pm2, 0., zcableVeto, 0, "ONLY");
+ gMC->Gspos("ECB2", 1, "EVV2", xcable2pm2, ycable2pm2, zcableVeto, 0, "ONLY");
+
+ gMC->Gspos("ECB3", 1, "ESV3", xcable3pm3, ycable3pm3, zcablePS, 0, "ONLY");
+ gMC->Gspos("ECB4", 1, "ESV3", xcable4pm3, ycable4pm3, zcablePS, 0, "ONLY");
+ gMC->Gspos("ECB3", 1, "EVV3", xcable3pm3, ycable3pm3, zcableVeto, 0, "ONLY");
+ gMC->Gspos("ECB4", 1, "EVV3", xcable4pm3, ycable4pm3, zcableVeto, 0, "ONLY");
+
+ gMC->Gspos("ECB2", 1, "ESV4", xcable21pm4, 0., zcablePS, 0, "ONLY");
+ gMC->Gspos("ECB2", 2, "ESV4", xcable22pm4, 0., zcablePS, 0, "ONLY");
+ gMC->Gspos("ECB3", 1, "ESV4", xcable3pm4, ycable3pm4, zcablePS, 0, "ONLY");
+ gMC->Gspos("ECB2", 1, "EVV4", xcable21pm4, 0., zcableVeto, 0, "ONLY");
+ gMC->Gspos("ECB2", 2, "EVV4", xcable22pm4, 0., zcableVeto, 0, "ONLY");
+ gMC->Gspos("ECB3", 1, "EVV4", xcable3pm4, ycable3pm4, zcableVeto, 0, "ONLY");
+
+
+ //=============== NOW POSITIONING THE Al Boxes IN EPM'S================//
+
+
+ gMC->Gspos("ESV1", 1, "EPM1", dboxFea1[0] - esvdA1[0] - 8.0, 0., zelvdbPS, 0, "ONLY");
+ gMC->Gspos("EVV1", 1, "EPM1", dboxFea1[0] - esvdB1[0] - 8.0, 0., zelvdbVeto, 0, "ONLY");
+
+ gMC->Gspos("ESV2", 1, "EPM2", -dboxFea2[0] + esvdA1[0] + 8.0, 2.3, zelvdbPS, 0, "ONLY");
+ gMC->Gspos("EVV2", 1, "EPM2", -dboxFea2[0] + esvdB1[0] + 8.0, 2.3, zelvdbVeto, 0, "ONLY");
+
+ gMC->Gspos("ESV3", 1, "EPM3", -dboxFea3[0] + esvdA1[0] + 8.0, 0., zelvdbPS, 0, "ONLY");
+ gMC->Gspos("EVV3", 1, "EPM3", -dboxFea3[0] + esvdB1[0] + 8.0, 0., zelvdbVeto, 0, "ONLY");
+
+ gMC->Gspos("ESV4", 1, "EPM4", dboxFea4[0] - esvdA1[0] - 8.0, 2.3, zelvdbPS, 0, "ONLY");
+ gMC->Gspos("EVV4", 1, "EPM4", dboxFea4[0] - esvdB1[0] - 8.0, 2.3, zelvdbVeto, 0, "ONLY");
+
+ //==================================================================//
+ //====================== LAST THING IS TO INSTALL ELMB ================//
+
+ // ELMB,s are the G10 Volumes
+
+ // First to create Air Volume to place ELMBs
+ Float_t xelmb[3];
+ xelmb[0] = 20.0/2.;
+ xelmb[1] = 8.0/2.;
+ xelmb[2] = 1.0/2.;
+
+ gMC->Gsvolu("ELMB", "BOX", idtmed[698], xelmb, 3);
+
+ // There are more G10 Volumes
+ // But in approximation, we reduced them to two
+ // ELM1 & ELM2
+
+ Float_t xelmb1[3];
+ xelmb1[0] = 19.4/2.;
+ xelmb1[1] = 7.2/2.;
+ xelmb1[2] = 0.2/2.;
+
+ gMC->Gsvolu("ELM1", "BOX", idtmed[607], xelmb1, 3);
+
+ Float_t xelmb2[3];
+ xelmb2[0] = 12.0/2.;
+ xelmb2[1] = 6.0/2.;
+ xelmb2[2] = 0.2/2.;
+
+ gMC->Gsvolu("ELM2", "BOX", idtmed[607], xelmb2, 3);
+
+ /******** NOW POSITIONING THE G10 VOLUMES ELM1 & ELM2 IN ELMB **********/
+
+ gMC->Gspos("ELM1", 1, "ELMB", 0., 0., -0.3, 0, "ONLY");
+ gMC->Gspos("ELM2", 1, "ELMB", 0., 0., 0.3, 0, "ONLY");
+
+ // Position co-ordinates of ELMBs in EPM2 & EPM4
+
+ Float_t xelmbepm2, xelmbepm4, yelmbepm2, yelmbepm4, zelmbPS, zelmbVeto;
+
+ xelmbepm2 = -gaspmd2[0] + 16.0 +23.2 + 2.5 + xelmb[0];
+ xelmbepm4 = gaspmd4[0] - 16.0 -23.2 - 2.5 - xelmb[0];