Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // 27 /// \file electromagnetic/TestEm10/src/Materia 28 /// \brief Implementation of the Materials cla 29 // 30 // 31 // 32 // GEANT 4 class 33 // 34 // History: based on object model of 35 // Materials 36 // Originally Created in Test30 by Vladimi 37 // 38 // Modified for Test by V. Grichine, 29 Jan 39 // is filled with XTR related materials, pl 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........oo 49 50 Materials* Materials::fgInstance = 0; 51 52 //....oooOO0OOooo........oooOO0OOooo........oo 53 54 Materials* Materials::GetInstance() 55 { 56 if (!fgInstance) { 57 fgInstance = new Materials(); 58 } 59 return fgInstance; 60 } 61 62 //....oooOO0OOooo........oooOO0OOooo........oo 63 64 Materials::Materials() 65 { 66 fgInstance = this; 67 Initialise(); 68 } 69 70 //....oooOO0OOooo........oooOO0OOooo........oo 71 72 Materials::~Materials() {} 73 74 //....oooOO0OOooo........oooOO0OOooo........oo 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 = "Hydro 87 88 a = 6.94 * g / mole; 89 G4Element* elLi = new G4Element(name = "Lith 90 91 a = 9.01 * g / mole; 92 G4Element* elBe = new G4Element(name = "Beri 93 94 a = 12.01 * g / mole; 95 G4Element* elC = new G4Element(name = "Carbo 96 97 a = 14.01 * g / mole; 98 G4Element* elN = new G4Element(name = "Nitro 99 100 a = 16.00 * g / mole; 101 G4Element* elO = new G4Element(name = "Oxyge 102 103 a = 39.948 * g / mole; 104 G4Element* elAr = new G4Element(name = "Argo 105 106 /* 107 a = 131.29*g/mole; 108 G4Element* elXe = new G4Element(name="Xenon" 109 110 a = 19.00*g/mole; 111 G4Element* elF = new G4Element(name="Fluori 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, dens 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 = 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 = 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(nam 146 CarbonFiber->AddElement(elC, 1); 147 148 // Lithium 149 150 density = 0.534 * g / cm3; 151 G4Material* Li = new G4Material(name = "Li", 152 Li->AddElement(elLi, 1); 153 154 // Beryllium 155 156 density = 1.848 * g / cm3; 157 G4Material* Be = new G4Material(name = "Be", 158 Be->AddElement(elBe, 1); 159 160 // Mylar 161 162 density = 1.39 * g / cm3; 163 G4Material* Mylar = new G4Material(name = "M 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. 169 170 density = 1.413 * g / cm3; 171 G4Material* Kapton = new G4Material(name = " 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 C5H4 178 179 // density = 1.39*g/cm3; 180 // G4Material* kapton = new G4Material(name= 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 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", 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, dens 206 207 // Argon as detector gas, STP 208 209 density = 1.7836 * mg / cm3; // STP 210 G4Material* Argon = new G4Material(name = "A 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", 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 = "Xeno 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 = " 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 = 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 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 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(n 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 = 273 Nitrogen->AddElement(elN, 2); 274 275 // Oxygen, STP 276 277 density = 1.4289 * mg / cm3; // STP 278 G4Material* Oxygen = new G4Material(name = " 279 Oxygen->AddElement(elO, 2); 280 281 /* ***************************** 282 density = 1.25053*mg/cm3; // STP 283 a = 14.01*g/mole ; // get atomic weigh 284 // a = 28.016*g/mole; 285 G4Material* N2 = new G4Material(name="Nitro 286 287 density = 1.25053*mg/cm3; // STP 288 G4Material* anotherN2 = new G4Material(name= 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 ele 295 G4Material* air = new G4Material(name="air" 296 air->AddElement(elN, fractionmass=0.7); 297 air->AddElement(elO, fractionmass=0.3); 298 ******************************************** 299 300 // Dry Air (average composition with Ar), ST 301 302 density = 1.2928 * mg / cm3; // STP 303 G4Material* Air = new G4Material(name = "Air 304 Air->AddMaterial(Nitrogen, fractionmass = 0. 305 Air->AddMaterial(Oxygen, fractionmass = 0.23 306 Air->AddMaterial(Argon, fractionmass = 0.012 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 = 316 Xe15CO2->AddMaterial(Xe, fractionmass = 0.97 317 Xe15CO2->AddMaterial(CarbonDioxide, fraction 318 319 // 80% Xe + 20% CO2, STP 320 321 density = 5.0818 * mg / cm3; 322 G4Material* Xe20CO2 = new G4Material(name = 323 Xe20CO2->AddMaterial(Xe, fractionmass = 0.92 324 Xe20CO2->AddMaterial(CarbonDioxide, fraction 325 326 // 70% Xe + 27% CO2 + 3% O2, 20 1 atm ATLAS 327 328 density = 4.358 * mg / cm3; 329 G4Material* Xe27CO23O2 = new G4Material(name 330 Xe27CO23O2->AddMaterial(Xe, fractionmass = 0 331 Xe27CO23O2->AddMaterial(CarbonDioxide, fract 332 Xe27CO23O2->AddMaterial(Oxygen, fractionmass 333 334 // 80% Kr + 20% CO2, STP 335 336 density = 3.601 * mg / cm3; 337 G4Material* Kr20CO2 = new G4Material(name = 338 Kr20CO2->AddMaterial(Kr, fractionmass = 0.89 339 Kr20CO2->AddMaterial(CarbonDioxide, fraction 340 341 // Xe + 55% He + 15% CH4 ; NIM A294 (1990) 4 342 343 density = 1.963 * 273. * mg / cm3 / 293.; 344 G4Material* Xe55He15CH4 = new G4Material(nam 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) 3 350 351 density = 5.344 * mg / cm3; 352 G4Material* Xe10CH4 = new G4Material(name = 353 Xe10CH4->AddMaterial(Xe, fractionmass = 0.98 354 Xe10CH4->AddMaterial(metane, fractionmass = 355 356 // 95% Xe + 5% CH4, STP ; NIM A214 (1983) 26 357 358 density = 5.601 * mg / cm3; 359 G4Material* Xe5CH4 = new G4Material(name = " 360 Xe5CH4->AddMaterial(Xe, fractionmass = 0.994 361 Xe5CH4->AddMaterial(metane, fractionmass = 0 362 363 // 80% Xe + 20% CH4, STP ; NIM A253 (1987) 2 364 365 density = 4.83 * mg / cm3; 366 G4Material* Xe20CH4 = new G4Material(name = 367 Xe20CH4->AddMaterial(Xe, fractionmass = 0.97 368 Xe20CH4->AddMaterial(metane, fractionmass = 369 370 // 93% Ar + 7% CH4, STP ; NIM 107 (1973) 413 371 372 density = 1.709 * mg / cm3; 373 G4Material* Ar7CH4 = new G4Material(name = " 374 Ar7CH4->AddMaterial(Argon, fractionmass = 0. 375 Ar7CH4->AddMaterial(metane, fractionmass = 0 376 377 // 93% Kr + 7% CH4, STP ; NIM 107 (1973) 413 378 379 density = 3.491 * mg / cm3; 380 G4Material* Kr7CH4 = new G4Material(name = " 381 Kr7CH4->AddMaterial(Kr, fractionmass = 0.986 382 Kr7CH4->AddMaterial(metane, fractionmass = 0 383 384 // 0.5*(95% Xe + 5% CH4)+0.5*(93% Ar + 7% CH 385 386 density = 3.655 * mg / cm3; 387 G4Material* XeArCH4 = new G4Material(name = 388 XeArCH4->AddMaterial(Xe5CH4, fractionmass = 389 XeArCH4->AddMaterial(Ar7CH4, fractionmass = 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, dens 396 397 /* 398 G4Material* ma; 399 ma = new G4Material("H", 1., 1.0*g/mol 400 ma = new G4Material("D", 1., 2.0*g/mol 401 ma = new G4Material("Li", 3., 6.941*g/m 402 ma = new G4Material("Be", 4., 9.01*g/mo 403 ma = new G4Material("C", 6., 12.00*g/m 404 ma = new G4Material("Graphite",6., 12 405 ma->SetChemicalFormula("Graphite"); 406 ma = new G4Material("Al", 13., 26.98*g/ 407 ma = new G4Material("Si", 14., 29 408 ma = new G4Material("LAr", 18., 39 409 ma = new G4Material("Zr", 40., 91 410 ma = new G4Material("LXe", 54., 131 411 ma = new G4Material("Fe", 26., 55 412 ma = new G4Material("Ni", 29., 58 413 ma = new G4Material("Cu", 29., 63 414 ma = new G4Material("Au", 79., 196 415 ma = new G4Material("Ta", 73., 180 416 ma = new G4Material("W", 74., 183 417 ma = new G4Material("Pb", 82., 207 418 ma = new G4Material("Bi", 83., 208 419 ma = new G4Material("U", 92., 238 420 421 G4Element* H = new G4Element ("Hydrogen", 422 G4Element* N = new G4Element ("Nitrigen", 423 G4Element* O = new G4Element ("Oxygen" , 424 G4Element* C = new G4Element ("Carbon" , 425 G4Element* Cs = new G4Element ("Cesium" , 426 G4Element* I = new G4Element ("Iodide" , 427 428 ma = new G4Material("O2", 8., 16.00*g/mole, 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 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........oo 450 451 G4Material* Materials::GetMaterial(const G4Str 452 { 453 // const G4MaterialTable* theMaterialTable 454 455 G4Material* ma = G4Material::GetMaterial(nam 456 457 G4cout << "Material is selected: " << ma->Ge 458 return ma; 459 } 460