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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 ]

Diff markup

Differences between /examples/advanced/human_phantom/src/G4HumanPhantomMaterial.cc (Version 11.3.0) and /examples/advanced/human_phantom/src/G4HumanPhantomMaterial.cc (Version 9.6.p4)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 // Previous authors: G. Guerrieri, S. Guatelli <<  26 // Authors: S. Guatelli and M. G. Pia, INFN Genova, Italy
 27 // Authors (since 2007): S. Guatelli, Universi <<  27 // 
                                                   >>  28 // Based on code developed by the undergraduate student G. Guerrieri 
                                                   >>  29 // Note: this is a preliminary beta-version of the code; an improved 
                                                   >>  30 // version will be distributed in the next Geant4 public release, compliant
                                                   >>  31 // with the design in a forthcoming publication, and subject to a 
                                                   >>  32 // design and code review.
 28 //                                                 33 //
 29                                                    34 
 30 #include "G4HumanPhantomMaterial.hh"               35 #include "G4HumanPhantomMaterial.hh"
 31 #include "globals.hh"                              36 #include "globals.hh"
 32 #include "G4SystemOfUnits.hh"                      37 #include "G4SystemOfUnits.hh"
 33 #include "G4MaterialPropertiesTable.hh"            38 #include "G4MaterialPropertiesTable.hh"
 34 #include "G4MaterialPropertyVector.hh"             39 #include "G4MaterialPropertyVector.hh"
 35 #include "G4MaterialTable.hh"                      40 #include "G4MaterialTable.hh"
 36 #include "Randomize.hh"                            41 #include "Randomize.hh"  
 37 #include "G4RunManager.hh"                         42 #include "G4RunManager.hh"
 38 #include "G4Element.hh"                            43 #include "G4Element.hh"
 39 #include "G4ElementTable.hh"                       44 #include "G4ElementTable.hh"
 40                                                    45 
 41 G4HumanPhantomMaterial::G4HumanPhantomMaterial     46 G4HumanPhantomMaterial::G4HumanPhantomMaterial(): 
 42  fWater(nullptr), fSoft(nullptr),  fSkeleton(n <<  47   soft(0),  skeleton(0),lung(0), adipose(0), glandular(0),
 43   fAdipose_glandular(nullptr)                  <<  48   adipose_glandular(0)
 44 {;}                                                49 {;}
 45                                                    50 
 46 G4HumanPhantomMaterial::~G4HumanPhantomMateria     51 G4HumanPhantomMaterial::~G4HumanPhantomMaterial()
 47 {;}                                                52 {;}
 48                                                    53 
 49 void G4HumanPhantomMaterial::DefineMaterials()     54 void G4HumanPhantomMaterial::DefineMaterials()
 50 {                                                  55 {
 51   // Define required materials                     56   // Define required materials
 52                                                    57 
 53   G4double A;  // atomic mass                      58   G4double A;  // atomic mass
 54   G4double Z;  // atomic number                    59   G4double Z;  // atomic number
 55   G4double d;  // density                          60   G4double d;  // density
 56                                                    61  
 57   // General elements                              62   // General elements
 58                                                    63  
 59   A = 1.01*g/mole;                                 64   A = 1.01*g/mole;
 60   auto* elH = new G4Element ("Hydrogen","H",Z  <<  65   G4Element* elH = new G4Element ("Hydrogen","H",Z = 1.,A);
 61                                                    66 
 62   A = 12.011*g/mole;                               67   A = 12.011*g/mole;
 63   auto* elC = new G4Element("Carbon","C",Z = 6 <<  68   G4Element* elC = new G4Element("Carbon","C",Z = 6.,A);  
 64                                                    69 
 65   A = 14.01*g/mole;                                70   A = 14.01*g/mole;
 66   auto* elN = new G4Element("Nitrogen","N",Z = <<  71   G4Element* elN = new G4Element("Nitrogen","N",Z = 7.,A);
 67                                                    72 
 68   A = 16.00*g/mole;                                73   A = 16.00*g/mole;
 69   auto* elO = new G4Element("Oxygen","O",Z = 8 <<  74   G4Element* elO = new G4Element("Oxygen","O",Z = 8.,A);
 70                                                    75 
 71   A = 22.99*g/mole;                                76   A = 22.99*g/mole;
 72   auto* elNa = new G4Element("Sodium","Na",Z = <<  77   G4Element* elNa = new G4Element("Sodium","Na",Z = 11.,A);
 73                                                    78 
 74   A = 24.305*g/mole;                               79   A = 24.305*g/mole;
 75   auto* elMg = new G4Element("Magnesium","Mg", <<  80   G4Element* elMg = new G4Element("Magnesium","Mg",Z = 12.,A);
 76                                                    81 
 77   A = 30.974*g/mole;                               82   A = 30.974*g/mole;
 78   auto* elP = new G4Element("Phosphorus","P",Z <<  83   G4Element* elP = new G4Element("Phosphorus","P",Z = 15.,A);
 79                                                    84  
 80   A = 32.064*g/mole;                               85   A = 32.064*g/mole;
 81   auto* elS = new G4Element("Sulfur","S",Z = 1 <<  86   G4Element* elS = new G4Element("Sulfur","S",Z = 16.,A);
 82                                                    87  
 83   A = 35.453*g/mole;                               88   A = 35.453*g/mole;
 84   auto* elCl = new G4Element("Chlorine","Cl",Z <<  89   G4Element* elCl = new G4Element("Chlorine","Cl",Z = 17.,A);
 85                                                    90  
 86   A = 39.098*g/mole;                               91   A = 39.098*g/mole;
 87   auto* elK = new G4Element("Potassium","K",Z  <<  92   G4Element* elK = new G4Element("Potassium","K",Z = 19.,A);
 88                                                    93 
 89   A = 40.08*g/mole;                                94   A = 40.08*g/mole;
 90   auto* elCa = new G4Element("Calcium","Ca",Z  <<  95   G4Element* elCa = new G4Element("Calcium","Ca",Z = 20.,A);
 91                                                    96 
 92   A = 55.85*g/mole;                                97   A = 55.85*g/mole;
 93   auto* elFe  = new G4Element("Iron","Fe",Z =  <<  98   G4Element* elFe  = new G4Element("Iron","Fe",Z = 26.,A);
 94                                                    99  
 95   A = 65.38*g/mole;                               100   A = 65.38*g/mole;
 96   auto* elZn = new G4Element("Zinc","Zn",Z = 3 << 101   G4Element* elZn = new G4Element("Zinc","Zn",Z = 30.,A);
 97                                                   102 
 98   A = 85.47 *g/mole;                              103   A = 85.47 *g/mole;
 99   auto* elRb = new G4Element("Rb","Rb",Z = 37. << 104   G4Element* elRb = new G4Element("Rb","Rb",Z = 37.,A);
100                                                   105 
101   A = 87.62 *g/mole;                              106   A = 87.62 *g/mole;
102   auto* elSr = new G4Element("Sr","Sr",Z = 38. << 107   G4Element* elSr = new G4Element("Sr","Sr",Z = 38.,A);
103                                                   108 
104   A = 91.22 *g/mole;                              109   A = 91.22 *g/mole;
105   auto* elZr = new G4Element("Zr","Zr",Z = 40. << 110   G4Element* elZr = new G4Element("Zr","Zr",Z = 40.,A);
106                                                   111 
107   A = 207.19 *g/mole;                             112   A = 207.19 *g/mole;
108   auto* elPb = new G4Element("Lead","Pb", Z =  << 113   G4Element* elPb = new G4Element("Lead","Pb", Z = 82.,A);
109                                                   114 
110   // Water                                        115   // Water
111   d = 1.000*g/cm3;                                116   d = 1.000*g/cm3;
112   fWater = new G4Material("Water",d,2);        << 117   matH2O = new G4Material("Water",d,2);
113   fWater->AddElement(elH,2);                   << 118   matH2O->AddElement(elH,2);
114   fWater->AddElement(elO,1);                   << 119   matH2O->AddElement(elO,1);
115   fWater->GetIonisation()->SetMeanExcitationEn << 120   matH2O->GetIonisation()->SetMeanExcitationEnergy(75.0*eV);
116                                                   121 
117   // MIRD soft tissue                             122   // MIRD soft tissue
118   d = 0.9869 *g/cm3;                              123   d = 0.9869 *g/cm3;
119   fSoft = new G4Material("soft_tissue",d,16);  << 124   soft = new G4Material("soft_tissue",d,16);
120   fSoft->AddElement(elH,0.1047);               << 125   soft->AddElement(elH,0.1047);
121   fSoft->AddElement(elC,0.2302);               << 126   soft->AddElement(elC,0.2302);
122   fSoft->AddElement(elN,0.0234);               << 127   soft->AddElement(elN,0.0234);
123   fSoft->AddElement(elO,0.6321);               << 128   soft->AddElement(elO,0.6321);
124   fSoft->AddElement(elNa,0.0013);              << 129   soft->AddElement(elNa,0.0013);
125   fSoft->AddElement(elMg,0.00015);             << 130   soft->AddElement(elMg,0.00015);
126   fSoft->AddElement(elP,0.0024);               << 131   soft->AddElement(elP,0.0024);
127   fSoft->AddElement(elS,0.0022);               << 132   soft->AddElement(elS,0.0022);
128   fSoft->AddElement(elCl,0.0014);              << 133   soft->AddElement(elCl,0.0014);
129   fSoft->AddElement(elK,0.0021);               << 134   soft->AddElement(elK,0.0021);
130   fSoft->AddElement(elFe,0.000063);            << 135   soft->AddElement(elFe,0.000063);
131   fSoft->AddElement(elZn,0.000032);            << 136   soft->AddElement(elZn,0.000032);
132   fSoft->AddElement(elRb,0.0000057);           << 137   soft->AddElement(elRb,0.0000057);
133   fSoft->AddElement(elSr,0.00000034);          << 138   soft->AddElement(elSr,0.00000034);
134   fSoft->AddElement(elZr,0.000008);            << 139   soft->AddElement(elZr,0.000008);
135   fSoft->AddElement(elPb,0.00000016);          << 140   soft->AddElement(elPb,0.00000016);
136                                                   141  
137   // MIRD Skeleton                                142   // MIRD Skeleton
138                                                   143 
139   d = 1.4862*g/cm3;                               144   d = 1.4862*g/cm3;
140   fSkeleton = new G4Material("skeleton",d,15); << 145   skeleton = new G4Material("skeleton",d,15);
141   fSkeleton -> AddElement(elH,0.0704);         << 146   skeleton -> AddElement(elH,0.0704);
142   fSkeleton -> AddElement(elC,0.2279);         << 147   skeleton -> AddElement(elC,0.2279);
143   fSkeleton -> AddElement(elN,0.0387);         << 148   skeleton -> AddElement(elN,0.0387);
144   fSkeleton -> AddElement(elO,0.4856);         << 149   skeleton -> AddElement(elO,0.4856);
145   fSkeleton -> AddElement(elNa,0.0032);        << 150   skeleton -> AddElement(elNa,0.0032); 
146   fSkeleton -> AddElement(elMg,0.0011);        << 151   skeleton -> AddElement(elMg,0.0011); 
147   fSkeleton -> AddElement(elP,0.0694);         << 152   skeleton -> AddElement(elP,0.0694);
148   fSkeleton -> AddElement(elS,0.0017);         << 153   skeleton -> AddElement(elS,0.0017);
149   fSkeleton -> AddElement(elCl,0.0014);        << 154   skeleton -> AddElement(elCl,0.0014);
150   fSkeleton -> AddElement(elK,0.0015);         << 155   skeleton -> AddElement(elK,0.0015);
151   fSkeleton -> AddElement(elCa,0.0991);        << 156   skeleton -> AddElement(elCa,0.0991);
152   fSkeleton -> AddElement(elFe,0.00008);       << 157   skeleton -> AddElement(elFe,0.00008);
153   fSkeleton -> AddElement(elZn,0.000048);      << 158   skeleton -> AddElement(elZn,0.000048);
154   fSkeleton -> AddElement(elSr,0.000032);      << 159   skeleton -> AddElement(elSr,0.000032);
155   fSkeleton -> AddElement(elPb,0.000011);      << 160   skeleton -> AddElement(elPb,0.000011);
156                                                   161  
157   // MIRD lung material                           162   // MIRD lung material
158   d = 0.2958 *g/cm3;                              163   d = 0.2958 *g/cm3;
159   fLung = new G4Material("lung_material", d,16 << 164   lung = new G4Material("lung_material", d,16);
160   fLung -> AddElement(elH, 0.1021);            << 165   lung -> AddElement(elH, 0.1021);
161   fLung -> AddElement(elC, 0.1001);            << 166   lung -> AddElement(elC, 0.1001);
162   fLung -> AddElement(elN,0.028);              << 167   lung -> AddElement(elN,0.028);
163   fLung -> AddElement(elO,0.7596);             << 168   lung -> AddElement(elO,0.7596);
164   fLung -> AddElement(elNa,0.0019);            << 169   lung -> AddElement(elNa,0.0019);
165   fLung -> AddElement(elMg,0.000074);          << 170   lung -> AddElement(elMg,0.000074);
166   fLung -> AddElement(elP,0.00081);            << 171   lung -> AddElement(elP,0.00081);
167   fLung -> AddElement(elS,0.0023);             << 172   lung -> AddElement(elS,0.0023);
168   fLung -> AddElement(elCl,0.0027);            << 173   lung -> AddElement(elCl,0.0027);
169   fLung -> AddElement(elK,0.0020);             << 174   lung -> AddElement(elK,0.0020);
170   fLung -> AddElement(elCa,0.00007);           << 175   lung -> AddElement(elCa,0.00007);
171   fLung -> AddElement(elFe,0.00037);           << 176   lung -> AddElement(elFe,0.00037);
172   fLung -> AddElement(elZn,0.000011);          << 177   lung -> AddElement(elZn,0.000011);
173   fLung -> AddElement(elRb,0.0000037);         << 178   lung -> AddElement(elRb,0.0000037);
174   fLung -> AddElement(elSr,0.000000059);       << 179   lung -> AddElement(elSr,0.000000059);
175   fLung -> AddElement(elPb,0.00000041);        << 180   lung -> AddElement(elPb,0.00000041);
176                                                   181 
177   G4double density_adipose = 0.93 *g/cm3;         182   G4double density_adipose = 0.93 *g/cm3;
178   fAdipose = new G4Material("adipose", density << 183   adipose = new G4Material("adipose", density_adipose,8);  
179   fAdipose -> AddElement(elH, 0.112);          << 184   adipose -> AddElement(elH, 0.112);
180   fAdipose -> AddElement(elC, 0.619);          << 185   adipose -> AddElement(elC, 0.619);
181   fAdipose -> AddElement(elN, 0.017);          << 186   adipose -> AddElement(elN, 0.017);
182   fAdipose -> AddElement(elO, 0.251);          << 187   adipose -> AddElement(elO, 0.251);
183   fAdipose -> AddElement(elS, 0.00025);        << 188   adipose -> AddElement(elS, 0.00025);
184   fAdipose -> AddElement(elP, 0.00025);        << 189   adipose -> AddElement(elP, 0.00025);
185   fAdipose -> AddElement(elK, 0.00025);        << 190   adipose -> AddElement(elK, 0.00025);
186   fAdipose -> AddElement(elCa,0.00025);        << 191   adipose -> AddElement(elCa,0.00025);
187                                                   192 
188   G4double density_glandular = 1.04 * g/cm3;      193   G4double density_glandular = 1.04 * g/cm3;
189   fGlandular = new G4Material("glandular", den << 194   glandular = new G4Material("glandular", density_glandular,8);
190   fGlandular -> AddElement(elH, 0.1);          << 195   glandular -> AddElement(elH, 0.1);
191   fGlandular -> AddElement(elC,0.184);         << 196   glandular -> AddElement(elC,0.184);
192   fGlandular -> AddElement(elN, 0.032);        << 197   glandular -> AddElement(elN, 0.032);
193   fGlandular -> AddElement(elO, 0.679);        << 198   glandular -> AddElement(elO, 0.679);
194   fGlandular -> AddElement(elS, 0.00125);      << 199   glandular -> AddElement(elS, 0.00125);
195   fGlandular -> AddElement(elP, 0.00125);      << 200   glandular -> AddElement(elP, 0.00125);
196   fGlandular -> AddElement(elK, 0.00125);      << 201   glandular -> AddElement(elK, 0.00125);
197   fGlandular -> AddElement(elCa,0.00125);      << 202   glandular -> AddElement(elCa,0.00125);
198                                                   203 
199                                                   204 
200   d = (density_adipose * 0.5) + (density_gland    205   d = (density_adipose * 0.5) + (density_glandular * 0.5);
201   fAdipose_glandular = new G4Material("adipose << 206   adipose_glandular = new G4Material("adipose_glandular", d, 2);
202   fAdipose_glandular -> AddMaterial(fAdipose,  << 207   adipose_glandular -> AddMaterial(adipose, 0.5);
203   fAdipose_glandular -> AddMaterial(fGlandular << 208   adipose_glandular -> AddMaterial(glandular, 0.5);
204                                                   209 
205   // Air                                          210   // Air 
206   d = 1.290*mg/cm3;                               211   d = 1.290*mg/cm3;
207   auto* matAir = new G4Material("Air",d,2);    << 212   G4Material* matAir = new G4Material("Air",d,2);
208   matAir->AddElement(elN,0.7);                    213   matAir->AddElement(elN,0.7);
209   matAir->AddElement(elO,0.3);                    214   matAir->AddElement(elO,0.3);
210 }                                                 215 }
211                                                   216 
212 G4Material* G4HumanPhantomMaterial::GetMateria    217 G4Material* G4HumanPhantomMaterial::GetMaterial(G4String material)
213 {                                                 218 {
214   // Returns a material                           219   // Returns a material 
215   G4Material* pttoMaterial = G4Material::GetMa    220   G4Material* pttoMaterial = G4Material::GetMaterial(material); 
216   return pttoMaterial;                            221   return pttoMaterial; 
217 }                                                 222 }
218                                                   223