ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WLSMaterials.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file WLSMaterials.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 //
29 //
30 //
31 #include "WLSMaterials.hh"
32 
33 #include "G4SystemOfUnits.hh"
34 
36 
37 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
38 
40 {
42 
43  fNistMan->SetVerbose(2);
44 
46 }
47 
48 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
49 
51 {
52  delete fPMMA;
53  delete fPethylene;
54  delete fFPethylene;
55  delete fPolystyrene;
56  delete fSilicone;
57 }
58 
59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
60 
62 {
63  if (fInstance == 0)
64  {
65  fInstance = new WLSMaterials();
66  }
67  return fInstance;
68 }
69 
70 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
71 
73 {
75 
76  if (!mat) mat = G4Material::GetMaterial(material);
77  if (!mat) {
78  std::ostringstream o;
79  o << "Material " << material << " not found!";
80  G4Exception("WLSMaterials::GetMaterial","",
81  FatalException,o.str().c_str());
82  }
83 
84  return mat;
85 }
86 
87 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
88 
90 {
91  G4double density;
92  G4int ncomponents;
93  G4double fractionmass;
94  std::vector<G4int> natoms;
95  std::vector<G4double> fractionMass;
96  std::vector<G4String> elements;
97 
98  // Materials Definitions
99  // =====================
100 
101  //--------------------------------------------------
102  // Vacuum
103  //--------------------------------------------------
104 
105  fNistMan->FindOrBuildMaterial("G4_Galactic");
106 
107  //--------------------------------------------------
108  // Air
109  //--------------------------------------------------
110 
111  fAir = fNistMan->FindOrBuildMaterial("G4_AIR");
112 
113  //--------------------------------------------------
114  // WLSfiber PMMA
115  //--------------------------------------------------
116 
117  elements.push_back("C"); natoms.push_back(5);
118  elements.push_back("H"); natoms.push_back(8);
119  elements.push_back("O"); natoms.push_back(2);
120 
121  density = 1.190*g/cm3;
122 
123  fPMMA = fNistMan->
124  ConstructNewMaterial("PMMA", elements, natoms, density);
125 
126  elements.clear();
127  natoms.clear();
128 
129  //--------------------------------------------------
130  // Cladding (polyethylene)
131  //--------------------------------------------------
132 
133  elements.push_back("C"); natoms.push_back(2);
134  elements.push_back("H"); natoms.push_back(4);
135 
136  density = 1.200*g/cm3;
137 
138  fPethylene = fNistMan->
139  ConstructNewMaterial("Pethylene", elements, natoms, density);
140 
141  elements.clear();
142  natoms.clear();
143 
144  //--------------------------------------------------
145  // Double Cladding (fluorinated polyethylene)
146  //--------------------------------------------------
147 
148  elements.push_back("C"); natoms.push_back(2);
149  elements.push_back("H"); natoms.push_back(4);
150 
151  density = 1.400*g/cm3;
152 
154  ConstructNewMaterial("FPethylene", elements, natoms, density);
155 
156  elements.clear();
157  natoms.clear();
158 
159  //--------------------------------------------------
160  // Polystyrene
161  //--------------------------------------------------
162 
163  elements.push_back("C"); natoms.push_back(8);
164  elements.push_back("H"); natoms.push_back(8);
165 
166  density = 1.050*g/cm3;
167 
169  ConstructNewMaterial("Polystyrene", elements, natoms, density);
170 
171  elements.clear();
172  natoms.clear();
173 
174  //--------------------------------------------------
175  // Silicone (Template for Optical Grease)
176  //--------------------------------------------------
177 
178  elements.push_back("C"); natoms.push_back(2);
179  elements.push_back("H"); natoms.push_back(6);
180 
181  density = 1.060*g/cm3;
182 
183  fSilicone = fNistMan->
184  ConstructNewMaterial("Silicone", elements, natoms, density);
185 
186  elements.clear();
187  natoms.clear();
188 
189  //--------------------------------------------------
190  // Aluminium
191  //--------------------------------------------------
192 
193  fNistMan->FindOrBuildMaterial("G4_Al");
194 
195  //--------------------------------------------------
196  // TiO2
197  //--------------------------------------------------
198 
199  elements.push_back("Ti"); natoms.push_back(1);
200  elements.push_back("O"); natoms.push_back(2);
201 
202  density = 4.26*g/cm3;
203 
204  G4Material* TiO2 = fNistMan->
205  ConstructNewMaterial("TiO2", elements, natoms, density);
206 
207  elements.clear();
208  natoms.clear();
209 
210  //--------------------------------------------------
211  // Scintillator Coating - 15% TiO2 and 85% polystyrene by weight.
212  //--------------------------------------------------
213 
214  density = 1.52*g/cm3;
215 
216  fCoating =
217  new G4Material("Coating", density, ncomponents=2);
218 
219  fCoating->AddMaterial(TiO2, fractionmass = 15*perCent);
220  fCoating->AddMaterial(fPolystyrene, fractionmass = 85*perCent);
221 
222  //
223  // ------------ Generate & Add Material Properties Table ------------
224  //
225 
226  G4double photonEnergy[] =
227  {2.00*eV,2.03*eV,2.06*eV,2.09*eV,2.12*eV,
228  2.15*eV,2.18*eV,2.21*eV,2.24*eV,2.27*eV,
229  2.30*eV,2.33*eV,2.36*eV,2.39*eV,2.42*eV,
230  2.45*eV,2.48*eV,2.51*eV,2.54*eV,2.57*eV,
231  2.60*eV,2.63*eV,2.66*eV,2.69*eV,2.72*eV,
232  2.75*eV,2.78*eV,2.81*eV,2.84*eV,2.87*eV,
233  2.90*eV,2.93*eV,2.96*eV,2.99*eV,3.02*eV,
234  3.05*eV,3.08*eV,3.11*eV,3.14*eV,3.17*eV,
235  3.20*eV,3.23*eV,3.26*eV,3.29*eV,3.32*eV,
236  3.35*eV,3.38*eV,3.41*eV,3.44*eV,3.47*eV};
237 
238  const G4int nEntries = sizeof(photonEnergy)/sizeof(G4double);
239 
240  //--------------------------------------------------
241  // Air
242  //--------------------------------------------------
243 
244  G4double refractiveIndex[] =
245  { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00,
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 
251  assert(sizeof(refractiveIndex) == sizeof(photonEnergy));
252 
254  mpt->AddProperty("RINDEX", photonEnergy, refractiveIndex, nEntries);
255 
257 
258  //--------------------------------------------------
259  // PMMA for WLSfibers
260  //--------------------------------------------------
261 
262  G4double refractiveIndexWLSfiber[] =
263  { 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60, 1.60,
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 
269  assert(sizeof(refractiveIndexWLSfiber) == sizeof(photonEnergy));
270 
271  G4double absWLSfiber[] =
272  {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,
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,1.10*m,
275  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,
276  1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm, 1.*mm};
277 
278  assert(sizeof(absWLSfiber) == sizeof(photonEnergy));
279 
280  G4double emissionFib[] =
281  {0.05, 0.10, 0.30, 0.50, 0.75, 1.00, 1.50, 1.85, 2.30, 2.75,
282  3.25, 3.80, 4.50, 5.20, 6.00, 7.00, 8.50, 9.50, 11.1, 12.4,
283  12.9, 13.0, 12.8, 12.3, 11.1, 11.0, 12.0, 11.0, 17.0, 16.9,
284  15.0, 9.00, 2.50, 1.00, 0.05, 0.00, 0.00, 0.00, 0.00, 0.00,
285  0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00};
286 
287  assert(sizeof(emissionFib) == sizeof(photonEnergy));
288 
289  // Add entries into properties table
291  mptWLSfiber->
292  AddProperty("RINDEX",photonEnergy,refractiveIndexWLSfiber,nEntries);
293  // mptWLSfiber->AddProperty("ABSLENGTH",photonEnergy,absWLSfiber,nEntries);
294  mptWLSfiber->AddProperty("WLSABSLENGTH",photonEnergy,absWLSfiber,nEntries);
295  mptWLSfiber->AddProperty("WLSCOMPONENT",photonEnergy,emissionFib,nEntries);
296  mptWLSfiber->AddConstProperty("WLSTIMECONSTANT", 0.5*ns);
297 
298  fPMMA->SetMaterialPropertiesTable(mptWLSfiber);
299 
300  //--------------------------------------------------
301  // Polyethylene
302  //--------------------------------------------------
303 
304  G4double refractiveIndexClad1[] =
305  { 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49, 1.49,
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 
311  assert(sizeof(refractiveIndexClad1) == sizeof(photonEnergy));
312 
313  G4double absClad[] =
314  {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,
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 
320  assert(sizeof(absClad) == sizeof(photonEnergy));
321 
322  // Add entries into properties table
324  mptClad1->AddProperty("RINDEX",photonEnergy,refractiveIndexClad1,nEntries);
325  mptClad1->AddProperty("ABSLENGTH",photonEnergy,absClad,nEntries);
326 
328 
329  //--------------------------------------------------
330  // Fluorinated Polyethylene
331  //--------------------------------------------------
332 
333  G4double refractiveIndexClad2[] =
334  { 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42, 1.42,
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 
340  assert(sizeof(refractiveIndexClad2) == sizeof(photonEnergy));
341 
342  // Add entries into properties table
344  mptClad2->AddProperty("RINDEX",photonEnergy,refractiveIndexClad2,nEntries);
345  mptClad2->AddProperty("ABSLENGTH",photonEnergy,absClad,nEntries);
346 
348 
349  //--------------------------------------------------
350  // Silicone
351  //--------------------------------------------------
352 
353  G4double refractiveIndexSilicone[] =
354  { 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46, 1.46,
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 
360  assert(sizeof(refractiveIndexSilicone) == sizeof(photonEnergy));
361 
362  // Add entries into properties table
364  mptSilicone->
365  AddProperty("RINDEX",photonEnergy,refractiveIndexSilicone,nEntries);
366  mptSilicone->AddProperty("ABSLENGTH",photonEnergy,absClad,nEntries);
367 
369 
370  //--------------------------------------------------
371  // Polystyrene
372  //--------------------------------------------------
373 
374  G4double refractiveIndexPS[] =
375  { 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50, 1.50,
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 
381  assert(sizeof(refractiveIndexPS) == sizeof(photonEnergy));
382 
383  G4double absPS[] =
384  {2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,2.*cm,
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 
390  assert(sizeof(absPS) == sizeof(photonEnergy));
391 
392  G4double scintilFast[] =
393  {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
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  1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
397  1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0};
398 
399  assert(sizeof(scintilFast) == sizeof(photonEnergy));
400 
401  // Add entries into properties table
403  mptPolystyrene->AddProperty("RINDEX",photonEnergy,refractiveIndexPS,nEntries);
404  mptPolystyrene->AddProperty("ABSLENGTH",photonEnergy,absPS,nEntries);
405  mptPolystyrene->
406  AddProperty("FASTCOMPONENT",photonEnergy, scintilFast,nEntries);
407  mptPolystyrene->AddConstProperty("SCINTILLATIONYIELD",10./keV);
408  mptPolystyrene->AddConstProperty("RESOLUTIONSCALE",1.0);
409  mptPolystyrene->AddConstProperty("FASTTIMECONSTANT", 10.*ns);
410 
411  fPolystyrene->SetMaterialPropertiesTable(mptPolystyrene);
412 
413  // Set the Birks Constant for the Polystyrene scintillator
414 
416 
417 }