Geant4-11
Public Member Functions
MyMaterials Class Reference

#include <MyMaterials.hh>

Public Member Functions

void Construct ()
 
 MyMaterials ()
 
 ~MyMaterials ()
 

Detailed Description

Definition at line 41 of file MyMaterials.hh.

Constructor & Destructor Documentation

◆ MyMaterials()

MyMaterials::MyMaterials ( )

Definition at line 43 of file MyMaterials.cc.

45{
46}

◆ ~MyMaterials()

MyMaterials::~MyMaterials ( )

Definition at line 50 of file MyMaterials.cc.

52{
53}

Member Function Documentation

◆ Construct()

void MyMaterials::Construct ( )

Definition at line 57 of file MyMaterials.cc.

59{
60 G4double A, Z;
61
62 // ------------------------------------------------------------------------
63 // Elements
64 // ------------------------------------------------------------------------
65 G4Element* elH = new G4Element("Hydrogen","H", Z=1., A=1.00794*g/mole);
66 G4Element* elC = new G4Element("Carbon", "C", Z=6., A= 12.011 *g/mole);
67 G4Element* elN = new G4Element("Nitrogen","N", Z=7., A= 14.00674*g/mole);
68 G4Element* elO = new G4Element("Oxygen", "O", Z=8., A= 15.9994*g/mole);
69
70 // ------------------------------------------------------------------------
71 // Materials
72 // ------------------------------------------------------------------------
73 G4double density, massfraction;
74 G4int natoms, nel;
75
76 // temperature of experimental hall is controlled at 20 degree.
77 const G4double expTemp= STP_Temperature+20.*kelvin;
78
79 // vacuum
80 density= universe_mean_density;
81 G4Material* Vacuum= new G4Material("Vacuum", density, nel=2);
82 Vacuum-> AddElement(elN, .7);
83 Vacuum-> AddElement(elO, .3);
84
85 // air
86 density= 1.2929e-03 *g/cm3; // at 20 degree
87 G4Material* Air= new G4Material("Air", density, nel=2,
88 kStateGas, expTemp);
89 G4double ttt= 75.47+23.20;
90 Air-> AddElement(elN, massfraction= 75.47/ttt);
91 Air-> AddElement(elO, massfraction= 23.20/ttt);
92
93 // water
94 density= 1.000*g/cm3;
95 G4Material* H2O= new G4Material("Water", density, nel=2);
96 H2O-> AddElement(elH, natoms=2);
97 H2O-> AddElement(elO, natoms=1);
98
99 // alminium
100 A= 26.98 *g/mole;
101 density= 2.70 *g/cm3;
102 G4Material* Al= new G4Material("Al", Z=13., A, density);
103
104 // iron
105 A= 55.847 *g/mole;
106 density= 7.87 *g/cm3;
107 G4Material* Fe= new G4Material("Iron", Z=26., A, density);
108
109 // lead
110 A= 207.2 *g/mole;
111 density= 11.35 *g/cm3;
112 G4Material* Pb= new G4Material("Lead", Z=82., A, density);
113
114 // scintillator (Polystyene(C6H5CH=CH2))
115 density= 1.032 *g/cm3;
116 G4Material* Scinti= new G4Material("Scinti", density, nel=2);
117 Scinti-> AddElement(elC, natoms=8);
118 Scinti-> AddElement(elH, natoms=8);
119
120}
@ kStateGas
Definition: G4Material.hh:111
static constexpr double kelvin
Definition: G4SIunits.hh:274
static constexpr double mole
Definition: G4SIunits.hh:279
static constexpr double cm3
Definition: G4SIunits.hh:101
static constexpr double g
Definition: G4SIunits.hh:168
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
const G4int Z[17]
const G4double A[17]
int universe_mean_density
Definition: hepunit.py:306
float STP_Temperature
Definition: hepunit.py:301

References A, cm3, g, kelvin, kStateGas, mole, source.hepunit::STP_Temperature, source.hepunit::universe_mean_density, and Z.

Referenced by BOOST_PYTHON_MODULE().


The documentation for this class was generated from the following files: