Geant4  10.00.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 77882 2013-11-29 08:39:07Z 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  const G4int lxenum = 3;
148  G4double lxe_Energy[lxenum] = { 7.0*eV , 7.07*eV, 7.14*eV };
149 
150  G4double lxe_SCINT[lxenum] = { 0.1, 1.0, 0.1 };
151  G4double lxe_RIND[lxenum] = { 1.59 , 1.57, 1.54 };
152  G4double lxe_ABSL[lxenum] = { 35.*cm, 35.*cm, 35.*cm};
154  fLXe_mt->AddProperty("FASTCOMPONENT", lxe_Energy, lxe_SCINT, lxenum);
155  fLXe_mt->AddProperty("SLOWCOMPONENT", lxe_Energy, lxe_SCINT, lxenum);
156  fLXe_mt->AddProperty("RINDEX", lxe_Energy, lxe_RIND, lxenum);
157  fLXe_mt->AddProperty("ABSLENGTH", lxe_Energy, lxe_ABSL, lxenum);
158  fLXe_mt->AddConstProperty("SCINTILLATIONYIELD",12000./MeV);
159  fLXe_mt->AddConstProperty("RESOLUTIONSCALE",1.0);
160  fLXe_mt->AddConstProperty("FASTTIMECONSTANT",20.*ns);
161  fLXe_mt->AddConstProperty("SLOWTIMECONSTANT",45.*ns);
162  fLXe_mt->AddConstProperty("YIELDRATIO",1.0);
164 
165  // Set the Birks Constant for the LXe scintillator
166 
168 
169  G4double glass_RIND[lxenum]={1.49,1.49,1.49};
170  G4double glass_AbsLength[lxenum]={420.*cm,420.*cm,420.*cm};
172  glass_mt->AddProperty("ABSLENGTH",lxe_Energy,glass_AbsLength,lxenum);
173  glass_mt->AddProperty("RINDEX",lxe_Energy,glass_RIND,lxenum);
175 
176  G4double vacuum_Energy[lxenum]={2.0*eV,7.0*eV,7.14*eV};
177  G4double vacuum_RIND[lxenum]={1.,1.,1.};
179  vacuum_mt->AddProperty("RINDEX", vacuum_Energy, vacuum_RIND,lxenum);
181  fAir->SetMaterialPropertiesTable(vacuum_mt);//Give air the same rindex
182 
183  const G4int wlsnum = 4;
184  G4double wls_Energy[] = {2.00*eV,2.87*eV,2.90*eV,3.47*eV};
185 
186  G4double rIndexPstyrene[wlsnum]={ 1.5, 1.5, 1.5, 1.5};
187  G4double absorption1[wlsnum]={2.*cm, 2.*cm, 2.*cm, 2.*cm};
188  G4double scintilFast[wlsnum]={0.00, 0.00, 1.00, 1.00};
190  fMPTPStyrene->AddProperty("RINDEX",wls_Energy,rIndexPstyrene,wlsnum);
191  fMPTPStyrene->AddProperty("ABSLENGTH",wls_Energy,absorption1,wlsnum);
192  fMPTPStyrene->AddProperty("FASTCOMPONENT",wls_Energy, scintilFast,wlsnum);
193  fMPTPStyrene->AddConstProperty("SCINTILLATIONYIELD",10./keV);
194  fMPTPStyrene->AddConstProperty("RESOLUTIONSCALE",1.0);
195  fMPTPStyrene->AddConstProperty("FASTTIMECONSTANT", 10.*ns);
197 
198  // Set the Birks Constant for the Polystyrene scintillator
199 
201 
202  G4double RefractiveIndexFiber[wlsnum]={ 1.60, 1.60, 1.60, 1.60};
203  G4double AbsFiber[wlsnum]={9.00*m,9.00*m,0.1*mm,0.1*mm};
204  G4double EmissionFib[wlsnum]={1.0, 1.0, 0.0, 0.0};
206  fiberProperty->AddProperty("RINDEX",wls_Energy,RefractiveIndexFiber,wlsnum);
207  fiberProperty->AddProperty("WLSABSLENGTH",wls_Energy,AbsFiber,wlsnum);
208  fiberProperty->AddProperty("WLSCOMPONENT",wls_Energy,EmissionFib,wlsnum);
209  fiberProperty->AddConstProperty("WLSTIMECONSTANT", 0.5*ns);
210  fPMMA->SetMaterialPropertiesTable(fiberProperty);
211 
212  G4double RefractiveIndexClad1[wlsnum]={ 1.49, 1.49, 1.49, 1.49};
214  clad1Property->AddProperty("RINDEX",wls_Energy,RefractiveIndexClad1,wlsnum);
215  clad1Property->AddProperty("ABSLENGTH",wls_Energy,AbsFiber,wlsnum);
216  fPethylene1->SetMaterialPropertiesTable(clad1Property);
217 
218  G4double RefractiveIndexClad2[wlsnum]={ 1.42, 1.42, 1.42, 1.42};
220  clad2Property->AddProperty("RINDEX",wls_Energy,RefractiveIndexClad2,wlsnum);
221  clad2Property->AddProperty("ABSLENGTH",wls_Energy,AbsFiber,wlsnum);
222  fPethylene2->SetMaterialPropertiesTable(clad2Property);
223 }
224 
225 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
226 
228 
236  }
237 
238  DefineMaterials();
239  return ConstructDetector();
240 }
241 
242 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
243 
245 {
246  //The experimental hall walls are all 1m away from housing walls
250 
251  //Create experimental hall
253  = new G4Box("expHall_box",expHall_x,expHall_y,expHall_z);
255  fVacuum,"expHall_log",0,0,0);
257  fExperimentalHall_log,"expHall",0,false,0);
258 
260 
261  //Place the main volume
262  if(fMainVolumeOn){
264  = new LXeMainVolume(0,G4ThreeVector(),fExperimentalHall_log,false,0,this);
265  }
266 
267  //Place the WLS slab
268  if(fWLSslab){
269  G4VPhysicalVolume* slab = new LXeWLSSlab(0,G4ThreeVector(0.,0.,
270  -fScint_z/2.-fSlab_z-1.*cm),
271  fExperimentalHall_log,false,0,
272  this);
273 
274  //Surface properties for the WLS slab
275  G4OpticalSurface* scintWrap = new G4OpticalSurface("ScintWrap");
276 
277  new G4LogicalBorderSurface("ScintWrap", slab,
279  scintWrap);
280 
281  scintWrap->SetType(dielectric_metal);
282  scintWrap->SetFinish(polished);
283  scintWrap->SetModel(glisur);
284 
285  const G4int num = 2;
286 
287  G4double pp[num] = {2.0*eV, 3.5*eV};
288  G4double reflectivity[num] = {1., 1.};
289  G4double efficiency[num] = {0.0, 0.0};
290 
291  G4MaterialPropertiesTable* scintWrapProperty
293 
294  scintWrapProperty->AddProperty("REFLECTIVITY",pp,reflectivity,num);
295  scintWrapProperty->AddProperty("EFFICIENCY",pp,efficiency,num);
296  scintWrap->SetMaterialPropertiesTable(scintWrapProperty);
297  }
298 
299  return fExperimentalHall_phys;
300 }
301 
302 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
303 
305 
306  if (!fMainVolume) return;
307 
308  // PMT SD
309 
310  if (!fPmt_SD.Get()) {
311  //Created here so it exists as pmts are being placed
312  G4cout << "Construction /LXeDet/pmtSD" << G4endl;
313  LXePMTSD* pmt_SD = new LXePMTSD("/LXeDet/pmtSD");
314  fPmt_SD.Put(pmt_SD);
315 
316  pmt_SD->InitPMTs((fNx*fNy+fNx*fNz+fNy*fNz)*2); //let pmtSD know # of pmts
318  }
319 
320  //sensitive detector is not actually on the photocathode.
321  //processHits gets done manually by the stepping action.
322  //It is used to detect when photons hit and get absorbed&detected at the
323  //boundary to the photocathode (which doesnt get done by attaching it to a
324  //logical volume.
325  //It does however need to be attached to something or else it doesnt get
326  //reset at the begining of events
327 
329 
330  // Scint SD
331 
332  if (!fScint_SD.Get()) {
333  G4cout << "Construction /LXeDet/scintSD" << G4endl;
334  LXeScintSD* scint_SD = new LXeScintSD("/LXeDet/scintSD");
335  fScint_SD.Put(scint_SD);
336  }
338 }
339 
340 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
341 
343  this->fScint_x=dims[0];
344  this->fScint_y=dims[1];
345  this->fScint_z=dims[2];
347 }
348 
349 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
350 
352  this->fD_mtl=d_mtl;
354 }
355 
356 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
357 
359  this->fNx=nx;
361 }
362 
363 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
364 
366  this->fNy=ny;
368 }
369 
370 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
371 
373  this->fNz=nz;
375 }
376 
377 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
378 
380  this->fOuterRadius_pmt=outerRadius_pmt;
382 }
383 
384 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
385 
387 
388  //Resets to default values
389  fD_mtl=0.0635*cm;
390 
391  fScint_x = 17.8*cm;
392  fScint_y = 17.8*cm;
393  fScint_z = 22.6*cm;
394 
395  fNx = 2;
396  fNy = 2;
397  fNz = 3;
398 
399  fOuterRadius_pmt = 2.3*cm;
400 
401  fSphereOn = true;
402  fRefl=1.0;
403 
404  fNfibers=15;
405  fWLSslab=false;
406  fMainVolumeOn=true;
407  fMainVolume=NULL;
408  fSlab_z=2.5*mm;
409 
411  ->ApplyCommand("/LXe/detector/scintYieldFactor 1.");
412 
413  if(fLXe_mt)fLXe_mt->AddConstProperty("SCINTILLATIONYIELD",12000./MeV);
414  if(fMPTPStyrene)fMPTPStyrene->AddConstProperty("SCINTILLATIONYIELD",10./keV);
415 
417 }
418 
419 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
420 
422  fSphereOn=b;
424 }
425 
426 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
427 
429  fRefl=r;
431 }
432 
433 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
434 
436  fWLSslab=b;
438 }
439 
440 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
441 
443  fMainVolumeOn=b;
445 }
446 
447 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
448 
450  fNfibers=n;
452 }
453 
454 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
455 
457  fLXe_mt->AddConstProperty("SCINTILLATIONYIELD",y/MeV);
458 }
459 
460 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
461 
463  fMPTPStyrene->AddConstProperty("SCINTILLATIONYIELD",y/MeV);
464 }
void SetFinish(const G4OpticalSurfaceFinish)
static const double cm
Definition: G4SIunits.hh:106
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:224
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:247
void SetBirksConstant(G4double value)
value_type & Get() const
Definition: G4Cache.hh:253
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:74
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:363
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:257
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