Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MyMaterials.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: MyMaterials.cc,v 1.3 2006-06-29 15:28:16 gunter Exp $
27 // $Name: not supported by cvs2svn $
28 // ====================================================================
29 // MyMaterials.cc
30 //
31 // 2005 Q
32 // ====================================================================
33 #include "MyMaterials.hh"
34 #include "G4Material.hh"
35 #include "G4SystemOfUnits.hh"
36 #include "G4PhysicalConstants.hh"
37 
38 // ====================================================================
39 //
40 // class description
41 //
42 // ====================================================================
43 
47 {
48 }
49 
50 
54 {
55 }
56 
57 
61 {
62  G4double A, Z;
63 
64  // ------------------------------------------------------------------------
65  // Elements
66  // ------------------------------------------------------------------------
67  G4Element* elH = new G4Element("Hydrogen","H", Z=1., A=1.00794*g/mole);
68  G4Element* elC = new G4Element("Carbon", "C", Z=6., A= 12.011 *g/mole);
69  G4Element* elN = new G4Element("Nitrogen","N", Z=7., A= 14.00674*g/mole);
70  G4Element* elO = new G4Element("Oxygen", "O", Z=8., A= 15.9994*g/mole);
71 
72  // ------------------------------------------------------------------------
73  // Materials
74  // ------------------------------------------------------------------------
75  G4double density, massfraction;
76  G4int natoms, nel;
77 
78  // temperature of experimental hall is controlled at 20 degree.
79  const G4double expTemp= STP_Temperature+20.*kelvin;
80 
81  // vacuum
82  density= universe_mean_density;
83  G4Material* Vacuum= new G4Material("Vacuum", density, nel=2);
84  Vacuum-> AddElement(elN, .7);
85  Vacuum-> AddElement(elO, .3);
86 
87  // air
88  density= 1.2929e-03 *g/cm3; // at 20 degree
89  G4Material* Air= new G4Material("Air", density, nel=2,
90  kStateGas, expTemp);
91  G4double ttt= 75.47+23.20;
92  Air-> AddElement(elN, massfraction= 75.47/ttt);
93  Air-> AddElement(elO, massfraction= 23.20/ttt);
94 
95  // water
96  density= 1.000*g/cm3;
97  G4Material* H2O= new G4Material("Water", density, nel=2);
98  H2O-> AddElement(elH, natoms=2);
99  H2O-> AddElement(elO, natoms=1);
100 
101  // alminium
102  A= 26.98 *g/mole;
103  density= 2.70 *g/cm3;
104  G4Material* Al= new G4Material("Al", Z=13., A, density);
105 
106  // iron
107  A= 55.847 *g/mole;
108  density= 7.87 *g/cm3;
109  G4Material* Fe= new G4Material("Iron", Z=26., A, density);
110 
111  // lead
112  A= 207.2 *g/mole;
113  density= 11.35 *g/cm3;
114  G4Material* Pb= new G4Material("Lead", Z=82., A, density);
115 
116  // scintillator (Polystyene(C6H5CH=CH2))
117  density= 1.032 *g/cm3;
118  G4Material* Scinti= new G4Material("Scinti", density, nel=2);
119  Scinti-> AddElement(elC, natoms=8);
120  Scinti-> AddElement(elH, natoms=8);
121 
122 }
123