File indexing completed on 2025-10-30 07:59:21
0001 
0002 
0003 
0004 
0005 
0006 
0007 
0008 
0009 
0010 
0011 
0012 
0013 
0014 
0015 
0016 
0017 
0018 
0019 
0020 
0021 
0022 
0023 
0024 
0025 
0026 
0027   
0028 
0029   G4double glassThick = 3.0*mm;
0030   G4double sidepanelWidth = 43.*cm;
0031   G4double windowWidth = labWidth - 2.*sidepanelWidth;
0032   G4double windowHeight = labHeight - 112.0*cm;
0033   G4double glassPosY = 0.5*(worldLength - glassThick);
0034   G4double glassPosZ = 0.5*(labHeight - windowHeight);
0035 
0036   G4Box* glass_box = new G4Box
0037   ("glass_box",0.5*windowWidth, 0.5*glassThick, 0.5*windowHeight );
0038   glass_log = new G4LogicalVolume(glass_box, glass_mat, "glass_log");
0039   glass_phys = new G4PVPlacement
0040     (0, G4ThreeVector(0., glassPosY, glassPosZ), "glass_phys", glass_log, 
0041      world_phys, false, 0);
0042 
0043   G4VisAttributes* glass_vat= new G4VisAttributes(blue);
0044   glass_vat->SetVisibility(true);
0045   glass_vat->SetForceSolid(true);
0046   glass_log->SetVisAttributes(glass_vat);
0047 
0048   
0049 
0050   G4double holeThick = wallThick - glassThick;
0051   G4double windowPosY = 0.5*(worldLength - holeThick) - glassThick;
0052   G4double windowPosZ = glassPosZ;
0053 
0054   G4Box* window_box = new G4Box
0055   ("window_box",0.5*windowWidth, 0.5*holeThick, 0.5*windowHeight );
0056   window_log = new G4LogicalVolume(window_box, lab_mat, "window_log");
0057   window_phys = new G4PVPlacement
0058     (0, G4ThreeVector(0., windowPosY, windowPosZ), "window_phys",
0059      window_log, world_phys, false, 0);
0060 
0061   G4VisAttributes* window_vat= new G4VisAttributes(yellow);
0062   
0063   window_vat->SetVisibility(true);
0064   window_log->SetVisAttributes(window_vat);
0065 
0066 
0067   
0068 
0069   G4double panelThick = 5.0*mm;
0070 
0071   G4double sidepanelPosX = 0.5*(labWidth - sidepanelWidth);
0072   G4double sidepanelPosY = 0.5*(worldLength - panelThick);
0073   G4double sidepanelPosZ = glassPosZ;
0074 
0075   G4Box* sidepanel_box = new G4Box
0076   ("sidepanel_box",0.5*sidepanelWidth, 0.5*panelThick, 0.5*windowHeight );
0077   sidepanel_log = new G4LogicalVolume
0078                       (sidepanel_box, panel_mat, "sidepanel_log");
0079   sidepanel_phys = new G4PVPlacement
0080     (0, G4ThreeVector(sidepanelPosX, sidepanelPosY, sidepanelPosZ), 
0081         "sidepanel_phys", sidepanel_log, world_phys, false, 0);
0082 
0083   sidepanel_phys = new G4PVPlacement
0084     (0, G4ThreeVector(-sidepanelPosX, sidepanelPosY, sidepanelPosZ), 
0085         "sidepanel_phys", sidepanel_log, world_phys, false, 1);
0086 
0087   G4VisAttributes* panel_vat= new G4VisAttributes(grey);
0088   panel_vat->SetVisibility(true);
0089   panel_vat->SetForceSolid(true);
0090   sidepanel_log->SetVisAttributes(panel_vat);
0091 
0092   
0093 
0094   G4double panelholePosX  = sidepanelPosX;
0095   G4double panelholeThick = wallThick - panelThick;
0096   G4double panelholePosY  = 0.5*(worldLength - panelholeThick) - panelThick;
0097   G4double panelholePosZ  = sidepanelPosZ;
0098 
0099   G4Box* panelhole_box = new G4Box
0100   ("panelhole_box",0.5*sidepanelWidth, 0.5*panelholeThick, 0.5*windowHeight );
0101   panelhole_log = new G4LogicalVolume
0102                        (panelhole_box, lab_mat, "panelhole_log");
0103 
0104   panelhole_phys = new G4PVPlacement
0105     (0, G4ThreeVector(panelholePosX, panelholePosY, panelholePosZ), 
0106     "panelhole_phys", panelhole_log, world_phys, false, 0);
0107   panelhole_phys = new G4PVPlacement
0108     (0, G4ThreeVector(-panelholePosX, panelholePosY, panelholePosZ), 
0109     "panelhole_phys", panelhole_log, world_phys, false, 1);
0110 
0111   panelhole_log->SetVisAttributes(window_vat);
0112 
0113 
0114   
0115 
0116   G4double doorwindowWidth = 62.*cm;
0117   G4double doorwindowHeight = 84.0*cm;
0118   G4double doorglassPosX = 0.5*(labWidth - doorwindowWidth) - sidepanelWidth;
0119   G4double doorglassPosY = 0.5*(worldLength - panelThick);
0120   G4double doorglassPosZ = glassPosZ - 0.5*(windowHeight+doorwindowHeight);
0121 
0122   G4Box* doorglass_box = new G4Box
0123   ("doorglass_box",0.5*doorwindowWidth, 0.5*panelThick, 0.5*doorwindowHeight );
0124   doorglass_log = new G4LogicalVolume
0125                       (doorglass_box, panel_mat, "doorglass_log");
0126   doorglass_phys = new G4PVPlacement
0127     (0, G4ThreeVector(doorglassPosX, doorglassPosY, doorglassPosZ), 
0128         "doorglass_phys", doorglass_log, world_phys, false, 0);
0129 
0130   doorglass_log->SetVisAttributes(panel_vat);
0131 
0132   
0133 
0134   G4double doorwindowPosX = doorglassPosX;
0135   G4double doorwindowPosY = 0.5*(worldLength - panelholeThick) - panelThick;
0136   G4double doorwindowPosZ = doorglassPosZ;
0137 
0138   G4Box* doorwindow_box = new G4Box
0139   ("doorwindow_box",0.5*doorwindowWidth, 0.5*panelholeThick, 0.5*doorwindowHeight );
0140   doorwindow_log = new G4LogicalVolume
0141                        (doorwindow_box, lab_mat, "doorwindow_log");
0142   doorwindow_phys = new G4PVPlacement
0143     (0, G4ThreeVector(doorwindowPosX, doorwindowPosY, doorwindowPosZ), 
0144     "doorwindow_phys", doorwindow_log, world_phys, false, 0);
0145 
0146   doorwindow_log->SetVisAttributes(window_vat);
0147 
0148 
0149   
0150 
0151   
0152   G4double cupboardDepth  = 38.0*cm; 
0153   G4double cupboard1Width  = 91.0*cm; 
0154   G4double cupboard2Width  = 153.0*cm; 
0155   G4double cupboardHeight = 91.0*cm; 
0156   G4double woodThick      = 2.0*cm;
0157   G4double insideDepth  = cupboardDepth - 2.*woodThick;
0158   G4double inside1Width  = cupboard1Width - 2.*woodThick;
0159   G4double inside2Width  = cupboard2Width - 2.*woodThick;
0160   G4double insideHeight = cupboardHeight - 2.*woodThick;
0161 
0162   
0163   G4Box* cupboard_box = new G4Box
0164    ("cupboard_box", 0.5*cupboardDepth, 0.5*cupboard1Width, 0.5*cupboardHeight);
0165   G4Box* inside_box = new G4Box
0166     ("inside_box", 0.5*insideDepth, 0.5*inside1Width, 0.5*insideHeight);
0167   G4Box* shelf_box  = new G4Box
0168     ("shelf_box", 0.5*insideDepth, 0.5*inside1Width, 0.5*woodThick);
0169   G4Box* cupdoor_box = new G4Box
0170     ("cupdoor_box", 0.5*woodThick+1.0*nanometer, 0.25*inside1Width, 0.5*insideHeight);
0171 
0172 
0173   G4RotationMatrix rotMatrixCupboard;
0174   rotMatrixCupboard.rotateY(0.0*deg);
0175   
0176   G4SubtractionSolid* cupboard_frame = new G4SubtractionSolid
0177     ("cupboard_frame", cupboard_box, inside_box, G4Transform3D
0178      (rotMatrixCupboard, G4ThreeVector(0.,0.,0.)));
0179   G4UnionSolid* cupboard_shelf1 = new G4UnionSolid
0180     ("cupboard_shelf1", cupboard_frame, shelf_box, G4Transform3D
0181      (rotMatrixCupboard, G4ThreeVector(0.,0.,0.30*(insideHeight))));
0182   G4UnionSolid* cupboard_shelf2 = new G4UnionSolid
0183     ("cupboard_shelf2", cupboard_shelf1, shelf_box, G4Transform3D
0184      (rotMatrixCupboard, G4ThreeVector(0.,0.,-0.05*(insideHeight))));
0185   G4SubtractionSolid* cupboard_sol = new G4SubtractionSolid
0186     ("cupboard_sol", cupboard_shelf2, cupdoor_box, G4Transform3D
0187      (rotMatrixCupboard, G4ThreeVector
0188       (-0.5*(insideDepth+woodThick),0.25*inside1Width,0.)));
0189 
0190   cupboard_log = new G4LogicalVolume
0191     (cupboard_sol, cupboard_mat, "cupboard_log");
0192 
0193   G4double cupb_X = 0.5*(labWidth - cupboardDepth);
0194   
0195   G4double cupb_Y = 0.5*labLength;
0196   G4double cupb_Z = 0.5*(labHeight - cupboardHeight) - 25.4*cm;
0197 
0198   for (G4int i=0; i<5; i++)
0199     {
0200       cupb_Y -= cupboard1Width+2.0*cm;
0201       cupboard_phys = new G4PVPlacement
0202     (0, G4ThreeVector(cupb_X, cupb_Y, cupb_Z), "cupboard_phys", 
0203      cupboard_log, lab_phys, false, i);
0204     }
0205 
0206   cupb_X  = -(0.5*(labWidth - cupboard1Width) - cupboardDepth - 2.0*cm);
0207   G4double cupb_Y2 = -0.5*(labLength - cupboardDepth);
0208 
0209   G4RotationMatrix rotMatrixWallcupboard;
0210   rotMatrixWallcupboard.rotateZ(-90.0*deg);
0211 
0212   cupboard_phys = new G4PVPlacement
0213     (G4Transform3D
0214      (rotMatrixWallcupboard,G4ThreeVector(cupb_X, cupb_Y2, cupb_Z)), 
0215       "cupboard_phys", cupboard_log, lab_phys, false, 5);
0216 
0217 
0218   G4VisAttributes* cupboard_vat= new G4VisAttributes(yellow);
0219   cupboard_vat->SetVisibility(true);
0220   cupboard_vat->SetForceSolid(true);
0221   cupboard_log->SetVisAttributes(cupboard_vat);
0222 
0223   
0224 
0225   G4Box* cupboard2_box = new G4Box
0226   ("cupboard2_box", 0.5*cupboardDepth, 0.5*cupboard2Width, 0.5*cupboardHeight);
0227   G4Box* inside2_box = new G4Box
0228     ("inside2_box", 0.5*insideDepth, 0.5*inside2Width, 0.5*insideHeight);
0229   G4Box* shelf2_box  = new G4Box
0230     ("shelf2_box", 0.5*insideDepth, 0.5*inside2Width, 0.5*woodThick);
0231   G4Box* cupdoor_box2 = new G4Box
0232     ("cupdoor_box2", 0.5*woodThick+1.0*nanometer, 0.25*inside2Width, 0.5*insideHeight);
0233 
0234 
0235   G4SubtractionSolid* cupboard2_frame = new G4SubtractionSolid
0236     ("cupboard2_frame", cupboard2_box, inside2_box, G4Transform3D
0237      (rotMatrixCupboard, G4ThreeVector(0.,0.,0.)));
0238   G4UnionSolid* cupboard2_shelf1 = new G4UnionSolid
0239     ("cupboard2_shelf1", cupboard2_frame, shelf2_box, G4Transform3D
0240      (rotMatrixCupboard, G4ThreeVector(0.,0.,0.30*(insideHeight))));
0241   G4UnionSolid* cupboard2_shelf2 = new G4UnionSolid
0242     ("cupboard2_shelf2", cupboard2_shelf1, shelf2_box, G4Transform3D
0243      (rotMatrixCupboard, G4ThreeVector(0.,0.,0.10*(insideHeight))));
0244   G4SubtractionSolid* cupboard2_sol = new G4SubtractionSolid
0245     ("cupboard2_sol", cupboard2_shelf2, cupdoor_box2, G4Transform3D
0246      (rotMatrixCupboard, G4ThreeVector
0247       (-0.5*(insideDepth+woodThick),0.25*inside2Width,0.)));
0248 
0249   cupboard2_log = new G4LogicalVolume
0250     (cupboard2_sol, cupboard_mat, "cupboard2_log");
0251 
0252   cupb_X = 0.5*(labWidth - cupboardDepth);
0253   
0254   cupb_Y -= 0.5*cupboard1Width + 0.5*cupboard2Width 
0255                                + 2.0*cm; 
0256   
0257 
0258   cupboard2_phys = new G4PVPlacement
0259     (0,G4ThreeVector(cupb_X, cupb_Y, cupb_Z), 
0260       "cupboard2_phys", cupboard2_log, lab_phys, false, 0);
0261 
0262   cupb_X = -0.5*(labWidth - cupboardDepth);
0263   cupb_Y = -(0.5*(labLength - cupboard2Width) - cupboardDepth - 2.0*cm);
0264 
0265   G4RotationMatrix rotMatrixWallcupboard2;
0266   rotMatrixWallcupboard2.rotateZ(-180.0*deg);
0267 
0268   cupboard2_phys = new G4PVPlacement
0269     (G4Transform3D
0270      (rotMatrixWallcupboard2,G4ThreeVector(cupb_X, cupb_Y, cupb_Z)), 
0271       "cupboard2_phys", cupboard2_log, lab_phys, false, 1);
0272 
0273 
0274   cupboard2_log->SetVisAttributes(cupboard_vat);
0275 
0276 
0277   
0278 
0279   G4double doorWidth = 1.67*m;  
0280   G4double doorThick = 4.0*cm; 
0281   G4double doorHeight = 2.09*m; 
0282   G4double doorPosY = -0.5*(worldLength - doorThick);
0283   G4double doorPosZ = -0.5*(worldHeight - doorHeight);
0284 
0285   G4Box* door_box = new G4Box
0286   ("door_box",0.5*doorWidth, 0.5*doorThick, 0.5*doorHeight );
0287   door_log = new G4LogicalVolume(door_box, door_mat, "door_log");
0288   door_phys = new G4PVPlacement
0289     (0, G4ThreeVector(0., doorPosY, doorPosZ), "door_phys", door_log, 
0290      world_phys, false, 0);
0291 
0292   G4VisAttributes* door_vat= new G4VisAttributes(brown);
0293   door_vat->SetVisibility(true);
0294   door_vat->SetForceSolid(true);
0295   door_log->SetVisAttributes(door_vat);
0296 
0297 
0298   
0299 
0300   G4double doorholeThick = wallThick - doorThick;
0301   G4double doorholePosY = -(0.5*(worldLength - doorholeThick) - doorThick);
0302   G4double doorholePosZ = doorPosZ;
0303 
0304   G4Box* doorhole_box = new G4Box
0305   ("doorhole_box",0.5*doorWidth, 0.5*doorholeThick, 0.5*doorHeight );
0306   doorhole_log = new G4LogicalVolume(doorhole_box, lab_mat, "doorhole_log");
0307   doorhole_phys = new G4PVPlacement
0308     (0, G4ThreeVector(0., doorholePosY, doorholePosZ), "doorhole_phys",
0309      doorhole_log, world_phys, false, 0);
0310 
0311   G4VisAttributes* doorhole_vat= new G4VisAttributes(cyan);
0312   
0313   doorhole_vat->SetVisibility(true);
0314   doorhole_log->SetVisAttributes(doorhole_vat);
0315 
0316 
0317   
0318   
0319   
0320 
0321   
0322 
0323   G4double desk1Depth  = 57.0*cm; 
0324   G4double desk1Width  = 160.0*cm; 
0325   G4double desk1Height = 90.5*cm; 
0326   G4double deskThick      = 3.0*cm;
0327   G4double desk1_insideDepth  = desk1Depth - 2.*deskThick;
0328   G4double desk1_insideWidth  = desk1Width - 2.*deskThick;
0329   G4double desk1_insideHeight = desk1Height - 2.*deskThick;
0330 
0331   
0332   G4Box* desk1_box = new G4Box
0333    ("desk1_box", 0.5*desk1Depth, 0.5*desk1Width, 0.5*desk1Height);
0334   G4Box* desk1_inside_box = new G4Box
0335     ("desk1_inside_box", 0.5*desk1_insideDepth, 0.5*desk1_insideWidth, 
0336      0.5*desk1_insideHeight);
0337   G4Box* desk1_door_box = new G4Box
0338     ("desk1_door_box", 0.5*deskThick+1.0*nanometer, 0.25*desk1_insideWidth, 
0339      0.5*desk1_insideHeight);
0340 
0341 
0342 
0343   G4RotationMatrix rotMatrixDesk;
0344   rotMatrixDesk.rotateY(0.0*deg);
0345   
0346   G4SubtractionSolid* desk1_frame = new G4SubtractionSolid
0347     ("desk1_frame", desk1_box, desk1_inside_box, G4Transform3D
0348      (rotMatrixCupboard, G4ThreeVector(0.,0.,0.)));
0349   G4SubtractionSolid* desk1_sol = new G4SubtractionSolid
0350     ("desk1_sol", desk1_frame, desk1_door_box, G4Transform3D
0351      (rotMatrixCupboard, G4ThreeVector
0352       (-0.5*(desk1_insideDepth+deskThick),-0.25*desk1_insideWidth,0.)));
0353 
0354   desk1_log = new G4LogicalVolume(desk1_sol, desk_mat, "desk1_log");
0355 
0356   G4double desk_X = 0.5*(labWidth - desk1Depth);
0357   G4double desk_Y = -(0.5*(labLength - desk1Width) - 30.0*cm);
0358   G4double desk_Z = 0.5*(desk1Height - labHeight);
0359 
0360   desk1_phys = new G4PVPlacement
0361     (0, G4ThreeVector(desk_X, desk_Y, desk_Z), "desk1_phys", 
0362      desk1_log, lab_phys, false, 0);
0363 
0364   G4VisAttributes* desk_vat= new G4VisAttributes(brown);
0365   desk_vat->SetVisibility(true);
0366   desk_vat->SetForceSolid(true);
0367   desk1_log->SetVisAttributes(desk_vat);
0368 
0369   
0370   
0371 
0372   G4double desk2Depth  = 57.0*cm; 
0373   G4double desk2Width = 156.0*cm; 
0374   G4double desk2Height = desk1Height; 
0375 
0376   G4double desk2_insideDepth  = desk2Depth - 2.*deskThick;
0377   G4double desk2_insideWidth  = desk2Width - 2.*deskThick;
0378   G4double desk2_insideHeight = desk2Height - 2.*deskThick;
0379 
0380   
0381   G4Box* desk2_box = new G4Box
0382    ("desk2_box", 0.5*desk2Depth, 0.5*desk2Width, 0.5*desk2Height);
0383   G4Box* desk2_inside_box = new G4Box
0384     ("desk2_inside_box", 0.5*desk2_insideDepth, 0.5*desk2_insideWidth, 
0385      0.5*desk2_insideHeight);
0386   G4Box* desk2_door_box = new G4Box
0387     ("desk2_door_box", 0.5*deskThick+1.0*nanometer, 0.2*desk2_insideWidth, 
0388      0.5*desk2_insideHeight);
0389 
0390 
0391 
0392   G4SubtractionSolid* desk2_frame = new G4SubtractionSolid
0393     ("desk2_frame", desk2_box, desk2_inside_box, G4Transform3D
0394      (rotMatrixCupboard, G4ThreeVector(0.,0.,0.)));
0395   G4SubtractionSolid* desk2_sol = new G4SubtractionSolid
0396     ("desk2_sol", desk2_frame, desk2_door_box, G4Transform3D
0397      (rotMatrixCupboard, G4ThreeVector
0398       (-0.5*(desk2_insideDepth+deskThick),-0.25*desk2_insideWidth,0.)));
0399 
0400   desk2_log = new G4LogicalVolume(desk2_sol, desk_mat, "desk2_log");
0401 
0402   desk_X = 0.5*(labWidth - desk2Depth);
0403   desk_Y += 0.5*(desk2Width + desk1Width) + 2.0*cm;
0404   desk_Z = 0.5*(desk2Height - labHeight);
0405 
0406   desk2_phys = new G4PVPlacement
0407     (0, G4ThreeVector(desk_X, desk_Y, desk_Z), "desk2_phys", 
0408      desk2_log, lab_phys, false, 0);
0409 
0410   desk2_log->SetVisAttributes(desk_vat);
0411 
0412   
0413   
0414 
0415   G4double desk3Depth  = 79.0*cm; 
0416   G4double desk3Width = 160.0*cm; 
0417   G4double desk3Height = desk1Height; 
0418 
0419   G4double desk3_insideDepth  = desk3Depth - 2.*deskThick;
0420   G4double desk3_insideWidth  = desk3Width - 2.*deskThick;
0421   G4double desk3_insideHeight = desk3Height - 2.*deskThick;
0422 
0423   
0424   G4Box* desk3_box = new G4Box
0425    ("desk3_box", 0.5*desk3Depth, 0.5*desk3Width, 0.5*desk3Height);
0426   G4Box* desk3_inside_box = new G4Box
0427     ("desk3_inside_box", 0.5*desk3_insideDepth, 0.5*desk3_insideWidth, 
0428      0.5*desk3_insideHeight);
0429   G4Box* desk3_door_box = new G4Box
0430     ("desk3_door_box", 0.5*deskThick+1.0*nanometer, 0.15*desk3_insideWidth, 0.5*desk1_insideHeight);
0431 
0432 
0433 
0434   G4SubtractionSolid* desk3_frame = new G4SubtractionSolid
0435     ("desk3_frame", desk3_box, desk3_inside_box, G4Transform3D
0436      (rotMatrixCupboard, G4ThreeVector(0.,0.,0.)));
0437   G4SubtractionSolid* desk3_sol = new G4SubtractionSolid
0438     ("desk3_sol", desk3_frame, desk3_door_box, G4Transform3D
0439      (rotMatrixCupboard, G4ThreeVector
0440       (-0.5*(desk3_insideDepth+deskThick),-0.35*desk3_insideWidth,0.)));
0441 
0442   desk3_log = new G4LogicalVolume(desk3_sol, desk_mat, "desk3_log");
0443 
0444   desk_X = 0.5*(labWidth - desk3Depth);
0445   desk_Y += 0.5*(desk3Width + desk3Width) + 2.0*cm;
0446   desk_Z = 0.5*(desk3Height - labHeight);
0447 
0448   desk3_phys = new G4PVPlacement
0449     (0, G4ThreeVector(desk_X, desk_Y, desk_Z), "desk3_phys", 
0450      desk3_log, lab_phys, false, 0);
0451 
0452   desk3_log->SetVisAttributes(desk_vat);
0453 
0454 
0455   
0456   
0457 
0458   G4double trunkDepth  = 20.0*cm; 
0459   G4double trunkWidth  = labLength; 
0460   G4double trunkHeight = desk1Height; 
0461   G4double trunkThick  = 3.0*cm;
0462 
0463   
0464   G4double trunk_insideDepth  = trunkDepth - trunkThick;
0465   G4double trunk_insideWidth  = trunkWidth;
0466   G4double trunk_insideHeight = trunkHeight - trunkThick;
0467 
0468   G4Box* trunk_box = new G4Box
0469    ("trunk_box", 0.5*trunkDepth, 0.5*trunkWidth, 0.5*trunkHeight);
0470   G4Box* trunk_inside_box = new G4Box
0471     ("trunk_inside_box", 0.5*trunk_insideDepth, 0.5*trunk_insideWidth, 
0472      0.5*trunk_insideHeight);
0473 
0474   trunk_log = new G4LogicalVolume(trunk_box, desk_mat, "trunk_log");
0475   trunk_inside_log = new G4LogicalVolume
0476                     (trunk_inside_box, lab_mat, "trunk_inside_log");
0477 
0478   G4double trunk_X = -0.5*(labWidth - trunkDepth);
0479   G4double trunk_Y = 0.0*m;
0480   G4double trunk_Z = -0.5*(labHeight - trunkHeight);
0481   
0482   trunk_phys = new G4PVPlacement
0483     (0, G4ThreeVector(trunk_X, trunk_Y, trunk_Z), "trunk_phys", 
0484      trunk_log, lab_phys, false, 0);
0485 
0486   G4double trunkinside_X = -0.5*(trunkDepth - trunk_insideDepth);
0487   G4double trunkinside_Y = 0.0*m;
0488   G4double trunkinside_Z = -0.5*(trunkHeight - trunk_insideHeight);
0489   
0490   trunk_inside_phys = new G4PVPlacement
0491     (0, G4ThreeVector(trunkinside_X, trunkinside_Y, trunkinside_Z), 
0492         "trunk_inside_phys",trunk_inside_log, trunk_phys, false, 0);
0493 
0494   trunk_log->SetVisAttributes(desk_vat);
0495   trunk_inside_log->SetVisAttributes(window_vat);
0496 
0497   
0498   
0499 
0500   G4double desk4Depth  = 79.0*cm; 
0501   G4double desk4Width  = 79.0*cm; 
0502   G4double desk4Height = desk1Height; 
0503 
0504   G4double desk4_insideDepth  = desk4Depth - 2.*deskThick;
0505   G4double desk4_insideWidth  = desk4Width - 2.*deskThick;
0506   G4double desk4_insideHeight = desk4Height - 2.*deskThick;
0507 
0508   
0509   G4Box* desk4_box = new G4Box
0510    ("desk4_box", 0.5*desk4Depth, 0.5*desk4Width, 0.5*desk4Height);
0511   G4Box* desk4_inside_box = new G4Box
0512     ("desk4_inside_box", 0.5*desk4_insideDepth, 0.5*desk4_insideWidth, 
0513      0.5*desk4_insideHeight);
0514   G4Box* desk4_door_box = new G4Box
0515     ("desk4_door_box", 0.5*deskThick+1.0*nanometer, 0.45*desk4_insideWidth, 
0516      0.5*desk4_insideHeight);
0517 
0518 
0519 
0520   G4SubtractionSolid* desk4_frame = new G4SubtractionSolid
0521     ("desk4_frame", desk4_box, desk4_inside_box, G4Transform3D
0522      (rotMatrixCupboard, G4ThreeVector(0.,0.,0.)));
0523   G4SubtractionSolid* desk4_sol = new G4SubtractionSolid
0524     ("desk4_sol", desk4_frame, desk4_door_box, G4Transform3D
0525      (rotMatrixCupboard, G4ThreeVector
0526       (0.5*(desk4_insideDepth+deskThick),0.,0.)));
0527 
0528   desk4_log = new G4LogicalVolume(desk4_sol, desk_mat, "desk4_log");
0529 
0530   desk_X = -0.5*(labWidth - desk4Depth) + trunkDepth;
0531   desk_Y = -(0.5*(labLength - desk4Width) - 5.0*cm);
0532   desk_Z = 0.5*(desk4Height - labHeight);
0533   
0534   G4double crateWidth  = 60.0*cm; 
0535   G4double crate_Y = 0.;
0536 
0537   G4RotationMatrix rotMatrixDesk4;
0538   rotMatrixDesk4.rotateZ(0.0*deg);
0539 
0540   for (G4int j=0; j<3; j++)
0541     {
0542       if( j == 2) 
0543         {
0544       desk_Y += crateWidth;
0545       crate_Y = desk_Y - 0.5*(desk4Width + crateWidth);
0546     }
0547       desk4_phys = new G4PVPlacement
0548     (G4Transform3D(rotMatrixDesk4, G4ThreeVector(desk_X, desk_Y, desk_Z)),
0549      "desk4_phys", desk4_log, lab_phys, false, j);
0550       desk_Y += desk4Width+2.0*cm;
0551     }
0552 
0553   desk4_log->SetVisAttributes(desk_vat);
0554 
0555   
0556   
0557 
0558   G4double crateDepth  = 64.0*cm; 
0559   
0560   G4double crateHeight = 128.0*cm; 
0561   G4double crateThick  = 3.0*cm;
0562 
0563   G4double crate_insideDepth  = crateDepth - 2.*crateThick;
0564   G4double crate_insideWidth  = crateWidth - 2.*crateThick;
0565   G4double crate_insideHeight = crateHeight - 2.*crateThick;
0566 
0567   
0568   G4Box* crate_box = new G4Box
0569    ("crate_box", 0.5*crateDepth, 0.5*crateWidth, 0.5*crateHeight);
0570   G4Box* crate_inside_box = new G4Box
0571     ("crate_inside_box", 0.5*crate_insideDepth, 0.5*crate_insideWidth, 
0572      0.5*crate_insideHeight);
0573   G4Box* crate_front_box = new G4Box
0574     ("crate_front_box", 0.5*crateThick+1.0*nanometer, 0.5*crate_insideWidth, 
0575      0.5*crate_insideHeight);
0576 
0577   G4SubtractionSolid* crate_frame = new G4SubtractionSolid
0578     ("crate_frame", crate_box, crate_inside_box, G4Transform3D
0579      (rotMatrixCupboard, G4ThreeVector(0.,0.,0.)));
0580   G4SubtractionSolid* crate_sol = new G4SubtractionSolid
0581     ("crate_sol", crate_frame, crate_front_box, G4Transform3D
0582      (rotMatrixCupboard, G4ThreeVector
0583       (0.5*(crate_insideDepth+crateThick),0.,0.)));
0584 
0585   crate_log = new G4LogicalVolume(crate_sol, crate_mat, "crate_log");
0586 
0587   G4double crate_X = -0.5*(labWidth - crateDepth) + trunkDepth;
0588   
0589   G4double crate_Z = 0.5*(crateHeight - labHeight);
0590   
0591   crate_phys = new G4PVPlacement
0592     (0, G4ThreeVector(crate_X, crate_Y, crate_Z), "crate_phys", 
0593      crate_log, lab_phys, false, 0);
0594 
0595   G4VisAttributes* crate_vat= new G4VisAttributes(grey);
0596   crate_vat->SetVisibility(true);
0597   crate_vat->SetForceSolid(true);
0598   crate_log->SetVisAttributes(crate_vat);
0599 
0600 
0601 
0602 
0603   desk_X = -0.5*(labWidth - desk3Width) + 50.0*cm;
0604   desk_Y = 0.5*(labLength - desk3Width - 30.0*cm);
0605   desk_Z = 0.5*(desk4Height - labHeight);
0606   
0607   G4RotationMatrix rotMatrixCleanDesk;
0608   rotMatrixCleanDesk.rotateZ(90.0*deg);
0609 
0610   desk3_phys = new G4PVPlacement
0611     (G4Transform3D
0612      (rotMatrixCleanDesk,G4ThreeVector(desk_X, desk_Y, desk_Z)), 
0613       "desk3_phys", desk3_log, lab_phys, false, 1);
0614 
0615 
0616 
0617   desk_X += 0.5*desk3Width + 0.5*desk4Width; 
0618 
0619   rotMatrixCleanDesk.rotateZ(-180.0*deg);
0620   desk4_phys = new G4PVPlacement
0621     (G4Transform3D
0622     (rotMatrixCleanDesk, G4ThreeVector(desk_X, desk_Y, desk_Z)), 
0623      "desk4_phys", desk4_log, lab_phys, false, 3);
0624 
0625