Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/extended/electromagnetic/TestEm10/src/Materials.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 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/extended/electromagnetic/TestEm10/src/Materials.cc (Version 11.3.0) and /examples/extended/electromagnetic/TestEm10/src/Materials.cc (Version 10.4.p2)


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