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