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 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

  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 //
 27 /// \file electromagnetic/TestEm10/src/Materials.cc
 28 /// \brief Implementation of the Materials class
 29 //
 30 //
 31 //
 32 //      GEANT 4 class
 33 //
 34 //      History: based on object model of
 35 //       Materials
 36 //     Originally Created in Test30 by Vladimir Ivanchenko, 12 March 2002
 37 //
 38 //    Modified for Test by V. Grichine, 29 Jan 2006
 39 //    is filled with XTR related materials, plastics, gas mixtures, etc
 40 
 41 #include "Materials.hh"
 42 
 43 #include "G4Material.hh"
 44 #include "G4MaterialTable.hh"
 45 #include "G4SystemOfUnits.hh"
 46 #include "G4UnitsTable.hh"
 47 
 48 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 49 
 50 Materials* Materials::fgInstance = 0;
 51 
 52 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 53 
 54 Materials* Materials::GetInstance()
 55 {
 56   if (!fgInstance) {
 57     fgInstance = new Materials();
 58   }
 59   return fgInstance;
 60 }
 61 
 62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 63 
 64 Materials::Materials()
 65 {
 66   fgInstance = this;
 67   Initialise();
 68 }
 69 
 70 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 71 
 72 Materials::~Materials() {}
 73 
 74 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 75 
 76 void Materials::Initialise()
 77 {
 78   G4String name, symbol;
 79   G4double a, z;
 80   G4double density, fractionmass;
 81   G4int nel, ncomponents;
 82 
 83   // define Elements
 84 
 85   a = 1.01 * g / mole;
 86   G4Element* elH = new G4Element(name = "Hydrogen", symbol = "H", z = 1., a);
 87 
 88   a = 6.94 * g / mole;
 89   G4Element* elLi = new G4Element(name = "Lithium", symbol = "Li", z = 3., a);
 90 
 91   a = 9.01 * g / mole;
 92   G4Element* elBe = new G4Element(name = "Berillium", symbol = "Be", z = 4., a);
 93 
 94   a = 12.01 * g / mole;
 95   G4Element* elC = new G4Element(name = "Carbon", symbol = "C", z = 6., a);
 96 
 97   a = 14.01 * g / mole;
 98   G4Element* elN = new G4Element(name = "Nitrogen", symbol = "N", z = 7., a);
 99 
100   a = 16.00 * g / mole;
101   G4Element* elO = new G4Element(name = "Oxygen", symbol = "O", z = 8., a);
102 
103   a = 39.948 * g / mole;
104   G4Element* elAr = new G4Element(name = "Argon", symbol = "Ar", z = 18., a);
105 
106   /*
107   a = 131.29*g/mole;
108   G4Element* elXe = new G4Element(name="Xenon", symbol="Xe", z=54., a);
109 
110   a = 19.00*g/mole;
111   G4Element* elF  = new G4Element(name="Fluorine", symbol="F", z=9., a);
112   */
113 
114   //////////////
115   //
116   // Detector windows, electrodes
117   // Al for electrodes
118 
119   density = 2.700 * g / cm3;
120   a = 26.98 * g / mole;
121   new G4Material(name = "Al", z = 13., a, density);
122 
123   /////////
124   //
125   // Materials for popular X-ray TR radiators
126   //
127 
128   // TRT_CH2
129 
130   density = 0.935 * g / cm3;
131   G4Material* TRT_CH2 = new G4Material(name = "TRT_CH2", density, nel = 2);
132   TRT_CH2->AddElement(elC, 1);
133   TRT_CH2->AddElement(elH, 2);
134 
135   // Radiator
136 
137   density = 0.059 * g / cm3;
138   G4Material* Radiator = new G4Material(name = "Radiator", density, nel = 2);
139   Radiator->AddElement(elC, 1);
140   Radiator->AddElement(elH, 2);
141 
142   // Carbon Fiber
143 
144   density = 0.145 * g / cm3;
145   G4Material* CarbonFiber = new G4Material(name = "CarbonFiber", density, nel = 1);
146   CarbonFiber->AddElement(elC, 1);
147 
148   // Lithium
149 
150   density = 0.534 * g / cm3;
151   G4Material* Li = new G4Material(name = "Li", density, nel = 1);
152   Li->AddElement(elLi, 1);
153 
154   // Beryllium
155 
156   density = 1.848 * g / cm3;
157   G4Material* Be = new G4Material(name = "Be", density, nel = 1);
158   Be->AddElement(elBe, 1);
159 
160   // Mylar
161 
162   density = 1.39 * g / cm3;
163   G4Material* Mylar = new G4Material(name = "Mylar", density, nel = 3);
164   Mylar->AddElement(elO, 2);
165   Mylar->AddElement(elC, 5);
166   Mylar->AddElement(elH, 4);
167 
168   // Kapton Dupont de Nemur (density: 1.396-1.430, get middle )
169 
170   density = 1.413 * g / cm3;
171   G4Material* Kapton = new G4Material(name = "Kapton", density, nel = 4);
172   Kapton->AddElement(elO, 5);
173   Kapton->AddElement(elC, 22);
174   Kapton->AddElement(elN, 2);
175   Kapton->AddElement(elH, 10);
176 
177   // Kapton (polyimide) ??? since = Mylar C5H4O2
178 
179   // density = 1.39*g/cm3;
180   // G4Material* kapton = new G4Material(name="kapton", density, nel=3);
181   // Kapton->AddElement(elO,2);
182   // Kapton->AddElement(elC,5);
183   // Kapton->AddElement(elH,4);
184 
185   // Polypropelene
186 
187   G4Material* CH2 = new G4Material("CH2", 0.91 * g / cm3, 2);
188   CH2->AddElement(elH, 2);
189   CH2->AddElement(elC, 1);
190 
191   ////////////////////////////
192   //
193   // Noble gases , STP conditions
194 
195   // Helium as detector gas, STP
196 
197   density = 0.178 * mg / cm3;
198   a = 4.0026 * g / mole;
199   G4Material* He = new G4Material(name = "He", z = 2., a, density);
200 
201   // Neon as detector gas, STP
202 
203   density = 0.900 * mg / cm3;
204   a = 20.179 * g / mole;
205   new G4Material(name = "Ne", z = 10., a, density);
206 
207   // Argon as detector gas, STP
208 
209   density = 1.7836 * mg / cm3;  // STP
210   G4Material* Argon = new G4Material(name = "Argon", density, ncomponents = 1);
211   Argon->AddElement(elAr, 1);
212 
213   // Krypton as detector gas, STP
214 
215   density = 3.700 * mg / cm3;
216   a = 83.80 * g / mole;
217   G4Material* Kr = new G4Material(name = "Kr", z = 36., a, density);
218 
219   // Xenon as detector gas, STP
220 
221   density = 5.858 * mg / cm3;
222   a = 131.29 * g / mole;
223   G4Material* Xe = new G4Material(name = "Xenon", z = 54., a, density);
224 
225   /////////////////////////////////
226   //
227   // Hydrocarbones, metane and others
228 
229   // Metane, STP
230 
231   density = 0.7174 * mg / cm3;
232   G4Material* metane = new G4Material(name = "CH4", density, nel = 2);
233   metane->AddElement(elC, 1);
234   metane->AddElement(elH, 4);
235 
236   // Propane, STP
237 
238   density = 2.005 * mg / cm3;
239   G4Material* propane = new G4Material(name = "C3H8", density, nel = 2);
240   propane->AddElement(elC, 3);
241   propane->AddElement(elH, 8);
242 
243   // iso-Butane (methylpropane), STP
244 
245   density = 2.67 * mg / cm3;
246   G4Material* isobutane = new G4Material(name = "isoC4H10", density, nel = 2);
247   isobutane->AddElement(elC, 4);
248   isobutane->AddElement(elH, 10);
249 
250   /////////////////////////
251   //
252   // Molecular gases
253 
254   // Carbon dioxide, STP
255 
256   density = 1.977 * mg / cm3;
257   G4Material* CO2 =
258     new G4Material(name = "CO2", density, nel = 2, kStateGas, 273.15 * kelvin, 1. * atmosphere);
259   CO2->AddElement(elC, 1);
260   CO2->AddElement(elO, 2);
261 
262   // Carbon dioxide, STP
263 
264   density = 1.977 * 273. * mg / cm3 / 293.;
265   G4Material* CarbonDioxide = new G4Material(name = "CO2_2", density, nel = 2);
266   CarbonDioxide->AddElement(elC, 1);
267   CarbonDioxide->AddElement(elO, 2);
268 
269   // Nitrogen, STP
270 
271   density = 1.25053 * mg / cm3;  // STP
272   G4Material* Nitrogen = new G4Material(name = "N2", density, ncomponents = 1);
273   Nitrogen->AddElement(elN, 2);
274 
275   // Oxygen, STP
276 
277   density = 1.4289 * mg / cm3;  // STP
278   G4Material* Oxygen = new G4Material(name = "O2", density, ncomponents = 1);
279   Oxygen->AddElement(elO, 2);
280 
281   /* *****************************
282   density = 1.25053*mg/cm3;       // STP
283   a = 14.01*g/mole ;       // get atomic weight !!!
284   //  a = 28.016*g/mole;
285   G4Material* N2  = new G4Material(name="Nitrogen", z= 7.,a,density) ;
286 
287   density = 1.25053*mg/cm3;       // STP
288   G4Material* anotherN2 = new G4Material(name="anotherN2", density,ncomponents=2);
289   anotherN2->AddElement(elN, 1);
290   anotherN2->AddElement(elN, 1);
291 
292   // air made from oxigen and nitrogen only
293 
294   density = 1.290*mg/cm3;  // old air from elements
295   G4Material* air = new G4Material(name="air"  , density, ncomponents=2);
296   air->AddElement(elN, fractionmass=0.7);
297   air->AddElement(elO, fractionmass=0.3);
298   ******************************************** */
299 
300   // Dry Air (average composition with Ar), STP
301 
302   density = 1.2928 * mg / cm3;  // STP
303   G4Material* Air = new G4Material(name = "Air", density, ncomponents = 3);
304   Air->AddMaterial(Nitrogen, fractionmass = 0.7557);
305   Air->AddMaterial(Oxygen, fractionmass = 0.2315);
306   Air->AddMaterial(Argon, fractionmass = 0.0128);
307 
308   ////////////////////////////////////////////////////////////////////////////
309   //
310   // MWPC mixtures
311 
312   // 85% Xe + 15% CO2, STP
313 
314   density = 4.9 * mg / cm3;
315   G4Material* Xe15CO2 = new G4Material(name = "Xe15CO2", density, ncomponents = 2);
316   Xe15CO2->AddMaterial(Xe, fractionmass = 0.979);
317   Xe15CO2->AddMaterial(CarbonDioxide, fractionmass = 0.021);
318 
319   // 80% Xe + 20% CO2, STP
320 
321   density = 5.0818 * mg / cm3;
322   G4Material* Xe20CO2 = new G4Material(name = "Xe20CO2", density, ncomponents = 2);
323   Xe20CO2->AddMaterial(Xe, fractionmass = 0.922);
324   Xe20CO2->AddMaterial(CarbonDioxide, fractionmass = 0.078);
325 
326   // 70% Xe + 27% CO2 + 3% O2, 20 1 atm ATLAS straw tube mixture
327 
328   density = 4.358 * mg / cm3;
329   G4Material* Xe27CO23O2 = new G4Material(name = "Xe27CO23O2", density, ncomponents = 3);
330   Xe27CO23O2->AddMaterial(Xe, fractionmass = 0.87671);
331   Xe27CO23O2->AddMaterial(CarbonDioxide, fractionmass = 0.11412);
332   Xe27CO23O2->AddMaterial(Oxygen, fractionmass = 0.00917);
333 
334   // 80% Kr + 20% CO2, STP
335 
336   density = 3.601 * mg / cm3;
337   G4Material* Kr20CO2 = new G4Material(name = "Kr20CO2", density, ncomponents = 2);
338   Kr20CO2->AddMaterial(Kr, fractionmass = 0.89);
339   Kr20CO2->AddMaterial(CarbonDioxide, fractionmass = 0.11);
340 
341   // Xe + 55% He + 15% CH4 ; NIM A294 (1990) 465-472; STP
342 
343   density = 1.963 * 273. * mg / cm3 / 293.;
344   G4Material* Xe55He15CH4 = new G4Material(name = "Xe55He15CH4", density, ncomponents = 3);
345   Xe55He15CH4->AddMaterial(Xe, 0.895);
346   Xe55He15CH4->AddMaterial(He, 0.050);
347   Xe55He15CH4->AddMaterial(metane, 0.055);
348 
349   // 90% Xe + 10% CH4, STP ; NIM A248 (1986) 379-388
350 
351   density = 5.344 * mg / cm3;
352   G4Material* Xe10CH4 = new G4Material(name = "Xe10CH4", density, ncomponents = 2);
353   Xe10CH4->AddMaterial(Xe, fractionmass = 0.987);
354   Xe10CH4->AddMaterial(metane, fractionmass = 0.013);
355 
356   // 95% Xe + 5% CH4, STP ; NIM A214 (1983) 261-268
357 
358   density = 5.601 * mg / cm3;
359   G4Material* Xe5CH4 = new G4Material(name = "Xe5CH4", density, ncomponents = 2);
360   Xe5CH4->AddMaterial(Xe, fractionmass = 0.994);
361   Xe5CH4->AddMaterial(metane, fractionmass = 0.006);
362 
363   // 80% Xe + 20% CH4, STP ; NIM A253 (1987) 235-244
364 
365   density = 4.83 * mg / cm3;
366   G4Material* Xe20CH4 = new G4Material(name = "Xe20CH4", density, ncomponents = 2);
367   Xe20CH4->AddMaterial(Xe, fractionmass = 0.97);
368   Xe20CH4->AddMaterial(metane, fractionmass = 0.03);
369 
370   // 93% Ar + 7% CH4, STP ; NIM 107 (1973) 413-422
371 
372   density = 1.709 * mg / cm3;
373   G4Material* Ar7CH4 = new G4Material(name = "Ar7CH4", density, ncomponents = 2);
374   Ar7CH4->AddMaterial(Argon, fractionmass = 0.971);
375   Ar7CH4->AddMaterial(metane, fractionmass = 0.029);
376 
377   // 93% Kr + 7% CH4, STP ; NIM 107 (1973) 413-422
378 
379   density = 3.491 * mg / cm3;
380   G4Material* Kr7CH4 = new G4Material(name = "Kr7CH4", density, ncomponents = 2);
381   Kr7CH4->AddMaterial(Kr, fractionmass = 0.986);
382   Kr7CH4->AddMaterial(metane, fractionmass = 0.014);
383 
384   // 0.5*(95% Xe + 5% CH4)+0.5*(93% Ar + 7% CH4), STP ; NIM A214 (1983) 261-268
385 
386   density = 3.655 * mg / cm3;
387   G4Material* XeArCH4 = new G4Material(name = "XeArCH4", density, ncomponents = 2);
388   XeArCH4->AddMaterial(Xe5CH4, fractionmass = 0.766);
389   XeArCH4->AddMaterial(Ar7CH4, fractionmass = 0.234);
390 
391   // Silicon as detector material
392 
393   density = 2.330 * g / cm3;
394   a = 28.09 * g / mole;
395   new G4Material(name = "Si", z = 14., a, density);
396 
397   /*
398   G4Material* ma;
399   ma  = new G4Material("H",     1.,  1.0*g/mole, 1.*g/cm3);
400   ma  = new G4Material("D",     1.,  2.0*g/mole, 1.*g/cm3);
401   ma  = new G4Material("Li",    3.,  6.941*g/mole, 1.*g/cm3);
402   ma  = new G4Material("Be",    4.,  9.01*g/mole, 1.848*g/cm3);
403   ma  = new G4Material("C",     6.,  12.00*g/mole, 2.0*g/cm3);
404         ma  = new G4Material("Graphite",6., 12.00*g/mole, 2.265*g/cm3 );
405   ma->SetChemicalFormula("Graphite");
406   ma  = new G4Material("Al",    13.,  26.98*g/mole,  2.7 *g/cm3);
407         ma  = new G4Material("Si",    14.,  29.055*g/mole, 2.33*g/cm3);
408         ma  = new G4Material("LAr",   18.,  39.95*g/mole,  1.393*g/cm3);
409         ma  = new G4Material("Zr",    40.,  91.224*g/mole, 4.0*g/cm3);
410         ma  = new G4Material("LXe",   54., 131.29*g/mole,  3.02*g/cm3);
411         ma  = new G4Material("Fe",    26.,  55.85*g/mole,  7.87*g/cm3);
412         ma  = new G4Material("Ni",    29.,  58.6934*g/mole,  8.00*g/cm3);
413         ma  = new G4Material("Cu",    29.,  63.55*g/mole,  8.96*g/cm3);
414         ma  = new G4Material("Au",    79., 196.97*g/mole, 19.32*g/cm3);
415         ma  = new G4Material("Ta",    73., 180.9479*g/mole, 16.67*g/cm3);
416         ma  = new G4Material("W",     74., 183.85*g/mole, 19.30*g/cm3);
417         ma  = new G4Material("Pb",    82., 207.19*g/mole, 11.35*g/cm3);
418         ma  = new G4Material("Bi",    83., 208.98*g/mole, 12.*g/cm3);
419         ma  = new G4Material("U",     92., 238.03*g/mole, 18.95*g/cm3);
420 
421   G4Element*   H  = new G4Element ("Hydrogen", "H",   1. ,  1.01*g/mole);
422   G4Element*   N  = new G4Element ("Nitrigen", "N",   7. , 14.00*g/mole);
423   G4Element*   O  = new G4Element ("Oxygen"  , "O",   8. , 16.00*g/mole);
424   G4Element*   C  = new G4Element ("Carbon"  , "C",   6. , 12.00*g/mole);
425   G4Element*  Cs  = new G4Element ("Cesium"  , "Cs", 55. , 132.905*g/mole);
426   G4Element*   I  = new G4Element ("Iodide"  , "I",  53. , 126.9044*g/mole);
427 
428   ma = new G4Material("O2", 8., 16.00*g/mole, 1.1*g/cm3);
429   ma->SetChemicalFormula("O_2");
430   ma = new G4Material ("Water" , 1.*g/cm3, 2);
431   ma->AddElement(H,2);
432   ma->AddElement(O,1);
433   ma->SetChemicalFormula("H_2O");
434   ma = new G4Material ("Ethane" , 0.4241*g/cm3, 2);
435   ma->AddElement(H,6);
436   ma->AddElement(C,2);
437   ma->SetChemicalFormula("C_2H_6");
438   ma = new G4Material ("CsI" , 4.53*g/cm3, 2);
439   ma->AddElement(Cs,1);
440   ma->AddElement(I,1);
441   ma->SetChemicalFormula("CsI");
442   ma = new G4Material("Air"  , 1.290*mg/cm3, 2);
443         // use fraction in mass
444   ma->AddElement(N, 0.7);
445   ma->AddElement(O, 0.3);
446   */
447 }
448 
449 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
450 
451 G4Material* Materials::GetMaterial(const G4String& name)
452 {
453   //  const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
454 
455   G4Material* ma = G4Material::GetMaterial(name);
456 
457   G4cout << "Material is selected: " << ma->GetName() << G4endl;
458   return ma;
459 }
460