970 G4RotationMatrix rot_dummy(0*deg,0*deg,0*deg);
971 G4ThreeVector transl_dummy(0*deg,0*deg,0*deg);
972 G4Transform3D transf_dummy(rot_dummy,transl_dummy);
975 G4double l_mrpc_xdo_out=133.62*mm;
976 G4double lmrpc_xup_out =200.97*mm;
977 G4double lmrpc_z_out= 395.5*mm;
978 G4double lmrpc_yfr_out_e =24.50*mm;
979 G4double lmrpc_yba_out_e =24.50*mm;
981 G4double l_mrpc_xdo_ins=115.25*mm;
982 G4double lmrpc_xup_ins=180.56*mm;
983 G4double lmrpc_yfr_ins=22.50*mm;
984 G4double lmrpc_yba_ins=22.50*mm;
985 G4double lmrpc_z_ins=383.14*mm;
986 G4double delta_frame_x =7*mm;
987 G4double delta_frame_y=3*mm;
988 G4double inner_angle=9.74*deg;
990 G4double ks_trafo =10.*mm - (lmrpc_z_out)/2. + lmrpc_z_ins/2.;
992 G4Trd* frame_tot_e =
new G4Trd(
"frame_tot_e",l_mrpc_xdo_out/2.,lmrpc_xup_out/2.,lmrpc_yfr_out_e/2.,lmrpc_yba_out_e/2.,lmrpc_z_out/2.);
994 G4Box* bendingbox_e =
new G4Box(
"bendingbox_e",lmrpc_xup_out/2,lmrpc_yfr_out_e/2,5*mm);
995 G4ThreeVector trans_bendingbox_e(0.,0.,(5.*mm+lmrpc_z_out/2.-0.05*mm));
996 G4Transform3D transf_bendingbox_e(rot_dummy,trans_bendingbox_e);
999 G4double ztransframein_e= 10.*mm - (lmrpc_z_out)/2. + lmrpc_z_ins/2.;
1000 G4ThreeVector trans_frame_in_e(0.,0.,ztransframein_e);
1001 G4Transform3D transf_frame_in_e(rot_dummy,trans_frame_in_e);
1003 G4UnionSolid * frame_000_e =
new G4UnionSolid(
"frame_000_e",frame_tot_e,bendingbox_e,transf_bendingbox_e);
1006 G4double r_bending_in=838.0*mm;
1007 G4double bending_angle_start=(90.-45.)*deg;
1008 G4double bending_angle_end=360*deg;
1009 G4double rot_bend_x=90.*deg;
1010 G4double rot_bend_y=90.*deg;
1011 G4double rot_bend_z=0.*deg;
1012 G4double transl_bend_x=0*mm;
1013 G4double transl_bend_y=0*mm;
1014 G4double transl_bend_z=-634.56*mm;
1017 G4Cons* bending_e =
new G4Cons(
"bending_e",r_bending_in,(r_bending_in+30.*mm),r_bending_in,(r_bending_in+30.*mm),(lmrpc_yfr_out_e/2.+4*mm),bending_angle_start,bending_angle_end);
1019 G4RotationMatrix rot_mat_bending;
1020 rot_mat_bending.rotateX(rot_bend_x);
1021 rot_mat_bending.rotateY(rot_bend_y);
1022 rot_mat_bending.rotateZ(rot_bend_z);
1023 G4ThreeVector transl_bending(transl_bend_x,transl_bend_y,transl_bend_z);
1024 G4Transform3D transf_bend(rot_mat_bending,transl_bending);
1026 G4SubtractionSolid* frame_003_e =
new G4SubtractionSolid(
"frame_003_e",frame_000_e,bending_e,transf_bend);
1028 G4Cons* borehole_m10 =
new G4Cons(
"borehole_m10",0.*mm,5.*mm,0.*mm,5.*mm,6.*mm,0*deg,360*deg);
1029 G4RotationMatrix rot_mat_boreholes_m10(0*deg,0*deg,0*deg);
1030 G4ThreeVector transl_gas_l(36.*mm,0.,-(lmrpc_z_out-10.*mm)/2.);
1031 G4ThreeVector transl_gas_r(-36.*mm,0.,-(lmrpc_z_out-10.*mm)/2.);
1032 G4ThreeVector transl_HV_l(13.*mm,0.,-(lmrpc_z_out-10.*mm)/2.);
1033 G4ThreeVector transl_HV_r(-13.*mm,0.,-(lmrpc_z_out-10.*mm)/2.);
1034 G4Transform3D transf_gas_l(rot_mat_boreholes_m10,transl_gas_l);
1035 G4Transform3D transf_gas_r(rot_mat_boreholes_m10,transl_gas_r);
1036 G4Transform3D transf_HV_l(rot_mat_boreholes_m10,transl_HV_l);
1037 G4Transform3D transf_HV_r(rot_mat_boreholes_m10,transl_HV_r);
1039 G4SubtractionSolid* frame_004_e =
new G4SubtractionSolid(
"frame_004_e",frame_003_e,borehole_m10,transf_gas_l);
1040 G4SubtractionSolid* frame_005_e =
new G4SubtractionSolid(
"frame_005_e",frame_004_e,borehole_m10,transf_gas_r);
1041 G4SubtractionSolid* frame_006_e =
new G4SubtractionSolid(
"frame_006_e",frame_005_e,borehole_m10,transf_HV_l);
1042 G4SubtractionSolid* frame_007_e =
new G4SubtractionSolid(
"frame_007_e",frame_006_e,borehole_m10,transf_HV_r);
1045 G4double readout_conncetor_y=4.5*mm;
1046 G4double readout_conncetor_z=23.0*mm;
1048 G4double rot_readout_con_x=0*deg;
1049 G4double rot_readout_con_y=+inner_angle/2;
1050 G4double rot_readout_con_z=0*deg;
1051 G4RotationMatrix rot_readout_con_r;
1052 rot_readout_con_r.rotateX(rot_readout_con_x);
1053 rot_readout_con_r.rotateY(rot_readout_con_y);
1054 rot_readout_con_r.rotateZ(rot_readout_con_z);
1056 G4RotationMatrix rot_readout_con_l;
1057 rot_readout_con_l.rotateX(rot_readout_con_x);
1058 rot_readout_con_l.rotateY(-rot_readout_con_y);
1059 rot_readout_con_l.rotateZ(rot_readout_con_z);
1063 G4Box* readout_connector_e =
new G4Box(
"readout_connector_e",2.*mm,readout_conncetor_y,readout_conncetor_z);
1065 G4double transl_readout_con1_x=(((lmrpc_z_ins-(182.*mm+1.*mm)*
cos(inner_angle/2))*
tan(inner_angle/2))+l_mrpc_xdo_ins/2.+delta_frame_x/
cos(inner_angle/2.)+delta_frame_y/2./
cos(inner_angle/2.));
1066 G4double transl_readout_con1_y=-1.25*mm;
1067 G4double transl_readout_con1_z=lmrpc_z_ins/2.-183*mm*
cos(inner_angle/2) + ks_trafo ;
1068 G4ThreeVector transl_readout_con1(transl_readout_con1_x,transl_readout_con1_y,transl_readout_con1_z);
1069 G4Transform3D transf_readout_con1(rot_readout_con_r,transl_readout_con1);
1071 G4double transl_readout_con2_x=(lmrpc_z_ins-96.*mm*
cos(inner_angle/2))*
tan(inner_angle/2.)+l_mrpc_xdo_ins/2.+delta_frame_x/
cos(inner_angle/2.)+delta_frame_y/2./
cos(inner_angle/2.);
1072 G4double transl_readout_con2_y=-1.25*mm;
1073 G4double transl_readout_con2_z=lmrpc_z_ins/2.-96.*mm*
cos(inner_angle/2) + ks_trafo;
1074 G4ThreeVector transl_readout_con2(transl_readout_con2_x,transl_readout_con2_y,transl_readout_con2_z);
1075 G4Transform3D transf_readout_con2(rot_readout_con_r,transl_readout_con2);
1077 G4double transl_readout_con3_x=-((lmrpc_z_ins-183.*mm*
cos(inner_angle/2))*
tan(inner_angle/2)+l_mrpc_xdo_ins/2.+delta_frame_x/
cos(inner_angle/2.)+delta_frame_y/
cos(inner_angle/2.)/2.);
1078 G4double transl_readout_con3_y=-1.25*mm;
1079 G4double transl_readout_con3_z=lmrpc_z_ins/2.-183*mm*
cos(inner_angle/2) + ks_trafo ;
1080 G4ThreeVector transl_readout_con3(transl_readout_con3_x,transl_readout_con3_y,transl_readout_con3_z);
1081 G4Transform3D transf_readout_con3(rot_readout_con_l,transl_readout_con3);
1083 G4double transl_readout_con4_x=-((lmrpc_z_ins-96.*mm*
cos(inner_angle/2))*
tan(inner_angle/2)+l_mrpc_xdo_ins/2.+delta_frame_x/
cos(inner_angle/2.)+delta_frame_y/
cos(inner_angle/2.)/2.);
1084 G4double transl_readout_con4_y=-1.25*mm;
1085 G4double transl_readout_con4_z=lmrpc_z_ins/2.-96*mm*
cos(inner_angle/2) + ks_trafo;
1086 G4ThreeVector transl_readout_con4(transl_readout_con4_x,transl_readout_con4_y,transl_readout_con4_z);
1087 G4Transform3D transf_readout_con4(rot_readout_con_l,transl_readout_con4);
1090 G4SubtractionSolid* frame_012_e =
new G4SubtractionSolid(
"frame_012_e",frame_007_e,readout_connector_e,transf_readout_con1);
1091 G4SubtractionSolid* frame_013_e =
new G4SubtractionSolid(
"frame_013_e",frame_012_e,readout_connector_e,transf_readout_con2);
1092 G4SubtractionSolid* frame_014_e =
new G4SubtractionSolid(
"frame_014_e",frame_013_e,readout_connector_e,transf_readout_con3);
1093 G4SubtractionSolid* frame_015_e =
new G4SubtractionSolid(
"frame_015_e",frame_014_e,readout_connector_e,transf_readout_con4);
1097 G4double interface_readout_x=1.5*mm;
1098 G4double interface_readout_y=20*mm;
1099 G4double interface_readout_z=160.00*mm;
1100 G4double interface_readout_connector_y=7*mm;
1101 G4double interface_readout_connector_z=44.00*mm;
1103 G4double rot_interface_readout_x=0*deg;
1104 G4double rot_interface_readout_y=-inner_angle/2;
1105 G4double rot_interface_readout_z=0*deg;
1106 G4RotationMatrix rot_interface_readout_r;
1107 G4RotationMatrix rot_interface_readout_l;
1108 rot_interface_readout_r.rotateX(rot_interface_readout_x);
1109 rot_interface_readout_r.rotateY(rot_interface_readout_y);
1110 rot_interface_readout_r.rotateZ(rot_interface_readout_z);
1111 rot_interface_readout_l.rotateX(rot_interface_readout_x);
1112 rot_interface_readout_l.rotateY(-rot_interface_readout_y);
1113 rot_interface_readout_l.rotateZ(rot_interface_readout_z);
1116 G4Box* interface_readout_001=
new G4Box(
"interface_readout_001",interface_readout_x/2.,interface_readout_y/2.,interface_readout_z/2.);
1117 G4Box* interface_readout_connector =
new G4Box(
"interface_readout_connector",1.5,interface_readout_connector_y/2.,interface_readout_connector_z/2.);
1120 G4ThreeVector transl_interface_readout_connector_1(0*mm,-1.25*mm,-43.5*mm);
1121 G4ThreeVector transl_interface_readout_connector_2(0*mm,-1.25*mm,+43.5*mm);
1122 G4Transform3D transf_interface_readout_connector_1(rot_dummy,transl_interface_readout_connector_1);
1123 G4Transform3D transf_interface_readout_connector_2(rot_dummy,transl_interface_readout_connector_2);
1126 G4SubtractionSolid* interface_readout_002=
new G4SubtractionSolid(
"interface_readout_002",interface_readout_001,interface_readout_connector,transf_interface_readout_connector_1);
1127 G4SubtractionSolid* interface_readout_006=
new G4SubtractionSolid(
"interface_readout_006",interface_readout_002,interface_readout_connector,transf_interface_readout_connector_2);
1130 G4double readout_box_wallthickness= 0.80*mm;
1132 G4double l_readoutbox_xdo_help=45.18*mm;
1133 G4double l_readoutbox_xup_help=86.63*mm;
1134 G4double l_readoutbox_z_help=233*mm;
1135 G4double angle_readoutbox=2*asin((l_readoutbox_xup_help-l_readoutbox_xdo_help)/(2*l_readoutbox_z_help))*180/
pi*deg;
1137 G4double l_readoutbox_xdo=l_readoutbox_xdo_help+2*1.5/
cos(angle_readoutbox/2)*mm;
1138 G4double l_readoutbox_xup=l_readoutbox_xup_help+2*1.5/
cos(angle_readoutbox/2)*mm;
1139 G4double l_readoutbox_yfr=21*mm;
1140 G4double l_readoutbox_yba=21*mm;
1141 G4double l_readoutbox_z=l_readoutbox_z_help*
cos(angle_readoutbox/2);
1144 G4double l_cut_1_readoutbox_xdo= (43.71)*mm;
1145 G4double l_cut_1_readoutbox_xup= 85.08*mm;
1146 G4double l_cut_1_readoutbox_yfr= l_readoutbox_yfr;
1147 G4double l_cut_1_readoutbox_yba= l_readoutbox_yba;
1148 G4double l_cut_1_readoutbox_z=(l_readoutbox_z-2*readout_box_wallthickness);
1151 G4double l_cut_2_readoutbox_xdo=(2*18.64*
sin(angle_readoutbox/2)*mm+l_readoutbox_xdo+2.5*mm);
1152 G4double l_cut_2_readoutbox_xup=(2*180.14*
sin(angle_readoutbox/2)*mm+l_readoutbox_xdo+2.5*mm);
1153 G4double l_cut_2_readoutbox_yfr=21*mm;
1154 G4double l_cut_2_readoutbox_yba=21*mm;
1155 G4double l_cut_2_readoutbox_z=161.5*
cos(angle_readoutbox/2)*mm;
1158 G4double l_cut_3_readoutbox_xdo=50.27*mm;
1159 G4double l_cut_3_readoutbox_xup=(81.81+2*1.6)*mm;
1160 G4double l_cut_3_readoutbox_yfr=21*mm;
1161 G4double l_cut_3_readoutbox_yba=21*mm;
1162 G4double l_cut_3_readoutbox_z=195.20*
cos(angle_readoutbox/2)*mm;
1165 G4Trd* readoutbox_tot =
new G4Trd(
"readoutbox_tot",l_readoutbox_xdo/2,l_readoutbox_xup/2,l_readoutbox_yfr/2,l_readoutbox_yba/2,l_readoutbox_z/2);
1167 G4Trd* readoutbox_cut_1 =
new G4Trd(
"readoutbox_cut_1",l_cut_1_readoutbox_xdo/2,l_cut_1_readoutbox_xup/2,l_cut_1_readoutbox_yfr/2,l_cut_1_readoutbox_yba/2,l_cut_1_readoutbox_z/2);
1168 G4ThreeVector transl_readoutbox_cut_1(0*mm,readout_box_wallthickness,0*mm);
1169 G4Transform3D transf_readoutbox_cut_1(rot_dummy,transl_readoutbox_cut_1);
1172 G4Trd* readoutbox_cut_2 =
new G4Trd(
"readoutbox_cut_2",l_cut_2_readoutbox_xdo/2,l_cut_2_readoutbox_xup/2,l_cut_2_readoutbox_yfr/2,l_cut_2_readoutbox_yba/2,l_cut_2_readoutbox_z/2);
1173 G4ThreeVector transl_readoutbox_cut_2(0*mm,readout_box_wallthickness,20.14*
cos(angle_readoutbox/2)*mm-l_readoutbox_z/2+l_cut_2_readoutbox_z/2);
1174 G4Transform3D transf_readoutbox_cut_2(rot_dummy,transl_readoutbox_cut_2);
1177 G4Cons* readoutbox_cablecon =
new G4Cons(
"readoutbox_cablecon",0.*mm,6.5*mm,0.*mm,6.5*mm,1*mm,0*deg,360*deg);
1178 G4Box * readoutbox_abovecablecon =
new G4Box(
"readoutbox_abovecablecon",6.5,5.26,1);
1180 G4ThreeVector transl_readoutbox_cablecon(0*mm,0*mm,-l_readoutbox_z/2+readout_box_wallthickness/2);
1181 G4Transform3D transf_readoutbox_cablecon(rot_dummy,transl_readoutbox_cablecon);
1183 G4ThreeVector transl_readoutbox_abovecablecon(0*mm,5.25*mm+0.005*mm,-l_readoutbox_z/2+readout_box_wallthickness/2);
1184 G4Transform3D transf_readoutbox_abovecablecon(rot_dummy,transl_readoutbox_abovecablecon);
1188 G4Trd* readoutbox_cut_3 =
new G4Trd(
"readoutbox_cut_3",l_cut_3_readoutbox_xdo/2,l_cut_3_readoutbox_xup/2,l_cut_3_readoutbox_yfr/2,l_cut_3_readoutbox_yba/2,l_cut_3_readoutbox_z/2);
1189 G4ThreeVector transl_readoutbox_cut_3(0*mm,readout_box_wallthickness,18.94*
cos(angle_readoutbox/2)*mm-l_readoutbox_z/2+l_cut_3_readoutbox_z/2);
1190 G4Transform3D transf_readoutbox_cut_3(rot_dummy,transl_readoutbox_cut_3);
1194 G4SubtractionSolid* readoutbox_001_e=
new G4SubtractionSolid(
"readoutbox_001_e",readoutbox_tot,readoutbox_cut_1,transf_readoutbox_cut_1);
1195 G4SubtractionSolid* readoutbox_002_e=
new G4SubtractionSolid(
"readoutbox_002_e",readoutbox_001_e,readoutbox_cut_2,transf_readoutbox_cut_2);
1196 G4SubtractionSolid* readoutbox_007_e=
new G4SubtractionSolid(
"readoutbox_007_e",readoutbox_002_e,readoutbox_cablecon,transf_readoutbox_cablecon);
1197 G4SubtractionSolid* readoutbox_008_e=
new G4SubtractionSolid(
"readoutbox_008_e",readoutbox_007_e,readoutbox_abovecablecon,transf_readoutbox_abovecablecon);
1198 G4SubtractionSolid* readoutbox_009_e=
new G4SubtractionSolid(
"readoutbox_009_e",readoutbox_008_e,readoutbox_cut_3,transf_readoutbox_cut_3);
1200 G4double bottom_bracket_x_e=15.0*mm ;
1201 G4double bottom_bracket_y_e=1.2*mm ;
1202 G4double bottom_bracket_z_e=18*mm ;
1203 G4Box* bottom_bracket=
new G4Box(
"bottom_bracket",bottom_bracket_x_e/2,bottom_bracket_y_e/2,bottom_bracket_z_e/2);
1205 G4ThreeVector transl_bottom_bracket_1((l_readoutbox_xdo/2-bottom_bracket_x_e/2),-(l_readoutbox_yfr/2 + bottom_bracket_y_e/2)+0.2*mm,-(l_readoutbox_z/2-bottom_bracket_z_e/2));
1206 G4Transform3D transf_bottom_bracket_1(rot_dummy,transl_bottom_bracket_1);
1207 G4UnionSolid* readoutbox_010_e =
new G4UnionSolid(
"readoutbox_010_e",readoutbox_009_e,bottom_bracket,transf_bottom_bracket_1);
1209 G4ThreeVector transl_bottom_bracket_2(-(l_readoutbox_xdo/2-bottom_bracket_x_e/2),-(l_readoutbox_yfr/2 + bottom_bracket_y_e/2)+0.2*mm,-(l_readoutbox_z/2-bottom_bracket_z_e/2));
1210 G4Transform3D transf_bottom_bracket_2(rot_dummy,transl_bottom_bracket_2);
1211 G4UnionSolid* readoutbox_011_e =
new G4UnionSolid(
"readoutbox_011_e",readoutbox_010_e,bottom_bracket,transf_bottom_bracket_2);
1214 G4ThreeVector transl_bottom_bracket_3(-(l_readoutbox_xup/2-bottom_bracket_x_e/2-bottom_bracket_z_e*
tan(angle_readoutbox/2)),-(l_readoutbox_yfr/2 + bottom_bracket_y_e/2)+0.2*mm,(l_readoutbox_z/2-bottom_bracket_z_e/2));
1215 G4Transform3D transf_bottom_bracket_3(rot_dummy,transl_bottom_bracket_3);
1216 G4UnionSolid* readoutbox_012_e =
new G4UnionSolid(
"readoutbox_012_e",readoutbox_011_e,bottom_bracket,transf_bottom_bracket_3);
1218 G4ThreeVector transl_bottom_bracket_4((l_readoutbox_xup/2-bottom_bracket_x_e/2-bottom_bracket_z_e*
tan(angle_readoutbox/2)),-(l_readoutbox_yfr/2 + bottom_bracket_y_e/2)+0.2*mm,(l_readoutbox_z/2-bottom_bracket_z_e/2));
1219 G4Transform3D transf_bottom_bracket_4(rot_dummy,transl_bottom_bracket_4);
1222 G4UnionSolid* readoutbox_013_e =
new G4UnionSolid(
"readoutbox_013_et",readoutbox_012_e,bottom_bracket,transf_bottom_bracket_4);
1227 double link_x_dotot = 60*mm;
1228 double link_z_mid =16.5*mm;
1229 double link_y=22.5*mm;
1230 double link_xangle=20.25*mm;
1231 double t_link_angle=10*deg;
1234 double link_x_trp1_do = (link_x_dotot+2*mm);
1235 double link_x_trp1_up = link_x_dotot-2*link_xangle*
cos(t_link_angle);
1236 double link_z_trp1 = (link_x_trp1_do-link_x_trp1_up)/2*
tan(t_link_angle);
1238 double link_x_trp2_do = (link_x_dotot-2*link_xangle*
tan(t_link_angle)+2*mm);
1239 double link_x_trp2_up = link_x_trp1_up -link_z_mid*
tan(t_link_angle);
1240 double link_z_trp2 = (link_x_trp2_do-link_x_trp2_up)/2*
tan(t_link_angle);
1243 G4Trd* link_up =
new G4Trd(
"link_up",link_x_trp1_do/2,link_x_trp1_up/2,link_y/2,link_y/2,link_z_trp1/2);
1244 double transl_link_up_z=link_z_mid/2+link_xangle*
sin(t_link_angle)/2;
1246 G4Trd* link_do =
new G4Trd(
"link_do",link_x_trp2_do/2,link_x_trp2_up/2,link_y/2+3*mm,link_y/2+3*mm,link_z_trp2/2);
1247 double transl_link_do_z=link_z_mid/2-link_xangle*
sin(t_link_angle)/2;
1248 G4Box* t_box =
new G4Box(
"link_box",(link_x_dotot)/2+10*mm,(link_y)/2+10*mm,(link_z_mid)/2);
1250 G4ThreeVector transl_link_up(0,0,transl_link_up_z);
1251 G4Transform3D transf_link_up(rot_dummy,transl_link_up);
1252 G4ThreeVector transl_link_do(0,0,-transl_link_do_z);
1253 G4Transform3D transf_link_do(rot_dummy,transl_link_do);
1255 G4UnionSolid* link_1=
new G4UnionSolid(
"link_1",t_box,link_up,transf_link_up);
1256 G4SubtractionSolid* link_2 =
new G4SubtractionSolid(
"link_2",link_1,link_do,transf_link_do);
1257 G4Trd* t_box_2 =
new G4Trd(
"link_box_2",link_x_trp2_do/2,(30*mm*
tan(10*deg)*2+link_x_trp2_do)/2,22.5*mm/2 ,22.5*mm/2,30*mm/2);
1258 G4ThreeVector transl_link_3(0,0,(15*mm-link_z_mid/2));
1259 G4Transform3D transf_link_3(rot_dummy,transl_link_3);
1260 G4IntersectionSolid * link_3 =
new G4IntersectionSolid(
"link_3",link_2,t_box_2,transf_link_3);
1265 G4double rot_interface_x_r_e=0*deg;
1266 G4double rot_interface_y_r_e=-angle_readoutbox/2;
1267 G4double rot_interface_z_r_e=0*deg;
1268 G4RotationMatrix rot_interface_r_e;
1269 rot_interface_r_e.rotateX(rot_interface_x_r_e);
1270 rot_interface_r_e.rotateY(rot_interface_y_r_e);
1271 rot_interface_r_e.rotateZ(rot_interface_z_r_e);
1272 G4RotationMatrix rot_interface_l_e;
1273 rot_interface_l_e.rotateX(rot_interface_x_r_e);
1274 rot_interface_l_e.rotateY(-rot_interface_y_r_e);
1275 rot_interface_l_e.rotateZ(rot_interface_z_r_e);
1276 G4ThreeVector transl_interface_r_e(-((20.14*
cos(angle_readoutbox/2)*mm+l_cut_2_readoutbox_z/2)*
tan(angle_readoutbox/2)+l_readoutbox_xdo/2-0.75*mm/
cos(inner_angle/2))
1278 ,readout_box_wallthickness,
1279 20.14*
cos(angle_readoutbox/2)*mm-l_readoutbox_z/2+l_cut_2_readoutbox_z/2
1282 G4Transform3D transf_interface_r_e(rot_interface_r_e,transl_interface_r_e);
1283 G4ThreeVector transl_interface_l_e(((20.14*
cos(angle_readoutbox/2)*mm+l_cut_2_readoutbox_z/2)*
tan(angle_readoutbox/2)+l_readoutbox_xdo/2-0.75*mm/
cos(inner_angle/2))
1285 ,readout_box_wallthickness,
1286 20.14*
cos(angle_readoutbox/2)*mm-l_readoutbox_z/2+l_cut_2_readoutbox_z/2
1288 G4Transform3D transf_interface_l_e(rot_interface_l_e,transl_interface_l_e);
1290 G4UnionSolid* assembly_01_e=
new G4UnionSolid(
"assembly_01",readoutbox_013_e,interface_readout_006, transf_interface_r_e);
1291 G4UnionSolid* assembly_02_e=
new G4UnionSolid(
"assembly_02",assembly_01_e,interface_readout_006, transf_interface_l_e);
1296 G4RotationMatrix rot_assembly_01_e;
1297 rot_assembly_01_e.rotateY((inner_angle+angle_readoutbox)/2);
1298 G4ThreeVector transl_assembly_01_e(((lmrpc_z_ins-123.5*mm*
cos(inner_angle/2))*
tan(inner_angle/2)+l_mrpc_xdo_ins/2.+delta_frame_x/
cos(inner_angle/2.)+delta_frame_y/
cos(inner_angle/2.)
1299 + l_readoutbox_xdo/2+l_readoutbox_z/2*
tan(angle_readoutbox/2)),
1300 -readout_box_wallthickness,
1301 lmrpc_z_ins/2-123.5*mm*
cos(inner_angle/2)+ks_trafo-(l_readoutbox_xdo/2+l_readoutbox_z/2*
tan(angle_readoutbox/2))*
tan((inner_angle+angle_readoutbox)/2));
1303 G4Transform3D transf_assembly_01_e(rot_assembly_01_e,transl_assembly_01_e);
1304 G4UnionSolid* assembly_03_e =
new G4UnionSolid(
"assembly_01_e",frame_015_e,assembly_02_e,transf_assembly_01_e);
1306 double transl_link_up_z_2=link_z_mid/2+ (link_x_dotot+(link_x_dotot-2*link_xangle*
cos(t_link_angle))/2)/2*
tan(t_link_angle)/2;
1308 G4RotationMatrix rot_link_002_e;
1309 rot_link_002_e.rotateY(-10*deg);
1310 G4ThreeVector transl_link_002_e(-55*mm-20.03*mm,0*mm,-lmrpc_z_out/2-transl_link_up_z_2/
cos(10*deg));
1311 G4Transform3D transf_link_002_e(rot_link_002_e,transl_link_002_e);
1312 G4UnionSolid* assembly_04_e =
new G4UnionSolid(
"assembly_04_e",assembly_03_e,link_3,transf_link_002_e);
1321 double l_pcboard_xdo=114.0*mm;
1322 double l_pcboard_xup=174.0*mm;
1323 double l_pcboard_y=12.94*mm;
1324 double l_pcboard_z=352*mm;
1325 double angle_pcboard = atan((l_pcboard_xup-l_pcboard_xdo)/2./l_pcboard_z)*180/
pi*deg;
1326 G4Trd* pcboard =
new G4Trd(
"pcboard",l_pcboard_xdo/2.,l_pcboard_xup/2.,l_pcboard_y/2.,l_pcboard_y/2.,l_pcboard_z/2.);
1330 double gaslayer_x_do=l_pcboard_xdo;
1331 double gaslayer_x_up=l_pcboard_xup;
1332 double gaslayer_y =4.82*mm;
1333 double gaslayer_z =l_pcboard_z;
1336 G4ThreeVector transl_gas_layer(0*mm,gaslayer_y+1.5*mm,0*mm);
1337 G4Transform3D transf_gas_layer(rot_dummy,transl_gas_layer);
1339 G4Trd * gas_layer =
new G4Trd(
"gas_layer",gaslayer_x_do/2.,gaslayer_x_up/2.,gaslayer_y/2.,gaslayer_y/2.,gaslayer_z/2.);
1340 G4UnionSolid *gas_layer_tot =
new G4UnionSolid(
"gas_layer_tot",gas_layer,gas_layer,transf_gas_layer);
1343 double glasslayer_inner_x_do=88.68*mm;
1344 double glasslayer_inner_x_up=147.32*mm;
1345 double glasslayer_inner_y=0.4*mm;
1346 double glasslayer_inner_z=344*mm;
1348 double glasslayer_outer_x_do=98.17*mm;
1349 double glasslayer_outer_x_up=157.83*mm;
1350 double glasslayer_outer_y=0.55*mm;
1351 double glasslayer_outer_z=350*mm;
1353 double sdlayer_x_do=glasslayer_inner_x_do;
1354 double sdlayer_x_up=glasslayer_inner_x_up;
1355 double sdlayer_y=0.22*mm;
1356 double sdlayer_z =glasslayer_inner_z;
1361 G4ThreeVector transl_sdlayer_tot2(0*mm,sdlayer_y+glasslayer_inner_y,0*mm);
1362 G4ThreeVector transl_sdlayer_tot3(0*mm,2*(sdlayer_y+glasslayer_inner_y),0*mm);
1363 G4ThreeVector transl_sdlayer_tot4(0*mm,3*(sdlayer_y+glasslayer_inner_y),0*mm);
1364 G4ThreeVector transl_sdlayer_tot5(0*mm,4*(sdlayer_y+glasslayer_inner_y),0*mm);
1365 G4ThreeVector transl_sdlayer_tot6(0*mm,5*(sdlayer_y+glasslayer_inner_y),0*mm);
1366 G4ThreeVector transl_sdlayer_tot7(0*mm,6*(sdlayer_y+glasslayer_inner_y)+3*mm-glasslayer_inner_y,0*mm);
1367 G4ThreeVector transl_sdlayer_tot8(0*mm,7*(sdlayer_y+glasslayer_inner_y)+3*mm-glasslayer_inner_y,0*mm);
1368 G4ThreeVector transl_sdlayer_tot9(0*mm,8*(sdlayer_y+glasslayer_inner_y)+3*mm-glasslayer_inner_y,0*mm);
1369 G4ThreeVector transl_sdlayer_tot10(0*mm,9*(sdlayer_y+glasslayer_inner_y)+3*mm-glasslayer_inner_y,0*mm);
1370 G4ThreeVector transl_sdlayer_tot11(0*mm,10*(sdlayer_y+glasslayer_inner_y)+3*mm-glasslayer_inner_y,0*mm);
1371 G4ThreeVector transl_sdlayer_tot12(0*mm,11*(sdlayer_y+glasslayer_inner_y)+3*mm-glasslayer_inner_y,0*mm);
1373 G4Transform3D transf_sdlayer_tot2(rot_dummy,transl_sdlayer_tot2);
1374 G4Transform3D transf_sdlayer_tot3(rot_dummy,transl_sdlayer_tot3);
1375 G4Transform3D transf_sdlayer_tot4(rot_dummy,transl_sdlayer_tot4);
1376 G4Transform3D transf_sdlayer_tot5(rot_dummy,transl_sdlayer_tot5);
1377 G4Transform3D transf_sdlayer_tot6(rot_dummy,transl_sdlayer_tot6);
1378 G4Transform3D transf_sdlayer_tot7(rot_dummy,transl_sdlayer_tot7);
1379 G4Transform3D transf_sdlayer_tot8(rot_dummy,transl_sdlayer_tot8);
1380 G4Transform3D transf_sdlayer_tot9(rot_dummy,transl_sdlayer_tot9);
1381 G4Transform3D transf_sdlayer_tot10(rot_dummy,transl_sdlayer_tot10);
1382 G4Transform3D transf_sdlayer_tot11(rot_dummy,transl_sdlayer_tot11);
1383 G4Transform3D transf_sdlayer_tot12(rot_dummy,transl_sdlayer_tot12);
1385 G4Trd * sdlayer =
new G4Trd(
"sdlayer",sdlayer_x_do/2.,sdlayer_x_up/2.,sdlayer_y/2.,sdlayer_y/2.,sdlayer_z/2.);
1386 G4UnionSolid *sdlayer_tot2 =
new G4UnionSolid(
"sdlayer_tot2",sdlayer,sdlayer,transf_sdlayer_tot2);
1387 G4UnionSolid *sdlayer_tot3 =
new G4UnionSolid(
"sdlayer_tot3",sdlayer_tot2,sdlayer,transf_sdlayer_tot3);
1388 G4UnionSolid *sdlayer_tot4 =
new G4UnionSolid(
"sdlayer_tot4",sdlayer_tot3,sdlayer,transf_sdlayer_tot4);
1389 G4UnionSolid *sdlayer_tot5 =
new G4UnionSolid(
"sdlayer_tot5",sdlayer_tot4,sdlayer,transf_sdlayer_tot5);
1390 G4UnionSolid *sdlayer_tot6 =
new G4UnionSolid(
"sdlayer_tot6",sdlayer_tot5,sdlayer,transf_sdlayer_tot6);
1391 G4UnionSolid *sdlayer_tot7 =
new G4UnionSolid(
"sdlayer_tot7",sdlayer_tot6,sdlayer,transf_sdlayer_tot7);
1392 G4UnionSolid *sdlayer_tot8 =
new G4UnionSolid(
"sdlayer_tot8",sdlayer_tot7,sdlayer,transf_sdlayer_tot8);
1393 G4UnionSolid *sdlayer_tot9 =
new G4UnionSolid(
"sdlayer_tot9",sdlayer_tot8,sdlayer,transf_sdlayer_tot9);
1394 G4UnionSolid *sdlayer_tot10 =
new G4UnionSolid(
"sdlayer_tot10",sdlayer_tot9,sdlayer,transf_sdlayer_tot10);
1395 G4UnionSolid *sdlayer_tot11 =
new G4UnionSolid(
"sdlayer_tot11",sdlayer_tot10,sdlayer,transf_sdlayer_tot11);
1396 G4UnionSolid *sensitive_detector =
new G4UnionSolid(
"sensitive_detector",sdlayer_tot11,sdlayer,transf_sdlayer_tot12);
1403 G4ThreeVector transl_glass_2(0*mm,(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.),0*mm);
1404 G4ThreeVector transl_glass_3(0*mm,(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+(sdlayer_y+glasslayer_inner_y),0*mm);
1405 G4ThreeVector transl_glass_4(0*mm,(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+2*(sdlayer_y+glasslayer_inner_y),0*mm);
1406 G4ThreeVector transl_glass_5(0*mm,(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+3*(sdlayer_y+glasslayer_inner_y),0*mm);
1407 G4ThreeVector transl_glass_6(0*mm,(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+4*(sdlayer_y+glasslayer_inner_y),0*mm);
1408 G4ThreeVector transl_glass_7(0*mm,2*(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+4*(sdlayer_y+glasslayer_inner_y),0*mm);
1410 G4ThreeVector transl_glass_8(0*mm,2*(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+4*(sdlayer_y+glasslayer_inner_y)+2.45*mm,0*mm);
1411 G4ThreeVector transl_glass_9(0*mm,3*(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+4*(sdlayer_y+glasslayer_inner_y)+2.45*mm,0*mm);
1412 G4ThreeVector transl_glass_10(0*mm,3*(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+5*(sdlayer_y+glasslayer_inner_y)+2.45*mm,0*mm);
1413 G4ThreeVector transl_glass_11(0*mm,3*(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+6*(sdlayer_y+glasslayer_inner_y)+2.45*mm,0*mm);
1414 G4ThreeVector transl_glass_12(0*mm,3*(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+7*(sdlayer_y+glasslayer_inner_y)+2.45*mm,0*mm);
1415 G4ThreeVector transl_glass_13(0*mm,3*(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+8*(sdlayer_y+glasslayer_inner_y)+2.45*mm,0*mm);
1416 G4ThreeVector transl_glass_14(0*mm,4*(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+8*(sdlayer_y+glasslayer_inner_y)+2.45*mm,0*mm);
1419 G4Transform3D transf_glass_2(rot_dummy,transl_glass_2);
1420 G4Transform3D transf_glass_3(rot_dummy,transl_glass_3);
1421 G4Transform3D transf_glass_4(rot_dummy,transl_glass_4);
1422 G4Transform3D transf_glass_5(rot_dummy,transl_glass_5);
1423 G4Transform3D transf_glass_6(rot_dummy,transl_glass_6);
1424 G4Transform3D transf_glass_7(rot_dummy,transl_glass_7);
1425 G4Transform3D transf_glass_8(rot_dummy,transl_glass_8);
1426 G4Transform3D transf_glass_9(rot_dummy,transl_glass_9);
1427 G4Transform3D transf_glass_10(rot_dummy,transl_glass_10);
1428 G4Transform3D transf_glass_11(rot_dummy,transl_glass_11);
1429 G4Transform3D transf_glass_12(rot_dummy,transl_glass_12);
1430 G4Transform3D transf_glass_13(rot_dummy,transl_glass_13);
1431 G4Transform3D transf_glass_14(rot_dummy,transl_glass_14);
1434 G4Trd * glass_outer =
new G4Trd(
"glass_outer",glasslayer_outer_x_do/2.,glasslayer_outer_x_up/2. ,glasslayer_outer_y/2.,glasslayer_outer_y/2.,glasslayer_outer_z/2.);
1435 G4Trd * glass_inner =
new G4Trd(
"glass_inner",glasslayer_inner_x_do/2.,glasslayer_inner_x_up/2. ,glasslayer_inner_y/2.,glasslayer_inner_y/2.,glasslayer_inner_z/2.);
1437 G4UnionSolid * glass_2 =
new G4UnionSolid(
"glass_2",glass_outer,glass_inner,transf_glass_2);
1438 G4UnionSolid * glass_3 =
new G4UnionSolid(
"glass_3",glass_2,glass_inner,transf_glass_3);
1439 G4UnionSolid * glass_4 =
new G4UnionSolid(
"glass_4",glass_3,glass_inner,transf_glass_4);
1440 G4UnionSolid * glass_5 =
new G4UnionSolid(
"glass_5",glass_4,glass_inner,transf_glass_5);
1441 G4UnionSolid * glass_6 =
new G4UnionSolid(
"glass_6",glass_5,glass_inner,transf_glass_6);
1442 G4UnionSolid * glass_7 =
new G4UnionSolid(
"glass_7",glass_6,glass_outer,transf_glass_7);
1443 G4UnionSolid * glass_8 =
new G4UnionSolid(
"glass_8",glass_7,glass_outer,transf_glass_8);
1444 G4UnionSolid * glass_9 =
new G4UnionSolid(
"glass_9",glass_8,glass_inner,transf_glass_9);
1445 G4UnionSolid * glass_10 =
new G4UnionSolid(
"glass_10",glass_9,glass_inner,transf_glass_10);
1446 G4UnionSolid * glass_11 =
new G4UnionSolid(
"glass_11",glass_10,glass_inner,transf_glass_11);
1447 G4UnionSolid * glass_12 =
new G4UnionSolid(
"glass_12",glass_11,glass_inner,transf_glass_12);
1448 G4UnionSolid * glass_13 =
new G4UnionSolid(
"glass_13",glass_12,glass_inner,transf_glass_13);
1449 G4UnionSolid * glass_layer =
new G4UnionSolid(
"glass_layer",glass_13,glass_outer,transf_glass_14);
1455 double electrode_x_do=93.51*mm;
1456 double electrode_x_up=152.49*mm;
1457 double electrode_y=0.13*mm;
1458 double electrode_z=346*mm;
1460 G4ThreeVector transl_electrode_2(0*mm,4.55*mm,0*mm);
1461 G4ThreeVector transl_electrode_3(0*mm,6.32*mm,0*mm);
1462 G4ThreeVector transl_electrode_4(0*mm,10.87*mm,0*mm);
1463 G4Transform3D transf_electrode_2(rot_dummy,transl_electrode_2);
1464 G4Transform3D transf_electrode_3(rot_dummy,transl_electrode_3);
1465 G4Transform3D transf_electrode_4(rot_dummy,transl_electrode_4);
1467 G4Trd * electrode =
new G4Trd(
"gaslayer",electrode_x_do/2.,electrode_x_up/2.,electrode_y/2.,electrode_y/2.,electrode_z/2.);
1468 G4UnionSolid *electrode_2 =
new G4UnionSolid(
"electrode_2",electrode,electrode,transf_electrode_2);
1469 G4UnionSolid *electrode_3 =
new G4UnionSolid(
"electrode_3",electrode_2,electrode,transf_electrode_3);
1470 G4UnionSolid *electrodes =
new G4UnionSolid(
"electrodes",electrode_3,electrode,transf_electrode_4);
1477 G4double readoutstrip_x[12]={88*mm,92*mm,98*mm,102*mm,108*mm,112*mm,118*mm,122*mm,128*mm,132*mm,138*mm,142*mm};
1478 G4double readoutstrip_y=0.035*mm;
1479 G4double readoutstrip_z=25*mm;
1481 const G4int no_readoutstrips=12;
1483 G4Box * readoutstrip[no_readoutstrips];
1484 G4UnionSolid * readoutstrip_unified[no_readoutstrips];
1489 for(G4int i=0; i<no_readoutstrips;i++)
1491 std::ostringstream
help;
1492 help <<
"strip_" << i;
1493 readoutstrip[i]=
new G4Box(
help.str(), readoutstrip_x[i]/2 , readoutstrip_y/2., readoutstrip_z/2.);
1494 G4ThreeVector transl_help_1(0*mm,6.4875*mm,0*mm);
1495 G4ThreeVector transl_help_2(0*mm,-6.4875*mm,0*mm);
1496 G4Transform3D transf_help_1(rot_dummy,transl_help_1);
1497 G4Transform3D transf_help_2(rot_dummy,transl_help_2);
1498 G4UnionSolid* strip_help =
new G4UnionSolid(
"strip_help",readoutstrip[i],readoutstrip[i],transf_help_1);
1499 readoutstrip_unified[i] =
new G4UnionSolid(
"strip_help_2",strip_help,readoutstrip[i],transf_help_2);
1502 G4ThreeVector transl_readoutsrips[no_readoutstrips-1];
1503 for(G4int i=0;i<(no_readoutstrips-1);i++)
1505 transl_readoutsrips[i].set(0*mm,0*mm,(i+1)*29*mm);
1509 G4Transform3D transf_readoutstrip_2(rot_dummy,transl_readoutsrips[0]);
1510 G4Transform3D transf_readoutstrip_3(rot_dummy,transl_readoutsrips[1]);
1511 G4Transform3D transf_readoutstrip_4(rot_dummy,transl_readoutsrips[2]);
1512 G4Transform3D transf_readoutstrip_5(rot_dummy,transl_readoutsrips[3]);
1513 G4Transform3D transf_readoutstrip_6(rot_dummy,transl_readoutsrips[4]);
1514 G4Transform3D transf_readoutstrip_7(rot_dummy,transl_readoutsrips[5]);
1515 G4Transform3D transf_readoutstrip_8(rot_dummy,transl_readoutsrips[6]);
1516 G4Transform3D transf_readoutstrip_9(rot_dummy,transl_readoutsrips[7]);
1517 G4Transform3D transf_readoutstrip_10(rot_dummy,transl_readoutsrips[8]);
1518 G4Transform3D transf_readoutstrip_11(rot_dummy,transl_readoutsrips[9]);
1519 G4Transform3D transf_readoutstrip_12(rot_dummy,transl_readoutsrips[10]);
1521 G4UnionSolid * readoutstrips_001 =
new G4UnionSolid(
"readoutstrips_001",readoutstrip_unified[0],readoutstrip_unified[1],transf_readoutstrip_2);
1522 G4UnionSolid * readoutstrips_002 =
new G4UnionSolid(
"readoutstrips_002",readoutstrips_001,readoutstrip_unified[2],transf_readoutstrip_3);
1523 G4UnionSolid * readoutstrips_003 =
new G4UnionSolid(
"readoutstrips_003",readoutstrips_002,readoutstrip_unified[3],transf_readoutstrip_4);
1524 G4UnionSolid * readoutstrips_004 =
new G4UnionSolid(
"readoutstrips_004",readoutstrips_003,readoutstrip_unified[4],transf_readoutstrip_5);
1525 G4UnionSolid * readoutstrips_005 =
new G4UnionSolid(
"readoutstrips_005",readoutstrips_004,readoutstrip_unified[5],transf_readoutstrip_6);
1526 G4UnionSolid * readoutstrips_006 =
new G4UnionSolid(
"readoutstrips_006",readoutstrips_005,readoutstrip_unified[6],transf_readoutstrip_7);
1527 G4UnionSolid * readoutstrips_007 =
new G4UnionSolid(
"readoutstrips_007",readoutstrips_006,readoutstrip_unified[7],transf_readoutstrip_8);
1528 G4UnionSolid * readoutstrips_008 =
new G4UnionSolid(
"readoutstrips_008",readoutstrips_007,readoutstrip_unified[8],transf_readoutstrip_9);
1529 G4UnionSolid * readoutstrips_009 =
new G4UnionSolid(
"readoutstrips_009",readoutstrips_008,readoutstrip_unified[9],transf_readoutstrip_10);
1530 G4UnionSolid * readoutstrips_010 =
new G4UnionSolid(
"readoutstrips_010",readoutstrips_009,readoutstrip_unified[10],transf_readoutstrip_11);
1531 G4UnionSolid * readoutstrips_011 =
new G4UnionSolid(
"readoutstrips_011",readoutstrips_010,readoutstrip_unified[11],transf_readoutstrip_12);
1533 G4Box * readoutstrip_help =
new G4Box(
"readoustrip_help",4/2*mm,(13.01+2)/2*mm,(344+2)/2*mm);
1535 G4ThreeVector transl_readoutstrip_help(0*mm,0*mm,160*mm);
1536 G4Transform3D transf_readoutstrip_help(rot_dummy,transl_readoutstrip_help);
1538 G4SubtractionSolid * readoutstrips_012 =
new G4SubtractionSolid(
"readoutstrips_012",readoutstrips_011,readoutstrip_help,transf_readoutstrip_help);
1543 G4double mylar_layer_x_do=103*mm;
1544 G4double mylar_layer_x_up=163*mm;
1545 G4double mylar_layer_y=0.07*mm;
1546 G4double mylar_layer_z=352*mm;
1550 G4ThreeVector transl_mylarlayer_2(0*mm,4.75*mm,0*mm);
1551 G4ThreeVector transl_mylarlayer_3(0*mm,6.32*mm,0*mm);
1552 G4ThreeVector transl_mylarlayer_4(0*mm,11.07*mm,0*mm);
1553 G4Transform3D transf_mylarlayer_2(rot_dummy,transl_mylarlayer_2);
1554 G4Transform3D transf_mylarlayer_3(rot_dummy,transl_mylarlayer_3);
1555 G4Transform3D transf_mylarlayer_4(rot_dummy,transl_mylarlayer_4);
1557 G4Trd * mylar_layer =
new G4Trd(
"mylar_layer",mylar_layer_x_do/2.,mylar_layer_x_up/2.,mylar_layer_y/2.,mylar_layer_y/2.,mylar_layer_z/2.);
1558 G4UnionSolid *mylar_layer_2 =
new G4UnionSolid(
"mylar_layer_2",mylar_layer,mylar_layer,transf_mylarlayer_2);
1559 G4UnionSolid *mylar_layer_3 =
new G4UnionSolid(
"mylar_layer_3",mylar_layer_2,mylar_layer,transf_mylarlayer_3);
1560 G4UnionSolid *mylarlayer_4 =
new G4UnionSolid(
"mylarlayer_4",mylar_layer_3,mylar_layer,transf_mylarlayer_4);
1565 double honeycomb_x_do=98.17*mm;
1566 double honeycomb_x_up=157.83*mm;
1567 double honeycomb_y=3*mm;
1568 double honeycomb_z=350*mm;
1569 G4Trd* honeycomb=
new G4Trd(
"honeycomb",honeycomb_x_do/2,honeycomb_x_up/2,honeycomb_y/2,honeycomb_y/2,honeycomb_z/2);
1574 G4Trd* gascontainer_1 =
new G4Trd(
"gas_container_1",(l_mrpc_xdo_ins)/2.,(lmrpc_xup_ins)/2.,(lmrpc_yfr_ins)/2.,(lmrpc_yba_ins)/2.,(lmrpc_z_ins)/2.);
1575 G4Trd* gascontainer_2 =
new G4Trd(
"gas_container_2",((l_mrpc_xdo_ins)/2.+ delta_frame_x/
cos(inner_angle/2.)),((lmrpc_xup_ins)/2. + delta_frame_x/
cos(inner_angle/2.)),
1576 ((lmrpc_yfr_ins)/2.-delta_frame_y),
1577 ((lmrpc_yba_ins)/2.-delta_frame_y),(lmrpc_z_ins)/2.);
1578 G4UnionSolid* gascontainer_3=
new G4UnionSolid(
"gascontainer_3",gascontainer_1,gascontainer_2,transf_dummy);
1581 logical_assembly_west_1 =
new G4LogicalVolume(assembly_04_e,G4Material::GetMaterial(
"Aluminium"),
"logical_assembly_west_1");
1582 logical_assembly_west_2 =
new G4LogicalVolume(assembly_04_e,G4Material::GetMaterial(
"Aluminium"),
"logical_assembly_west_2");
1583 logical_assembly_east_1 =
new G4LogicalVolume(assembly_04_e,G4Material::GetMaterial(
"Aluminium"),
"logical_assembly_east_1");
1584 logical_assembly_east_2 =
new G4LogicalVolume(assembly_04_e,G4Material::GetMaterial(
"Aluminium"),
"logical_assembly_east_2");
1595 logical_gascontainer_3_west_1 =
new G4LogicalVolume(gascontainer_3,MRPCGas,
"logical_gascontainer_3_west_1");
1596 logical_pcboard_west_1 =
new G4LogicalVolume(pcboard,Mylar_1397,
"logical_pcboard_west_1");
1597 logical_gaslayer_tot_west_1 =
new G4LogicalVolume(gas_layer_tot,MRPCGas,
"logical_gaslayer_tot_west_1");
1598 logical_sensitive_detector_west_1 =
new G4LogicalVolume(sensitive_detector,MRPCGas,
"logical_sensitive_detector_west_1");
1599 logical_glass_layer_west_1 =
new G4LogicalVolume(glass_layer,G4Material::GetMaterial(
"SiO2"),
"logical_glass_layer_west_1");
1600 logical_electrodes_west_1 =
new G4LogicalVolume(electrodes,Graphite,
"logical_electrodes_west_1");
1601 logical_readoutstrips_012_west_1 =
new G4LogicalVolume(readoutstrips_012,G4Material::GetMaterial(
"Copper"),
"logical_readoutstrips_012_west_1");
1602 logical_mylarlayer_west_1 =
new G4LogicalVolume(mylarlayer_4,Mylar_1397,
"logical_mylarlayer_west_1");
1603 logical_honeycomb_west_1 =
new G4LogicalVolume(honeycomb,Mylar_073,
"logical_honeycomb_west_1");
1606 logical_gascontainer_3_west_2 =
new G4LogicalVolume(gascontainer_3,MRPCGas,
"logical_gascontainer_3_west_2");
1607 logical_pcboard_west_2 =
new G4LogicalVolume(pcboard,Mylar_1397,
"logical_pcboard_west_2");
1608 logical_gaslayer_tot_west_2 =
new G4LogicalVolume(gas_layer_tot,MRPCGas,
"logical_gaslayer_tot_west_2");
1609 logical_sensitive_detector_west_2 =
new G4LogicalVolume(sensitive_detector,MRPCGas,
"logical_sensitive_detector_west_2");
1610 logical_electrodes_west_2 =
new G4LogicalVolume(electrodes,Graphite,
"logical_electrodes_west_2");
1611 logical_glass_layer_west_2 =
new G4LogicalVolume(glass_layer,G4Material::GetMaterial(
"SiO2"),
"logical_glass_layer_west_2");
1612 logical_readoutstrips_012_west_2 =
new G4LogicalVolume(readoutstrips_012,G4Material::GetMaterial(
"Copper"),
"logical_readoutstrips_012_west_2");
1613 logical_mylarlayer_west_2 =
new G4LogicalVolume(mylarlayer_4,Mylar_1397,
"logical_mylarlayer_west_2");
1614 logical_honeycomb_west_2 =
new G4LogicalVolume(honeycomb,Mylar_073,
"logical_honeycomb_west_2");
1617 logical_gascontainer_3_east_1 =
new G4LogicalVolume(gascontainer_3,MRPCGas,
"logical_gascontainer_3_east_1");
1618 logical_pcboard_east_1 =
new G4LogicalVolume(pcboard,Mylar_1397,
"logical_pcboard_east_1");
1619 logical_gaslayer_tot_east_1 =
new G4LogicalVolume(gas_layer_tot,MRPCGas,
"logical_gaslayer_tot_east_1");
1620 logical_sensitive_detector_east_1 =
new G4LogicalVolume(sensitive_detector,MRPCGas,
"logical_sensitive_detector_east_1");
1621 logical_electrodes_east_1 =
new G4LogicalVolume(electrodes,Graphite,
"logical_electrodes_east_1");
1622 logical_glass_layer_east_1 =
new G4LogicalVolume(glass_layer,G4Material::GetMaterial(
"SiO2"),
"logical_glass_layer_east_1");
1623 logical_readoutstrips_012_east_1 =
new G4LogicalVolume(readoutstrips_012,G4Material::GetMaterial(
"Copper"),
"logical_readoutstrips_012_east_1");
1624 logical_mylarlayer_east_1 =
new G4LogicalVolume(mylarlayer_4,Mylar_1397,
"logical_mylarlayer_east_1");
1625 logical_honeycomb_east_1 =
new G4LogicalVolume(honeycomb,Mylar_073,
"logical_honeycomb_east_1");
1630 logical_gascontainer_3_east_2 =
new G4LogicalVolume(gascontainer_3,MRPCGas,
"logical_gascontain_3_east_2");
1631 logical_pcboard_east_2 =
new G4LogicalVolume(pcboard,Mylar_1397,
"logical_pcboard_east_2");
1632 logical_gaslayer_tot_east_2 =
new G4LogicalVolume(gas_layer_tot,MRPCGas,
"logical_gaslayer_tot_east_2");
1633 logical_sensitive_detector_east_2 =
new G4LogicalVolume(sensitive_detector,MRPCGas,
"logical_sensitive_detector_east_2");
1634 logical_electrodes_east_2 =
new G4LogicalVolume(electrodes,Graphite,
"logical_electrodes_east_2");
1635 logical_glass_layer_east_2 =
new G4LogicalVolume(glass_layer,G4Material::GetMaterial(
"SiO2"),
"logical_glass_layer_east_2");
1636 logical_readoutstrips_012_east_2 =
new G4LogicalVolume(readoutstrips_012,G4Material::GetMaterial(
"Copper"),
"logical_readoutstrips_012_east_2");
1637 logical_mylarlayer_east_2 =
new G4LogicalVolume(mylarlayer_4,Mylar_1397,
"logical_mylarlayer_east_2");
1638 logical_honeycomb_east_2 =
new G4LogicalVolume(honeycomb,Mylar_073,
"logical_honeycomb_east_2");
1661 physical_gascontainer_3_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,0,ks_trafo),logical_gascontainer_3_west_1,
"physical_gascontainer_3_west_1",logical_assembly_west_1,
false,0);
1662 physical_pcboard_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logical_pcboard_west_1,
"physical_pcboard_west_1",logical_gascontainer_3_west_1,
false,0);
1663 physical_gaslayer_tot_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,-3.16*mm,0),logical_gaslayer_tot_west_1,
"physical_gaslayer_tot_west_1",logical_gascontainer_3_west_1,
false,0);
1664 physical_sensitive_detector_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,-4.71*mm,0),logical_sensitive_detector_west_1,
"physical_sensitive_detector_west_1",logical_pcboard_west_1,
false,0);
1665 physical_glass_layer_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,-5.095*mm,0),logical_glass_layer_west_1,
"physical_glass_layer_west_1",logical_pcboard_west_1,
false,0);
1666 physical_electrodes_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,-5.435*mm,0),logical_electrodes_west_1,
"physical_electrodes_west_1",logical_pcboard_west_1,
false,0);
1667 physical_readoutstrips_012_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,0*mm,-159.5*mm),logical_readoutstrips_012_west_1,
"physical_readoutstrips_012_west_1",logical_pcboard_west_1,
false,0);
1668 physical_mylarlayer_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,-5.535*mm,0*mm),logical_mylarlayer_west_1,
"physical_mylarlayer_west_1",logical_pcboard_west_1,
false,0);
1669 physical_honeycomb_1_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,l_pcboard_y/2.+readoutstrip_y+honeycomb_y/2,0),
1670 logical_honeycomb_west_1,
"physical_honeycomb_1_west_1",logical_gascontainer_3_west_1,
false,0);
1671 physical_honeycomb_2_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,-(l_pcboard_y/2.+readoutstrip_y+honeycomb_y/2),0),
1672 logical_honeycomb_west_1,
"physical_honeycomb_2_west_1",logical_gascontainer_3_west_1,
false,0);
1675 physical_gascontainer_3_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,0,ks_trafo),logical_gascontainer_3_west_2,
"physical_gascontainer_3_west_2",logical_assembly_west_2,
false,0);
1676 physical_pcboard_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logical_pcboard_west_2,
"physical_pcboard_west_2",logical_gascontainer_3_west_2,
false,0);
1677 physical_gaslayer_tot_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,-3.16*mm,0),logical_gaslayer_tot_west_2,
"physical_gaslayer_tot_west_2",logical_gascontainer_3_west_2,
false,0);
1678 physical_sensitive_detector_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,-4.71*mm,0),logical_sensitive_detector_west_2,
"physical_sensitive_detector_west_2",logical_pcboard_west_2,
false,0);
1679 physical_glass_layer_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,-5.095*mm,0),logical_glass_layer_west_2,
"physical_glass_layer_west_2",logical_pcboard_west_2,
false,0);
1680 physical_electrodes_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,-5.435*mm,0),logical_electrodes_west_2,
"physical_electrodes_west_2",logical_pcboard_west_2,
false,0);
1681 physical_readoutstrips_012_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,0*mm,-159.5*mm),logical_readoutstrips_012_west_2,
"physical_readoutstrips_012_west_2",logical_pcboard_west_2,
false,0);
1682 physical_mylarlayer_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,-5.535*mm,0*mm),logical_mylarlayer_west_2,
"physical_mylarlayer_west_2",logical_pcboard_west_2,
false,0);
1683 physical_honeycomb_1_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,l_pcboard_y/2.+readoutstrip_y+honeycomb_y/2,0),
1684 logical_honeycomb_west_2,
"physical_honeycomb_1_west_2",logical_gascontainer_3_west_2,
false,0);
1685 physical_honeycomb_2_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,-(l_pcboard_y/2.+readoutstrip_y+honeycomb_y/2),0),
1686 logical_honeycomb_west_2,
"physical_honeycomb_2_west_2",logical_gascontainer_3_west_2,
false,0);
1689 physical_gascontainer_3_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,0,ks_trafo),logical_gascontainer_3_east_1,
"physical_gascontainer_3_east_1",logical_assembly_east_1,
false,0);
1690 physical_pcboard_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logical_pcboard_east_1,
"physical_pcboard_east_1",logical_gascontainer_3_east_1,
false,0);
1691 physical_gaslayer_tot_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,-3.16*mm,0),logical_gaslayer_tot_east_1,
"physical_gaslayer_tot_east_1",logical_gascontainer_3_east_1,
false,0);
1692 physical_sensitive_detector_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,-4.71*mm,0),logical_sensitive_detector_east_1,
"physical_sensitive_detector_east_1",logical_pcboard_east_1,
false,0);
1693 physical_glass_layer_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,-5.095*mm,0),logical_glass_layer_east_1,
"physical_glass_layer_east_1",logical_pcboard_east_1,
false,0);
1694 physical_electrodes_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,-5.435*mm,0),logical_electrodes_east_1,
"physical_electrodes_east_1",logical_pcboard_east_1,
false,0);
1695 physical_readoutstrips_012_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,0*mm,-159.5*mm),logical_readoutstrips_012_east_1,
"physical_readoutstrips_012_east_1",logical_pcboard_east_1,
false,0);
1696 physical_mylarlayer_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,-5.535*mm,0*mm),logical_mylarlayer_east_1,
"physical_mylarlayer_east_1",logical_pcboard_east_1,
false,0);
1697 physical_honeycomb_1_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,l_pcboard_y/2.+readoutstrip_y+honeycomb_y/2,0),
1698 logical_honeycomb_east_1,
"physical_honeycomb_1_east_1",logical_gascontainer_3_east_1,
false,0);
1699 physical_honeycomb_2_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,-(l_pcboard_y/2.+readoutstrip_y+honeycomb_y/2),0),
1700 logical_honeycomb_east_1,
"physical_honeycomb_2_east_1",logical_gascontainer_3_east_1,
false,0);
1704 physical_gascontainer_3_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,0,ks_trafo),logical_gascontainer_3_east_2,
"physical_gascontainer_3_east_2",logical_assembly_east_2,
false,0);
1705 physical_pcboard_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logical_pcboard_east_2,
"physical_pcboard_east_2",logical_gascontainer_3_east_2,
false,0);
1706 physical_gaslayer_tot_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,-3.16*mm,0),logical_gaslayer_tot_east_2,
"physical_gaslayer_tot_east_2",logical_gascontainer_3_east_2,
false,0);
1707 physical_sensitive_detector_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,-4.71*mm,0),logical_sensitive_detector_east_2,
"physical_sensitive_detector_east_2",logical_pcboard_east_2,
false,0);
1708 physical_glass_layer_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,-5.095*mm,0),logical_glass_layer_east_2,
"physical_glass_layer_east_2",logical_pcboard_east_2,
false,0);
1709 physical_electrodes_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,-5.435*mm,0),logical_electrodes_east_2,
"physical_electrodes_east_2",logical_pcboard_east_2,
false,0);
1710 physical_readoutstrips_012_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,0*mm,-159.5*mm),logical_readoutstrips_012_east_2,
"physical_readoutstrips_012_east_2",logical_pcboard_east_2,
false,0);
1711 physical_mylarlayer_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,-5.535*mm,0*mm),logical_mylarlayer_east_2,
"physical_mylarlayer_east_2",logical_pcboard_east_2,
false,0);
1712 physical_honeycomb_1_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,l_pcboard_y/2.+readoutstrip_y+honeycomb_y/2,0),
1713 logical_honeycomb_east_2,
"physical_honeycomb_1_east_2",logical_gascontainer_3_east_2,
false,0);
1714 physical_honeycomb_2_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,-(l_pcboard_y/2.+readoutstrip_y+honeycomb_y/2),0),
1715 logical_honeycomb_east_2,
"physical_honeycomb_2_east_2",logical_gascontainer_3_east_2,
false,0);
1720 G4ThreeVector pos_west_1(0,0,+12.5*mm);
1721 G4ThreeVector pos_west_2(0,0,-12.5*mm);
1722 G4ThreeVector pos_east_1(0,0,-12.5*mm);
1723 G4ThreeVector pos_east_2(0,0,+12.5*mm);
1725 int n_mrpc_modules=18;
1726 double shift_angle_mrpc=360*deg/n_mrpc_modules;
1727 double shift_angle_layer_2=(angle_readoutbox+inner_angle)/2.;
1729 double radius_physical_mrpc_placement = 634.56*mm;
1733 for (
int i=0;i<n_mrpc_modules;i++)
1737 pos_west_1.setX(radius_physical_mrpc_placement*
cos(90*deg+i*shift_angle_mrpc));
1738 pos_west_1.setY(radius_physical_mrpc_placement*
sin(90*deg+i*shift_angle_mrpc));
1740 pos_west_2.setX(radius_physical_mrpc_placement*
cos(90*deg+shift_angle_layer_2+i*shift_angle_mrpc));
1741 pos_west_2.setY(radius_physical_mrpc_placement*
sin(90*deg+shift_angle_layer_2+i*shift_angle_mrpc));
1743 G4RotationMatrix rot_west_1,rot_west_2;
1745 rot_west_1.rotateX(90*deg);
1746 rot_west_1.rotateY(shift_angle_mrpc*i);
1747 rot_west_1.rotateZ(180*deg);
1748 rot_west_1.invert();
1749 G4Transform3D transf_west_1(rot_west_1,pos_west_1);
1751 rot_west_2.rotateX(90*deg);
1752 rot_west_2.rotateY(shift_angle_layer_2+shift_angle_mrpc*i);
1753 rot_west_2.rotateZ(180*deg);
1754 rot_west_2.invert();
1755 G4Transform3D transf_west_2(rot_west_2,pos_west_2);
1758 std::ostringstream string_physical_mrpc_lay1,string_physical_mrpc_lay2;
1759 string_physical_mrpc_lay1 <<
"physical_mrpc_west_lay1_mod_"<<i;
1760 string_physical_mrpc_lay2 <<
"physical_mrpc_west_lay2_mod_"<<i;
1763 physical_assembly_west_1 =
new G4PVPlacement(transf_west_1,logical_assembly_west_1,string_physical_mrpc_lay1.str(),logicalEcTofWest,
false,(i+1));
1764 physical_assembly_west_2 =
new G4PVPlacement(transf_west_2,logical_assembly_west_2,string_physical_mrpc_lay2.str(),logicalEcTofWest,
false,(i+1));
1769 G4cout << G4endl << G4endl <<
"You are using the new MRPC TOF Detector" <<G4endl << G4endl;
1771 for (
int i=0;i<n_mrpc_modules;i++)
1774 pos_east_1.setX(radius_physical_mrpc_placement*
cos(90*deg+i*shift_angle_mrpc));
1775 pos_east_1.setY(radius_physical_mrpc_placement*
sin(90*deg+i*shift_angle_mrpc));
1777 pos_east_2.setX(radius_physical_mrpc_placement*
cos(90*deg+shift_angle_layer_2+i*shift_angle_mrpc));
1778 pos_east_2.setY(radius_physical_mrpc_placement*
sin(90*deg+shift_angle_layer_2+i*shift_angle_mrpc));
1780 G4RotationMatrix rot_east_1,rot_east_2;
1782 rot_east_1.rotateX(90*deg);
1783 rot_east_1.rotateY(shift_angle_mrpc*i);
1784 rot_east_1.invert();
1785 G4Transform3D transf_east_1(rot_east_1,pos_east_1);
1787 rot_east_2.rotateX(90*deg);
1788 rot_east_2.rotateY(shift_angle_layer_2+shift_angle_mrpc*i);
1789 rot_east_2.invert();
1790 G4Transform3D transf_east_2(rot_east_2,pos_east_2);
1792 std::ostringstream string_physical_mrpc_lay1,string_physical_mrpc_lay2;
1793 string_physical_mrpc_lay1 <<
"physical_mrpc_east_lay1_mod_"<<(17-i);
1794 string_physical_mrpc_lay2 <<
"physical_mrpc_east_lay2_mod_"<<(17-i);
1796 physical_assembly_east_1 =
new G4PVPlacement(transf_east_1,logical_assembly_east_1,string_physical_mrpc_lay1.str(),logicalEcTofEast,
false,(18-i));
1797 physical_assembly_east_2 =
new G4PVPlacement(transf_east_2,logical_assembly_east_2,string_physical_mrpc_lay2.str(),logicalEcTofEast,
false,(18-i));