Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DMXDetectorConstruction.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // --------------------------------------------------------------
28 // GEANT 4 - Underground Dark Matter Detector Advanced Example
29 //
30 // For information related to this code contact: Alex Howard
31 // e-mail: alexander.howard@cern.ch
32 // --------------------------------------------------------------
33 // Comments
34 //
35 // Underground Advanced
36 // by A. Howard and H. Araujo
37 // (27th November 2001)
38 //
39 // DetectorConstruction program
40 // --------------------------------------------------------------
41 
43 #include "DMXDetectorMessenger.hh"
44 
45 #include "DMXScintSD.hh"
46 #include "DMXPmtSD.hh"
47 
48 #include "G4SystemOfUnits.hh"
49 #include "G4Material.hh"
50 #include "G4MaterialTable.hh"
51 #include "G4Element.hh"
52 #include "G4Isotope.hh"
53 #include "G4UnitsTable.hh"
54 #include "G4Box.hh"
55 #include "G4Tubs.hh"
56 #include "G4Sphere.hh"
57 #include "G4UnionSolid.hh"
58 #include "G4SubtractionSolid.hh"
59 
60 #include "G4LogicalVolume.hh"
61 #include "G4PVPlacement.hh"
62 #include "G4ThreeVector.hh"
63 #include "G4RotationMatrix.hh"
64 #include "G4Transform3D.hh"
66 #include "G4LogicalSkinSurface.hh"
67 #include "G4OpBoundaryProcess.hh"
68 
69 #include "G4FieldManager.hh"
73 #include "G4EqMagElectricField.hh"
74 #include "G4ClassicalRK4.hh"
75 #include "G4ChordFinder.hh"
76 
77 #include "G4SDManager.hh"
78 
79 #include "G4VisAttributes.hh"
80 #include "G4Colour.hh"
81 
82 #include "G4UserLimits.hh"
83 
84 #include "G4RunManager.hh"
85 
86 
87 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
89 {
90  // create commands for interactive definition of time cuts:
91  detectorMessenger = new DMXDetectorMessenger(this);
92 
93  theUserLimitsForRoom = 0;
94  theUserLimitsForDetector = 0;
95  // default time cut = infinite
96  // - note also number of steps cut in stepping action = MaxNoSteps
97  theMaxTimeCuts = DBL_MAX;
98  theMaxStepSize = DBL_MAX;
99  theDetectorStepSize = DBL_MAX;
100  theRoomTimeCut = 1000. * nanosecond;
101  theMinEkine = 250.0*eV; // minimum kinetic energy required in volume
102  theRoomMinEkine = 250.0*eV; // minimum kinetic energy required in volume
103 
104 }
105 
106 
107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
109 {
110  delete theUserLimitsForRoom;
111  delete theUserLimitsForDetector;
112  delete detectorMessenger;
113 }
114 
115 
116 
117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
118 void DMXDetectorConstruction::DefineMaterials()
119 {
120 
121 #include "DMXDetectorMaterial.icc"
122 
123 }
124 
125 
126 /*
127 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
128 void DMXDetectorConstruction::DefineField() {
129 
130 #include "DMXDetectorField.icc"
131 
132 }
133 */
134 
135 
136 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
138 
139  DefineMaterials();
140 
141  // DefineField();
142 
143  // make colours
144  G4Colour white (1.0, 1.0, 1.0) ;
145  G4Colour grey (0.5, 0.5, 0.5) ;
146  G4Colour lgrey (.85, .85, .85) ;
147  G4Colour red (1.0, 0.0, 0.0) ;
148  G4Colour blue (0.0, 0.0, 1.0) ;
149  G4Colour cyan (0.0, 1.0, 1.0) ;
150  G4Colour magenta (1.0, 0.0, 1.0) ;
151  G4Colour yellow (1.0, 1.0, 0.0) ;
152  G4Colour orange (.75, .55, 0.0) ;
153  G4Colour lblue (0.0, 0.0, .75) ;
154  G4Colour lgreen (0.0, .75, 0.0) ;
155  G4Colour green (0.0, 1.0, 0.0) ;
156  G4Colour brown (0.7, 0.4, 0.1) ;
157 
158 
159  // un-used colours:
160  // G4Colour black (0.0, 0.0, 0.0) ;
161 
162 
163 
164  // Universe - room wall - CONCRETE ****************************************
165 
166  //NB: measured INSIDE of lab, therefore have to add twice wall thickness
167  G4double wallThick = 24.*cm;
168  G4double worldWidth = 470.0*cm + 2.*wallThick; // "x"
169  G4double worldLength = 690.0*cm + 2.*wallThick; // "y"
170  G4double worldHeight = 280.0*cm + 2.*wallThick; // "z"
171 
172  G4Box* world_box = new G4Box
173  ("world_box", 0.5*worldWidth, 0.5*worldLength, 0.5*worldHeight );
174  world_log = new G4LogicalVolume(world_box, world_mat, "world_log");
175  world_phys = new G4PVPlacement(0, G4ThreeVector(0.,0.,0.),
176  "world_phys", world_log, NULL, false,0);
177 
178  // G4VisAttributes* world_vat= new G4VisAttributes(white);
180  //world_vat->SetVisibility(true);
181  //world_vat->SetVisibility(false);
182  //world_log->SetVisAttributes(world_vat);
183 
184 
185  // Lab Space - AIR ********************************************************
186 
187  G4double labWidth = worldWidth - 2.*wallThick; //X
188  G4double labLength = worldLength - 2.*wallThick; //Y
189  G4double labHeight = worldHeight - 2.*wallThick; //Z
190 
191  G4Box* lab_box = new G4Box
192  ("lab_box", 0.5*labWidth, 0.5*labLength, 0.5*labHeight );
193  lab_log = new G4LogicalVolume(lab_box, lab_mat, "lab_log");
194  lab_phys = new G4PVPlacement(0, G4ThreeVector(0.,0.,0.), "lab_phys",
195  lab_log, world_phys, false,0);
196 
197  G4VisAttributes* lab_vat= new G4VisAttributes(white);
198  // lab_log->SetVisAttributes(G4VisAttributes::Invisible);
199  // lab_vat->SetVisibility(true);
200  lab_vat->SetVisibility(false);
201  lab_log->SetVisAttributes(lab_vat);
202 
203 // include room furniture: **************************************************
204 
205 #include "DMXDetectorRoom.icc"
206 
207  // Now start with detector assembly:
208 
209  // first LN2 cooling container: *******************************************
210 
211  G4double PosZ = -25.3*cm; // extra z-pos to correspond with height in lab
212 
213  G4double LN2jacketRadius = 107.5*mm;
214  G4double LN2jacketHeight = 590.0*mm;
215  G4double jacketHeight = 680.0*mm;
216  G4double jacketflangeHeight = 53.0*mm;
217  G4double LN2PosZ = 0.5*jacketHeight + 0.5*LN2jacketHeight
218  + jacketflangeHeight + PosZ;
219 
220  G4Tubs* LN2jacket_tube = new G4Tubs("LN2jacket_tube",
221  0.*cm, LN2jacketRadius, 0.5*LN2jacketHeight, 0.*deg, 360.*deg);
222  LN2jacket_log = new G4LogicalVolume
223  (LN2jacket_tube, LN2jacket_mat, "LN2jacket_log");
224  LN2jacket_phys = new G4PVPlacement(0, G4ThreeVector(0.,0.,LN2PosZ),
225  "LN2jacket_phys", LN2jacket_log, lab_phys, false,0);
226 
227  G4VisAttributes* LN2jacket_vat = new G4VisAttributes(lgrey);
228  // LN2jacket_log->SetVisAttributes(G4VisAttributes::Invisible);
229  // LN2jacket_vat->SetVisibility(true);
230  LN2jacket_log->SetVisAttributes(LN2jacket_vat);
231 
232  // LN2jacket vacuum: **********************
233 
234  G4double LN2jacketMetalThick = 2.0*mm;
235  G4double LN2vacuumRadius = LN2jacketRadius - LN2jacketMetalThick;
236  G4double LN2vacuumHeight = LN2jacketHeight - LN2jacketMetalThick;
237 
238  G4Tubs* LN2vacuum_tube = new G4Tubs("LN2vacuum_tube",
239  0.*cm, LN2vacuumRadius, 0.5*LN2vacuumHeight, 0.*deg, 360.*deg);
240  LN2vacuum_log = new G4LogicalVolume
241  (LN2vacuum_tube, vacuum_mat, "LN2vacuum_log");
242  LN2vacuum_phys = new G4PVPlacement(0, G4ThreeVector(0.,0.,0.),
243  "LN2vacuum_phys", LN2vacuum_log, LN2jacket_phys, false,0);
244 
246 
247  // LN2 vessel: ************************************************************
248 
249  G4double LN2Radius = 76.0*mm;
250  G4double LN2Height = 590.0*mm - 2.*LN2jacketMetalThick;
251  G4double LN2vesselRadius = LN2Radius + LN2jacketMetalThick;
252  G4double LN2vesselHeight = LN2Height;
253  G4double LN2vesselPosZ = 0.5*LN2vacuumHeight - 0.5*LN2vesselHeight;
254 
255  G4Tubs* LN2vessel_tube = new G4Tubs("LN2vessel_tube",
256  0.*cm, LN2vesselRadius, 0.5*LN2vesselHeight, 0.*deg, 360.*deg);
257  LN2vessel_log = new G4LogicalVolume
258  (LN2vessel_tube, LN2jacket_mat, "LN2vessel_log");
259  LN2vessel_phys = new G4PVPlacement(0, G4ThreeVector(0.,0.,LN2vesselPosZ),
260  "LN2vessel_phys", LN2vessel_log, LN2vacuum_phys, false,0);
261 
262  G4VisAttributes* LN2vessel_vat = new G4VisAttributes(lgrey);
263  // LN2vessel_log->SetVisAttributes(G4VisAttributes::Invisible);
264  // LN2vessel_vat->SetVisibility(true);
265  LN2vessel_log->SetVisAttributes(LN2vessel_vat);
266 
267 
268  // and finally LN2: *******************************************************
269 
270  G4Tubs* LN2_tube = new G4Tubs("LN2_tube",
271  0.*cm, LN2Radius, 0.5*LN2Height, 0.*deg, 360.*deg);
272  LN2_log = new G4LogicalVolume(LN2_tube, LN2_mat, "LN2_log");
273  LN2_phys = new G4PVPlacement(0, G4ThreeVector(0.,0.,0.),
274  "LN2_phys", LN2_log, LN2vessel_phys, false,0);
275 
276  G4VisAttributes* LN2_vat = new G4VisAttributes(green);
277  LN2_vat->SetVisibility(true);
278  LN2_log->SetVisAttributes(LN2_vat);
279 
280 
281  // outer vacuum jacket volume: stainless steel ****************************
282 
283  G4double jacketRadius = 127.5*mm;
284  // G4double jacketHeight = 680.0*mm; // defined above to get full-height
285  G4double jacketMetalThick = LN2jacketMetalThick;
286 
287  G4Tubs* jacket_tube = new G4Tubs("jacket_tube",
288  0.*cm, jacketRadius, 0.5*jacketHeight, 0.*deg, 360.*deg);
289  jacket_log = new G4LogicalVolume(jacket_tube, jacket_mat, "jacket_log");
290  jacket_phys = new G4PVPlacement(0, G4ThreeVector(0.,0.,PosZ),
291  "jacket_phys", jacket_log, lab_phys, false,0);
292 
293  G4VisAttributes* jacket_vat = new G4VisAttributes(grey);
294  // jacket_log->SetVisAttributes(G4VisAttributes::Invisible);
295  jacket_log->SetVisAttributes(jacket_vat);
296 
297 
298  // outer vacuum jacket flanges: stainless steel *************************
299 
300  G4double jacketflangeRadius = 127.5*mm;
301  // G4double jacketflangeHeight = 53.0*mm; // defined above to get full-height
302  G4double topjacketflangePosZ = 0.5*(jacketHeight+jacketflangeHeight);
303 
304  G4Tubs* jacketflange_tube = new G4Tubs("jacketflange_tube",
305  0.*cm, jacketflangeRadius, 0.5*jacketflangeHeight, 0.*deg, 360.*deg);
306  jacketflange_log = new G4LogicalVolume
307  (jacketflange_tube, jacketflange_mat, "jacketflange_log");
308  topjacketflange_phys = new G4PVPlacement
309  (0, G4ThreeVector(0.,0.,topjacketflangePosZ + PosZ),
310  "topjacketflange_phys", jacketflange_log, lab_phys, false,0);
311  bottomjacketflange_phys = new G4PVPlacement
312  (0, G4ThreeVector(0.,0.,-topjacketflangePosZ + PosZ),
313  "bottomjacketflange_phys", jacketflange_log, lab_phys, false,0);
314 
315  // jacketflange_log->SetVisAttributes(G4VisAttributes::Invisible);
316  jacketflange_log->SetVisAttributes(jacket_vat);
317 
318  // vacuum **************************************************************
319 
320  G4double vacuumRadius = jacketRadius - jacketMetalThick;
321  G4double vacuumHeight = jacketHeight - jacketMetalThick;
322 
323  G4Tubs* vacuum_tube = new G4Tubs("vacuum_tube",
324  0.*cm, vacuumRadius, 0.5*vacuumHeight, 0.*deg, 360.*deg);
325  vacuum_log = new G4LogicalVolume(vacuum_tube, vacuum_mat, "vacuum_log");
326  vacuum_phys = new G4PVPlacement(0, G4ThreeVector(0.,0.,0.),
327  "vacuum_phys", vacuum_log, jacket_phys, false,0);
328 
329  // G4VisAttributes* vacuum_vat= new G4VisAttributes(lgrey);
331 
332 
333  // copper cooling jacket volume: **************************************
334 
335  G4double copperMetalThick = 3.0*mm;
336  G4double copperRadius = 103.5*mm + copperMetalThick;
337  G4double copperHeight = 420.0*mm;
338  G4double copperInner = copperRadius - copperMetalThick;
339  G4double vesselHeight = 320.0*mm;
340  G4double copperVPos = 0.5*(vesselHeight-copperHeight) + 13.0*cm;
341  G4double coppertopThick = 1.0*cm;
342  G4double coppertopVPos = copperVPos + 0.5*(coppertopThick+copperHeight);
343 
344  G4Tubs* copper_tube = new G4Tubs("copper_tube",
345  copperInner, copperRadius, 0.5*copperHeight, 0.*deg, 360.*deg);
346  copper_log = new G4LogicalVolume(copper_tube, copper_mat, "copper_log");
347  copper_phys = new G4PVPlacement(0, G4ThreeVector(0.,0.,copperVPos),
348  "copper_phys", copper_log, vacuum_phys, false,0);
349 
350  G4Tubs* coppertop_tube = new G4Tubs("coppertop_tube",
351  0.*cm, copperRadius, 0.5*coppertopThick, 0.*deg, 360.*deg);
352  coppertop_log = new G4LogicalVolume
353  (coppertop_tube, copper_mat, "coppertop_log");
354  coppertop_phys = new G4PVPlacement(0,G4ThreeVector(0.,0.,coppertopVPos),
355  "coppertop_phys", coppertop_log, vacuum_phys, false,0);
356 
357  G4VisAttributes* copper_vat = new G4VisAttributes(orange);
358  // copper_log->SetVisAttributes(G4VisAttributes::Invisible);
359  copper_log->SetVisAttributes(copper_vat);
360  coppertop_log->SetVisAttributes(copper_vat);
361 
362  // inner vessel jacket volume: stainless steel ************************
363 
364  // G4double vesselHeight = 320.0*mm; // - moved earlier
365  G4double vesselMetalThick = jacketMetalThick;
366  G4double vesselRadius = 75.0*mm + vesselMetalThick;
367  G4double vesselflangeRadius = 101.5*mm;
368  G4double vesselflangeThick = 40.0*mm;
369  G4double PMTvesselRadius = 31.0*mm + vesselMetalThick;
370  G4double PMTvesselHeight = 152.0*mm;
371  G4double pmtvesselflangeRadius = 52.0*mm;
372  G4double pmtvesselflangeThick = 32.0*mm;
373  G4double vesselVPos = 7.0*cm;
374  G4double TotalvesselHeight = PMTvesselHeight + vesselHeight;
375 
376  G4Tubs* vessel_tube = new G4Tubs("vessel_tube",
377  0.*cm, vesselRadius, 0.5*vesselHeight, 0.*deg, 360.*deg);
378  G4Tubs* PMTvessel_tube = new G4Tubs("PMTvessel_tube",
379  0.*cm, PMTvesselRadius, 0.5*PMTvesselHeight, 0.*deg, 360.*deg);
380 
381  G4UnionSolid* vessel_sol = new G4UnionSolid
382  ("vessel_sol", vessel_tube, PMTvessel_tube,
384  G4ThreeVector(0,0,-0.5*(vesselHeight+PMTvesselHeight))));
385 
386  vessel_log = new G4LogicalVolume(vessel_sol, vessel_mat, "vessel_log");
387  vessel_phys = new G4PVPlacement(0, G4ThreeVector(0.,0.,vesselVPos),
388  "vessel_phys", vessel_log, vacuum_phys, false,0);
389 
390 
391  // flanges: 1=upper half (diff. inner diam.) 2=lower half
392  G4Tubs* vesseltop_flange1 = new G4Tubs("vesseltop_flange1",
393  0.*cm, vesselflangeRadius, 0.25*vesselflangeThick, 0.*deg, 360.*deg);
394  vesseltop_log1 = new G4LogicalVolume
395  (vesseltop_flange1, vessel_mat, "vesseltop_log1");
396  vesseltop_phys1 = new G4PVPlacement
397  (0,
398  G4ThreeVector(0.,0.,0.5*(vesselHeight+0.5*vesselflangeThick)+vesselVPos),
399  "vesseltop_phys1", vesseltop_log1, vacuum_phys, false,0);
400 
401  G4Tubs* vesseltop_flange2 = new G4Tubs("vesseltop_flange2",vesselRadius,
402  vesselflangeRadius, 0.25*vesselflangeThick, 0.*deg, 360.*deg);
403  vesseltop_log2 = new G4LogicalVolume
404  (vesseltop_flange2, vessel_mat, "vesseltop_log2");
405  vesseltop_phys2 = new G4PVPlacement
406  (0,
407  G4ThreeVector(0.,0.,0.5*(vesselHeight-0.5*vesselflangeThick)+vesselVPos),
408  "vesseltop_phys2", vesseltop_log2, vacuum_phys, false,0);
409 
410 
411  G4Tubs* vesselbottom_flange1 = new G4Tubs
412  ("vesselbottom_flange1",vesselRadius, vesselflangeRadius,
413  0.25*vesselflangeThick, 0.*deg, 360.*deg);
414  vesselbottom_log1 = new G4LogicalVolume
415  (vesselbottom_flange1, vessel_mat, "vesselbottom_log1");
416  vesselbottom_phys1 = new G4PVPlacement(0,
417  G4ThreeVector(0.,0.,-0.5*(vesselHeight-0.5*vesselflangeThick)+vesselVPos),
418  "vesselbottom_phys1", vesselbottom_log1, vacuum_phys, false,0);
419 
420  G4Tubs* vesselbottom_flange2 = new G4Tubs
421  ("vesselbottom_flange2",PMTvesselRadius, vesselflangeRadius,
422  0.25*vesselflangeThick, 0.*deg, 360.*deg);
423  vesselbottom_log2 = new G4LogicalVolume
424  (vesselbottom_flange2, vessel_mat, "vesselbottom_log2");
425  vesselbottom_phys2 = new G4PVPlacement(0,
426  G4ThreeVector(0.,0.,-0.5*(vesselHeight+0.5*vesselflangeThick)+vesselVPos),
427  "vesselbottom_phys2", vesselbottom_log2, vacuum_phys, false,0);
428 
429 
430  G4Tubs* pmtvesselbottom_flange1 = new G4Tubs
431  ("pmtvesselbottom_flange1", PMTvesselRadius, pmtvesselflangeRadius,
432  0.25*pmtvesselflangeThick, 0.*deg, 360.*deg);
433  pmtvesselbottom_log1 = new G4LogicalVolume
434  (pmtvesselbottom_flange1, vessel_mat, "pmtvesselbottom_log1");
435  pmtvesselbottom_phys1 = new G4PVPlacement(0, G4ThreeVector(0.,0.,
436  (-0.5*vesselHeight-PMTvesselHeight+vesselVPos+0.25*pmtvesselflangeThick)),
437  "pmtvesselbottom_phys1", pmtvesselbottom_log1, vacuum_phys, false,0);
438 
439  G4Tubs* pmtvesselbottom_flange2 = new G4Tubs
440  ("pmtvesselbottom_flange2", 0.*cm, pmtvesselflangeRadius,
441  0.25*pmtvesselflangeThick, 0.*deg, 360.*deg);
442  pmtvesselbottom_log2 = new G4LogicalVolume
443  (pmtvesselbottom_flange2, vessel_mat, "pmtvesselbottom_log2");
444  pmtvesselbottom_phys2 = new G4PVPlacement(0, G4ThreeVector(0.,0.,
445  -0.5*vesselHeight-PMTvesselHeight+vesselVPos-0.25*pmtvesselflangeThick),
446  "pmtvesselbottom_phys2", pmtvesselbottom_log2, vacuum_phys, false,0);
447 
448 
449  G4VisAttributes* vessel_vat = new G4VisAttributes(grey);
450  G4VisAttributes* pmtvessel_vat = new G4VisAttributes(yellow);
451  G4VisAttributes* pmtvessel_vat2 = new G4VisAttributes(green);
452  // vessel_log->SetVisAttributes(G4VisAttributes::Invisible);
453  // vessel_vat->SetForceSolid(true);
454  // pmtvessel_vat->SetForceSolid(true);
455  // pmtvessel_vat2->SetForceSolid(true);
456  vessel_log->SetVisAttributes(vessel_vat);
457  vesseltop_log1->SetVisAttributes(vessel_vat);
458  vesselbottom_log1->SetVisAttributes(vessel_vat);
459  vesseltop_log2->SetVisAttributes(pmtvessel_vat);
460  vesselbottom_log2->SetVisAttributes(pmtvessel_vat);
461  // pmtvesselbottom_log->SetVisAttributes(vessel_vat);
462  pmtvesselbottom_log1->SetVisAttributes(vessel_vat);
463  pmtvesselbottom_log2->SetVisAttributes(pmtvessel_vat2);
464 
465 
466 
467  // *********************************************************************
468  // grid#1 to mirror surface: 21.75 mm
469  // LXe height = 15.75 mm, gXe height = 6.00 mm
470  // NB: Increased liquid height by 1mm - to take away problem with
471  // over-lapping volumes/ring pronounced from liquid phase..........
472  // *********************************************************************
473 
474  // detector volume: gas phase ******************************************
475 
476  G4double mirrorVPos = 21.3*cm;
477  G4double gasGap = 6.0*mm;
478  G4double DetectorRadius = vesselRadius - vesselMetalThick;
479  G4double GXeHeight = TotalvesselHeight - mirrorVPos + gasGap;
480  G4double GXeVPos = 0.5*vesselHeight - 0.5*GXeHeight;
481 
482  G4Tubs* GXe_tube = new G4Tubs("GXe_tube",
483  0.*cm, DetectorRadius, 0.5*GXeHeight, 0.*deg, 360.*deg);
484  GXe_log = new G4LogicalVolume(GXe_tube, GXe_mat, "GXe_log");
485  GXe_phys = new G4PVPlacement(0, G4ThreeVector(0.,0.,GXeVPos),
486  "GXe_phys", GXe_log, vessel_phys, false,0);
487 
488  G4VisAttributes* GXe_vat = new G4VisAttributes(cyan);
489  // GXe_vat->SetForceSolid(true);
490  GXe_vat->SetVisibility(true);
491  GXe_log->SetVisAttributes(GXe_vat);
492 
493 
494  // liquid phase *******************************************************
495 
496  G4double LXeHeight = mirrorVPos - gasGap;
497  G4double PMTDetectorRadius = PMTvesselRadius - vesselMetalThick;
498  G4double PMTDetectorHeight = PMTvesselHeight;
499  G4double LXeTubeHeight = LXeHeight - PMTDetectorHeight;
500  G4double LXe_solVPos = -0.5*(LXeTubeHeight+PMTDetectorHeight);
501  G4double LXeVPos = -0.5*TotalvesselHeight + 0.5*LXeHeight;
502 
503  G4Tubs* LXe_tube = new G4Tubs("GXe_tube",
504  0.*cm, DetectorRadius, 0.5*LXeTubeHeight, 0.*deg, 360.*deg);
505  G4Tubs* PMTdetector_tube = new G4Tubs("PMTdetector_tube",
506  0.*cm, PMTDetectorRadius, 0.5*PMTDetectorHeight, 0.*deg, 360.*deg);
507 
508  G4UnionSolid* LXe_sol = new G4UnionSolid
509  ("LXe_sol", LXe_tube, PMTdetector_tube,
510  G4Transform3D(G4RotationMatrix(), G4ThreeVector(0,0,LXe_solVPos)));
511 
512  LXe_log = new G4LogicalVolume(LXe_sol, LXe_mat, "LXe_log");
513  LXe_phys = new G4PVPlacement(0, G4ThreeVector(0.*cm, 0.*cm, LXeVPos),
514  "LXe_phys", LXe_log, vessel_phys, false, 0);
515 
516  // attributes
517  G4VisAttributes* LXe_vat = new G4VisAttributes(lblue);
518  // LXe_vat->SetForceSolid(true);
519  LXe_vat->SetVisibility(true);
520  LXe_log->SetVisAttributes(LXe_vat);
521 
522 
523  // Gas phase vessel lagging - for optical properties:
524 
525  G4double laggingThickness = 10.*micrometer;
526  G4double laggingRadius = DetectorRadius - laggingThickness;
527 
528  G4Tubs* gaslag_tube = new G4Tubs("gaslag_tube", laggingRadius,
529  DetectorRadius, 0.5*GXeHeight, 0.*deg, 360.*deg);
530  gaslag_log = new G4LogicalVolume(gaslag_tube, vessel_mat, "gaslag_log");
531  gaslag_phys = new G4PVPlacement(0, G4ThreeVector(0.*cm, 0.*cm, 0.*cm),
532  "gaslag_phys", gaslag_log, GXe_phys, false, 0);
533 
534  // attributes
535  G4VisAttributes* gaslag_vat = new G4VisAttributes(lgreen);
536  // gaslag_vat->SetForceSolid(true);
537  gaslag_vat->SetVisibility(true);
538  gaslag_log->SetVisAttributes(gaslag_vat);
539 
540 
541  // liquid phase vessel lagging - for optical properties:
542 
543  G4double lagTubeRadius = DetectorRadius - laggingThickness;
544  G4double lagTubeHeight = LXeHeight - PMTDetectorHeight;
545  G4double lagPMTRadius = PMTDetectorRadius - laggingThickness;
546  G4double lagPMTHeight = PMTDetectorHeight;
547 
548  G4Tubs* liqLag_tube = new G4Tubs("liqlag_tube", lagTubeRadius,
549  DetectorRadius, 0.5*lagTubeHeight, 0.*deg, 360.*deg);
550  G4Tubs* lagPMT_tube = new G4Tubs("lagPMT_tube", lagPMTRadius,
551  PMTDetectorRadius, 0.5*lagPMTHeight, 0.*deg, 360.*deg);
552 
553  G4UnionSolid* liqLag_sol = new G4UnionSolid
554  ("liqLag_sol", liqLag_tube, lagPMT_tube,
555  G4Transform3D(G4RotationMatrix(),G4ThreeVector(0,0,LXe_solVPos)));
556 
557  liqLag_log = new G4LogicalVolume(liqLag_sol, vessel_mat, "liqLag_log");
558  liqLag_phys = new G4PVPlacement(0, G4ThreeVector(0.*cm, 0.*cm, 0.*cm),
559  "liqLag_phys", liqLag_log, LXe_phys, false, 0);
560 
561  // attributes
562  G4VisAttributes* liqLag_vat = new G4VisAttributes(magenta);
563  // liqLag_vat->SetForceSolid(true);
564  liqLag_vat->SetVisibility(true);
565  liqLag_log->SetVisAttributes(liqLag_vat);
566 
567 
568  // Vessel Wall Optical Surface definition:
569  G4OpticalSurface* OpVesselSurface = new G4OpticalSurface
570  ("VesselSurface", unified, polished, dielectric_metal);
571 
572  // created optical lagging onto vessel - to avoid clash between over-lapping
573  // liquid and gas phase - so removed below:
574  /*
575  G4LogicalBorderSurface* VesselSurface;
576  VesselSurface = new G4LogicalBorderSurface
577  ("Vessel", liqPhase_phys, vessel_phys, OpVesselSurface);
578  */
579 
580  const G4int NUM = 2;
581  G4double vessel_PP[NUM] = { 6.5*eV, 7.50*eV };
582  G4double vessel_REFL[NUM] = { 0.2, 0.2 };
584  vessel_mt->AddProperty("REFLECTIVITY", vessel_PP, vessel_REFL, NUM);
585  OpVesselSurface->SetMaterialPropertiesTable(vessel_mt);
586 
587  G4LogicalBorderSurface* VesselTopSurface;
588  VesselTopSurface = new G4LogicalBorderSurface
589  ("VesselTop", GXe_phys, vesseltop_phys1, OpVesselSurface);
590 
591  G4LogicalBorderSurface* VesselBottomSurface;
592  VesselBottomSurface = new G4LogicalBorderSurface
593  ("VesselBottom", LXe_phys, vesselbottom_phys2, OpVesselSurface);
594 
595  G4LogicalBorderSurface* GasVesselSurface;
596  GasVesselSurface = new G4LogicalBorderSurface
597  ("GasVessel", GXe_phys, gaslag_phys, OpVesselSurface);
598 
599  G4LogicalBorderSurface* LiquidVesselSurface;
600  LiquidVesselSurface = new G4LogicalBorderSurface
601  ("LiquidVessel", LXe_phys, liqLag_phys, OpVesselSurface);
602 
603 
604 
605  // Cu Shield **********************************************************
606 
607  G4double CuShieldHeight = 17.7*cm;
608  G4double CuShieldThickness = 2.4*mm;
609  G4double CuShieldOuterRadius = 3.0*cm;
610  G4double CuShieldInnerRadius = CuShieldOuterRadius-CuShieldThickness;
611  G4double CuShieldVPosition = -0.5*LXeTubeHeight - PMTDetectorHeight
612  + 0.5*CuShieldHeight;
613 
614  // Zero co-ordinate of the union is the zero of the first volume,
615  // i.e. the offset is still present
616 
617  G4Tubs* CuShield_tube = new G4Tubs("CuShield_tube", CuShieldInnerRadius,
618  CuShieldOuterRadius, 0.5*CuShieldHeight, 0.*deg, 360.*deg);
619  CuShield_log = new G4LogicalVolume(CuShield_tube, CuShield_mat,
620  "CuShield_log");
621  CuShield_phys = new G4PVPlacement(0,
622  G4ThreeVector(0.*cm, 0.*cm, CuShieldVPosition),
623  "CuShield_phys", CuShield_log, LXe_phys, false, 0);
624 
625  // G4VisAttributes* CuShield_vat= new G4VisAttributes(magenta);
626  G4VisAttributes* CuShield_vat = new G4VisAttributes(brown);
627  // CuShield_vat->SetForceSolid(true);
628  CuShield_vat->SetVisibility(true);
629  CuShield_log->SetVisAttributes(CuShield_vat);
630 
631  // Cu shield surface
632  G4double sigalpha;
633  G4OpticalSurface* OpCuShieldSurface = new G4OpticalSurface
634  ("ShieldSurface", unified, ground, dielectric_metal, sigalpha=30.0*deg);
635  G4LogicalBorderSurface* ShieldSurface;
636  ShieldSurface = new G4LogicalBorderSurface
637  ("Shield", LXe_phys, CuShield_phys, OpCuShieldSurface);
638 
639  G4double CuShield_PP[NUM] = { 7.0*eV, 7.50*eV };
640  G4double CuShield_REFL[NUM] = { 0.3, 0.2 };
642  CuShield_mt->AddProperty("REFLECTIVITY", CuShield_PP, CuShield_REFL, NUM);
643  OpCuShieldSurface->SetMaterialPropertiesTable(CuShield_mt);
644 
645 
646  // rings ***************************************************************
647 
648  G4double ringHeight = 4.*mm;
649  G4double ringOuterRadius = 4.0*cm;
650  G4double ringInnerRadius = CuShieldOuterRadius;
651  G4double ringVOffset = 0.5*ringHeight;
652  G4double ringVPosition = -0.5*GXeHeight + gasGap +ringVOffset;
653 
654  G4Tubs* ring_tube=new G4Tubs("ring_tube", ringInnerRadius,
655  ringOuterRadius, 0.5*ringHeight, 0.*deg, 360.*deg);
656  ring_log = new G4LogicalVolume(ring_tube, ring_mat, "ring_log");
657 
658  // optical surface: ring materials table
659  G4double ring_PP[NUM] = { 6.00*eV, 7.50*eV };
660  G4double ring_REFL[NUM] = { 0.7, 0.65 };
662  ring_mt->AddProperty("REFLECTIVITY", ring_PP, ring_REFL, NUM);
663 
664  G4OpticalSurface* OpRingSurface = new G4OpticalSurface
665  ("RingSurface", unified, ground, dielectric_metal, sigalpha=10.*deg);
666  // last argument is surface roughness if it's non-polished - i.e. ground
667  OpRingSurface->SetMaterialPropertiesTable(ring_mt);
668 
669  // rings inside gas phase
670  ring_phys_gas[0] = new G4PVPlacement(0, G4ThreeVector
671  (0.*cm, 0.*cm, ringVPosition),"ring_phys0",ring_log,GXe_phys,false, 0);
672  G4LogicalBorderSurface* RingSurface_gas0;
673  RingSurface_gas0 = new G4LogicalBorderSurface
674  ("Ring", GXe_phys, ring_phys_gas[0], OpRingSurface);
675 
676  ring_phys_gas[1] = new G4PVPlacement(0,
677  G4ThreeVector(0.*cm, 0.*cm, ringVPosition-=ringHeight+1.0*mm),
678  "ring_phys1",ring_log, GXe_phys, false, 0);
679  G4LogicalBorderSurface* RingSurface_gas1;
680  RingSurface_gas1 = new G4LogicalBorderSurface
681  ("Ring", GXe_phys, ring_phys_gas[1], OpRingSurface);
682 
683 
684  // rings inside liquid phase:
685  ringVPosition = 0.5*LXeTubeHeight;
686 
687  ring_phys_liq[0] = new G4PVPlacement(0,
688  G4ThreeVector(0.*cm, 0.*cm, ringVPosition-=0.5*ringHeight),
689  "ring_phys2",ring_log,LXe_phys, false, 0);
690  G4LogicalBorderSurface* RingSurface_liq0;
691  RingSurface_liq0 = new G4LogicalBorderSurface
692  ("Ring", LXe_phys, ring_phys_liq[0], OpRingSurface);
693 
694  ring_phys_liq[1] = new G4PVPlacement(0,
695  G4ThreeVector(0.*cm, 0.*cm, ringVPosition-=ringHeight+1.75*mm),
696  "ring_phys3",ring_log, LXe_phys, false, 0);
697  G4LogicalBorderSurface* RingSurface_liq1;
698  RingSurface_liq1 = new G4LogicalBorderSurface
699  ("Ring", LXe_phys, ring_phys_liq[1], OpRingSurface);
700 
701  ring_phys_liq[2]=new G4PVPlacement(0,
702  G4ThreeVector(0.*cm, 0.*cm, ringVPosition-=ringHeight),
703  "ring_phys4",ring_log, LXe_phys, false, 0);
704  G4LogicalBorderSurface* RingSurface_liq2;
705  RingSurface_liq2 = new G4LogicalBorderSurface
706  ("Ring", LXe_phys, ring_phys_liq[2], OpRingSurface);
707 
708  ring_phys_liq[3]=new G4PVPlacement(0,
709  G4ThreeVector(0.*cm, 0.*cm, ringVPosition-=ringHeight),
710  "ring_phys5",ring_log, LXe_phys, false, 0);
711  G4LogicalBorderSurface* RingSurface_liq3;
712  RingSurface_liq3 = new G4LogicalBorderSurface
713  ("Ring", LXe_phys, ring_phys_liq[3], OpRingSurface);
714 
715  ring_phys_liq[4]=new G4PVPlacement(0,
716  G4ThreeVector(0.*cm, 0.*cm, ringVPosition-=ringHeight+1.75*mm),
717  "ring_phys6",ring_log, LXe_phys,false, 0);
718  G4LogicalBorderSurface* RingSurface_liq4;
719  RingSurface_liq4 = new G4LogicalBorderSurface
720  ("Ring", LXe_phys, ring_phys_liq[4], OpRingSurface);
721 
722  ring_phys_liq[5]=new G4PVPlacement(0,
723  G4ThreeVector(0.*cm, 0.*cm, ringVPosition-=ringHeight+1.75*mm),
724  "ring_phys7",ring_log, LXe_phys,false, 0);
725  G4LogicalBorderSurface* RingSurface_liq5;
726  RingSurface_liq5 = new G4LogicalBorderSurface
727  ("Ring", LXe_phys, ring_phys_liq[5], OpRingSurface);
728 
729 
730  G4VisAttributes* ring_vat= new G4VisAttributes(lgrey);
731  ring_vat->SetVisibility(true);
732  ring_log->SetVisAttributes(ring_vat);
733 
734 
735  // Mirror *************************************************************
736 
737  G4double mirrorHeight = 2.0*mm;
738  G4double mirrorRadius = ringInnerRadius;
739  G4double mirrorVOffset = 0.5*ringHeight;
740  G4double mirrorVPosition = -0.5*GXeHeight + gasGap +mirrorVOffset;
741 
742  G4Tubs* mirror_tube = new G4Tubs("mirror_tube", 0.*cm, mirrorRadius,
743  0.5*mirrorHeight, 0.*deg, 360.*deg);
744  mirror_log = new G4LogicalVolume(mirror_tube, mirror_mat, "mirror_log");
745  mirror_phys = new G4PVPlacement(0,
746  G4ThreeVector(0.*cm, 0.*cm, mirrorVPosition),
747  "mirror_phys", mirror_log, GXe_phys, false, 0);
748 
749  G4VisAttributes* mirror_vat = new G4VisAttributes(cyan);
750  mirror_vat->SetVisibility(true);
751  // mirror_vat->SetForceSolid(true);
752  mirror_log->SetVisAttributes(mirror_vat);
753 
754 
755  // mirror surface
756  G4OpticalSurface * OpMirrorSurface = new G4OpticalSurface
757  ("MirrorSurface", unified, ground, dielectric_metal, sigalpha=5.0*deg);
758  G4LogicalBorderSurface* MirrorSurface;
759  MirrorSurface = new G4LogicalBorderSurface
760  ("Mirror", GXe_phys, mirror_phys, OpMirrorSurface);
761 
762  G4double mirror_PP[NUM] = { 6.00*eV, 7.50*eV };
763  G4double mirror_REFL[NUM] = { 0.83, 0.78 };
765  mirror_mt->AddProperty("REFLECTIVITY", mirror_PP, mirror_REFL, NUM);
766  OpMirrorSurface->SetMaterialPropertiesTable(mirror_mt);
767 
768 
769  // Grids *************************************************************
770 
771  G4double gridHeight = 0.100*mm;
772  G4double gridRadius = ringInnerRadius;
773  G4double grid1VOffset = 3.5*ringHeight+1.75*mm;
774  G4double grid1VPosition = 0.5*LXeTubeHeight - grid1VOffset;
775  G4double grid2VOffset = 4.5*ringHeight+3.50*mm;
776  G4double grid2VPosition = 0.5*LXeTubeHeight - grid2VOffset;
777 
778  G4Tubs* grid_tube = new G4Tubs("grid_tube", 0.*cm, gridRadius,
779  0.5*gridHeight, 0.*deg, 360.*deg);
780 
781  grid1_log = new G4LogicalVolume(grid_tube, grid_mat, "grid1_log");
782  grid1_phys = new G4PVPlacement(0,G4ThreeVector(0.*cm, 0.*cm, grid1VPosition),
783  "grid1_phys", grid1_log, LXe_phys, false, 0);
784  grid2_log = new G4LogicalVolume(grid_tube, grid_mat, "grid2_log");
785  grid2_phys = new G4PVPlacement(0,G4ThreeVector(0.*cm, 0.*cm, grid2VPosition),
786  "grid2_phys", grid2_log, LXe_phys, false, 0);
787 
788  G4VisAttributes* grid_vat = new G4VisAttributes(red);
789  grid_vat->SetVisibility(true);
790  grid1_log->SetVisAttributes(grid_vat);
791  grid2_log->SetVisAttributes(grid_vat);
792 
793 
794  // alpha source holder ************************************************
795 
796  G4double alphaHeight = 0.7*mm; // total lead thickness = 1.23 mm
797  G4double recessHeight = 0.3*mm; // totals lead thickness = 1.23 mm
798  G4double alphaRadius = 1.2*mm; // was 0.8
799  G4double recessRadius = 0.35*mm; // was 0.5 was 0.2
800  G4double recessVPosition = 0.5*(alphaHeight - recessHeight);
801 
802  G4double alphaVOffset = grid1VOffset-0.5*alphaHeight - gridHeight;
803  G4double americiumHeight = 3000.*nanometer; // assumes ~1% Am
804  G4double extra_offset = (recessHeight +0.3*mm + 0.5*americiumHeight);
805  G4double alphaVPosition = 0.5*LXeTubeHeight - alphaVOffset + extra_offset;
806 
807  G4Tubs* alpha_tube = new G4Tubs("alpha_tube", 0.*cm, alphaRadius,
808  0.5*alphaHeight, 0.*deg, 360.*deg);
809  G4Tubs* recess_tube = new G4Tubs("recess_tube", 0.*cm, recessRadius,
810  0.5*recessHeight, 0.*deg, 360.*deg);
811 
812  G4SubtractionSolid* alpha_sol = new G4SubtractionSolid
813  ("alpha_sol", alpha_tube, recess_tube, G4Transform3D
814  (G4RotationMatrix(), G4ThreeVector(0. ,0. , recessVPosition)));
815  alpha_log = new G4LogicalVolume(alpha_sol, alpha_mat, "alpha_log");
816 
817  alpha_phys = new G4PVPlacement(0, G4ThreeVector(0., 0., alphaVPosition),
818  "alpha_phys", alpha_log, LXe_phys, false, 0);
819 
820  G4VisAttributes* alpha_vat = new G4VisAttributes(white);
821  alpha_vat->SetVisibility(true);
822  alpha_log ->SetVisAttributes(alpha_vat);
823 
824  // alpha source HOLDER surface
825  G4OpticalSurface* OpAlphaSurface = new G4OpticalSurface("AlphaSurface",
826  unified, ground, dielectric_metal, sigalpha=20.0*deg);
827  G4LogicalBorderSurface* AlphaSurface;
828  AlphaSurface = new G4LogicalBorderSurface
829  ("Alpha", LXe_phys, alpha_phys, OpAlphaSurface);
830 
831  G4double alpha_PP[NUM] = { 6.00*eV, 7.50*eV };
832  G4double alpha_REFL[NUM] = { 0.05, 0.05 };
834  alpha_mt->AddProperty("REFLECTIVITY", alpha_PP, alpha_REFL, NUM);
835  OpAlphaSurface->SetMaterialPropertiesTable(alpha_mt);
836 
837  // americium ***********************************************************
838 
839  // moved above for the "extra_offset":
840  // G4double americiumHeight = 600.*nanometer; // assumes ~1% Am
841  G4double americiumRadius = recessRadius - 50.0*micrometer;
842  G4double americiumVOffset = 0.5*(alphaHeight-americiumHeight)-recessHeight;
843  G4double americiumVPosition = americiumVOffset;
844 
845  sourceZ = vesselVPos + LXeVPos + alphaVPosition + americiumVPosition + PosZ;
846  G4cout << G4endl << "Calibration source centre (X,Y,Z): 0, 0, "
847  << sourceZ/mm << " mm" << G4endl;
848 
849  G4Tubs* americium_tube = new G4Tubs("americium_tube", 0.*cm,
850  americiumRadius, 0.5*americiumHeight, 0.*deg, 360.*deg);
851  americium_log = new G4LogicalVolume(americium_tube, americium_mat,
852  "americium_log");
853  americium_phys = new G4PVPlacement(0, G4ThreeVector(0., 0.,
854  americiumVPosition),"americium_phys", americium_log, alpha_phys,false,0);
855 
856  // americium optical properties:
857  G4OpticalSurface* OpAmericiumSurface = new G4OpticalSurface
858  ("AmericiumSurface", unified, ground, dielectric_metal, sigalpha=5.0*deg);
859  G4LogicalBorderSurface* AmericiumSurface;
860  AmericiumSurface = new G4LogicalBorderSurface
861  ("Americium", LXe_phys, americium_phys, OpAmericiumSurface);
862 
863  G4double americium_PP[NUM] = { 6.00*eV, 7.50*eV };
864  G4double americium_REFL[NUM] = { 0.7, 0.65 };
866  americium_mt->AddProperty("REFLECTIVITY", americium_PP, americium_REFL, NUM);
867  OpAlphaSurface->SetMaterialPropertiesTable(americium_mt);
868 
869  G4VisAttributes* americium_vat= new G4VisAttributes(cyan);
870  americium_vat->SetVisibility(true);
871  americium_vat->SetForceSolid(true);
872  americium_log->SetVisAttributes(americium_vat);
873 
874 
875  // Photomultiplier: ETL 9829 QA ****************************************
876 
877  G4double pmtHeight = 12.0*cm;
878  G4double pmtRadius = 2.6*cm;
879  G4double pmtVOffset = 1.0*cm;
880  G4double pmtVPosition = -0.5*(LXeTubeHeight+pmtHeight)+pmtVOffset;
881 
882  G4Sphere* pmt_window = new G4Sphere("pmt_sphere", 0.*cm, 2.*pmtRadius,
883  0.*deg, 360.*deg, 0.*deg, 30.0*deg);
884  G4Tubs* pmt_tube = new G4Tubs("pmt_tube", 0.*cm, pmtRadius, 0.5*pmtHeight,
885  0.*deg, 360.*deg);
886 
887  G4UnionSolid* pmt_sol = new G4UnionSolid("pmt_sol", pmt_tube, pmt_window,
888  G4Transform3D(G4RotationMatrix(), G4ThreeVector(0,0,0.5*pmtHeight
889  -2.*pmtRadius*std::cos(30.0*deg))));
890 
891  pmt_log = new G4LogicalVolume(pmt_sol, pmt_mat, "pmt_log");
892  pmt_phys = new G4PVPlacement(0,G4ThreeVector(0.*cm, 0.*cm, pmtVPosition),
893  "pmt_phys", pmt_log, LXe_phys, false, 0);
894 
895  G4OpticalSurface* pmt_opsurf = new G4OpticalSurface
896  ("pmt_opsurf",unified, polished, dielectric_dielectric);
897  G4LogicalBorderSurface* pmt_surf;
898  pmt_surf = new G4LogicalBorderSurface
899  ("pmt_surf", LXe_phys, pmt_phys, pmt_opsurf);
900 
901  G4VisAttributes* pmt_vat= new G4VisAttributes(blue);
902  pmt_vat->SetForceSolid(true);
903  pmt_vat->SetVisibility(true);
904  pmt_log->SetVisAttributes(pmt_vat);
905 
906 
907  // photocathode *******************************************************
908 
909  G4double phcathVOffset = 0.5*pmtHeight-2.*pmtRadius*std::cos(30.0*deg);
910  G4double phcathVPosition = phcathVOffset;
911 
912  G4Sphere* phcath_sol = new G4Sphere("phcath_sphere",
913  2.*pmtRadius-1.6*mm, 2.*pmtRadius-1.59*mm, 0.*deg, 360.*deg, 0.*deg,
914  27.0*deg);
915 
916  phcath_log = new G4LogicalVolume(phcath_sol, phcath_mat, "phcath_log");
917  phcath_phys = new G4PVPlacement(0, G4ThreeVector(0., 0., phcathVPosition),
918  "phcath_phys", phcath_log, pmt_phys, false, 0);
919 
920  G4OpticalSurface* phcath_opsurf = new G4OpticalSurface("phcath_opsurf",
922  G4LogicalBorderSurface* phcath_surf;
923  phcath_surf = new G4LogicalBorderSurface
924  ("phcath_surf", pmt_phys, phcath_phys, phcath_opsurf);
925 
926  G4double phcath_PP[NUM] = { 6.00*eV, 7.50*eV };
927  G4double phcath_REFL[NUM] = { 0.0, 0.0};
929  phcath_mt->AddProperty("REFLECTIVITY", phcath_PP, phcath_REFL, NUM);
930  phcath_opsurf->SetMaterialPropertiesTable(phcath_mt);
931 
932  G4VisAttributes* phcath_vat= new G4VisAttributes(lblue);
933  phcath_vat->SetForceSolid(true);
934  phcath_vat->SetVisibility(true);
935  phcath_log->SetVisAttributes(phcath_vat);
936 
937 
938  // ......................................................................
939  // attach user limits ...................................................
940 
941 
942  G4cout << G4endl << "User Limits: " << G4endl
943  << "\t theMaxTimeCuts: " << G4BestUnit(theMaxTimeCuts,"Time")
944  << G4endl
945  << "\t theRoomTimeCut: " << G4BestUnit(theRoomTimeCut,"Time")
946  << G4endl
947  << "\t theMaxStepSize: " << G4BestUnit(theMaxStepSize,"Length")
948  << G4endl
949  << "\t theMinEKine: " << G4BestUnit(theMinEkine,"Energy")
950  << G4endl
951  << "\t minRoomMinEKine: " << G4BestUnit(theRoomMinEkine,"Energy")
952  << G4endl << G4endl;
953 
954  if (theUserLimitsForRoom != 0) delete theUserLimitsForRoom;
955  if (theUserLimitsForDetector != 0) delete theUserLimitsForDetector;
956 
957  theUserLimitsForRoom = new G4UserLimits(theMaxStepSize, // step length max
958  DBL_MAX, // track length max
959  theRoomTimeCut, // Time cut
960  theRoomMinEkine); // min energy
961 
962 #include "DMXDetectorRoomLimits.icc"
963 
964  theUserLimitsForDetector = new G4UserLimits(theDetectorStepSize,
965  DBL_MAX, // Track Max
966  theMaxTimeCuts,
967  theMinEkine);
968 
969  world_log->SetUserLimits(theUserLimitsForRoom);
970  lab_log->SetUserLimits(theUserLimitsForRoom);
971  jacket_log->SetUserLimits(theUserLimitsForRoom);
972  vacuum_log->SetUserLimits(theUserLimitsForRoom);
973  vessel_log->SetUserLimits(theUserLimitsForRoom);
974  GXe_log->SetUserLimits(theUserLimitsForDetector);
975  // LXe_log->SetUserLimits(theUserLimitsForXenon);
976  LXe_log->SetUserLimits(theUserLimitsForDetector);
977  CuShield_log->SetUserLimits(theUserLimitsForDetector);
978  ring_log->SetUserLimits(theUserLimitsForDetector);
979  mirror_log->SetUserLimits(theUserLimitsForDetector);
980  grid1_log->SetUserLimits(theUserLimitsForDetector);
981  grid2_log->SetUserLimits(theUserLimitsForDetector);
982  alpha_log->SetUserLimits(theUserLimitsForDetector);
983  americium_log->SetUserLimits(theUserLimitsForDetector);
984  pmt_log->SetUserLimits(theUserLimitsForDetector);
985  phcath_log->SetUserLimits(theUserLimitsForDetector);
986 
987 
988  // ......................................................................
989  // sensitive detectors ..................................................
990 
992 
993  G4String name="/DMXDet/LXeSD";
994  LXeSD = new DMXScintSD(name, this);
995  SDman->AddNewDetector(LXeSD);
996  LXe_log->SetSensitiveDetector(LXeSD);
997 
998  SDman = G4SDManager::GetSDMpointer();
999  name="/DMXDet/pmtSD";
1000  pmtSD = new DMXPmtSD(name, this);
1001  SDman->AddNewDetector(pmtSD);
1002  phcath_log->SetSensitiveDetector(pmtSD);
1003 
1004  return world_phys;
1005 
1006 }
1007 
1008 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1009 
1010 // specific method to G4UserLimits:= SetUserMinEkine
1012 {
1013  // set minimum charged particle energy cut - NB: for ROOM
1014  theRoomMinEkine = val;
1015  if (theUserLimitsForRoom != 0)
1016  {
1017  theUserLimitsForRoom->SetUserMinEkine(val);
1018  G4cout << " Changing Room energy cut to: " << G4BestUnit(val,"Energy")
1019  << G4endl;
1020  }
1021 }
1022 
1023 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1024 
1025 // specific method to G4UserLimits:= SetUserMinEkine
1027 {
1028  // set minimum charged particle energy cut - NB: for Xenon Detector
1029  theMinEkine = val;
1030  if (theUserLimitsForDetector != 0)
1031  {
1032  theUserLimitsForDetector->SetUserMinEkine(val);
1033  G4cout << "Changing Detector energy cut to: " << G4BestUnit(val,"Energy")
1034  << G4endl;
1035  }
1036 }
1037 
1038 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1039 
1040 // specific method to G4UserLimits:= SetUserMaxTime
1042 {
1043  // set room time cut:
1044  theRoomTimeCut = val;
1045  if (theUserLimitsForRoom != 0)
1046  {
1047  theUserLimitsForRoom->SetUserMaxTime(val);
1048  G4cout << " Changing Room Time cut to: " << G4BestUnit(val,"Time")
1049  << G4endl;
1050  }
1051 }
1052 
1053 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1054 
1055 // specific method to G4UserLimits:= SetUserMaxTime
1057 {
1058  // set detector time cut:
1059  theMaxTimeCuts = val;
1060  if (theUserLimitsForDetector != 0)
1061  {
1062  theUserLimitsForDetector->SetUserMaxTime(val);
1063  G4cout << " Changing Detector Time cut to: " << G4BestUnit(val,"Time")
1064  << G4endl;
1065  }
1066 }
1067 
1068 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1069 
1070 //void DMXDetectorConstruction::UpdateGeometry()
1071 //{
1072 // G4RunManager::GetRunManager()->DefineWorldVolume(Construct());
1073 //}
1074 
1075 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1076 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
1077 
1078