source: trunk/examples/advanced/hadrontherapy/src/HadrontherapyMaterial.cc @ 1332

Last change on this file since 1332 was 807, checked in by garnier, 16 years ago

update

File size: 8.4 KB
Line 
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: HadrontherapyMaterial.cc; May 2005
27// ----------------------------------------------------------------------------
28//                 GEANT 4 - Hadrontherapy example
29// ----------------------------------------------------------------------------
30// Code developed by:
31//
32// G.A.P. Cirrone(a)*, F. Di Rosa(a), S. Guatelli(b), G. Russo(a)
33//
34// (a) Laboratori Nazionali del Sud
35//     of the National Institute for Nuclear Physics, Catania, Italy
36// (b) National Institute for Nuclear Physics Section of Genova, genova, Italy
37//
38// * cirrone@lns.infn.it
39// ----------------------------------------------------------------------------
40#include "globals.hh"
41#include "G4Material.hh"
42#include "G4MaterialTable.hh"
43#include "G4Element.hh"
44#include "G4ElementTable.hh"
45#include "HadrontherapyMaterial.hh"
46
47HadrontherapyMaterial::HadrontherapyMaterial():
48  matW(0), matAl(0), matSi(0), matTa(0), matCu(0),
49  vacuum(0), matplexiglass(0), brass(0),
50  kapton(0), matPb(0), titanium(0), matAir(0),
51  matH2O(0), soft(0), gold(0), bone(0), muscle(0)
52{;}
53
54HadrontherapyMaterial::~HadrontherapyMaterial()
55{
56  delete muscle;
57  delete bone;
58  delete gold;
59  delete soft;
60  delete matH2O;
61  delete matAir;
62  delete titanium;
63  delete matPb;
64  delete kapton;
65  delete brass;
66  delete matplexiglass;
67  delete vacuum;
68  delete matCu;
69  delete matTa;
70  delete matSi;
71  delete matAl;
72  delete matW;
73}
74
75void HadrontherapyMaterial::DefineMaterials()
76{
77  // Define required materials
78
79  G4double z; // Atomic numebr
80  G4double a; // Atomic mass
81  G4double d; // Density
82  G4int nComponents;// Number of components
83  G4double fractionmass; // Fraction in mass of an element in a material
84  G4int nAtoms; // Number of atoms in a molecuule
85
86  // Elements
87 
88  a = 1.01*g/mole;
89  G4Element* elH = new G4Element ("Hydrogen","H",z = 1.,a);
90 
91  a = 14.01*g/mole;
92  G4Element* elN = new G4Element("Nitrogen","N",z = 7.,a);
93
94  a = 16.00*g/mole;
95  G4Element* elO = new G4Element("Oxygen","O",z = 8.,a);
96
97  a = 12.011*g/mole;
98  G4Element* elC = new G4Element("Carbon","C",z = 6.,a);
99 
100  a = 22.99*g/mole;
101  G4Element* elNa = new G4Element("Sodium","Na",z = 11.,a);
102 
103  a = 24.305*g/mole;
104  G4Element* elMg = new G4Element("Magnesium","Mg",z = 12.,a);
105
106  a = 30.974*g/mole;
107  G4Element* elP = new G4Element("Phosphorus","P",z = 15.,a);
108 
109  a = 32.06*g/mole;
110  G4Element* elS = new G4Element("Sulfur","S",z = 16.,a);
111 
112  a = 35.453*g/mole;
113  G4Element* elCl = new G4Element("Chlorine","Cl",z = 17.,a);
114 
115  a = 39.098*g/mole;
116  G4Element* elK = new G4Element("Potassium","K",z = 19.,a);
117
118  a = 40.08*g/mole;
119  G4Element* elCa = new G4Element("Calcium","Ca",z = 20.,a);
120 
121  a = 65.38*g/mole;
122  G4Element* elZn = new G4Element("Zinc","Zn",z = 30.,a);
123 
124  a = 55.85*g/mole;
125  G4Element* elFe = new G4Element("Iron","Fe",z = 26.,a);
126 
127  a = 63.546*g/mole;
128  d = 8.90*g/cm3;
129  G4Element* elCu = new G4Element("Copper","Cu", z = 29., a); 
130
131  // Materials
132 
133  // Tungsten
134  z = 74.;
135  a = 183.84* g/mole;
136  d = 19.3*g/cm3;
137  matW = new G4Material("Tungsten", z, a, d);
138 
139  // Aluminum
140  z = 13.;
141  a = 26.98*g/mole;
142  d = 2.700*g/cm3;
143  matAl = new G4Material("MatAluminum",z, a, d);
144 
145  // Silicon
146  z = 14.;
147  a = 28.09*g/mole;
148  d = 2.330*g/cm3;
149  matSi = new G4Material("MatSilicon",z, a, d);
150 
151  // Tantalum
152  z = 73.;
153  a = 180.948*g/mole;
154  d = 16.6*g/cm3;
155  matTa = new G4Material("MatTantalum", z, a, d);
156 
157  // Copper
158  z = 29.;
159  a = 63.546*g/mole;
160  d = 8.90*g/cm3;
161  matCu = new G4Material("MatCopper", z, a, d);
162 
163  // Vacuum
164  G4double density = universe_mean_density;
165  G4double pressure = 3.e-18*pascal;
166  G4double temperature = 2.73*kelvin;
167  a = 1.01*g/mole;
168  z = 1;
169  vacuum = new G4Material("Galactic", z, a,
170                          density,kStateGas,temperature,pressure);
171 
172  // Plexiglass
173  d = 1.18*g/cm3;
174  matplexiglass = new G4Material("PMMA",d,3);
175  matplexiglass -> AddElement(elH,0.08);
176  matplexiglass -> AddElement(elC,0.60);
177  matplexiglass -> AddElement(elO,0.32);
178 
179  // Brass
180  d = 8.40*g/cm3;
181  nComponents = 2;
182  G4Material* brass = new G4Material("Brass", d, nComponents);       
183  brass -> AddElement(elZn, fractionmass = 30*perCent);
184  brass -> AddElement(elCu, fractionmass = 70*perCent);
185
186  // Kapton
187  d = 1.43*g/cm3;
188  nComponents = 4;
189  G4Material* kapton = new G4Material("Kapton", d, nComponents);
190  kapton -> AddElement(elH, nAtoms = 10);
191  kapton -> AddElement(elO, nAtoms = 5);
192  kapton -> AddElement(elC, nAtoms = 22);
193  kapton -> AddElement(elN, nAtoms = 2);
194
195  // Lead
196  a = 207.19*g/mole;
197  z = 82.;
198  d = 11.35*g/cm3;
199  matPb = new G4Material("Lead", z, a, d);
200
201  // Titanium
202  z = 22.;
203  a = 47.88*g/mole;
204  d = 4.50*g/cm3;
205  titanium = new G4Material("titanium", z, a, d);
206 
207  // Air material
208  d = 1.290*mg/cm3;
209  nComponents = 2;
210  G4Material* matAir = new G4Material("Air", d, nComponents);
211  matAir -> AddElement(elN,0.7);
212  matAir -> AddElement(elO,0.3);
213
214  // Water
215  d = 1.000*g/cm3;
216  nComponents = 2;
217  matH2O = new G4Material("Water", d, nComponents);
218  matH2O -> AddElement(elH,2);
219  matH2O -> AddElement(elO,1);
220  matH2O -> GetIonisation()->SetMeanExcitationEnergy(75.0*eV);
221  matH2O -> SetChemicalFormula("H_2O");
222  G4cout << "-----------> CHEMICAL FORMULA FOR WATER FIXED <----------"<< G4endl;
223
224  //soft tissue(http://www.nist.gov)
225  d = 1.0*g/cm3;
226  nComponents = 13;
227  soft = new G4Material("tissue",d, nComponents);
228  soft -> AddElement(elH,0.104472);
229  soft -> AddElement(elC,0.23219);
230  soft -> AddElement(elN,0.02488);
231  soft -> AddElement(elO,0.630238);
232  soft -> AddElement(elNa,0.00113);
233  soft -> AddElement(elMg,0.00013);
234  soft -> AddElement(elP,0.00133);
235  soft -> AddElement(elS,0.00199);
236  soft -> AddElement(elCl,0.00134);
237  soft -> AddElement(elK,0.00199);
238  soft -> AddElement(elCa,0.00023);
239  soft -> AddElement(elFe,0.00005);
240  soft -> AddElement(elZn,0.00003); 
241 
242  // Gold
243  z = 79;
244  a = 196.97*g/mole;
245  d = 19.32*g/cm3;
246  gold = new G4Material("gold", z, a, d);
247
248  // Compact bone (http://www.NIST.gov)
249  d = 1.85*g/cm3;
250  nComponents = 8;
251  bone = new G4Material("bone", d, nComponents);
252  bone -> AddElement(elH,0.063984);
253  bone -> AddElement(elC,0.278);
254  bone -> AddElement(elN,0.027);
255  bone -> AddElement(elO,0.410016);
256  bone -> AddElement(elMg,0.002);
257  bone -> AddElement(elP,0.07);
258  bone -> AddElement(elS,0.002);
259  bone -> AddElement(elCa,0.147);
260
261  //muscle(http://www.NIST.gov)
262  nComponents = 9;
263  muscle = new G4Material("muscle", d, nComponents);
264  muscle -> AddElement(elH,0.101997);
265  muscle -> AddElement(elC,0.123);
266  muscle -> AddElement(elN,0.035);
267  muscle -> AddElement(elNa,0.0008);
268  muscle -> AddElement(elO,0.729);
269  muscle -> AddElement(elMg,0.0002);
270  muscle -> AddElement(elP,0.002);
271  muscle -> AddElement(elS,0.005);
272  muscle -> AddElement(elK,0.003);
273}
274
275G4Material* HadrontherapyMaterial::GetMat(G4String material)
276{
277  G4Material* pttoMaterial = G4Material::GetMaterial(material); 
278  return pttoMaterial; 
279}
280
Note: See TracBrowser for help on using the repository browser.