982 G4Material* fCrystalMaterial = G4Material::GetMaterial(
"Cesiumiodide");
990 solidEnd =
new G4Cons(
"EndWorld",(*emcEnd).WorldRmin1,(*emcEnd).WorldRmax1,(*emcEnd).WorldRmin2,(*emcEnd).WorldRmax2,
991 (*emcEnd).WorldDz/2,0.*deg,360.*deg);
992 logicEnd =
new G4LogicalVolume(solidEnd, G4Material::GetMaterial(
"Air"),
"EndWorld", 0, 0, 0);
993 physiEnd =
new G4PVPlacement(0,
994 G4ThreeVector(0,0,(*emcEnd).WorldZPosition),
1005 G4RotationMatrix *rotateEnd =
new G4RotationMatrix();
1006 rotateEnd->rotateY(180.*deg);
1007 physiEnd =
new G4PVPlacement(rotateEnd,
1008 G4ThreeVector(0,0,-(*emcEnd).WorldZPosition),
1040 solidEndPhi =
new G4Cons(
"EndPhi",(*emcEnd).WorldRmin1,(*emcEnd).WorldRmax1,(*emcEnd).WorldRmin2,(*emcEnd).WorldRmax2,
1041 (*emcEnd).WorldDz/2,0*deg,22.5*deg);
1042 logicEndPhi =
new G4LogicalVolume(solidEndPhi, G4Material::GetMaterial(
"Air"),
"EndPhi", 0, 0, 0);
1043 for(G4int i=0;i<14;i++)
1047 G4RotationMatrix *rotatePhi =
new G4RotationMatrix();
1048 rotatePhi->rotateZ(-i*22.5*deg+67.5*deg);
1049 physiEndPhi =
new G4PVPlacement(rotatePhi,0,logicEndPhi,
"EndPhi",logicEnd,
false,i);
1055 for(G4int i=0;i<35;i++)
1059 solidEndCasing =
new G4IrregBox(
"EndCasing",(*emcEnd).fPnt[i]);
1060 logicEndCasing =
new G4LogicalVolume(solidEndCasing,fCasingMaterial,
"EndCasing");
1061 physiEndCasing =
new G4PVPlacement(0,0,logicEndCasing,
"EndCasing",logicEndPhi,
false,copyNb);
1064 solidEndCrystal =
new G4IrregBox(
"EndCrystal",(*emcEnd).cryPoint);
1065 logicEndCrystal =
new G4LogicalVolume(solidEndCrystal,fCrystalMaterial,
"EndCrystal");
1066 physiEndCrystal =
new G4PVPlacement(0,0,logicEndCrystal,
"EndCrystal",logicEndCasing,
false,copyNb);
1076 solidEndPhi =
new G4Cons(
"EndPhi",(*emcEnd).WorldRmin1,(*emcEnd).WorldRmax1,(*emcEnd).WorldRmin2,(*emcEnd).WorldRmax2,
1077 (*emcEnd).WorldDz/2,67.5*deg,22.5*deg);
1078 logicEndPhi =
new G4LogicalVolume(solidEndPhi, G4Material::GetMaterial(
"Air"),
"EndPhi", 0, 0, 0);
1079 for(G4int i=0;i<2;i++)
1081 G4RotationMatrix *rotatePhi =
new G4RotationMatrix();
1082 rotatePhi->rotateZ(-i*180.*deg);
1083 physiEndPhi =
new G4PVPlacement(rotatePhi,0,logicEndPhi,
"EndPhi",logicEnd,
false,i*8+6);
1088 for(G4int i=0;i<35;i++)
1091 solidEndCasing =
new G4IrregBox(
"EndCasing",(*emcEnd).fPnt1[i]);
1092 logicEndCasing =
new G4LogicalVolume(solidEndCasing,fCasingMaterial,
"EndCasing");
1093 physiEndCasing =
new G4PVPlacement(0,0,logicEndCasing,
"EndCasing",logicEndPhi,
false,copyNb);
1096 solidEndCrystal =
new G4IrregBox(
"EndCrystal",(*emcEnd).cryPoint);
1097 logicEndCrystal =
new G4LogicalVolume(solidEndCrystal,fCrystalMaterial,
"EndCrystal");
1098 physiEndCrystal =
new G4PVPlacement(0,0,logicEndCrystal,
"EndCrystal",logicEndCasing,
false,copyNb);
1105 (*emcEnd).ReflectX();
1108 for(G4int i=0;i<35;i++)
1109 for (G4int j=0;j<8;j++)
1110 (*emcEnd).fPnt1[i][j].rotateZ(-90.*deg);
1112 solidEndPhi =
new G4Cons(
"EndPhi",(*emcEnd).WorldRmin1,(*emcEnd).WorldRmax1,(*emcEnd).WorldRmin2,(*emcEnd).WorldRmax2,
1113 (*emcEnd).WorldDz/2,0*deg,22.5*deg);
1114 logicEndPhi =
new G4LogicalVolume(solidEndPhi, G4Material::GetMaterial(
"Air"),
"EndPhi", 0, 0, 0);
1115 for(G4int i=0;i<2;i++)
1117 G4RotationMatrix *rotatePhi =
new G4RotationMatrix();
1118 rotatePhi->rotateZ(-i*180.*deg-90.*deg);
1119 physiEndPhi =
new G4PVPlacement(rotatePhi,0,logicEndPhi,
"EndPhi",logicEnd,
false,i*8+7);
1124 for(G4int i=0;i<35;i++)
1127 solidEndCasing =
new G4IrregBox(
"EndCasing",(*emcEnd).fPnt1[i]);
1128 logicEndCasing =
new G4LogicalVolume(solidEndCasing,fCrystalMaterial,
"EndCasing");
1129 physiEndCasing =
new G4PVPlacement(0,0,logicEndCasing,
"EndCasing",logicEndPhi,
false,copyNb);
1132 solidEndCrystal =
new G4IrregBox(
"EndCrystal",(*emcEnd).cryPoint);
1133 logicEndCrystal =
new G4LogicalVolume(solidEndCrystal,fCrystalMaterial,
"EndCrystal");
1134 physiEndCrystal =
new G4PVPlacement(0,0,logicEndCrystal,
"EndCrystal",logicEndCasing,
false,copyNb);
1148 solidSupportBar =
new G4Tubs(
"SupportBar",
1149 (*besEMCGeometry).BSCRmax+(*besEMCGeometry).SPBarThickness1,
1150 (*besEMCGeometry).BSCRmax+(*besEMCGeometry).SPBarThickness+(*besEMCGeometry).SPBarThickness1,
1151 (*besEMCGeometry).BSCDz+(*besEMCGeometry).TaperRingThickness3+(*besEMCGeometry).EndRingDz,
1155 logicSupportBar =
new G4LogicalVolume(solidSupportBar,stainlessSteel,
"SupportBar");
1157 physiSupportBar =
new G4PVPlacement(0,0,logicSupportBar,
"SupportBar",logicEMC,
false,0);
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);
1166 logicSupportBar1 =
new G4LogicalVolume(solidSupportBar1,stainlessSteel,
"SupportBar1");
1168 for(G4int i=0;i<(*besEMCGeometry).BSCNbPhi/2;i++)
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);
1176 solidEndRing =
new G4Tubs(
"EndRing",
1177 (*besEMCGeometry).EndRingRmin,
1178 (*besEMCGeometry).EndRingRmin+(*besEMCGeometry).EndRingDr/2,
1179 (*besEMCGeometry).EndRingDz/2,
1183 solidGear =
new G4Tubs(
"Gear",
1184 (*besEMCGeometry).EndRingRmin+(*besEMCGeometry).EndRingDr/2,
1185 (*besEMCGeometry).EndRingRmin+(*besEMCGeometry).EndRingDr,
1186 (*besEMCGeometry).EndRingDz/2,
1188 (*besEMCGeometry).BSCPhiDphi);
1191 solidTaperRing1 =
new G4Tubs(
"TaperRing1",
1192 (*besEMCGeometry).TaperRingRmin1,
1193 (*besEMCGeometry).TaperRingRmin1+(*besEMCGeometry).TaperRingThickness1,
1194 (*besEMCGeometry).TaperRingInnerLength/2,
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,
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,
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");
1222 for(G4int i=0;i<2;i++)
1224 G4RotationMatrix *rotateSPRing =
new G4RotationMatrix();
1225 G4double zEndRing,z1,z2,z3;
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;
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);
1244 physiEndRing =
new G4PVPlacement(rotateSPRing,G4ThreeVector(0,0,zEndRing),
1245 logicEndRing,
"EndRing",logicEMC,
false,0);
1247 for(G4int j=0;j<(*besEMCGeometry).BSCNbPhi/2;j++)
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);
1255 physiTaperRing1 =
new G4PVPlacement(rotateSPRing,G4ThreeVector(0,0,z1),
1256 logicTaperRing1,
"TaperRing1",logicEMC,
false,0);
1258 physiTaperRing2 =
new G4PVPlacement(rotateSPRing,G4ThreeVector(0,0,z2),
1259 logicTaperRing2,
"TaperRing2",logicEMC,
false,0);
1261 physiTaperRing3 =
new G4PVPlacement(rotateSPRing,G4ThreeVector(0,0,z3),
1262 logicTaperRing3,
"TaperRing3",logicEMC,
false,0);