Geant4.10
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4.10.00.p01
environments
g4py
examples
demos
water_phantom
g4lib
MyMaterials.cc
Go to the documentation of this file.
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
// $Id: MyMaterials.cc 66892 2013-01-17 10:57:59Z gunter $
27
// ====================================================================
28
// MyMaterials.cc
29
//
30
// 2005 Q
31
// ====================================================================
32
#include "
MyMaterials.hh
"
33
#include "
G4Material.hh
"
34
#include "
G4SystemOfUnits.hh
"
35
#include "
G4PhysicalConstants.hh
"
36
37
// ====================================================================
38
//
39
// class description
40
//
41
// ====================================================================
42
43
//////////////////////////
44
MyMaterials::MyMaterials
()
45
//////////////////////////
46
{
47
}
48
49
50
///////////////////////////
51
MyMaterials::~MyMaterials
()
52
///////////////////////////
53
{
54
}
55
56
57
/////////////////////////////
58
void
MyMaterials::Construct
()
59
/////////////////////////////
60
{
61
G4double
A, Z;
62
63
// ------------------------------------------------------------------------
64
// Elements
65
// ------------------------------------------------------------------------
66
G4Element
*
elH
=
new
G4Element
(
"Hydrogen"
,
"H"
, Z=1., A=1.00794*
g
/
mole
);
67
G4Element
*
elC
=
new
G4Element
(
"Carbon"
,
"C"
, Z=6., A= 12.011 *
g
/
mole
);
68
G4Element
*
elN
=
new
G4Element
(
"Nitrogen"
,
"N"
, Z=7., A= 14.00674*
g
/
mole
);
69
G4Element
*
elO
=
new
G4Element
(
"Oxygen"
,
"O"
, Z=8., A= 15.9994*
g
/
mole
);
70
71
// ------------------------------------------------------------------------
72
// Materials
73
// ------------------------------------------------------------------------
74
G4double
density
, massfraction;
75
G4int
natoms,
nel
;
76
77
// temperature of experimental hall is controlled at 20 degree.
78
const
G4double
expTemp=
STP_Temperature
+20.*
kelvin
;
79
80
// vacuum
81
density=
universe_mean_density
;
82
G4Material
* Vacuum=
new
G4Material
(
"Vacuum"
, density, nel=2);
83
Vacuum->
AddElement
(elN, .7);
84
Vacuum->
AddElement
(elO, .3);
85
86
// air
87
density= 1.2929e-03 *
g
/
cm3
;
// at 20 degree
88
G4Material
*
Air
=
new
G4Material
(
"Air"
, density, nel=2,
89
kStateGas
, expTemp);
90
G4double
ttt= 75.47+23.20;
91
Air->
AddElement
(elN, massfraction= 75.47/ttt);
92
Air->
AddElement
(elO, massfraction= 23.20/ttt);
93
94
// water
95
density= 1.000*
g
/
cm3
;
96
G4Material
* H2O=
new
G4Material
(
"Water"
, density, nel=2);
97
H2O->
AddElement
(elH, natoms=2);
98
H2O->
AddElement
(elO, natoms=1);
99
100
// alminium
101
A= 26.98 *
g
/
mole
;
102
density= 2.70 *
g
/
cm3
;
103
G4Material
*
Al
=
new
G4Material
(
"Al"
, Z=13., A, density);
104
105
// iron
106
A= 55.847 *
g
/
mole
;
107
density= 7.87 *
g
/
cm3
;
108
G4Material
* Fe=
new
G4Material
(
"Iron"
, Z=26., A, density);
109
110
// lead
111
A= 207.2 *
g
/
mole
;
112
density= 11.35 *
g
/
cm3
;
113
G4Material
* Pb=
new
G4Material
(
"Lead"
, Z=82., A, density);
114
115
// scintillator (Polystyene(C6H5CH=CH2))
116
density= 1.032 *
g
/
cm3
;
117
G4Material
* Scinti=
new
G4Material
(
"Scinti"
, density, nel=2);
118
Scinti->
AddElement
(elC, natoms=8);
119
Scinti->
AddElement
(elH, natoms=8);
120
121
}
122
Air
G4Material * Air
Definition:
TRTMaterials.hh:57
python.hepunit.universe_mean_density
int universe_mean_density
Definition:
hepunit.py:307
G4Material
Definition:
G4Material.hh:118
elC
G4Element * elC
Definition:
TRTMaterials.hh:48
G4Element
Definition:
G4Element.hh:97
python.hepunit.STP_Temperature
float STP_Temperature
Definition:
hepunit.py:302
kStateGas
Definition:
G4Material.hh:114
G4int
int G4int
Definition:
G4Types.hh:78
MyMaterials::MyMaterials
MyMaterials()
Definition:
MyMaterials.cc:44
elN
G4Element * elN
Definition:
TRTMaterials.hh:44
elH
G4Element * elH
Definition:
TRTMaterials.hh:50
MyMaterials::~MyMaterials
~MyMaterials()
Definition:
MyMaterials.cc:51
python.hepunit.kelvin
int kelvin
Definition:
hepunit.py:203
density
G4double density
Definition:
TRTMaterials.hh:39
g
function g(Y1, Y2, PT2)
Definition:
hijing1.383.f:5205
MyMaterials.hh
elO
G4Element * elO
Definition:
TRTMaterials.hh:46
G4Material.hh
python.hepunit.cm3
cm3
Definition:
hepunit.py:52
G4PhysicalConstants.hh
MyMaterials::Construct
void Construct()
Definition:
MyMaterials.cc:58
G4double
double G4double
Definition:
G4Types.hh:76
G4SystemOfUnits.hh
AddElement
Air AddElement(elN,.7)
python.hepunit.mole
int mole
Definition:
hepunit.py:208
nel
G4int nel
Definition:
TRTMaterials.hh:41
Al
G4Material * Al
Definition:
TRTMaterials.hh:74
Generated on Wed Apr 30 2014 15:55:19 for Geant4.10 by
1.8.7