995 {
996 G4Material* fCrystalMaterial = G4Material::GetMaterial( "Cesiumiodide" );
997
998
999
1000
1001
1002
1003
1004 solidEnd = new G4Cons( "EndWorld", ( *emcEnd ).WorldRmin1, ( *emcEnd ).WorldRmax1,
1005 ( *emcEnd ).WorldRmin2, ( *emcEnd ).WorldRmax2,
1006 ( *emcEnd ).WorldDz / 2, 0. * deg, 360. * deg );
1007 logicEnd =
1008 new G4LogicalVolume( solidEnd, G4Material::GetMaterial( "Air" ), "EndWorld", 0, 0, 0 );
1009 physiEnd = new G4PVPlacement( 0,
1010 G4ThreeVector( 0, 0, ( *emcEnd ).WorldZPosition ),
1011 logicEnd,
1012 "EndWorld",
1013 logicEMC,
1014 false,
1015 0 );
1016
1017
1018
1019
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 );
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050 solidEndPhi = new G4Cons( "EndPhi", ( *emcEnd ).WorldRmin1, ( *emcEnd ).WorldRmax1,
1051 ( *emcEnd ).WorldRmin2, ( *emcEnd ).WorldRmax2,
1052 ( *emcEnd ).WorldDz / 2, 0 * deg, 22.5 * deg );
1053 logicEndPhi =
1054 new G4LogicalVolume( solidEndPhi, G4Material::GetMaterial( "Air" ), "EndPhi", 0, 0, 0 );
1055 for ( G4int i = 0; i < 14; i++ )
1056 {
1057 if ( ( i != 6 ) && ( i != 7 ) )
1058 {
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 );
1063 }
1064 }
1065
1066
1067
1068 for ( G4int i = 0; i < 35; i++ )
1069 {
1071
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 );
1076
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 );
1082
1083
1084
1085
1086 }
1087
1088
1089
1090 solidEndPhi = new G4Cons( "EndPhi", ( *emcEnd ).WorldRmin1, ( *emcEnd ).WorldRmax1,
1091 ( *emcEnd ).WorldRmin2, ( *emcEnd ).WorldRmax2,
1092 ( *emcEnd ).WorldDz / 2, 67.5 * deg, 22.5 * deg );
1093 logicEndPhi =
1094 new G4LogicalVolume( solidEndPhi, G4Material::GetMaterial( "Air" ), "EndPhi", 0, 0, 0 );
1095 for ( G4int i = 0; i < 2; i++ )
1096 {
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 );
1101 }
1102
1103
1104
1105 for ( G4int i = 0; i < 35; i++ )
1106 {
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 );
1112
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 );
1118
1119
1120
1121
1122 }
1123
1124 ( *emcEnd ).ReflectX();
1125
1126
1127 for ( G4int i = 0; i < 35; i++ )
1128 for ( G4int j = 0; j < 8; j++ ) ( *emcEnd ).fPnt1[i][j].rotateZ( -90. * deg );
1129
1130 solidEndPhi = new G4Cons( "EndPhi", ( *emcEnd ).WorldRmin1, ( *emcEnd ).WorldRmax1,
1131 ( *emcEnd ).WorldRmin2, ( *emcEnd ).WorldRmax2,
1132 ( *emcEnd ).WorldDz / 2, 0 * deg, 22.5 * deg );
1133 logicEndPhi =
1134 new G4LogicalVolume( solidEndPhi, G4Material::GetMaterial( "Air" ), "EndPhi", 0, 0, 0 );
1135 for ( G4int i = 0; i < 2; i++ )
1136 {
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 );
1141 }
1142
1143
1144
1145 for ( G4int i = 0; i < 35; i++ )
1146 {
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 );
1152
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 );
1158
1159
1160
1161
1162 }
1163}
G4int ComputeEndCopyNb(G4int)