Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/advanced/underground_physics/src/DMXDetectorRoom.icc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/advanced/underground_physics/src/DMXDetectorRoom.icc (Version 11.3.0) and /examples/advanced/underground_physics/src/DMXDetectorRoom.icc (Version 5.0.p1)


  1 //                                                  1 
  2 // *******************************************    
  3 // * License and Disclaimer                       
  4 // *                                              
  5 // * The  Geant4 software  is  copyright of th    
  6 // * the Geant4 Collaboration.  It is provided    
  7 // * conditions of the Geant4 Software License    
  8 // * LICENSE and available at  http://cern.ch/    
  9 // * include a list of copyright holders.         
 10 // *                                              
 11 // * Neither the authors of this software syst    
 12 // * institutes,nor the agencies providing fin    
 13 // * work  make  any representation or  warran    
 14 // * regarding  this  software system or assum    
 15 // * use.  Please see the license in the file     
 16 // * for the full disclaimer and the limitatio    
 17 // *                                              
 18 // * This  code  implementation is the result     
 19 // * technical work of the GEANT4 collaboratio    
 20 // * By using,  copying,  modifying or  distri    
 21 // * any work based  on the software)  you  ag    
 22 // * use  in  resulting  scientific  publicati    
 23 // * acceptance of all terms of the Geant4 Sof    
 24 // *******************************************    
 25 //                                                
 26 //                                                
 27   // Window - AIR + glass ********************    
 28                                                   
 29   G4double glassThick = 3.0*mm;                   
 30   G4double sidepanelWidth = 43.*cm;               
 31   G4double windowWidth = labWidth - 2.*sidepan    
 32   G4double windowHeight = labHeight - 112.0*cm    
 33   G4double glassPosY = 0.5*(worldLength - glas    
 34   G4double glassPosZ = 0.5*(labHeight - window    
 35                                                   
 36   G4Box* glass_box = new G4Box                    
 37   ("glass_box",0.5*windowWidth, 0.5*glassThick    
 38   glass_log = new G4LogicalVolume(glass_box, g    
 39   glass_phys = new G4PVPlacement                  
 40     (0, G4ThreeVector(0., glassPosY, glassPosZ    
 41      world_phys, false, 0);                       
 42                                                   
 43   G4VisAttributes* glass_vat= new G4VisAttribu    
 44   glass_vat->SetVisibility(true);                 
 45   glass_vat->SetForceSolid(true);                 
 46   glass_log->SetVisAttributes(glass_vat);         
 47                                                   
 48   // hole in wall between glass and "lab": ***    
 49                                                   
 50   G4double holeThick = wallThick - glassThick;    
 51   G4double windowPosY = 0.5*(worldLength - hol    
 52   G4double windowPosZ = glassPosZ;                
 53                                                   
 54   G4Box* window_box = new G4Box                   
 55   ("window_box",0.5*windowWidth, 0.5*holeThick    
 56   window_log = new G4LogicalVolume(window_box,    
 57   window_phys = new G4PVPlacement                 
 58     (0, G4ThreeVector(0., windowPosY, windowPo    
 59      window_log, world_phys, false, 0);           
 60                                                   
 61   G4VisAttributes* window_vat= new G4VisAttrib    
 62   //  window_log->SetVisAttributes(G4VisAttrib    
 63   window_vat->SetVisibility(true);                
 64   window_log->SetVisAttributes(window_vat);       
 65                                                   
 66                                                   
 67   // Side panels of Window - AIR + Al ********    
 68                                                   
 69   G4double panelThick = 5.0*mm;                   
 70 //  G4double sidepanelWidth = 43.*cm; // defin    
 71   G4double sidepanelPosX = 0.5*(labWidth - sid    
 72   G4double sidepanelPosY = 0.5*(worldLength -     
 73   G4double sidepanelPosZ = glassPosZ;             
 74                                                   
 75   G4Box* sidepanel_box = new G4Box                
 76   ("sidepanel_box",0.5*sidepanelWidth, 0.5*pan    
 77   sidepanel_log = new G4LogicalVolume             
 78                       (sidepanel_box, panel_ma    
 79   sidepanel_phys = new G4PVPlacement              
 80     (0, G4ThreeVector(sidepanelPosX, sidepanel    
 81         "sidepanel_phys", sidepanel_log, world    
 82                                                   
 83   sidepanel_phys = new G4PVPlacement              
 84     (0, G4ThreeVector(-sidepanelPosX, sidepane    
 85         "sidepanel_phys", sidepanel_log, world    
 86                                                   
 87   G4VisAttributes* panel_vat= new G4VisAttribu    
 88   panel_vat->SetVisibility(true);                 
 89   panel_vat->SetForceSolid(true);                 
 90   sidepanel_log->SetVisAttributes(panel_vat);     
 91                                                   
 92   // panel hole in wall between Al and "lab":     
 93                                                   
 94   G4double panelholePosX  = sidepanelPosX;        
 95   G4double panelholeThick = wallThick - panelT    
 96   G4double panelholePosY  = 0.5*(worldLength -    
 97   G4double panelholePosZ  = sidepanelPosZ;        
 98                                                   
 99   G4Box* panelhole_box = new G4Box                
100   ("panelhole_box",0.5*sidepanelWidth, 0.5*pan    
101   panelhole_log = new G4LogicalVolume             
102                        (panelhole_box, lab_mat    
103                                                   
104   panelhole_phys = new G4PVPlacement              
105     (0, G4ThreeVector(panelholePosX, panelhole    
106     "panelhole_phys", panelhole_log, world_phy    
107   panelhole_phys = new G4PVPlacement              
108     (0, G4ThreeVector(-panelholePosX, panelhol    
109     "panelhole_phys", panelhole_log, world_phy    
110                                                   
111   panelhole_log->SetVisAttributes(window_vat);    
112                                                   
113                                                   
114   // DOOR Window - AIR + glass ***************    
115                                                   
116   G4double doorwindowWidth = 62.*cm;              
117   G4double doorwindowHeight = 84.0*cm;            
118   G4double doorglassPosX = 0.5*(labWidth - doo    
119   G4double doorglassPosY = 0.5*(worldLength -     
120   G4double doorglassPosZ = glassPosZ - 0.5*(wi    
121                                                   
122   G4Box* doorglass_box = new G4Box                
123   ("doorglass_box",0.5*doorwindowWidth, 0.5*pa    
124   doorglass_log = new G4LogicalVolume             
125                       (doorglass_box, panel_ma    
126   doorglass_phys = new G4PVPlacement              
127     (0, G4ThreeVector(doorglassPosX, doorglass    
128         "doorglass_phys", doorglass_log, world    
129                                                   
130   doorglass_log->SetVisAttributes(panel_vat);     
131                                                   
132   // door hole in wall between glass and "lab"    
133                                                   
134   G4double doorwindowPosX = doorglassPosX;        
135   G4double doorwindowPosY = 0.5*(worldLength -    
136   G4double doorwindowPosZ = doorglassPosZ;        
137                                                   
138   G4Box* doorwindow_box = new G4Box               
139   ("doorwindow_box",0.5*doorwindowWidth, 0.5*p    
140   doorwindow_log = new G4LogicalVolume            
141                        (doorwindow_box, lab_ma    
142   doorwindow_phys = new G4PVPlacement             
143     (0, G4ThreeVector(doorwindowPosX, doorwind    
144     "doorwindow_phys", doorwindow_log, world_p    
145                                                   
146   doorwindow_log->SetVisAttributes(window_vat)    
147                                                   
148                                                   
149   // cupboards: ******************************    
150                                                   
151   // cupboard 1:                                  
152   G4double cupboardDepth  = 38.0*cm; //X          
153   G4double cupboard1Width  = 91.0*cm; //Y         
154   G4double cupboard2Width  = 153.0*cm; //Y        
155   G4double cupboardHeight = 91.0*cm; //Z          
156   G4double woodThick      = 2.0*cm;               
157   G4double insideDepth  = cupboardDepth - 2.*w    
158   G4double inside1Width  = cupboard1Width - 2.    
159   G4double inside2Width  = cupboard2Width - 2.    
160   G4double insideHeight = cupboardHeight - 2.*    
161                                                   
162   //nb: cupboard orientation is sideways becau    
163   G4Box* cupboard_box = new G4Box                 
164    ("cupboard_box", 0.5*cupboardDepth, 0.5*cup    
165   G4Box* inside_box = new G4Box                   
166     ("inside_box", 0.5*insideDepth, 0.5*inside    
167   G4Box* shelf_box  = new G4Box                   
168     ("shelf_box", 0.5*insideDepth, 0.5*inside1    
169   G4Box* cupdoor_box = new G4Box                  
170     ("cupdoor_box", 0.5*woodThick+1.0*nanomete    
171 //    ("cupdoor_box", 0.5*woodThick, 0.25*insi    
172                                                   
173   G4RotationMatrix rotMatrixCupboard;             
174   rotMatrixCupboard.rotateY(0.0*deg);             
175                                                   
176   G4SubtractionSolid* cupboard_frame = new G4S    
177     ("cupboard_frame", cupboard_box, inside_bo    
178      (rotMatrixCupboard, G4ThreeVector(0.,0.,0    
179   G4UnionSolid* cupboard_shelf1 = new G4UnionS    
180     ("cupboard_shelf1", cupboard_frame, shelf_    
181      (rotMatrixCupboard, G4ThreeVector(0.,0.,0    
182   G4UnionSolid* cupboard_shelf2 = new G4UnionS    
183     ("cupboard_shelf2", cupboard_shelf1, shelf    
184      (rotMatrixCupboard, G4ThreeVector(0.,0.,-    
185   G4SubtractionSolid* cupboard_sol = new G4Sub    
186     ("cupboard_sol", cupboard_shelf2, cupdoor_    
187      (rotMatrixCupboard, G4ThreeVector            
188       (-0.5*(insideDepth+woodThick),0.25*insid    
189                                                   
190   cupboard_log = new G4LogicalVolume              
191     (cupboard_sol, cupboard_mat, "cupboard_log    
192                                                   
193   G4double cupb_X = 0.5*(labWidth - cupboardDe    
194   //  G4double cupb_Y = 0.5*(labLength - cupbo    
195   G4double cupb_Y = 0.5*labLength;                
196   G4double cupb_Z = 0.5*(labHeight - cupboardH    
197                                                   
198   for (G4int i=0; i<5; i++)                       
199     {                                             
200       cupb_Y -= cupboard1Width+2.0*cm;            
201       cupboard_phys = new G4PVPlacement           
202   (0, G4ThreeVector(cupb_X, cupb_Y, cupb_Z), "    
203    cupboard_log, lab_phys, false, i);             
204     }                                             
205                                                   
206   cupb_X  = -(0.5*(labWidth - cupboard1Width)     
207   G4double cupb_Y2 = -0.5*(labLength - cupboar    
208                                                   
209   G4RotationMatrix rotMatrixWallcupboard;         
210   rotMatrixWallcupboard.rotateZ(-90.0*deg);       
211                                                   
212   cupboard_phys = new G4PVPlacement               
213     (G4Transform3D                                
214      (rotMatrixWallcupboard,G4ThreeVector(cupb    
215       "cupboard_phys", cupboard_log, lab_phys,    
216                                                   
217                                                   
218   G4VisAttributes* cupboard_vat= new G4VisAttr    
219   cupboard_vat->SetVisibility(true);              
220   cupboard_vat->SetForceSolid(true);              
221   cupboard_log->SetVisAttributes(cupboard_vat)    
222                                                   
223   // cupboard 2 (bigger/wider) ***************    
224                                                   
225   G4Box* cupboard2_box = new G4Box                
226   ("cupboard2_box", 0.5*cupboardDepth, 0.5*cup    
227   G4Box* inside2_box = new G4Box                  
228     ("inside2_box", 0.5*insideDepth, 0.5*insid    
229   G4Box* shelf2_box  = new G4Box                  
230     ("shelf2_box", 0.5*insideDepth, 0.5*inside    
231   G4Box* cupdoor_box2 = new G4Box                 
232     ("cupdoor_box2", 0.5*woodThick+1.0*nanomet    
233 //    ("cupdoor_box2", 0.5*woodThick, 0.25*ins    
234                                                   
235   G4SubtractionSolid* cupboard2_frame = new G4    
236     ("cupboard2_frame", cupboard2_box, inside2    
237      (rotMatrixCupboard, G4ThreeVector(0.,0.,0    
238   G4UnionSolid* cupboard2_shelf1 = new G4Union    
239     ("cupboard2_shelf1", cupboard2_frame, shel    
240      (rotMatrixCupboard, G4ThreeVector(0.,0.,0    
241   G4UnionSolid* cupboard2_shelf2 = new G4Union    
242     ("cupboard2_shelf2", cupboard2_shelf1, she    
243      (rotMatrixCupboard, G4ThreeVector(0.,0.,0    
244   G4SubtractionSolid* cupboard2_sol = new G4Su    
245     ("cupboard2_sol", cupboard2_shelf2, cupdoo    
246      (rotMatrixCupboard, G4ThreeVector            
247       (-0.5*(insideDepth+woodThick),0.25*insid    
248                                                   
249   cupboard2_log = new G4LogicalVolume             
250     (cupboard2_sol, cupboard_mat, "cupboard2_l    
251                                                   
252   cupb_X = 0.5*(labWidth - cupboardDepth);        
253   //  cupb_Y = -(0.5*(labLength - cupboard2Wid    
254   cupb_Y -= 0.5*cupboard1Width + 0.5*cupboard2    
255                                + 2.0*cm; //usi    
256   //  cupb_Z = 0.5*(labHeight - cupboardHeight    
257                                                   
258   cupboard2_phys = new G4PVPlacement              
259     (0,G4ThreeVector(cupb_X, cupb_Y, cupb_Z),     
260       "cupboard2_phys", cupboard2_log, lab_phy    
261                                                   
262   cupb_X = -0.5*(labWidth - cupboardDepth);       
263   cupb_Y = -(0.5*(labLength - cupboard2Width)     
264                                                   
265   G4RotationMatrix rotMatrixWallcupboard2;        
266   rotMatrixWallcupboard2.rotateZ(-180.0*deg);     
267                                                   
268   cupboard2_phys = new G4PVPlacement              
269     (G4Transform3D                                
270      (rotMatrixWallcupboard2,G4ThreeVector(cup    
271       "cupboard2_phys", cupboard2_log, lab_phy    
272                                                   
273                                                   
274   cupboard2_log->SetVisAttributes(cupboard_vat    
275                                                   
276                                                   
277   // NOW add the (wooden) DOOR:                   
278                                                   
279   G4double doorWidth = 1.67*m;  //X               
280   G4double doorThick = 4.0*cm; //Y                
281   G4double doorHeight = 2.09*m; //Z               
282   G4double doorPosY = -0.5*(worldLength - door    
283   G4double doorPosZ = -0.5*(worldHeight - door    
284                                                   
285   G4Box* door_box = new G4Box                     
286   ("door_box",0.5*doorWidth, 0.5*doorThick, 0.    
287   door_log = new G4LogicalVolume(door_box, doo    
288   door_phys = new G4PVPlacement                   
289     (0, G4ThreeVector(0., doorPosY, doorPosZ),    
290      world_phys, false, 0);                       
291                                                   
292   G4VisAttributes* door_vat= new G4VisAttribut    
293   door_vat->SetVisibility(true);                  
294   door_vat->SetForceSolid(true);                  
295   door_log->SetVisAttributes(door_vat);           
296                                                   
297                                                   
298   // hole in wall between door and "lab": ****    
299                                                   
300   G4double doorholeThick = wallThick - doorThi    
301   G4double doorholePosY = -(0.5*(worldLength -    
302   G4double doorholePosZ = doorPosZ;               
303                                                   
304   G4Box* doorhole_box = new G4Box                 
305   ("doorhole_box",0.5*doorWidth, 0.5*doorholeT    
306   doorhole_log = new G4LogicalVolume(doorhole_    
307   doorhole_phys = new G4PVPlacement               
308     (0, G4ThreeVector(0., doorholePosY, doorho    
309      doorhole_log, world_phys, false, 0);         
310                                                   
311   G4VisAttributes* doorhole_vat= new G4VisAttr    
312   //  window_log->SetVisAttributes(G4VisAttrib    
313   doorhole_vat->SetVisibility(true);              
314   doorhole_log->SetVisAttributes(doorhole_vat)    
315                                                   
316                                                   
317   // desks: **********************************    
318   //now add Desks - wood, but have the opportu    
319   // Cupboard, Door and then desks                
320                                                   
321   // desk1 - no cupboard underneath - should b    
322                                                   
323   G4double desk1Depth  = 57.0*cm; //X             
324   G4double desk1Width  = 160.0*cm; //Y            
325   G4double desk1Height = 90.5*cm; //Z             
326   G4double deskThick      = 3.0*cm;               
327   G4double desk1_insideDepth  = desk1Depth - 2    
328   G4double desk1_insideWidth  = desk1Width - 2    
329   G4double desk1_insideHeight = desk1Height -     
330                                                   
331   //nb: desk orientation is sideways because t    
332   G4Box* desk1_box = new G4Box                    
333    ("desk1_box", 0.5*desk1Depth, 0.5*desk1Widt    
334   G4Box* desk1_inside_box = new G4Box             
335     ("desk1_inside_box", 0.5*desk1_insideDepth    
336      0.5*desk1_insideHeight);                     
337   G4Box* desk1_door_box = new G4Box               
338     ("desk1_door_box", 0.5*deskThick+1.0*nanom    
339      0.5*desk1_insideHeight);                     
340 //    ("desk1_door_box", 0.5*deskThick, 0.25*d    
341 //     0.5*desk1_insideHeight);                   
342                                                   
343   G4RotationMatrix rotMatrixDesk;                 
344   rotMatrixDesk.rotateY(0.0*deg);                 
345                                                   
346   G4SubtractionSolid* desk1_frame = new G4Subt    
347     ("desk1_frame", desk1_box, desk1_inside_bo    
348      (rotMatrixCupboard, G4ThreeVector(0.,0.,0    
349   G4SubtractionSolid* desk1_sol = new G4Subtra    
350     ("desk1_sol", desk1_frame, desk1_door_box,    
351      (rotMatrixCupboard, G4ThreeVector            
352       (-0.5*(desk1_insideDepth+deskThick),-0.2    
353                                                   
354   desk1_log = new G4LogicalVolume(desk1_sol, d    
355                                                   
356   G4double desk_X = 0.5*(labWidth - desk1Depth    
357   G4double desk_Y = -(0.5*(labLength - desk1Wi    
358   G4double desk_Z = 0.5*(desk1Height - labHeig    
359                                                   
360   desk1_phys = new G4PVPlacement                  
361   (0, G4ThreeVector(desk_X, desk_Y, desk_Z), "    
362    desk1_log, lab_phys, false, 0);                
363                                                   
364   G4VisAttributes* desk_vat= new G4VisAttribut    
365   desk_vat->SetVisibility(true);                  
366   desk_vat->SetForceSolid(true);                  
367   desk1_log->SetVisAttributes(desk_vat);          
368                                                   
369   // *****************                            
370   // desk2 (drawers):                             
371                                                   
372   G4double desk2Depth  = 57.0*cm; //X             
373   G4double desk2Width = 156.0*cm; //Y             
374   G4double desk2Height = desk1Height; //Z         
375                                                   
376   G4double desk2_insideDepth  = desk2Depth - 2    
377   G4double desk2_insideWidth  = desk2Width - 2    
378   G4double desk2_insideHeight = desk2Height -     
379                                                   
380   //nb: desk orientation is sideways because t    
381   G4Box* desk2_box = new G4Box                    
382    ("desk2_box", 0.5*desk2Depth, 0.5*desk2Widt    
383   G4Box* desk2_inside_box = new G4Box             
384     ("desk2_inside_box", 0.5*desk2_insideDepth    
385      0.5*desk2_insideHeight);                     
386   G4Box* desk2_door_box = new G4Box               
387     ("desk2_door_box", 0.5*deskThick+1.0*nanom    
388      0.5*desk2_insideHeight);                     
389 //    ("desk2_door_box", 0.5*deskThick, 0.2*de    
390 //     0.5*desk2_insideHeight);                   
391                                                   
392   G4SubtractionSolid* desk2_frame = new G4Subt    
393     ("desk2_frame", desk2_box, desk2_inside_bo    
394      (rotMatrixCupboard, G4ThreeVector(0.,0.,0    
395   G4SubtractionSolid* desk2_sol = new G4Subtra    
396     ("desk2_sol", desk2_frame, desk2_door_box,    
397      (rotMatrixCupboard, G4ThreeVector            
398       (-0.5*(desk2_insideDepth+deskThick),-0.2    
399                                                   
400   desk2_log = new G4LogicalVolume(desk2_sol, d    
401                                                   
402   desk_X = 0.5*(labWidth - desk2Depth);           
403   desk_Y += 0.5*(desk2Width + desk1Width) + 2.    
404   desk_Z = 0.5*(desk2Height - labHeight);         
405                                                   
406   desk2_phys = new G4PVPlacement                  
407   (0, G4ThreeVector(desk_X, desk_Y, desk_Z), "    
408    desk2_log, lab_phys, false, 0);                
409                                                   
410   desk2_log->SetVisAttributes(desk_vat);          
411                                                   
412   // *****************                            
413   // desk3 (cupboard underneath):                 
414                                                   
415   G4double desk3Depth  = 79.0*cm; //X             
416   G4double desk3Width = 160.0*cm; //Y             
417   G4double desk3Height = desk1Height; //Z         
418                                                   
419   G4double desk3_insideDepth  = desk3Depth - 2    
420   G4double desk3_insideWidth  = desk3Width - 2    
421   G4double desk3_insideHeight = desk3Height -     
422                                                   
423   //nb: desk orientation is sideways because t    
424   G4Box* desk3_box = new G4Box                    
425    ("desk3_box", 0.5*desk3Depth, 0.5*desk3Widt    
426   G4Box* desk3_inside_box = new G4Box             
427     ("desk3_inside_box", 0.5*desk3_insideDepth    
428      0.5*desk3_insideHeight);                     
429   G4Box* desk3_door_box = new G4Box               
430     ("desk3_door_box", 0.5*deskThick+1.0*nanom    
431 //    ("desk3_door_box", 0.5*deskThick, 0.15*d    
432 //     0.5*desk1_insideHeight);                   
433                                                   
434   G4SubtractionSolid* desk3_frame = new G4Subt    
435     ("desk3_frame", desk3_box, desk3_inside_bo    
436      (rotMatrixCupboard, G4ThreeVector(0.,0.,0    
437   G4SubtractionSolid* desk3_sol = new G4Subtra    
438     ("desk3_sol", desk3_frame, desk3_door_box,    
439      (rotMatrixCupboard, G4ThreeVector            
440       (-0.5*(desk3_insideDepth+deskThick),-0.3    
441                                                   
442   desk3_log = new G4LogicalVolume(desk3_sol, d    
443                                                   
444   desk_X = 0.5*(labWidth - desk3Depth);           
445   desk_Y += 0.5*(desk3Width + desk3Width) + 2.    
446   desk_Z = 0.5*(desk3Height - labHeight);         
447                                                   
448   desk3_phys = new G4PVPlacement                  
449   (0, G4ThreeVector(desk_X, desk_Y, desk_Z), "    
450    desk3_log, lab_phys, false, 0);                
451                                                   
452   desk3_log->SetVisAttributes(desk_vat);          
453                                                   
454                                                   
455   // *****************                            
456   // wooden radiator trunking - along LHS wall    
457                                                   
458   G4double trunkDepth  = 20.0*cm; //X             
459   G4double trunkWidth  = labLength; //Y           
460   G4double trunkHeight = desk1Height; //Z         
461   G4double trunkThick  = 3.0*cm;                  
462                                                   
463   // not 2.*trunkThick since only 2 sides of b    
464   G4double trunk_insideDepth  = trunkDepth - t    
465   G4double trunk_insideWidth  = trunkWidth;       
466   G4double trunk_insideHeight = trunkHeight -     
467                                                   
468   G4Box* trunk_box = new G4Box                    
469    ("trunk_box", 0.5*trunkDepth, 0.5*trunkWidt    
470   G4Box* trunk_inside_box = new G4Box             
471     ("trunk_inside_box", 0.5*trunk_insideDepth    
472      0.5*trunk_insideHeight);                     
473                                                   
474   trunk_log = new G4LogicalVolume(trunk_box, d    
475   trunk_inside_log = new G4LogicalVolume          
476                     (trunk_inside_box, lab_mat    
477                                                   
478   G4double trunk_X = -0.5*(labWidth - trunkDep    
479   G4double trunk_Y = 0.0*m;                       
480   G4double trunk_Z = -0.5*(labHeight - trunkHe    
481                                                   
482   trunk_phys = new G4PVPlacement                  
483   (0, G4ThreeVector(trunk_X, trunk_Y, trunk_Z)    
484    trunk_log, lab_phys, false, 0);                
485                                                   
486   G4double trunkinside_X = -0.5*(trunkDepth -     
487   G4double trunkinside_Y = 0.0*m;                 
488   G4double trunkinside_Z = -0.5*(trunkHeight -    
489                                                   
490   trunk_inside_phys = new G4PVPlacement           
491   (0, G4ThreeVector(trunkinside_X, trunkinside    
492       "trunk_inside_phys",trunk_inside_log, tr    
493                                                   
494   trunk_log->SetVisAttributes(desk_vat);          
495   trunk_inside_log->SetVisAttributes(window_va    
496                                                   
497   // *****************                            
498   // desk4,5,6 (actually 4 with multi-place id    
499                                                   
500   G4double desk4Depth  = 79.0*cm; //X             
501   G4double desk4Width  = 79.0*cm; //Y             
502   G4double desk4Height = desk1Height; //Z         
503                                                   
504   G4double desk4_insideDepth  = desk4Depth - 2    
505   G4double desk4_insideWidth  = desk4Width - 2    
506   G4double desk4_insideHeight = desk4Height -     
507                                                   
508   //nb: desk orientation is sideways because t    
509   G4Box* desk4_box = new G4Box                    
510    ("desk4_box", 0.5*desk4Depth, 0.5*desk4Widt    
511   G4Box* desk4_inside_box = new G4Box             
512     ("desk4_inside_box", 0.5*desk4_insideDepth    
513      0.5*desk4_insideHeight);                     
514   G4Box* desk4_door_box = new G4Box               
515     ("desk4_door_box", 0.5*deskThick+1.0*nanom    
516      0.5*desk4_insideHeight);                     
517 //    ("desk4_door_box", 0.5*deskThick, 0.45*d    
518 //     0.5*desk4_insideHeight);                   
519                                                   
520   G4SubtractionSolid* desk4_frame = new G4Subt    
521     ("desk4_frame", desk4_box, desk4_inside_bo    
522      (rotMatrixCupboard, G4ThreeVector(0.,0.,0    
523   G4SubtractionSolid* desk4_sol = new G4Subtra    
524     ("desk4_sol", desk4_frame, desk4_door_box,    
525      (rotMatrixCupboard, G4ThreeVector            
526       (0.5*(desk4_insideDepth+deskThick),0.,0.    
527                                                   
528   desk4_log = new G4LogicalVolume(desk4_sol, d    
529                                                   
530   desk_X = -0.5*(labWidth - desk4Depth) + trun    
531   desk_Y = -(0.5*(labLength - desk4Width) - 5.    
532   desk_Z = 0.5*(desk4Height - labHeight);         
533                                                   
534   G4double crateWidth  = 60.0*cm; //Y             
535   G4double crate_Y = 0.;                          
536                                                   
537   G4RotationMatrix rotMatrixDesk4;                
538   rotMatrixDesk4.rotateZ(0.0*deg);                
539                                                   
540   for (G4int j=0; j<3; j++)                       
541     {                                             
542       if( j == 2)                                 
543         {                                         
544     desk_Y += crateWidth;                         
545     crate_Y = desk_Y - 0.5*(desk4Width + crate    
546   }                                               
547       desk4_phys = new G4PVPlacement              
548   (G4Transform3D(rotMatrixDesk4, G4ThreeVector    
549    "desk4_phys", desk4_log, lab_phys, false, j    
550       desk_Y += desk4Width+2.0*cm;                
551     }                                             
552                                                   
553   desk4_log->SetVisAttributes(desk_vat);          
554                                                   
555   // *****************                            
556   // aluminium crate rack:                        
557                                                   
558   G4double crateDepth  = 64.0*cm; //X             
559   //  G4double crateWidth  = 60.0*cm; //Y - mo    
560   G4double crateHeight = 128.0*cm; //Z            
561   G4double crateThick  = 3.0*cm;                  
562                                                   
563   G4double crate_insideDepth  = crateDepth - 2    
564   G4double crate_insideWidth  = crateWidth - 2    
565   G4double crate_insideHeight = crateHeight -     
566                                                   
567   //nb: crate orientation is sideways because     
568   G4Box* crate_box = new G4Box                    
569    ("crate_box", 0.5*crateDepth, 0.5*crateWidt    
570   G4Box* crate_inside_box = new G4Box             
571     ("crate_inside_box", 0.5*crate_insideDepth    
572      0.5*crate_insideHeight);                     
573   G4Box* crate_front_box = new G4Box              
574     ("crate_front_box", 0.5*crateThick+1.0*nan    
575      0.5*crate_insideHeight);                     
576                                                   
577   G4SubtractionSolid* crate_frame = new G4Subt    
578     ("crate_frame", crate_box, crate_inside_bo    
579      (rotMatrixCupboard, G4ThreeVector(0.,0.,0    
580   G4SubtractionSolid* crate_sol = new G4Subtra    
581     ("crate_sol", crate_frame, crate_front_box    
582      (rotMatrixCupboard, G4ThreeVector            
583       (0.5*(crate_insideDepth+crateThick),0.,0    
584                                                   
585   crate_log = new G4LogicalVolume(crate_sol, c    
586                                                   
587   G4double crate_X = -0.5*(labWidth - crateDep    
588   // crate_Y defined previously (by desk spaci    
589   G4double crate_Z = 0.5*(crateHeight - labHei    
590                                                   
591   crate_phys = new G4PVPlacement                  
592   (0, G4ThreeVector(crate_X, crate_Y, crate_Z)    
593    crate_log, lab_phys, false, 0);                
594                                                   
595   G4VisAttributes* crate_vat= new G4VisAttribu    
596   crate_vat->SetVisibility(true);                 
597   crate_vat->SetForceSolid(true);                 
598   crate_log->SetVisAttributes(crate_vat);         
599                                                   
600 // clean room desks: *************************    
601                                                   
602 // first oblong desk (type "3"):                  
603   desk_X = -0.5*(labWidth - desk3Width) + 50.0    
604   desk_Y = 0.5*(labLength - desk3Width - 30.0*    
605   desk_Z = 0.5*(desk4Height - labHeight);         
606                                                   
607   G4RotationMatrix rotMatrixCleanDesk;            
608   rotMatrixCleanDesk.rotateZ(90.0*deg);           
609                                                   
610   desk3_phys = new G4PVPlacement                  
611     (G4Transform3D                                
612      (rotMatrixCleanDesk,G4ThreeVector(desk_X,    
613       "desk3_phys", desk3_log, lab_phys, false    
614                                                   
615 // square desk (type "4"):                        
616                                                   
617   desk_X += 0.5*desk3Width + 0.5*desk4Width; /    
618                                                   
619   rotMatrixCleanDesk.rotateZ(-180.0*deg);         
620   desk4_phys = new G4PVPlacement                  
621     (G4Transform3D                                
622   (rotMatrixCleanDesk, G4ThreeVector(desk_X, d    
623    "desk4_phys", desk4_log, lab_phys, false, 3    
624                                                   
625                                                   
626