Geant4  10.03
WLSMaterials.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: WLSMaterials.cc 82854 2014-07-14 09:08:25Z gcosmo $
27 //
30 //
31 //
32 #include "WLSMaterials.hh"
33 
34 #include "G4SystemOfUnits.hh"
35 
37 
38 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
39 
41 {
43 
44  fNistMan->SetVerbose(2);
45 
47 }
48 
49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
50 
52 {
53  delete fPMMA;
54  delete fPethylene;
55  delete fFPethylene;
56  delete fPolystyrene;
57  delete fSilicone;
58 }
59 
60 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
61 
63 {
64  if (fInstance == 0)
65  {
66  fInstance = new WLSMaterials();
67  }
68  return fInstance;
69 }
70 
71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
72 
74 {
75  G4Material* mat = fNistMan->FindOrBuildMaterial(material);
76 
77  if (!mat) mat = G4Material::GetMaterial(material);
78  if (!mat) {
79  std::ostringstream o;
80  o << "Material " << material << " not found!";
81  G4Exception("WLSMaterials::GetMaterial","",
82  FatalException,o.str().c_str());
83  }
84 
85  return mat;
86 }
87 
88 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
89 
91 {
92  G4double density;
93  G4int ncomponents;
94  G4double fractionmass;
95  std::vector<G4int> natoms;
96  std::vector<G4double> fractionMass;
97  std::vector<G4String> elements;
98 
99  // Materials Definitions
100  // =====================
101 
102  //--------------------------------------------------
103  // Vacuum
104  //--------------------------------------------------
105 
106  fNistMan->FindOrBuildMaterial("G4_Galactic");
107 
108  //--------------------------------------------------
109  // Air
110  //--------------------------------------------------
111 
112  fAir = fNistMan->FindOrBuildMaterial("G4_AIR");
113 
114  //--------------------------------------------------
115  // WLSfiber PMMA
116  //--------------------------------------------------
117 
118  elements.push_back("C"); natoms.push_back(5);
119  elements.push_back("H"); natoms.push_back(8);
120  elements.push_back("O"); natoms.push_back(2);
121 
122  density = 1.190*g/cm3;
123 
124  fPMMA = fNistMan->
125  ConstructNewMaterial("PMMA", elements, natoms, density);
126 
127  elements.clear();
128  natoms.clear();
129 
130  //--------------------------------------------------
131  // Cladding (polyethylene)
132  //--------------------------------------------------
133 
134  elements.push_back("C"); natoms.push_back(2);
135  elements.push_back("H"); natoms.push_back(4);
136 
137  density = 1.200*g/cm3;
138 
139  fPethylene = fNistMan->
140  ConstructNewMaterial("Pethylene", elements, natoms, density);
141 
142  elements.clear();
143  natoms.clear();
144 
145  //--------------------------------------------------
146  // Double Cladding (fluorinated polyethylene)
147  //--------------------------------------------------
148 
149  elements.push_back("C"); natoms.push_back(2);
150  elements.push_back("H"); natoms.push_back(4);
151 
152  density = 1.400*g/cm3;
153 
155  ConstructNewMaterial("FPethylene", elements, natoms, density);
156 
157  elements.clear();
158  natoms.clear();
159 
160  //--------------------------------------------------
161  // Polystyrene
162  //--------------------------------------------------
163 
164  elements.push_back("C"); natoms.push_back(8);
165  elements.push_back("H"); natoms.push_back(8);
166 
167  density = 1.050*g/cm3;
168 
170  ConstructNewMaterial("Polystyrene", elements, natoms, density);
171 
172  elements.clear();
173  natoms.clear();
174 
175  //--------------------------------------------------
176  // Silicone (Template for Optical Grease)
177  //--------------------------------------------------
178 
179  elements.push_back("C"); natoms.push_back(2);
180  elements.push_back("H"); natoms.push_back(6);
181 
182  density = 1.060*g/cm3;
183 
184  fSilicone = fNistMan->
185  ConstructNewMaterial("Silicone", elements, natoms, density);
186 
187  elements.clear();
188  natoms.clear();
189 
190  //--------------------------------------------------
191  // Aluminium
192  //--------------------------------------------------
193 
194  fNistMan->FindOrBuildMaterial("G4_Al");
195 
196  //--------------------------------------------------
197  // TiO2
198  //--------------------------------------------------
199 
200  elements.push_back("Ti"); natoms.push_back(1);
201  elements.push_back("O"); natoms.push_back(2);
202 
203  density = 4.26*g/cm3;
204 
205  G4Material* TiO2 = fNistMan->
206  ConstructNewMaterial("TiO2", elements, natoms, density);
207 
208  elements.clear();
209  natoms.clear();
210 
211  //--------------------------------------------------
212  // Scintillator Coating - 15% TiO2 and 85% polystyrene by weight.
213  //--------------------------------------------------
214 
215  density = 1.52*g/cm3;
216 
217  fCoating =
218  new G4Material("Coating", density, ncomponents=2);
219 
220  fCoating->AddMaterial(TiO2, fractionmass = 15*perCent);
221  fCoating->AddMaterial(fPolystyrene, fractionmass = 85*perCent);
222 
223  //
224  // ------------ Generate & Add Material Properties Table ------------
225  //
226 
227  G4double photonEnergy[] =
228  {2.00*eV,2.03*eV,2.06*eV,2.09*eV,2.12*eV,
229  2.15*eV,2.18*eV,2.21*eV,2.24*eV,2.27*eV,
230  2.30*eV,2.33*eV,2.36*eV,2.39*eV,2.42*eV,
231  2.45*eV,2.48*eV,2.51*eV,2.54*eV,2.57*eV,
232  2.60*eV,2.63*eV,2.66*eV,2.69*eV,2.72*eV,
233  2.75*eV,2.78*eV,2.81*eV,2.84*eV,2.87*eV,
234  2.90*eV,2.93*eV,2.96*eV,2.99*eV,3.02*eV,
235  3.05*eV,3.08*eV,3.11*eV,3.14*eV,3.17*eV,
236  3.20*eV,3.23*eV,3.26*eV,3.29*eV,3.32*eV,
237  3.35*eV,3.38*eV,3.41*eV,3.44*eV,3.47*eV};
238 
239  const G4int nEntries = sizeof(photonEnergy)/sizeof(G4double);
240 
241  //--------------------------------------------------
242  // Air
243  //--------------------------------------------------
244 
245  G4double refractiveIndex[] =
246  { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
247  1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
248  1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
249  1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
250  1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00};
251 
252  assert(sizeof(refractiveIndex) == sizeof(photonEnergy));
253 
255  mpt->AddProperty("RINDEX", photonEnergy, refractiveIndex, nEntries);
256 
258 
259  //--------------------------------------------------
260  // PMMA for WLSfibers
261  //--------------------------------------------------
262 
263  G4double refractiveIndexWLSfiber[] =
264  { 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60,
265  1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60,
266  1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60,
267  1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60,
268  1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60};
269 
270  assert(sizeof(refractiveIndexWLSfiber) == sizeof(photonEnergy));
271 
272  G4double absWLSfiber[] =
273  {5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,
274  5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,
275  5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,5.40*m,1.10*m,
276  1.10*m,1.10*m,1.10*m,1.10*m,1.10*m,1.10*m, 1.*mm, 1.*mm, 1.*mm, 1.*mm,
277  1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm};
278 
279  assert(sizeof(absWLSfiber) == sizeof(photonEnergy));
280 
281  G4double emissionFib[] =
282  {0.05, 0.10, 0.30, 0.50, 0.75, 1.00, 1.50, 1.85, 2.30, 2.75,
283  3.25, 3.80, 4.50, 5.20, 6.00, 7.00, 8.50, 9.50, 11.1, 12.4,
284  12.9, 13.0, 12.8, 12.3, 11.1, 11.0, 12.0, 11.0, 17.0, 16.9,
285  15.0, 9.00, 2.50, 1.00, 0.05, 0.00, 0.00, 0.00, 0.00, 0.00,
286  0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00};
287 
288  assert(sizeof(emissionFib) == sizeof(photonEnergy));
289 
290  // Add entries into properties table
292  mptWLSfiber->
293  AddProperty("RINDEX",photonEnergy,refractiveIndexWLSfiber,nEntries);
294  // mptWLSfiber->AddProperty("ABSLENGTH",photonEnergy,absWLSfiber,nEntries);
295  mptWLSfiber->AddProperty("WLSABSLENGTH",photonEnergy,absWLSfiber,nEntries);
296  mptWLSfiber->AddProperty("WLSCOMPONENT",photonEnergy,emissionFib,nEntries);
297  mptWLSfiber->AddConstProperty("WLSTIMECONSTANT", 0.5*ns);
298 
299  fPMMA->SetMaterialPropertiesTable(mptWLSfiber);
300 
301  //--------------------------------------------------
302  // Polyethylene
303  //--------------------------------------------------
304 
305  G4double refractiveIndexClad1[] =
306  { 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49,
307  1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49,
308  1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49,
309  1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49,
310  1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49};
311 
312  assert(sizeof(refractiveIndexClad1) == sizeof(photonEnergy));
313 
314  G4double absClad[] =
315  {20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,
316  20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,
317  20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,
318  20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,
319  20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m,20.0*m};
320 
321  assert(sizeof(absClad) == sizeof(photonEnergy));
322 
323  // Add entries into properties table
325  mptClad1->AddProperty("RINDEX",photonEnergy,refractiveIndexClad1,nEntries);
326  mptClad1->AddProperty("ABSLENGTH",photonEnergy,absClad,nEntries);
327 
329 
330  //--------------------------------------------------
331  // Fluorinated Polyethylene
332  //--------------------------------------------------
333 
334  G4double refractiveIndexClad2[] =
335  { 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42,
336  1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42,
337  1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42,
338  1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42,
339  1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42};
340 
341  assert(sizeof(refractiveIndexClad2) == sizeof(photonEnergy));
342 
343  // Add entries into properties table
345  mptClad2->AddProperty("RINDEX",photonEnergy,refractiveIndexClad2,nEntries);
346  mptClad2->AddProperty("ABSLENGTH",photonEnergy,absClad,nEntries);
347 
349 
350  //--------------------------------------------------
351  // Silicone
352  //--------------------------------------------------
353 
354  G4double refractiveIndexSilicone[] =
355  { 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46,
356  1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46,
357  1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46,
358  1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46,
359  1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46};
360 
361  assert(sizeof(refractiveIndexSilicone) == sizeof(photonEnergy));
362 
363  // Add entries into properties table
365  mptSilicone->
366  AddProperty("RINDEX",photonEnergy,refractiveIndexSilicone,nEntries);
367  mptSilicone->AddProperty("ABSLENGTH",photonEnergy,absClad,nEntries);
368 
370 
371  //--------------------------------------------------
372  // Polystyrene
373  //--------------------------------------------------
374 
375  G4double refractiveIndexPS[] =
376  { 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50,
377  1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50,
378  1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50,
379  1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50,
380  1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50};
381 
382  assert(sizeof(refractiveIndexPS) == sizeof(photonEnergy));
383 
384  G4double absPS[] =
385  {2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,
386  2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,
387  2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,
388  2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,
389  2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm};
390 
391  assert(sizeof(absPS) == sizeof(photonEnergy));
392 
393  G4double scintilFast[] =
394  {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
395  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
396  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
397  1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
398  1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0};
399 
400  assert(sizeof(scintilFast) == sizeof(photonEnergy));
401 
402  // Add entries into properties table
404  mptPolystyrene->AddProperty("RINDEX",photonEnergy,refractiveIndexPS,nEntries);
405  mptPolystyrene->AddProperty("ABSLENGTH",photonEnergy,absPS,nEntries);
406  mptPolystyrene->
407  AddProperty("FASTCOMPONENT",photonEnergy, scintilFast,nEntries);
408  mptPolystyrene->AddConstProperty("SCINTILLATIONYIELD",10./keV);
409  mptPolystyrene->AddConstProperty("RESOLUTIONSCALE",1.0);
410  mptPolystyrene->AddConstProperty("FASTTIMECONSTANT", 10.*ns);
411 
412  fPolystyrene->SetMaterialPropertiesTable(mptPolystyrene);
413 
414  // Set the Birks Constant for the Polystyrene scintillator
415 
417 
418 }
G4IonisParamMat * GetIonisation() const
Definition: G4Material.hh:226
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
static constexpr double mm
Definition: G4SIunits.hh:115
G4Material * GetMaterial(const G4String)
Definition: WLSMaterials.cc:73
void CreateMaterials()
Definition: WLSMaterials.cc:90
void AddMaterial(G4Material *material, G4double fraction)
Definition: G4Material.cc:467
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:602
G4Material * fPethylene
Definition: WLSMaterials.hh:67
static constexpr double perCent
Definition: G4SIunits.hh:332
void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
Definition: G4Material.hh:249
void SetBirksConstant(G4double value)
Definition of the WLSMaterials class.
G4Material * fPMMA
Definition: WLSMaterials.hh:66
static constexpr double g
Definition: G4SIunits.hh:183
int G4int
Definition: G4Types.hh:78
static G4NistManager * Instance()
G4MaterialPropertyVector * AddProperty(const char *key, G4double *PhotonEnergies, G4double *PropertyValues, G4int NumEntries)
static WLSMaterials * fInstance
Definition: WLSMaterials.hh:60
static constexpr double m
Definition: G4SIunits.hh:129
G4Material * fFPethylene
Definition: WLSMaterials.hh:68
G4Material * fAir
Definition: WLSMaterials.hh:64
void SetVerbose(G4int)
static constexpr double cm
Definition: G4SIunits.hh:119
static constexpr double eV
Definition: G4SIunits.hh:215
void AddConstProperty(const char *key, G4double PropertyValue)
G4NistManager * fNistMan
Definition: WLSMaterials.hh:62
static constexpr double cm3
Definition: G4SIunits.hh:121
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4Material * fCoating
Definition: WLSMaterials.hh:71
G4Material * fSilicone
Definition: WLSMaterials.hh:70
G4Material * fPolystyrene
Definition: WLSMaterials.hh:69
virtual ~WLSMaterials()
Definition: WLSMaterials.cc:51
static constexpr double MeV
Definition: G4SIunits.hh:214
double G4double
Definition: G4Types.hh:76
static WLSMaterials * GetInstance()
Definition: WLSMaterials.cc:62
static constexpr double keV
Definition: G4SIunits.hh:216
#define ns
Definition: xmlparse.cc:614