Geant4  10.01.p02
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 //
26 // $Id: LXeDetectorConstruction.cc 82853 2014-07-14 09:07:11Z gcosmo $
27 //
30 //
31 //
33 #include "LXePMTSD.hh"
34 #include "LXeScintSD.hh"
35 #include "LXeDetectorMessenger.hh"
36 #include "LXeMainVolume.hh"
37 #include "LXeWLSSlab.hh"
38 
39 #include "G4SDManager.hh"
40 #include "G4RunManager.hh"
41 
42 #include "G4GeometryManager.hh"
43 #include "G4SolidStore.hh"
44 #include "G4LogicalVolumeStore.hh"
45 #include "G4PhysicalVolumeStore.hh"
47 #include "G4LogicalSkinSurface.hh"
48 
49 #include "G4OpticalSurface.hh"
50 #include "G4MaterialTable.hh"
51 #include "G4VisAttributes.hh"
52 #include "G4Material.hh"
53 #include "G4Box.hh"
54 #include "G4Tubs.hh"
55 #include "G4Sphere.hh"
56 #include "G4LogicalVolume.hh"
57 #include "G4ThreeVector.hh"
58 #include "G4PVPlacement.hh"
59 #include "globals.hh"
60 #include "G4UImanager.hh"
61 #include "G4PhysicalConstants.hh"
62 #include "G4SystemOfUnits.hh"
63 
65 
66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
67 
69 : fLXe_mt(NULL), fMPTPStyrene(NULL)
70 {
71  fExperimentalHall_box = NULL;
72  fExperimentalHall_log = NULL;
74 
75  fLXe = fAl = fAir = fVacuum = fGlass = NULL;
77 
78  fN = fO = fC = fH = NULL;
79 
80  SetDefaults();
81 
83 }
84 
85 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
86 
88 
89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
90 
92  G4double a; // atomic mass
93  G4double z; // atomic number
95 
96  G4int polyPMMA = 1;
97  G4int nC_PMMA = 3+2*polyPMMA;
98  G4int nH_PMMA = 6+2*polyPMMA;
99 
100  G4int polyeth = 1;
101  G4int nC_eth = 2*polyeth;
102  G4int nH_eth = 4*polyeth;
103 
104  //***Elements
105  fH = new G4Element("H", "H", z=1., a=1.01*g/mole);
106  fC = new G4Element("C", "C", z=6., a=12.01*g/mole);
107  fN = new G4Element("N", "N", z=7., a= 14.01*g/mole);
108  fO = new G4Element("O" , "O", z=8., a= 16.00*g/mole);
109 
110  //***Materials
111  //Liquid Xenon
112  fLXe = new G4Material("LXe",z=54.,a=131.29*g/mole,density=3.020*g/cm3);
113  //Aluminum
114  fAl = new G4Material("Al",z=13.,a=26.98*g/mole,density=2.7*g/cm3);
115  //Vacuum
116  fVacuum = new G4Material("Vacuum",z=1.,a=1.01*g/mole,
117  density=universe_mean_density,kStateGas,0.1*kelvin,
118  1.e-19*pascal);
119  //Air
120  fAir = new G4Material("Air", density= 1.29*mg/cm3, 2);
121  fAir->AddElement(fN, 70*perCent);
122  fAir->AddElement(fO, 30*perCent);
123  //Glass
124  fGlass = new G4Material("Glass", density=1.032*g/cm3,2);
125  fGlass->AddElement(fC,91.533*perCent);
126  fGlass->AddElement(fH,8.467*perCent);
127  //Polystyrene
128  fPstyrene = new G4Material("Polystyrene", density= 1.03*g/cm3, 2);
129  fPstyrene->AddElement(fC, 8);
130  fPstyrene->AddElement(fH, 8);
131  //Fiber(PMMA)
132  fPMMA = new G4Material("PMMA", density=1190*kg/m3,3);
133  fPMMA->AddElement(fH,nH_PMMA);
134  fPMMA->AddElement(fC,nC_PMMA);
135  fPMMA->AddElement(fO,2);
136  //Cladding(polyethylene)
137  fPethylene1 = new G4Material("Pethylene1", density=1200*kg/m3,2);
138  fPethylene1->AddElement(fH,nH_eth);
139  fPethylene1->AddElement(fC,nC_eth);
140  //Double cladding(flourinated polyethylene)
141  fPethylene2 = new G4Material("Pethylene2", density=1400*kg/m3,2);
142  fPethylene2->AddElement(fH,nH_eth);
143  fPethylene2->AddElement(fC,nC_eth);
144 
145  //***Material properties tables
146 
147  G4double lxe_Energy[] = { 7.0*eV , 7.07*eV, 7.14*eV };
148  const G4int lxenum = sizeof(lxe_Energy)/sizeof(G4double);
149 
150  G4double lxe_SCINT[] = { 0.1, 1.0, 0.1 };
151  assert(sizeof(lxe_SCINT) == sizeof(lxe_Energy));
152  G4double lxe_RIND[] = { 1.59 , 1.57, 1.54 };
153  assert(sizeof(lxe_RIND) == sizeof(lxe_Energy));
154  G4double lxe_ABSL[] = { 35.*cm, 35.*cm, 35.*cm};
155  assert(sizeof(lxe_ABSL) == sizeof(lxe_Energy));
157  fLXe_mt->AddProperty("FASTCOMPONENT", lxe_Energy, lxe_SCINT, lxenum);
158  fLXe_mt->AddProperty("SLOWCOMPONENT", lxe_Energy, lxe_SCINT, lxenum);
159  fLXe_mt->AddProperty("RINDEX", lxe_Energy, lxe_RIND, lxenum);
160  fLXe_mt->AddProperty("ABSLENGTH", lxe_Energy, lxe_ABSL, lxenum);
161  fLXe_mt->AddConstProperty("SCINTILLATIONYIELD",12000./MeV);
162  fLXe_mt->AddConstProperty("RESOLUTIONSCALE",1.0);
163  fLXe_mt->AddConstProperty("FASTTIMECONSTANT",20.*ns);
164  fLXe_mt->AddConstProperty("SLOWTIMECONSTANT",45.*ns);
165  fLXe_mt->AddConstProperty("YIELDRATIO",1.0);
167 
168  // Set the Birks Constant for the LXe scintillator
169 
171 
172  G4double glass_RIND[]={1.49,1.49,1.49};
173  assert(sizeof(glass_RIND) == sizeof(lxe_Energy));
174  G4double glass_AbsLength[]={420.*cm,420.*cm,420.*cm};
175  assert(sizeof(glass_AbsLength) == sizeof(lxe_Energy));
177  glass_mt->AddProperty("ABSLENGTH",lxe_Energy,glass_AbsLength,lxenum);
178  glass_mt->AddProperty("RINDEX",lxe_Energy,glass_RIND,lxenum);
180 
181  G4double vacuum_Energy[]={2.0*eV,7.0*eV,7.14*eV};
182  const G4int vacnum = sizeof(vacuum_Energy)/sizeof(G4double);
183  G4double vacuum_RIND[]={1.,1.,1.};
184  assert(sizeof(vacuum_RIND) == sizeof(vacuum_Energy));
186  vacuum_mt->AddProperty("RINDEX", vacuum_Energy, vacuum_RIND,vacnum);
188  fAir->SetMaterialPropertiesTable(vacuum_mt);//Give air the same rindex
189 
190  G4double wls_Energy[] = {2.00*eV,2.87*eV,2.90*eV,3.47*eV};
191  const G4int wlsnum = sizeof(wls_Energy)/sizeof(G4double);
192 
193  G4double rIndexPstyrene[]={ 1.5, 1.5, 1.5, 1.5};
194  assert(sizeof(rIndexPstyrene) == sizeof(wls_Energy));
195  G4double absorption1[]={2.*cm, 2.*cm, 2.*cm, 2.*cm};
196  assert(sizeof(absorption1) == sizeof(wls_Energy));
197  G4double scintilFast[]={0.00, 0.00, 1.00, 1.00};
198  assert(sizeof(scintilFast) == sizeof(wls_Energy));
200  fMPTPStyrene->AddProperty("RINDEX",wls_Energy,rIndexPstyrene,wlsnum);
201  fMPTPStyrene->AddProperty("ABSLENGTH",wls_Energy,absorption1,wlsnum);
202  fMPTPStyrene->AddProperty("FASTCOMPONENT",wls_Energy, scintilFast,wlsnum);
203  fMPTPStyrene->AddConstProperty("SCINTILLATIONYIELD",10./keV);
204  fMPTPStyrene->AddConstProperty("RESOLUTIONSCALE",1.0);
205  fMPTPStyrene->AddConstProperty("FASTTIMECONSTANT", 10.*ns);
207 
208  // Set the Birks Constant for the Polystyrene scintillator
209 
211 
212  G4double RefractiveIndexFiber[]={ 1.60, 1.60, 1.60, 1.60};
213  assert(sizeof(RefractiveIndexFiber) == sizeof(wls_Energy));
214  G4double AbsFiber[]={9.00*m,9.00*m,0.1*mm,0.1*mm};
215  assert(sizeof(AbsFiber) == sizeof(wls_Energy));
216  G4double EmissionFib[]={1.0, 1.0, 0.0, 0.0};
217  assert(sizeof(EmissionFib) == sizeof(wls_Energy));
219  fiberProperty->AddProperty("RINDEX",wls_Energy,RefractiveIndexFiber,wlsnum);
220  fiberProperty->AddProperty("WLSABSLENGTH",wls_Energy,AbsFiber,wlsnum);
221  fiberProperty->AddProperty("WLSCOMPONENT",wls_Energy,EmissionFib,wlsnum);
222  fiberProperty->AddConstProperty("WLSTIMECONSTANT", 0.5*ns);
223  fPMMA->SetMaterialPropertiesTable(fiberProperty);
224 
225  G4double RefractiveIndexClad1[]={ 1.49, 1.49, 1.49, 1.49};
226  assert(sizeof(RefractiveIndexClad1) == sizeof(wls_Energy));
228  clad1Property->AddProperty("RINDEX",wls_Energy,RefractiveIndexClad1,wlsnum);
229  clad1Property->AddProperty("ABSLENGTH",wls_Energy,AbsFiber,wlsnum);
230  fPethylene1->SetMaterialPropertiesTable(clad1Property);
231 
232  G4double RefractiveIndexClad2[]={ 1.42, 1.42, 1.42, 1.42};
233  assert(sizeof(RefractiveIndexClad2) == sizeof(wls_Energy));
235  clad2Property->AddProperty("RINDEX",wls_Energy,RefractiveIndexClad2,wlsnum);
236  clad2Property->AddProperty("ABSLENGTH",wls_Energy,AbsFiber,wlsnum);
237  fPethylene2->SetMaterialPropertiesTable(clad2Property);
238 }
239 
240 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
241 
243 
251  }
252 
253  DefineMaterials();
254  return ConstructDetector();
255 }
256 
257 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
258 
260 {
261  //The experimental hall walls are all 1m away from housing walls
265 
266  //Create experimental hall
268  = new G4Box("expHall_box",expHall_x,expHall_y,expHall_z);
270  fVacuum,"expHall_log",0,0,0);
272  fExperimentalHall_log,"expHall",0,false,0);
273 
275 
276  //Place the main volume
277  if(fMainVolumeOn){
279  = new LXeMainVolume(0,G4ThreeVector(),fExperimentalHall_log,false,0,this);
280  }
281 
282  //Place the WLS slab
283  if(fWLSslab){
284  G4VPhysicalVolume* slab = new LXeWLSSlab(0,G4ThreeVector(0.,0.,
285  -fScint_z/2.-fSlab_z-1.*cm),
286  fExperimentalHall_log,false,0,
287  this);
288 
289  //Surface properties for the WLS slab
290  G4OpticalSurface* scintWrap = new G4OpticalSurface("ScintWrap");
291 
292  new G4LogicalBorderSurface("ScintWrap", slab,
294  scintWrap);
295 
296  scintWrap->SetType(dielectric_metal);
297  scintWrap->SetFinish(polished);
298  scintWrap->SetModel(glisur);
299 
300  G4double pp[] = {2.0*eV, 3.5*eV};
301  const G4int num = sizeof(pp)/sizeof(G4double);
302  G4double reflectivity[] = {1., 1.};
303  assert(sizeof(reflectivity) == sizeof(pp));
304  G4double efficiency[] = {0.0, 0.0};
305  assert(sizeof(efficiency) == sizeof(pp));
306 
307  G4MaterialPropertiesTable* scintWrapProperty
309 
310  scintWrapProperty->AddProperty("REFLECTIVITY",pp,reflectivity,num);
311  scintWrapProperty->AddProperty("EFFICIENCY",pp,efficiency,num);
312  scintWrap->SetMaterialPropertiesTable(scintWrapProperty);
313  }
314 
315  return fExperimentalHall_phys;
316 }
317 
318 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
319 
321 
322  if (!fMainVolume) return;
323 
324  // PMT SD
325 
326  if (!fPmt_SD.Get()) {
327  //Created here so it exists as pmts are being placed
328  G4cout << "Construction /LXeDet/pmtSD" << G4endl;
329  LXePMTSD* pmt_SD = new LXePMTSD("/LXeDet/pmtSD");
330  fPmt_SD.Put(pmt_SD);
331 
332  pmt_SD->InitPMTs((fNx*fNy+fNx*fNz+fNy*fNz)*2); //let pmtSD know # of pmts
334  }
335 
336  //sensitive detector is not actually on the photocathode.
337  //processHits gets done manually by the stepping action.
338  //It is used to detect when photons hit and get absorbed&detected at the
339  //boundary to the photocathode (which doesnt get done by attaching it to a
340  //logical volume.
341  //It does however need to be attached to something or else it doesnt get
342  //reset at the begining of events
343 
345 
346  // Scint SD
347 
348  if (!fScint_SD.Get()) {
349  G4cout << "Construction /LXeDet/scintSD" << G4endl;
350  LXeScintSD* scint_SD = new LXeScintSD("/LXeDet/scintSD");
351  fScint_SD.Put(scint_SD);
352  }
354 }
355 
356 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
357 
359  this->fScint_x=dims[0];
360  this->fScint_y=dims[1];
361  this->fScint_z=dims[2];
363 }
364 
365 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
366 
368  this->fD_mtl=d_mtl;
370 }
371 
372 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
373 
375  this->fNx=nx;
377 }
378 
379 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
380 
382  this->fNy=ny;
384 }
385 
386 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
387 
389  this->fNz=nz;
391 }
392 
393 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
394 
396  this->fOuterRadius_pmt=outerRadius_pmt;
398 }
399 
400 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
401 
403 
404  //Resets to default values
405  fD_mtl=0.0635*cm;
406 
407  fScint_x = 17.8*cm;
408  fScint_y = 17.8*cm;
409  fScint_z = 22.6*cm;
410 
411  fNx = 2;
412  fNy = 2;
413  fNz = 3;
414 
415  fOuterRadius_pmt = 2.3*cm;
416 
417  fSphereOn = true;
418  fRefl=1.0;
419 
420  fNfibers=15;
421  fWLSslab=false;
422  fMainVolumeOn=true;
423  fMainVolume=NULL;
424  fSlab_z=2.5*mm;
425 
427  ->ApplyCommand("/LXe/detector/scintYieldFactor 1.");
428 
429  if(fLXe_mt)fLXe_mt->AddConstProperty("SCINTILLATIONYIELD",12000./MeV);
430  if(fMPTPStyrene)fMPTPStyrene->AddConstProperty("SCINTILLATIONYIELD",10./keV);
431 
433 }
434 
435 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
436 
438  fSphereOn=b;
440 }
441 
442 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
443 
445  fRefl=r;
447 }
448 
449 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
450 
452  fWLSslab=b;
454 }
455 
456 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
457 
459  fMainVolumeOn=b;
461 }
462 
463 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
464 
466  fNfibers=n;
468 }
469 
470 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
471 
473  fLXe_mt->AddConstProperty("SCINTILLATIONYIELD",y/MeV);
474 }
475 
476 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
477 
479  fMPTPStyrene->AddConstProperty("SCINTILLATIONYIELD",y/MeV);
480 }
void SetFinish(const G4OpticalSurfaceFinish)
static const double cm
Definition: G4SIunits.hh:106
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:226
static const double MeV
Definition: G4SIunits.hh:193
CLHEP::Hep3Vector G4ThreeVector
static const double m3
Definition: G4SIunits.hh:112
G4double z
Definition: TRTMaterials.hh:39
Definition: G4Box.hh:64
void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
Definition: G4Material.hh:249
void SetBirksConstant(G4double value)
value_type & Get() const
Definition: G4Cache.hh:282
static void Clean()
Definition: G4SolidStore.cc:79
G4double expHall_x
Definition of the LXeDetectorConstruction class.
Definition of the LXeMainVolume class.
std::vector< G4ThreeVector > GetPmtPositions()
G4double a
Definition: TRTMaterials.hh:39
static const double mg
Definition: G4SIunits.hh:163
G4MaterialPropertiesTable * fMPTPStyrene
int G4int
Definition: G4Types.hh:78
G4LogicalVolume * GetLogPhotoCath()
G4MaterialPropertyVector * AddProperty(const char *key, G4double *PhotonEnergies, G4double *PropertyValues, G4int NumEntries)
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:58
static G4PhysicalVolumeStore * GetInstance()
G4VPhysicalVolume * ConstructDetector()
G4LogicalVolume * GetLogScint()
G4double density
Definition: TRTMaterials.hh:39
G4double expHall_y
Definition of the LXePMTSD class.
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
virtual G4VPhysicalVolume * Construct()
static G4LogicalVolumeStore * GetInstance()
static const double cm3
Definition: G4SIunits.hh:108
static G4SolidStore * GetInstance()
static const double kg
Definition: G4SIunits.hh:161
static const double perCent
Definition: G4SIunits.hh:296
const G4int n
static G4GeometryManager * GetInstance()
void AddConstProperty(const char *key, G4double PropertyValue)
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static const double kelvin
Definition: G4SIunits.hh:260
#define pascal
Definition: G4SIunits.hh:213
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
static const double eV
Definition: G4SIunits.hh:194
void SetPmtPositions(const std::vector< G4ThreeVector > &positions)
Definition: LXePMTSD.cc:62
LXeDetectorMessenger * fDetectorMessenger
static const double g
Definition: G4SIunits.hh:162
G4Cache< LXeScintSD * > fScint_SD
static const G4VisAttributes Invisible
Definition of the LXeScintSD class.
void InitPMTs(G4int nPMTs)
Definition: LXePMTSD.hh:64
G4MaterialPropertiesTable * fLXe_mt
static const double mole
Definition: G4SIunits.hh:265
#define G4endl
Definition: G4ios.hh:61
G4LogicalVolume * fExperimentalHall_log
static const double m
Definition: G4SIunits.hh:110
void OpenGeometry(G4VPhysicalVolume *vol=0)
void AddElement(G4Element *element, G4int nAtoms)
Definition: G4Material.cc:364
static const double keV
Definition: G4SIunits.hh:195
Definition of the LXeWLSSlab class.
double G4double
Definition: G4Types.hh:76
void SetModel(const G4OpticalSurfaceModel model)
Definition of the LXeDetectorMessenger class.
void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
void Put(const value_type &val) const
Definition: G4Cache.hh:286
static const double mm
Definition: G4SIunits.hh:102
#define ns
Definition: xmlparse.cc:597
void SetType(const G4SurfaceType &type)
void SetVisAttributes(const G4VisAttributes *pVA)
G4VPhysicalVolume * fExperimentalHall_phys
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:432
G4double expHall_z