+ //
+ // The DCS boards
+ //
+
+ const Float_t kDCSx = 9.0;
+ const Float_t kDCSy = 14.5;
+ const Float_t kDCSz = 0.3;
+
+ const Float_t kDCSpcTh = 0.15;
+ const Float_t kDCScuTh = 0.01;
+ const Float_t kDCScoTh = 0.04;
+
+ // The mother volume for the DCSs (air)
+ const Int_t kNparDCS = 3;
+ Float_t parDCS[kNparDCS];
+ parDCS[0] = kDCSx /2.0;
+ parDCS[1] = kDCSy /2.0;
+ parDCS[2] = kDCSz /2.0;
+ gMC->Gsvolu("UDCS","BOX",idtmed[1302-1],parDCS,kNparDCS);
+
+ // The DCS carrier G10 layer
+ parDCS[0] = kDCSx /2.0;
+ parDCS[1] = kDCSy /2.0;
+ parDCS[2] = kDCSpcTh/2.0;
+ gMC->Gsvolu("UDC1","BOX",idtmed[1319-1],parDCS,kNparDCS);
+ // The DCS carrier Cu layer
+ parDCS[0] = kDCSx /2.0;
+ parDCS[1] = kDCSy /2.0;
+ parDCS[2] = kDCScuTh/2.0;
+ gMC->Gsvolu("UDC2","BOX",idtmed[1318-1],parDCS,kNparDCS);
+ // The aluminum of the cooling plates
+ parDCS[0] = 5.0 /2.0;
+ parDCS[1] = 5.0 /2.0;
+ parDCS[2] = kDCScoTh/2.0;
+ gMC->Gsvolu("UDC3","BOX",idtmed[1324-1],parDCS,kNparDCS);
+
+ // Put the DCS material inside the DCS mother volume
+ xpos = 0.0;
+ ypos = 0.0;
+ zpos = -kDCSz /2.0 + kDCSpcTh/2.0;
+ gMC->Gspos("UDC1",1,"UDCS",xpos,ypos,zpos,0,"ONLY");
+ zpos += kDCSpcTh/2.0 + kDCScuTh/2.0;
+ gMC->Gspos("UDC2",1,"UDCS",xpos,ypos,zpos,0,"ONLY");
+ zpos += kDCScuTh/2.0 + kDCScoTh/2.0;
+ gMC->Gspos("UDC3",1,"UDCS",xpos,ypos,zpos,0,"ONLY");
+
+ // Put the DCS board in the chamber services mother volume
+ for (istack = 0; istack < kNstack; istack++) {
+ for (ilayer = 0; ilayer < kNlayer; ilayer++) {
+ Int_t iDet = GetDetectorSec(ilayer,istack);
+ Int_t iCopy = iDet + 1;
+ xpos = fCwidth[ilayer]/2.0 - 1.9 * (GetChamberLength(ilayer,istack) - 2.0*fgkRpadW)
+ / ((Float_t) GetRowMax(ilayer,istack,0));
+ ypos = 0.05 * fClength[ilayer][istack];
+ zpos = kDCSz/2.0 - fgkCsvH/2.0;
+ sprintf(cTagV,"UU%02d",iDet);
+ gMC->Gspos("UDCS",iCopy,cTagV,xpos,ypos,zpos,0,"ONLY");
+ }
+ }
+
+ //
+ // The ORI boards
+ //
+
+ const Float_t kORIx = 4.2;
+ const Float_t kORIy = 13.5;
+ const Float_t kORIz = 0.3;
+
+ const Float_t kORIpcTh = 0.15;
+ const Float_t kORIcuTh = 0.01;
+ const Float_t kORIcoTh = 0.04;
+
+ // The mother volume for the ORIs (air)
+ const Int_t kNparORI = 3;
+ Float_t parORI[kNparORI];
+ parORI[0] = kORIx /2.0;
+ parORI[1] = kORIy /2.0;
+ parORI[2] = kORIz /2.0;
+ gMC->Gsvolu("UORI","BOX",idtmed[1302-1],parORI,kNparORI);
+
+ // The ORI carrier G10 layer
+ parORI[0] = kORIx /2.0;
+ parORI[1] = kORIy /2.0;
+ parORI[2] = kORIpcTh/2.0;
+ gMC->Gsvolu("UOR1","BOX",idtmed[1319-1],parORI,kNparORI);
+ // The ORI carrier Cu layer
+ parORI[0] = kORIx /2.0;
+ parORI[1] = kORIy /2.0;
+ parORI[2] = kORIcuTh/2.0;
+ gMC->Gsvolu("UOR2","BOX",idtmed[1318-1],parORI,kNparORI);
+ // The aluminum of the cooling plates
+ parORI[0] = kORIx /2.0;
+ parORI[1] = kORIy /2.0;
+ parORI[2] = kORIcoTh/2.0;
+ gMC->Gsvolu("UOR3","BOX",idtmed[1324-1],parORI,kNparORI);
+
+ // Put the ORI material inside the ORI mother volume
+ xpos = 0.0;
+ ypos = 0.0;
+ zpos = -kORIz /2.0 + kORIpcTh/2.0;
+ gMC->Gspos("UOR1",1,"UORI",xpos,ypos,zpos,0,"ONLY");
+ zpos += kORIpcTh/2.0 + kORIcuTh/2.0;
+ gMC->Gspos("UOR2",1,"UORI",xpos,ypos,zpos,0,"ONLY");
+ zpos += kORIcuTh/2.0 + kORIcoTh/2.0;
+ gMC->Gspos("UOR3",1,"UORI",xpos,ypos,zpos,0,"ONLY");
+
+ // Put the ORI board in the chamber services mother volume
+ for (istack = 0; istack < kNstack; istack++) {
+ for (ilayer = 0; ilayer < kNlayer; ilayer++) {
+ Int_t iDet = GetDetectorSec(ilayer,istack);
+ Int_t iCopy = iDet + 1;
+ xpos = fCwidth[ilayer]/2.0 - 1.92 * (GetChamberLength(ilayer,istack) - 2.0*fgkRpadW)
+ / ((Float_t) GetRowMax(ilayer,istack,0));
+ ypos = -16.0;
+ zpos = kORIz/2.0 - fgkCsvH/2.0;
+ sprintf(cTagV,"UU%02d",iDet);
+ gMC->Gspos("UORI",iCopy ,cTagV,xpos,ypos,zpos,0,"ONLY");
+ xpos = -fCwidth[ilayer]/2.0 + 3.8 * (GetChamberLength(ilayer,istack) - 2.0*fgkRpadW)
+ / ((Float_t) GetRowMax(ilayer,istack,0));
+ ypos = -16.0;
+ zpos = kORIz/2.0 - fgkCsvH/2.0;
+ sprintf(cTagV,"UU%02d",iDet);
+ gMC->Gspos("UORI",iCopy+kNdet,cTagV,xpos,ypos,zpos,0,"ONLY");
+ }
+ }
+