Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
LXeDetectorConstruction.cc
이 파일의 문서화 페이지로 가기
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 110138 2018-05-16 07:31:43Z 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(nullptr), fMPTPStyrene(nullptr)
70 {
71  fExperimentalHall_box = nullptr;
72  fExperimentalHall_log = nullptr;
73  fExperimentalHall_phys = nullptr;
74 
75  fLXe = fAl = fAir = fVacuum = fGlass = nullptr;
76  fPstyrene = fPMMA = fPethylene1 = fPethylene2 = nullptr;
77 
78  fN = fO = fC = fH = nullptr;
79 
80  SetDefaults();
81 
84 }
85 
86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
87 
89 
90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
91 
93  G4double a; // atomic mass
94  G4double z; // atomic number
95  G4double density;
96 
97  G4int polyPMMA = 1;
98  G4int nC_PMMA = 3+2*polyPMMA;
99  G4int nH_PMMA = 6+2*polyPMMA;
100 
101  G4int polyeth = 1;
102  G4int nC_eth = 2*polyeth;
103  G4int nH_eth = 4*polyeth;
104 
105  //***Elements
106  fH = new G4Element("H", "H", z=1., a=1.01*g/mole);
107  fC = new G4Element("C", "C", z=6., a=12.01*g/mole);
108  fN = new G4Element("N", "N", z=7., a= 14.01*g/mole);
109  fO = new G4Element("O" , "O", z=8., a= 16.00*g/mole);
110 
111  //***Materials
112  //Liquid Xenon
113  fLXe = new G4Material("LXe",z=54.,a=131.29*g/mole,density=3.020*g/cm3);
114  //Aluminum
115  fAl = new G4Material("Al",z=13.,a=26.98*g/mole,density=2.7*g/cm3);
116  //Vacuum
117  fVacuum = new G4Material("Vacuum",z=1.,a=1.01*g/mole,
119  1.e-19*pascal);
120  //Air
121  fAir = new G4Material("Air", density= 1.29*mg/cm3, 2);
122  fAir->AddElement(fN, 70*perCent);
123  fAir->AddElement(fO, 30*perCent);
124  //Glass
125  fGlass = new G4Material("Glass", density=1.032*g/cm3,2);
126  fGlass->AddElement(fC,91.533*perCent);
127  fGlass->AddElement(fH,8.467*perCent);
128  //Polystyrene
129  fPstyrene = new G4Material("Polystyrene", density= 1.03*g/cm3, 2);
130  fPstyrene->AddElement(fC, 8);
131  fPstyrene->AddElement(fH, 8);
132  //Fiber(PMMA)
133  fPMMA = new G4Material("PMMA", density=1190*kg/m3,3);
134  fPMMA->AddElement(fH,nH_PMMA);
135  fPMMA->AddElement(fC,nC_PMMA);
136  fPMMA->AddElement(fO,2);
137  //Cladding(polyethylene)
138  fPethylene1 = new G4Material("Pethylene1", density=1200*kg/m3,2);
139  fPethylene1->AddElement(fH,nH_eth);
140  fPethylene1->AddElement(fC,nC_eth);
141  //Double cladding(flourinated polyethylene)
142  fPethylene2 = new G4Material("Pethylene2", density=1400*kg/m3,2);
143  fPethylene2->AddElement(fH,nH_eth);
144  fPethylene2->AddElement(fC,nC_eth);
145 
146  //***Material properties tables
147 
148  G4double lxe_Energy[] = { 7.0*eV , 7.07*eV, 7.14*eV };
149  const G4int lxenum = sizeof(lxe_Energy)/sizeof(G4double);
150 
151  G4double lxe_SCINT[] = { 0.1, 1.0, 0.1 };
152  assert(sizeof(lxe_SCINT) == sizeof(lxe_Energy));
153  G4double lxe_RIND[] = { 1.59 , 1.57, 1.54 };
154  assert(sizeof(lxe_RIND) == sizeof(lxe_Energy));
155  G4double lxe_ABSL[] = { 35.*cm, 35.*cm, 35.*cm};
156  assert(sizeof(lxe_ABSL) == sizeof(lxe_Energy));
158  fLXe_mt->AddProperty("FASTCOMPONENT", lxe_Energy, lxe_SCINT, lxenum);
159  fLXe_mt->AddProperty("SLOWCOMPONENT", lxe_Energy, lxe_SCINT, lxenum);
160  fLXe_mt->AddProperty("RINDEX", lxe_Energy, lxe_RIND, lxenum);
161  fLXe_mt->AddProperty("ABSLENGTH", lxe_Energy, lxe_ABSL, lxenum);
162  fLXe_mt->AddConstProperty("SCINTILLATIONYIELD",12000./MeV);
163  fLXe_mt->AddConstProperty("RESOLUTIONSCALE",1.0);
164  fLXe_mt->AddConstProperty("FASTTIMECONSTANT",20.*ns);
165  fLXe_mt->AddConstProperty("SLOWTIMECONSTANT",45.*ns);
166  fLXe_mt->AddConstProperty("YIELDRATIO",1.0);
168 
169  // Set the Birks Constant for the LXe scintillator
170 
172 
173  G4double glass_RIND[]={1.49,1.49,1.49};
174  assert(sizeof(glass_RIND) == sizeof(lxe_Energy));
175  G4double glass_AbsLength[]={420.*cm,420.*cm,420.*cm};
176  assert(sizeof(glass_AbsLength) == sizeof(lxe_Energy));
178  glass_mt->AddProperty("ABSLENGTH",lxe_Energy,glass_AbsLength,lxenum);
179  glass_mt->AddProperty("RINDEX",lxe_Energy,glass_RIND,lxenum);
181 
182  G4double vacuum_Energy[]={2.0*eV,7.0*eV,7.14*eV};
183  const G4int vacnum = sizeof(vacuum_Energy)/sizeof(G4double);
184  G4double vacuum_RIND[]={1.,1.,1.};
185  assert(sizeof(vacuum_RIND) == sizeof(vacuum_Energy));
187  vacuum_mt->AddProperty("RINDEX", vacuum_Energy, vacuum_RIND,vacnum);
189  fAir->SetMaterialPropertiesTable(vacuum_mt);//Give air the same rindex
190 
191  G4double wls_Energy[] = {2.00*eV,2.87*eV,2.90*eV,3.47*eV};
192  const G4int wlsnum = sizeof(wls_Energy)/sizeof(G4double);
193 
194  G4double rIndexPstyrene[]={ 1.5, 1.5, 1.5, 1.5};
195  assert(sizeof(rIndexPstyrene) == sizeof(wls_Energy));
196  G4double absorption1[]={2.*cm, 2.*cm, 2.*cm, 2.*cm};
197  assert(sizeof(absorption1) == sizeof(wls_Energy));
198  G4double scintilFast[]={0.00, 0.00, 1.00, 1.00};
199  assert(sizeof(scintilFast) == sizeof(wls_Energy));
201  fMPTPStyrene->AddProperty("RINDEX",wls_Energy,rIndexPstyrene,wlsnum);
202  fMPTPStyrene->AddProperty("ABSLENGTH",wls_Energy,absorption1,wlsnum);
203  fMPTPStyrene->AddProperty("FASTCOMPONENT",wls_Energy, scintilFast,wlsnum);
204  fMPTPStyrene->AddConstProperty("SCINTILLATIONYIELD",10./keV);
205  fMPTPStyrene->AddConstProperty("RESOLUTIONSCALE",1.0);
206  fMPTPStyrene->AddConstProperty("FASTTIMECONSTANT", 10.*ns);
208 
209  // Set the Birks Constant for the Polystyrene scintillator
210 
212 
213  G4double RefractiveIndexFiber[]={ 1.60, 1.60, 1.60, 1.60};
214  assert(sizeof(RefractiveIndexFiber) == sizeof(wls_Energy));
215  G4double AbsFiber[]={9.00*m,9.00*m,0.1*mm,0.1*mm};
216  assert(sizeof(AbsFiber) == sizeof(wls_Energy));
217  G4double EmissionFib[]={1.0, 1.0, 0.0, 0.0};
218  assert(sizeof(EmissionFib) == sizeof(wls_Energy));
220  fiberProperty->AddProperty("RINDEX",wls_Energy,RefractiveIndexFiber,wlsnum);
221  fiberProperty->AddProperty("WLSABSLENGTH",wls_Energy,AbsFiber,wlsnum);
222  fiberProperty->AddProperty("WLSCOMPONENT",wls_Energy,EmissionFib,wlsnum);
223  fiberProperty->AddConstProperty("WLSTIMECONSTANT", 0.5*ns);
224  fPMMA->SetMaterialPropertiesTable(fiberProperty);
225 
226  G4double RefractiveIndexClad1[]={ 1.49, 1.49, 1.49, 1.49};
227  assert(sizeof(RefractiveIndexClad1) == sizeof(wls_Energy));
229  clad1Property->AddProperty("RINDEX",wls_Energy,RefractiveIndexClad1,wlsnum);
230  clad1Property->AddProperty("ABSLENGTH",wls_Energy,AbsFiber,wlsnum);
231  fPethylene1->SetMaterialPropertiesTable(clad1Property);
232 
233  G4double RefractiveIndexClad2[]={ 1.42, 1.42, 1.42, 1.42};
234  assert(sizeof(RefractiveIndexClad2) == sizeof(wls_Energy));
236  clad2Property->AddProperty("RINDEX",wls_Energy,RefractiveIndexClad2,wlsnum);
237  clad2Property->AddProperty("ABSLENGTH",wls_Energy,AbsFiber,wlsnum);
238  fPethylene2->SetMaterialPropertiesTable(clad2Property);
239 }
240 
241 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
242 
244 
252  }
253 
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  }
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  }
355 }
356 
357 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
358 
360  //this->fScint_x=dims[0];
361  //this->fScint_y=dims[1];
362  //this->fScint_z=dims[2];
363  fScint_x=dims[0];
364  fScint_y=dims[1];
365  fScint_z=dims[2];
367 }
368 
369 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
370 
372  //this->fD_mtl=d_mtl;
373  fD_mtl=d_mtl;
375 }
376 
377 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
378 
380  //this->fNx=nx;
381  fNx=nx;
383 }
384 
385 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
386 
388  //this->fNy=ny;
389  fNy=ny;
391 }
392 
393 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
394 
396  //this->fNz=nz;
397  fNz=nz;
399 }
400 
401 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
402 
404  //this->fOuterRadius_pmt=outerRadius_pmt;
405  fOuterRadius_pmt=outerRadius_pmt;
407 }
408 
409 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
410 
412 
413  //Resets to default values
414  fD_mtl=0.0635*cm;
415 
416  fScint_x = 17.8*cm;
417  fScint_y = 17.8*cm;
418  fScint_z = 22.6*cm;
419 
420  fNx = 2;
421  fNy = 2;
422  fNz = 3;
423 
424  fOuterRadius_pmt = 2.3*cm;
425 
426  fSphereOn = true;
427  fRefl = 1.0;
428 
429  fNfibers = 15;
430  fWLSslab = false;
431  fMainVolumeOn = true;
432  fMainVolume = nullptr;
433  fSlab_z = 2.5*mm;
434 
436  ->ApplyCommand("/LXe/detector/scintYieldFactor 1.");
437 
438  if(fLXe_mt)fLXe_mt->AddConstProperty("SCINTILLATIONYIELD",12000./MeV);
439  if(fMPTPStyrene)fMPTPStyrene->AddConstProperty("SCINTILLATIONYIELD",10./keV);
440 
441 }
442 
443 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
444 
446  fSphereOn=b;
448 }
449 
450 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
451 
453  fRefl=r;
455 }
456 
457 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
458 
460  fWLSslab=b;
462 }
463 
464 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
465 
467  fMainVolumeOn=b;
469 }
470 
471 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
472 
474  fNfibers=n;
476 }
477 
478 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
479 
481  fLXe_mt->AddConstProperty("SCINTILLATIONYIELD",y/MeV);
482 }
483 
484 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
485 
487  fMPTPStyrene->AddConstProperty("SCINTILLATIONYIELD",y/MeV);
488 }
static constexpr double kelvin
Definition: G4SIunits.hh:281
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:80
static void Clean()
Definition: G4SolidStore.cc:73
void SetPmtPositions(const std::vector< G4ThreeVector > &positions)
Definition: LXePMTSD.cc:62
CLHEP::Hep3Vector G4ThreeVector
std::vector< ExP01TrackerHit * > a
Definition: ExP01Classes.hh:33
static constexpr double MeV
Definition: G4SIunits.hh:214
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
static constexpr double keV
Definition: G4SIunits.hh:216
static constexpr double mm
Definition: G4SIunits.hh:115
virtual G4VPhysicalVolume * Construct()
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:71
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:466
#define G4endl
Definition: G4ios.hh:61
Float_t y
Definition: compare.C:6
Definition of the LXeDetectorMessenger class.
Double_t z
static constexpr double perCent
Definition: G4SIunits.hh:332
void AddConstProperty(const char *key, G4double PropertyValue)
void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
static constexpr double kg
Definition: G4SIunits.hh:182
Definition of the LXeWLSSlab class.
void SetBirksConstant(G4double value)
static constexpr double universe_mean_density
Definition of the LXeScintSD class.
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:73
static const G4VisAttributes & GetInvisible()
LXeDetectorMessenger * fDetectorMessenger
static constexpr double g
Definition: G4SIunits.hh:183
static constexpr double m
Definition: G4SIunits.hh:129
Definition of the LXeMainVolume class.
static constexpr double m3
Definition: G4SIunits.hh:131
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
Definition: G4Material.cc:730
void SetType(const G4SurfaceType &type)
G4MaterialPropertyVector * AddProperty(const char *key, G4double *PhotonEnergies, G4double *PropertyValues, G4int NumEntries)
static constexpr double mg
Definition: G4SIunits.hh:184
static G4GeometryManager * GetInstance()
G4Cache< LXeScintSD * > fScint_SD
Definition: G4Box.hh:64
G4LogicalVolume * fExperimentalHall_log
static constexpr double eV
Definition: G4SIunits.hh:215
value_type & Get() const
Definition: G4Cache.hh:314
void OpenGeometry(G4VPhysicalVolume *vol=0)
void SetVisAttributes(const G4VisAttributes *pVA)
G4VPhysicalVolume * fExperimentalHall_phys
void InitPMTs(G4int nPMTs)
Definition: LXePMTSD.hh:64
G4MaterialPropertiesTable * fMPTPStyrene
void Put(const value_type &val) const
Definition: G4Cache.hh:318
Definition of the LXeDetectorConstruction class.
G4LogicalVolume * GetLogScint()
static G4SolidStore * GetInstance()
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
static G4PhysicalVolumeStore * GetInstance()
int G4int
Definition: G4Types.hh:78
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
void AddElement(G4Element *element, G4int nAtoms)
Definition: G4Material.cc:368
Definition of the LXePMTSD class.
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:227
G4GLOB_DLL std::ostream G4cout
static constexpr double cm
Definition: G4SIunits.hh:119
std::vector< G4ThreeVector > GetPmtPositions()
Char_t n[5]
G4MaterialPropertiesTable * fLXe_mt
static constexpr double mole
Definition: G4SIunits.hh:286
G4LogicalVolume * GetLogPhotoCath()
#define pascal
static constexpr double cm3
Definition: G4SIunits.hh:121
G4VPhysicalVolume * ConstructDetector()
#define ns
Definition: xmlparse.cc:614
void SetModel(const G4OpticalSurfaceModel model)
static G4LogicalVolumeStore * GetInstance()
void SetFinish(const G4OpticalSurfaceFinish)