G4gsmate.cc File Reference

#include <cmath>
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "G3toG4.hh"
#include "G3MatTable.hh"
#include "G3EleTable.hh"
#include "G4Material.hh"
#include "G4Isotope.hh"
#include "G4UnitsTable.hh"

Go to the source code of this file.

Functions

void PG4gsmate (G4String *tokens)
void G4gsmate (G4int imate, G4String name, G4double ain, G4double zin, G4double densin, G4double, G4int, G4double *)


Function Documentation

void G4gsmate ( G4int  imate,
G4String  name,
G4double  ain,
G4double  zin,
G4double  densin,
G4double  ,
G4int  ,
G4double  
)

Definition at line 105 of file G4gsmate.cc.

References G4Material::AddElement(), G4String::both, G3Ele, G3Mat, G4gsmixt(), G3EleTable::GetEle(), kStateGas, CLHEP::detail::n, pascal, G3MatTable::put(), and G4String::strip().

Referenced by PG4gsmate().

00107 {
00108   G4double G3_minimum_density = 1.e-10*g/cm3;
00109 
00110   // add units
00111   G4double z = zin;    
00112   G4double a = ain*g/mole;
00113   G4double dens = densin*g/cm3;
00114 
00115   G4Material* material=0;
00116   
00117   G4String sname = name.strip(G4String::both);
00118   if (sname == "AIR") {
00119     // handle the built in AIR mixture
00120     G4double aa[2], zz[2], wmat[2];
00121     aa[0] = 14.01*g/mole;
00122     aa[1] = 16.00*g/mole;
00123     zz[0] = 7;
00124     zz[1] = 8;
00125     wmat[0] = 0.7;
00126     wmat[1] = 0.3;
00127     // G4double theDensity = 1.2931*mg/cm3;
00128     G4double theDensity = 0.0012931;
00129     G4int n=2;
00130     G4gsmixt(imate, sname, aa, zz, theDensity, n, wmat);
00131   } 
00132   else if ( z<1 || dens < G3_minimum_density ) {
00133     // define vacuum according to definition from N03 example
00134     G4double density     = universe_mean_density;    //from PhysicalConstants.h
00135     G4double pressure    = 3.e-18*pascal;
00136     G4double temperature = 2.73*kelvin;
00137     material = new G4Material(name, z=1., a=1.01*g/mole, density,
00138                     kStateGas,temperature,pressure);
00139   }
00140   else {
00141     //G4Element* element = CreateElement(z, a, name);
00142     G4Element* element = G3Ele.GetEle(z);
00143     material = new G4Material(name, dens, 1);
00144     material->AddElement(element, 1.);    
00145   }  
00146 
00147   // add the material to the List
00148   G3Mat.put(imate, material);
00149 }

void PG4gsmate ( G4String tokens  ) 

Definition at line 42 of file G4gsmate.cc.

References G3fillParams(), G4gsmate(), Ipar, PTgsmate, Rpar, and Spar.

Referenced by G3CLEval().

00043 {
00044   // fill the parameter containers
00045   G3fillParams(tokens,PTgsmate);
00046   G4String name = Spar[0];
00047   G4int imate = Ipar[0];
00048   G4int nwbf = Ipar[1];
00049   G4double a = Rpar[0];
00050   G4double z = Rpar[1];
00051   G4double dens = Rpar[2];
00052   G4double radl = Rpar[3];
00053   // G4double absl = Rpar[4];
00054   G4double *ubuf = &Rpar[5];
00055 
00056   G4gsmate(imate, name, a, z, dens, radl, nwbf, ubuf);
00057 }


Generated on Mon May 27 17:50:46 2013 for Geant4 by  doxygen 1.4.7