996 G4Material* fCrystalMaterial = G4Material::GetMaterial(
"Cesiumiodide" );
1004 solidEnd =
new G4Cons(
"EndWorld", ( *emcEnd ).WorldRmin1, ( *emcEnd ).WorldRmax1,
1005 ( *emcEnd ).WorldRmin2, ( *emcEnd ).WorldRmax2,
1006 ( *emcEnd ).WorldDz / 2, 0. * deg, 360. * deg );
1008 new G4LogicalVolume( solidEnd, G4Material::GetMaterial(
"Air" ),
"EndWorld", 0, 0, 0 );
1009 physiEnd =
new G4PVPlacement( 0,
1010 G4ThreeVector( 0, 0, ( *emcEnd ).WorldZPosition ),
1020 G4RotationMatrix* rotateEnd =
new G4RotationMatrix();
1021 rotateEnd->rotateY( 180. * deg );
1022 physiEnd =
new G4PVPlacement( rotateEnd, G4ThreeVector( 0, 0, -( *emcEnd ).WorldZPosition ),
1023 logicEnd,
"EndWorld", logicEMC,
false, 2 );
1050 solidEndPhi =
new G4Cons(
"EndPhi", ( *emcEnd ).WorldRmin1, ( *emcEnd ).WorldRmax1,
1051 ( *emcEnd ).WorldRmin2, ( *emcEnd ).WorldRmax2,
1052 ( *emcEnd ).WorldDz / 2, 0 * deg, 22.5 * deg );
1054 new G4LogicalVolume( solidEndPhi, G4Material::GetMaterial(
"Air" ),
"EndPhi", 0, 0, 0 );
1055 for ( G4int i = 0; i < 14; i++ )
1057 if ( ( i != 6 ) && ( i != 7 ) )
1059 G4RotationMatrix* rotatePhi =
new G4RotationMatrix();
1060 rotatePhi->rotateZ( -i * 22.5 * deg + 67.5 * deg );
1061 physiEndPhi =
new G4PVPlacement( rotatePhi, G4ThreeVector( 0, 0, 0 ), logicEndPhi,
1062 "EndPhi", logicEnd,
false, i,
false );
1068 for ( G4int i = 0; i < 35; i++ )
1072 solidEndCasing =
new G4IrregBox(
"EndCasing", ( *emcEnd ).fPnt[i] );
1073 logicEndCasing =
new G4LogicalVolume( solidEndCasing, fCasingMaterial,
"EndCasing" );
1074 physiEndCasing =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicEndCasing,
1075 "EndCasing", logicEndPhi,
false, copyNb,
false );
1077 emcEnd->ModifyForCasing( ( *emcEnd ).fPnt[i], i );
1078 solidEndCrystal =
new G4IrregBox(
"EndCrystal", ( *emcEnd ).cryPoint );
1079 logicEndCrystal =
new G4LogicalVolume( solidEndCrystal, fCrystalMaterial,
"EndCrystal" );
1080 physiEndCrystal =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicEndCrystal,
1081 "EndCrystal", logicEndCasing,
false, copyNb,
false );
1090 solidEndPhi =
new G4Cons(
"EndPhi", ( *emcEnd ).WorldRmin1, ( *emcEnd ).WorldRmax1,
1091 ( *emcEnd ).WorldRmin2, ( *emcEnd ).WorldRmax2,
1092 ( *emcEnd ).WorldDz / 2, 67.5 * deg, 22.5 * deg );
1094 new G4LogicalVolume( solidEndPhi, G4Material::GetMaterial(
"Air" ),
"EndPhi", 0, 0, 0 );
1095 for ( G4int i = 0; i < 2; i++ )
1097 G4RotationMatrix* rotatePhi =
new G4RotationMatrix();
1098 rotatePhi->rotateZ( -i * 180. * deg );
1099 physiEndPhi =
new G4PVPlacement( rotatePhi, G4ThreeVector( 0, 0, 0 ), logicEndPhi,
1100 "EndPhi", logicEnd,
false, i * 8 + 6,
false );
1105 for ( G4int i = 0; i < 35; i++ )
1108 solidEndCasing =
new G4IrregBox(
"EndCasing", ( *emcEnd ).fPnt1[i] );
1109 logicEndCasing =
new G4LogicalVolume( solidEndCasing, fCasingMaterial,
"EndCasing" );
1110 physiEndCasing =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicEndCasing,
1111 "EndCasing", logicEndPhi,
false, copyNb,
false );
1113 emcEnd->ModifyForCasing( ( *emcEnd ).fPnt1[i], i );
1114 solidEndCrystal =
new G4IrregBox(
"EndCrystal", ( *emcEnd ).cryPoint );
1115 logicEndCrystal =
new G4LogicalVolume( solidEndCrystal, fCrystalMaterial,
"EndCrystal" );
1116 physiEndCrystal =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicEndCrystal,
1117 "EndCrystal", logicEndCasing,
false, copyNb,
false );
1124 ( *emcEnd ).ReflectX();
1127 for ( G4int i = 0; i < 35; i++ )
1128 for ( G4int j = 0; j < 8; j++ ) ( *emcEnd ).fPnt1[i][j].rotateZ( -90. * deg );
1130 solidEndPhi =
new G4Cons(
"EndPhi", ( *emcEnd ).WorldRmin1, ( *emcEnd ).WorldRmax1,
1131 ( *emcEnd ).WorldRmin2, ( *emcEnd ).WorldRmax2,
1132 ( *emcEnd ).WorldDz / 2, 0 * deg, 22.5 * deg );
1134 new G4LogicalVolume( solidEndPhi, G4Material::GetMaterial(
"Air" ),
"EndPhi", 0, 0, 0 );
1135 for ( G4int i = 0; i < 2; i++ )
1137 G4RotationMatrix* rotatePhi =
new G4RotationMatrix();
1138 rotatePhi->rotateZ( -i * 180. * deg - 90. * deg );
1139 physiEndPhi =
new G4PVPlacement( rotatePhi, G4ThreeVector( 0, 0, 0 ), logicEndPhi,
1140 "EndPhi", logicEnd,
false, i * 8 + 7,
false );
1145 for ( G4int i = 0; i < 35; i++ )
1148 solidEndCasing =
new G4IrregBox(
"EndCasing", ( *emcEnd ).fPnt1[i] );
1149 logicEndCasing =
new G4LogicalVolume( solidEndCasing, fCrystalMaterial,
"EndCasing" );
1150 physiEndCasing =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicEndCasing,
1151 "EndCasing", logicEndPhi,
false, copyNb,
false );
1153 emcEnd->ModifyForCasing( ( *emcEnd ).fPnt1[i], i );
1154 solidEndCrystal =
new G4IrregBox(
"EndCrystal", ( *emcEnd ).cryPoint );
1155 logicEndCrystal =
new G4LogicalVolume( solidEndCrystal, fCrystalMaterial,
"EndCrystal" );
1156 physiEndCrystal =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicEndCrystal,
1157 "EndCrystal", logicEndCasing,
false, copyNb,
false );
1171 solidSupportBar =
new G4Tubs(
1172 "SupportBar", ( *besEMCGeometry ).BSCRmax + ( *besEMCGeometry ).SPBarThickness1,
1173 ( *besEMCGeometry ).BSCRmax + ( *besEMCGeometry ).SPBarThickness +
1174 ( *besEMCGeometry ).SPBarThickness1,
1175 ( *besEMCGeometry ).BSCDz + ( *besEMCGeometry ).TaperRingThickness3 +
1176 ( *besEMCGeometry ).EndRingDz,
1177 0. * deg, 360. * deg );
1179 logicSupportBar =
new G4LogicalVolume( solidSupportBar, stainlessSteel,
"SupportBar" );
1181 physiSupportBar =
new G4PVPlacement( 0, G4ThreeVector( 0, 0, 0 ), logicSupportBar,
1182 "SupportBar", logicEMC,
false, 0,
false );
1185 new G4Tubs(
"SupportBar1", ( *besEMCGeometry ).BSCRmax,
1186 ( *besEMCGeometry ).BSCRmax + ( *besEMCGeometry ).SPBarThickness1,
1187 ( *besEMCGeometry ).BSCDz + ( *besEMCGeometry ).TaperRingThickness3,
1188 ( *besEMCGeometry ).BSCPhiDphi - ( *besEMCGeometry ).SPBarDphi / 2,
1189 ( *besEMCGeometry ).SPBarDphi );
1191 logicSupportBar1 =
new G4LogicalVolume( solidSupportBar1, stainlessSteel,
"SupportBar1" );
1193 for ( G4int i = 0; i < ( *besEMCGeometry ).BSCNbPhi / 2; i++ )
1195 G4RotationMatrix* rotateSPBar =
new G4RotationMatrix();
1196 rotateSPBar->rotateZ( ( *besEMCGeometry ).BSCPhiDphi -
1197 i * 2 * ( *besEMCGeometry ).BSCPhiDphi );
1199 new G4PVPlacement( rotateSPBar, G4ThreeVector( 0, 0, 0 ), logicSupportBar1,
1200 "SupportBar1", logicEMC,
false, 0,
false );
1205 new G4Tubs(
"EndRing", ( *besEMCGeometry ).EndRingRmin,
1206 ( *besEMCGeometry ).EndRingRmin + ( *besEMCGeometry ).EndRingDr / 2,
1207 ( *besEMCGeometry ).EndRingDz / 2, 0. * deg, 360. * deg );
1209 solidGear =
new G4Tubs(
1210 "Gear", ( *besEMCGeometry ).EndRingRmin + ( *besEMCGeometry ).EndRingDr / 2,
1211 ( *besEMCGeometry ).EndRingRmin + ( *besEMCGeometry ).EndRingDr,
1212 ( *besEMCGeometry ).EndRingDz / 2, 0. * deg, ( *besEMCGeometry ).BSCPhiDphi );
1216 new G4Tubs(
"TaperRing1", ( *besEMCGeometry ).TaperRingRmin1,
1217 ( *besEMCGeometry ).TaperRingRmin1 + ( *besEMCGeometry ).TaperRingThickness1,
1218 ( *besEMCGeometry ).TaperRingInnerLength / 2, 0. * deg, 360. * deg );
1221 new G4Cons(
"TaperRing2", ( *besEMCGeometry ).TaperRingRmin1,
1222 ( *besEMCGeometry ).TaperRingRmin1 + ( *besEMCGeometry ).TaperRingDr,
1223 ( *besEMCGeometry ).TaperRingRmin2,
1224 ( *besEMCGeometry ).TaperRingRmin2 + ( *besEMCGeometry ).TaperRingDr,
1225 ( *besEMCGeometry ).TaperRingDz / 2, 0. * deg, 360. * deg );
1228 new G4Cons(
"TaperRing3", ( *besEMCGeometry ).BSCRmax2,
1229 ( *besEMCGeometry ).BSCRmax2 + ( *besEMCGeometry ).TaperRingOuterLength1,
1230 ( *besEMCGeometry ).TaperRingRmin2 + ( *besEMCGeometry ).TaperRingDr,
1231 ( *besEMCGeometry ).TaperRingRmin2 + ( *besEMCGeometry ).TaperRingDr +
1232 ( *besEMCGeometry ).TaperRingOuterLength,
1233 ( *besEMCGeometry ).TaperRingThickness3 / 2, 0. * deg, 360. * deg );
1235 logicEndRing =
new G4LogicalVolume( solidEndRing, stainlessSteel,
"EmcEndRing" );
1236 logicGear =
new G4LogicalVolume( solidGear, stainlessSteel,
"Gear" );
1237 logicTaperRing1 =
new G4LogicalVolume( solidTaperRing1, stainlessSteel,
"TaperRing1" );
1238 logicTaperRing2 =
new G4LogicalVolume( solidTaperRing2, stainlessSteel,
"TaperRing2" );
1239 logicTaperRing3 =
new G4LogicalVolume( solidTaperRing3, stainlessSteel,
"TaperRing3" );
1241 for ( G4int i = 0; i < 2; i++ )
1243 G4RotationMatrix* rotateSPRing =
new G4RotationMatrix();
1244 G4double zEndRing, z1, z2, z3;
1247 zEndRing = ( *besEMCGeometry ).BSCDz + ( *besEMCGeometry ).TaperRingThickness3 +
1248 ( *besEMCGeometry ).EndRingDz / 2;
1249 z1 = ( *besEMCGeometry ).BSCDz + ( *besEMCGeometry ).TaperRingThickness3 -
1250 ( *besEMCGeometry ).TaperRingDz - ( *besEMCGeometry ).TaperRingInnerLength / 2;
1251 z2 = ( *besEMCGeometry ).BSCDz + ( *besEMCGeometry ).TaperRingThickness3 -
1252 ( *besEMCGeometry ).TaperRingDz / 2;
1253 z3 = ( *besEMCGeometry ).BSCDz + ( *besEMCGeometry ).TaperRingThickness3 / 2;
1257 rotateSPRing->rotateY( 180. * deg );
1258 zEndRing = -( ( *besEMCGeometry ).BSCDz + ( *besEMCGeometry ).TaperRingThickness3 +
1259 ( *besEMCGeometry ).EndRingDz / 2 );
1260 z1 = -( ( *besEMCGeometry ).BSCDz + ( *besEMCGeometry ).TaperRingThickness3 -
1261 ( *besEMCGeometry ).TaperRingDz - ( *besEMCGeometry ).TaperRingInnerLength / 2 );
1262 z2 = -( ( *besEMCGeometry ).BSCDz + ( *besEMCGeometry ).TaperRingThickness3 -
1263 ( *besEMCGeometry ).TaperRingDz / 2 );
1264 z3 = -( ( *besEMCGeometry ).BSCDz + ( *besEMCGeometry ).TaperRingThickness3 / 2 );
1267 physiEndRing =
new G4PVPlacement( rotateSPRing, G4ThreeVector( 0, 0, zEndRing ),
1268 logicEndRing,
"EndRing", logicEMC,
false, 0 );
1270 for ( G4int j = 0; j < ( *besEMCGeometry ).BSCNbPhi / 2; j++ )
1272 G4RotationMatrix* rotateGear =
new G4RotationMatrix();
1273 rotateGear->rotateZ( ( *besEMCGeometry ).BSCPhiDphi / 2 -
1274 j * 2 * ( *besEMCGeometry ).BSCPhiDphi );
1275 physiGear =
new G4PVPlacement( rotateGear, G4ThreeVector( 0, 0, zEndRing ), logicGear,
1276 "Gear", logicEMC,
false, 0 );
1279 physiTaperRing1 =
new G4PVPlacement( rotateSPRing, G4ThreeVector( 0, 0, z1 ),
1280 logicTaperRing1,
"TaperRing1", logicEMC,
false, 0 );
1282 physiTaperRing2 =
new G4PVPlacement( rotateSPRing, G4ThreeVector( 0, 0, z2 ),
1283 logicTaperRing2,
"TaperRing2", logicEMC,
false, 0 );
1285 physiTaperRing3 =
new G4PVPlacement( rotateSPRing, G4ThreeVector( 0, 0, z3 ),
1286 logicTaperRing3,
"TaperRing3", logicEMC,
false, 0 );