1144{
1145
1146
1147
1148 solidSupportBar = new G4Tubs("SupportBar",
1149 (*besEMCGeometry).BSCRmax+(*besEMCGeometry).SPBarThickness1,
1150 (*besEMCGeometry).BSCRmax+(*besEMCGeometry).SPBarThickness+(*besEMCGeometry).SPBarThickness1,
1151 (*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3+(*besEMCGeometry).EndRingDz,
1152 0.*deg,
1153 360.*deg);
1154
1155 logicSupportBar = new G4LogicalVolume(solidSupportBar,stainlessSteel,"SupportBar");
1156
1157 physiSupportBar = new G4PVPlacement(0,0,logicSupportBar,"SupportBar",logicEMC,false,0);
1158
1159 solidSupportBar1 = new G4Tubs("SupportBar1",
1160 (*besEMCGeometry).BSCRmax,
1161 (*besEMCGeometry).BSCRmax+(*besEMCGeometry).SPBarThickness1,
1162 (*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3,
1163 (*besEMCGeometry).BSCPhiDphi-(*besEMCGeometry).SPBarDphi/2,
1164 (*besEMCGeometry).SPBarDphi);
1165
1166 logicSupportBar1 = new G4LogicalVolume(solidSupportBar1,stainlessSteel,"SupportBar1");
1167
1168 for(G4int i=0;i<(*besEMCGeometry).BSCNbPhi/2;i++)
1169 {
1170 G4RotationMatrix *rotateSPBar = new G4RotationMatrix();
1171 rotateSPBar->rotateZ((*besEMCGeometry).BSCPhiDphi-i*2*(*besEMCGeometry).BSCPhiDphi);
1172 physiSupportBar1 = new G4PVPlacement(rotateSPBar,0,logicSupportBar1,"SupportBar1",logicEMC,false,0);
1173 }
1174
1175
1176 solidEndRing = new G4Tubs("EndRing",
1177 (*besEMCGeometry).EndRingRmin,
1178 (*besEMCGeometry).EndRingRmin+(*besEMCGeometry).EndRingDr/2,
1179 (*besEMCGeometry).EndRingDz/2,
1180 0.*deg,
1181 360.*deg);
1182
1183 solidGear = new G4Tubs("Gear",
1184 (*besEMCGeometry).EndRingRmin+(*besEMCGeometry).EndRingDr/2,
1185 (*besEMCGeometry).EndRingRmin+(*besEMCGeometry).EndRingDr,
1186 (*besEMCGeometry).EndRingDz/2,
1187 0.*deg,
1188 (*besEMCGeometry).BSCPhiDphi);
1189
1190
1191 solidTaperRing1 = new G4Tubs("TaperRing1",
1192 (*besEMCGeometry).TaperRingRmin1,
1193 (*besEMCGeometry).TaperRingRmin1+(*besEMCGeometry).TaperRingThickness1,
1194 (*besEMCGeometry).TaperRingInnerLength/2,
1195 0.*deg,
1196 360.*deg);
1197
1198 solidTaperRing2 = new G4Cons("TaperRing2",
1199 (*besEMCGeometry).TaperRingRmin1,
1200 (*besEMCGeometry).TaperRingRmin1+(*besEMCGeometry).TaperRingDr,
1201 (*besEMCGeometry).TaperRingRmin2,
1202 (*besEMCGeometry).TaperRingRmin2+(*besEMCGeometry).TaperRingDr,
1203 (*besEMCGeometry).TaperRingDz/2,
1204 0.*deg,
1205 360.*deg);
1206
1207 solidTaperRing3 = new G4Cons("TaperRing3",
1208 (*besEMCGeometry).BSCRmax2,
1209 (*besEMCGeometry).BSCRmax2+(*besEMCGeometry).TaperRingOuterLength1,
1210 (*besEMCGeometry).TaperRingRmin2+(*besEMCGeometry).TaperRingDr,
1211 (*besEMCGeometry).TaperRingRmin2+(*besEMCGeometry).TaperRingDr+(*besEMCGeometry).TaperRingOuterLength,
1212 (*besEMCGeometry).TaperRingThickness3/2,
1213 0.*deg,
1214 360.*deg);
1215
1216 logicEndRing = new G4LogicalVolume(solidEndRing,stainlessSteel,"EmcEndRing");
1217 logicGear = new G4LogicalVolume(solidGear,stainlessSteel,"Gear");
1218 logicTaperRing1 = new G4LogicalVolume(solidTaperRing1,stainlessSteel,"TaperRing1");
1219 logicTaperRing2 = new G4LogicalVolume(solidTaperRing2,stainlessSteel,"TaperRing2");
1220 logicTaperRing3 = new G4LogicalVolume(solidTaperRing3,stainlessSteel,"TaperRing3");
1221
1222 for(G4int i=0;i<2;i++)
1223 {
1224 G4RotationMatrix *rotateSPRing = new G4RotationMatrix();
1225 G4double zEndRing,z1,z2,z3;
1226 if(i==0)
1227 {
1228 zEndRing = (*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3+(*besEMCGeometry).EndRingDz/2;
1229 z1 = (*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3
1230 -(*besEMCGeometry).TaperRingDz-(*besEMCGeometry).TaperRingInnerLength/2;
1231 z2 = (*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3-(*besEMCGeometry).TaperRingDz/2;
1232 z3 = (*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3/2;
1233 }
1234 else
1235 {
1236 rotateSPRing->rotateY(180.*deg);
1237 zEndRing = -((*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3+(*besEMCGeometry).EndRingDz/2);
1238 z1 = -((*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3
1239 -(*besEMCGeometry).TaperRingDz-(*besEMCGeometry).TaperRingInnerLength/2);
1240 z2 = -((*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3-(*besEMCGeometry).TaperRingDz/2);
1241 z3 = -((*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3/2);
1242 }
1243
1244 physiEndRing = new G4PVPlacement(rotateSPRing,G4ThreeVector(0,0,zEndRing),
1245 logicEndRing,"EndRing",logicEMC,false,0);
1246
1247 for(G4int j=0;j<(*besEMCGeometry).BSCNbPhi/2;j++)
1248 {
1249 G4RotationMatrix *rotateGear = new G4RotationMatrix();
1250 rotateGear->rotateZ((*besEMCGeometry).BSCPhiDphi/2-j*2*(*besEMCGeometry).BSCPhiDphi);
1251 physiGear = new G4PVPlacement(rotateGear,G4ThreeVector(0,0,zEndRing),
1252 logicGear,"Gear",logicEMC,false,0);
1253 }
1254
1255 physiTaperRing1 = new G4PVPlacement(rotateSPRing,G4ThreeVector(0,0,z1),
1256 logicTaperRing1,"TaperRing1",logicEMC,false,0);
1257
1258 physiTaperRing2 = new G4PVPlacement(rotateSPRing,G4ThreeVector(0,0,z2),
1259 logicTaperRing2,"TaperRing2",logicEMC,false,0);
1260
1261 physiTaperRing3 = new G4PVPlacement(rotateSPRing,G4ThreeVector(0,0,z3),
1262 logicTaperRing3,"TaperRing3",logicEMC,false,0);
1263 }
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273}