Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LXeDetectorConstruction.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 //
28 //
29 //
31 #include "LXePMTSD.hh"
32 #include "LXeScintSD.hh"
33 #include "LXeDetectorMessenger.hh"
34 #include "LXeMainVolume.hh"
35 #include "LXeWLSSlab.hh"
36 
37 #include "G4SDManager.hh"
38 #include "G4RunManager.hh"
40 #include "G4LogicalSkinSurface.hh"
41 #include "G4OpticalSurface.hh"
42 #include "G4MaterialTable.hh"
43 #include "G4VisAttributes.hh"
44 #include "G4Material.hh"
45 #include "G4Box.hh"
46 #include "G4Tubs.hh"
47 #include "G4Sphere.hh"
48 #include "G4LogicalVolume.hh"
49 #include "G4ThreeVector.hh"
50 #include "G4PVPlacement.hh"
51 #include "globals.hh"
52 #include "G4SolidStore.hh"
53 #include "G4LogicalVolumeStore.hh"
54 #include "G4PhysicalVolumeStore.hh"
55 #include "G4GeometryManager.hh"
56 #include "G4UImanager.hh"
57 #include "G4PhysicalConstants.hh"
58 #include "G4SystemOfUnits.hh"
59 
60 G4bool LXeDetectorConstruction::fSphereOn = true;
61 
62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
63 
65 : fLXe_mt(NULL), fMPTPStyrene(NULL)
66 {
67  fExperimentalHall_box = NULL;
68  fExperimentalHall_log = NULL;
69  fExperimentalHall_phys = NULL;
70 
71  fLXe = fAl = fAir = fVacuum = fGlass = NULL;
72  fPstyrene = fPMMA = fPethylene1 = fPethylene2 = NULL;
73 
74  fN = fO = fC = fH = NULL;
75 
76  fUpdated = false;
77 
78  SetDefaults();
79 
80  fDetectorMessenger = new LXeDetectorMessenger(this);
81 }
82 
83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84 
86 
87 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
88 
89 void LXeDetectorConstruction::DefineMaterials(){
90  G4double a; // atomic mass
91  G4double z; // atomic number
93 
94  G4int polyPMMA = 1;
95  G4int nC_PMMA = 3+2*polyPMMA;
96  G4int nH_PMMA = 6+2*polyPMMA;
97 
98  G4int polyeth = 1;
99  G4int nC_eth = 2*polyeth;
100  G4int nH_eth = 4*polyeth;
101 
102  //***Elements
103  fH = new G4Element("H", "H", z=1., a=1.01*g/mole);
104  fC = new G4Element("C", "C", z=6., a=12.01*g/mole);
105  fN = new G4Element("N", "N", z=7., a= 14.01*g/mole);
106  fO = new G4Element("O" , "O", z=8., a= 16.00*g/mole);
107 
108  //***Materials
109  //Liquid Xenon
110  fLXe = new G4Material("LXe",z=54.,a=131.29*g/mole,density=3.020*g/cm3);
111  //Aluminum
112  fAl = new G4Material("Al",z=13.,a=26.98*g/mole,density=2.7*g/cm3);
113  //Vacuum
114  fVacuum = new G4Material("Vacuum",z=1.,a=1.01*g/mole,
116  1.e-19*pascal);
117  //Air
118  fAir = new G4Material("Air", density= 1.29*mg/cm3, 2);
119  fAir->AddElement(fN, 70*perCent);
120  fAir->AddElement(fO, 30*perCent);
121  //Glass
122  fGlass = new G4Material("Glass", density=1.032*g/cm3,2);
123  fGlass->AddElement(fC,91.533*perCent);
124  fGlass->AddElement(fH,8.467*perCent);
125  //Polystyrene
126  fPstyrene = new G4Material("Polystyrene", density= 1.03*g/cm3, 2);
127  fPstyrene->AddElement(fC, 8);
128  fPstyrene->AddElement(fH, 8);
129  //Fiber(PMMA)
130  fPMMA = new G4Material("PMMA", density=1190*kg/m3,3);
131  fPMMA->AddElement(fH,nH_PMMA);
132  fPMMA->AddElement(fC,nC_PMMA);
133  fPMMA->AddElement(fO,2);
134  //Cladding(polyethylene)
135  fPethylene1 = new G4Material("Pethylene1", density=1200*kg/m3,2);
136  fPethylene1->AddElement(fH,nH_eth);
137  fPethylene1->AddElement(fC,nC_eth);
138  //Double cladding(flourinated polyethylene)
139  fPethylene2 = new G4Material("Pethylene2", density=1400*kg/m3,2);
140  fPethylene2->AddElement(fH,nH_eth);
141  fPethylene2->AddElement(fC,nC_eth);
142 
143  //***Material properties tables
144 
145  const G4int lxenum = 3;
146  G4double lxe_Energy[lxenum] = { 7.0*eV , 7.07*eV, 7.14*eV };
147 
148  G4double lxe_SCINT[lxenum] = { 0.1, 1.0, 0.1 };
149  G4double lxe_RIND[lxenum] = { 1.59 , 1.57, 1.54 };
150  G4double lxe_ABSL[lxenum] = { 35.*cm, 35.*cm, 35.*cm};
151  fLXe_mt = new G4MaterialPropertiesTable();
152  fLXe_mt->AddProperty("FASTCOMPONENT", lxe_Energy, lxe_SCINT, lxenum);
153  fLXe_mt->AddProperty("SLOWCOMPONENT", lxe_Energy, lxe_SCINT, lxenum);
154  fLXe_mt->AddProperty("RINDEX", lxe_Energy, lxe_RIND, lxenum);
155  fLXe_mt->AddProperty("ABSLENGTH", lxe_Energy, lxe_ABSL, lxenum);
156  fLXe_mt->AddConstProperty("SCINTILLATIONYIELD",12000./MeV);
157  fLXe_mt->AddConstProperty("RESOLUTIONSCALE",1.0);
158  fLXe_mt->AddConstProperty("FASTTIMECONSTANT",20.*ns);
159  fLXe_mt->AddConstProperty("SLOWTIMECONSTANT",45.*ns);
160  fLXe_mt->AddConstProperty("YIELDRATIO",1.0);
161  fLXe->SetMaterialPropertiesTable(fLXe_mt);
162 
163  // Set the Birks Constant for the LXe scintillator
164 
165  fLXe->GetIonisation()->SetBirksConstant(0.126*mm/MeV);
166 
167  G4double glass_RIND[lxenum]={1.49,1.49,1.49};
168  G4double glass_AbsLength[lxenum]={420.*cm,420.*cm,420.*cm};
170  glass_mt->AddProperty("ABSLENGTH",lxe_Energy,glass_AbsLength,lxenum);
171  glass_mt->AddProperty("RINDEX",lxe_Energy,glass_RIND,lxenum);
172  fGlass->SetMaterialPropertiesTable(glass_mt);
173 
174  G4double vacuum_Energy[lxenum]={2.0*eV,7.0*eV,7.14*eV};
175  G4double vacuum_RIND[lxenum]={1.,1.,1.};
177  vacuum_mt->AddProperty("RINDEX", vacuum_Energy, vacuum_RIND,lxenum);
178  fVacuum->SetMaterialPropertiesTable(vacuum_mt);
179  fAir->SetMaterialPropertiesTable(vacuum_mt);//Give air the same rindex
180 
181  const G4int wlsnum = 4;
182  G4double wls_Energy[] = {2.00*eV,2.87*eV,2.90*eV,3.47*eV};
183 
184  G4double rIndexPstyrene[wlsnum]={ 1.5, 1.5, 1.5, 1.5};
185  G4double absorption1[wlsnum]={2.*cm, 2.*cm, 2.*cm, 2.*cm};
186  G4double scintilFast[wlsnum]={0.00, 0.00, 1.00, 1.00};
187  fMPTPStyrene = new G4MaterialPropertiesTable();
188  fMPTPStyrene->AddProperty("RINDEX",wls_Energy,rIndexPstyrene,wlsnum);
189  fMPTPStyrene->AddProperty("ABSLENGTH",wls_Energy,absorption1,wlsnum);
190  fMPTPStyrene->AddProperty("FASTCOMPONENT",wls_Energy, scintilFast,wlsnum);
191  fMPTPStyrene->AddConstProperty("SCINTILLATIONYIELD",10./keV);
192  fMPTPStyrene->AddConstProperty("RESOLUTIONSCALE",1.0);
193  fMPTPStyrene->AddConstProperty("FASTTIMECONSTANT", 10.*ns);
194  fPstyrene->SetMaterialPropertiesTable(fMPTPStyrene);
195 
196  // Set the Birks Constant for the Polystyrene scintillator
197 
198  fPstyrene->GetIonisation()->SetBirksConstant(0.126*mm/MeV);
199 
200  G4double RefractiveIndexFiber[wlsnum]={ 1.60, 1.60, 1.60, 1.60};
201  G4double AbsFiber[wlsnum]={9.00*m,9.00*m,0.1*mm,0.1*mm};
202  G4double EmissionFib[wlsnum]={1.0, 1.0, 0.0, 0.0};
204  fiberProperty->AddProperty("RINDEX",wls_Energy,RefractiveIndexFiber,wlsnum);
205  fiberProperty->AddProperty("WLSABSLENGTH",wls_Energy,AbsFiber,wlsnum);
206  fiberProperty->AddProperty("WLSCOMPONENT",wls_Energy,EmissionFib,wlsnum);
207  fiberProperty->AddConstProperty("WLSTIMECONSTANT", 0.5*ns);
208  fPMMA->SetMaterialPropertiesTable(fiberProperty);
209 
210  G4double RefractiveIndexClad1[wlsnum]={ 1.49, 1.49, 1.49, 1.49};
212  clad1Property->AddProperty("RINDEX",wls_Energy,RefractiveIndexClad1,wlsnum);
213  clad1Property->AddProperty("ABSLENGTH",wls_Energy,AbsFiber,wlsnum);
214  fPethylene1->SetMaterialPropertiesTable(clad1Property);
215 
216  G4double RefractiveIndexClad2[wlsnum]={ 1.42, 1.42, 1.42, 1.42};
218  clad2Property->AddProperty("RINDEX",wls_Energy,RefractiveIndexClad2,wlsnum);
219  clad2Property->AddProperty("ABSLENGTH",wls_Energy,AbsFiber,wlsnum);
220  fPethylene2->SetMaterialPropertiesTable(clad2Property);
221 }
222 
223 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
224 
226  DefineMaterials();
227  return ConstructDetector();
228 }
229 
230 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
231 
232 G4VPhysicalVolume* LXeDetectorConstruction::ConstructDetector()
233 {
234  //The experimental hall walls are all 1m away from housing walls
235  G4double expHall_x = fScint_x+fD_mtl+1.*m;
236  G4double expHall_y = fScint_y+fD_mtl+1.*m;
237  G4double expHall_z = fScint_z+fD_mtl+1.*m;
238 
239  //Create experimental hall
240  fExperimentalHall_box
241  = new G4Box("expHall_box",expHall_x,expHall_y,expHall_z);
242  fExperimentalHall_log = new G4LogicalVolume(fExperimentalHall_box,
243  fVacuum,"expHall_log",0,0,0);
244  fExperimentalHall_phys = new G4PVPlacement(0,G4ThreeVector(),
245  fExperimentalHall_log,"expHall",0,false,0);
246 
247  fExperimentalHall_log->SetVisAttributes(G4VisAttributes::Invisible);
248 
249  //Place the main volume
250  if(fMainVolume){
251  new LXeMainVolume(0,G4ThreeVector(),fExperimentalHall_log,false,0,this);
252  }
253 
254  //Place the WLS slab
255  if(fWLSslab){
256  G4VPhysicalVolume* slab = new LXeWLSSlab(0,G4ThreeVector(0.,0.,
257  -fScint_z/2.-fSlab_z-1.*cm),
258  fExperimentalHall_log,false,0,
259  this);
260 
261  //Surface properties for the WLS slab
262  G4OpticalSurface* scintWrap = new G4OpticalSurface("ScintWrap");
263 
264  new G4LogicalBorderSurface("ScintWrap", slab,
265  fExperimentalHall_phys,
266  scintWrap);
267 
268  scintWrap->SetType(dielectric_metal);
269  scintWrap->SetFinish(polished);
270  scintWrap->SetModel(glisur);
271 
272  const G4int num = 2;
273 
274  G4double pp[num] = {2.0*eV, 3.5*eV};
275  G4double reflectivity[num] = {1., 1.};
276  G4double efficiency[num] = {0.0, 0.0};
277 
278  G4MaterialPropertiesTable* scintWrapProperty
280 
281  scintWrapProperty->AddProperty("REFLECTIVITY",pp,reflectivity,num);
282  scintWrapProperty->AddProperty("EFFICIENCY",pp,efficiency,num);
283  scintWrap->SetMaterialPropertiesTable(scintWrapProperty);
284  }
285 
286  return fExperimentalHall_phys;
287 }
288 
289 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
290 
292  this->fScint_x=dims[0];
293  this->fScint_y=dims[1];
294  this->fScint_z=dims[2];
295  fUpdated=true;
296 }
297 
298 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
299 
301  this->fD_mtl=d_mtl;
302  fUpdated=true;
303 }
304 
305 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
306 
308  this->fNx=nx;
309  fUpdated=true;
310 }
311 
312 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
313 
315  this->fNy=ny;
316  fUpdated=true;
317 }
318 
319 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
320 
322  this->fNz=nz;
323  fUpdated=true;
324 }
325 
326 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
327 
329  this->fOuterRadius_pmt=outerRadius_pmt;
330  fUpdated=true;
331 }
332 
333 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
334 
336  //Resets to default values
337  fD_mtl=0.0635*cm;
338 
339  fScint_x = 17.8*cm;
340  fScint_y = 17.8*cm;
341  fScint_z = 22.6*cm;
342 
343  fNx = 2;
344  fNy = 2;
345  fNz = 3;
346 
347  fOuterRadius_pmt = 2.3*cm;
348 
349  fSphereOn = true;
350  fRefl=1.0;
351 
352  fNfibers=15;
353  fWLSslab=false;
354  fMainVolume=true;
355  fSlab_z=2.5*mm;
356 
358  ->ApplyCommand("/LXe/detector/scintYieldFactor 1.");
359 
360  if(fLXe_mt)fLXe_mt->AddConstProperty("SCINTILLATIONYIELD",12000./MeV);
361  if(fMPTPStyrene)fMPTPStyrene->AddConstProperty("SCINTILLATIONYIELD",10./keV);
362 
363  fUpdated=true;
364 }
365 
366 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
367 
369 
370  // clean-up previous geometry
372 
379 
380  //define new one
381  G4RunManager::GetRunManager()->DefineWorldVolume(ConstructDetector());
383 
384  fUpdated=false;
385 }
386 
387 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
388 
390  fLXe_mt->AddConstProperty("SCINTILLATIONYIELD",y/MeV);
391 }
392 
393 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
394 
396  fMPTPStyrene->AddConstProperty("SCINTILLATIONYIELD",y/MeV);
397 }