Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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"
Include dependency graph for G4gsmate.cc:

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.

107 {
108  G4double G3_minimum_density = 1.e-10*g/cm3;
109 
110  // add units
111  G4double z = zin;
112  G4double a = ain*g/mole;
113  G4double dens = densin*g/cm3;
114 
115  G4Material* material=0;
116 
117  G4String sname = name.strip(G4String::both);
118  if (sname == "AIR") {
119  // handle the built in AIR mixture
120  G4double aa[2], zz[2], wmat[2];
121  aa[0] = 14.01*g/mole;
122  aa[1] = 16.00*g/mole;
123  zz[0] = 7;
124  zz[1] = 8;
125  wmat[0] = 0.7;
126  wmat[1] = 0.3;
127  // G4double theDensity = 1.2931*mg/cm3;
128  G4double theDensity = 0.0012931;
129  G4int n=2;
130  G4gsmixt(imate, sname, aa, zz, theDensity, n, wmat);
131  }
132  else if ( z<1 || dens < G3_minimum_density ) {
133  // define vacuum according to definition from N03 example
134  G4double density = universe_mean_density; //from PhysicalConstants.h
135  G4double pressure = 3.e-18*pascal;
136  G4double temperature = 2.73*kelvin;
137  material = new G4Material(name, z=1., a=1.01*g/mole, density,
138  kStateGas,temperature,pressure);
139  }
140  else {
141  //G4Element* element = CreateElement(z, a, name);
142  G4Element* element = G3Ele.GetEle(z);
143  material = new G4Material(name, dens, 1);
144  material->AddElement(element, 1.);
145  }
146 
147  // add the material to the List
148  G3Mat.put(imate, material);
149 }
G4Element * GetEle(G4double Z)
Definition: G3EleTable.cc:52
std::vector< ExP01TrackerHit * > a
Definition: ExP01Classes.hh:33
int universe_mean_density
Definition: hepunit.py:307
G4String strip(G4int strip_Type=trailing, char c=' ')
void put(G4int id, G4Material *material)
Definition: G3MatTable.cc:53
G3G4DLL_API G3MatTable G3Mat
Definition: clparse.cc:55
int G4int
Definition: G4Types.hh:78
void G4gsmixt(G4int imate, G4String name, G4double a[], G4double *z, G4double dens, G4int nlmat, G4double *wmat)
string material
Definition: eplot.py:19
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5205
G3G4DLL_API G3EleTable G3Ele
Definition: clparse.cc:60
#define pascal
const G4int n
static constexpr double kelvin
Definition: G4SIunits.hh:281
static constexpr double cm3
Definition: G4SIunits.hh:121
tuple z
Definition: test.py:28
void AddElement(G4Element *element, G4int nAtoms)
Definition: G4Material.cc:362
double G4double
Definition: G4Types.hh:76
static constexpr double mole
Definition: G4SIunits.hh:286

Here is the call graph for this function:

Here is the caller graph for this function:

void PG4gsmate ( G4String tokens)

Definition at line 42 of file G4gsmate.cc.

43 {
44  // fill the parameter containers
45  G3fillParams(tokens,PTgsmate);
46  G4String name = Spar[0];
47  G4int imate = Ipar[0];
48  G4int nwbf = Ipar[1];
49  G4double a = Rpar[0];
50  G4double z = Rpar[1];
51  G4double dens = Rpar[2];
52  G4double radl = Rpar[3];
53  // G4double absl = Rpar[4];
54  G4double *ubuf = &Rpar[5];
55 
56  G4gsmate(imate, name, a, z, dens, radl, nwbf, ubuf);
57 }
#define PTgsmate
Definition: G3toG4.hh:62
G3G4DLL_API G4double Rpar[1000]
Definition: clparse.cc:67
const XML_Char * name
Definition: expat.h:151
std::vector< ExP01TrackerHit * > a
Definition: ExP01Classes.hh:33
void G3fillParams(G4String *tokens, const char *ptypes)
Definition: clparse.cc:219
int G4int
Definition: G4Types.hh:78
void G4gsmate(G4int imate, G4String name, G4double a, G4double z, G4double dens, G4double radl, G4int nwbf, G4double *ubuf)
Definition: G4gsmate.cc:105
G3G4DLL_API G4String Spar[1000]
Definition: clparse.cc:68
G3G4DLL_API G4int Ipar[1000]
Definition: clparse.cc:66
tuple z
Definition: test.py:28
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function: