Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExGflashMaterialManager.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 //
28 //
30 #include "G4SystemOfUnits.hh"
31 using namespace std;
32 
33 ExGflashMaterialManager* ExGflashMaterialManager::mpointer=0;
34 
36 {
37  if (elist.find(symbol)!=elist.end())
38  {
39  G4cout<<"attempt of redefining an existing element "<<symbol<<G4endl;
41  }
42  else
43  {
44  G4Element *newelement=new G4Element(name,symbol,z,a);
45  elist[symbol]=newelement;
46  }
47 }
48 
50 {
51  if (elist.find(symbol)==elist.end())
52  {
53  G4cout<<" element "<<symbol<<" not found!"<<G4endl;
54  return NULL;
55  }
56  else
57  return elist[symbol];
58 }
59 
61 {
62  if (mlist.find(name)!=mlist.end())
63  {
64  G4cout<<"attempt of redefining an existing material "<<G4endl;
65  G4cout<<mlist[name]<<G4endl;
66  }
67  else
68  {
69  G4Material *newmaterial=new G4Material(name,z,a,d);
70  mlist[name]=newmaterial;
71  }
72 }
73 
75 {
76  if (mlist.find(name)!=mlist.end())
77  {
78  G4cout<<"attempt of redefining an existing material "<<G4endl;
79  G4cout<<mlist[name]<<G4endl;
80  }
81  else
82  {
83  G4Material *newmaterial=new G4Material(name,d,ncomponent);
84  mlist[name]=newmaterial;
85  }
86 }
87 
89 {
90  if (mlist.find(name)==mlist.end())
91  {
92  G4cout<<" material "<<name<<" not found!"<<G4endl;
93  return NULL;
94  }
95  else
96  {
97  // G4cout<<"returning material "<<name<<G4endl;
98  return mlist[name];
99  }
100 }
101 
103 {
104  G4Material *mat=getMaterial(n1);
105  mat->AddMaterial(getMaterial(n2),fraction);
106 }
107 
109 {
110  G4Material *mat=getMaterial(n1);
111  mat->AddElement(getElement(n2),fraction);
112 }
113 
115 {
116  G4Material *mat=getMaterial(n1);
117  mat->AddElement(getElement(n2),natoms);
118 }
119 
121 {
122  MaterialList::iterator it;
123  for (it=mlist.begin();it!=mlist.end();it++) G4cout<<(*it).second<<G4endl;
124 }
125 
127 {
128  ElementList::iterator it;
129  for (it=elist.begin();it!=elist.end();it++) G4cout<<(*it).second<<G4endl;
130 }
131 
133 {
135  double z,a,density;
136  int ncomponents,natoms;
137  //double fraction;
138  storeElement(name="Hydrogen",symbol="H" , z= 1., a=1.01*g/mole);
139  storeElement(name="Carbon" ,symbol="C" , z= 6., a=12.01*g/mole);
140  storeElement(name="Nitrogen",symbol="N" , z= 7., a=14.01*g/mole);
141  storeElement(name="Oxygen" ,symbol="O" , z= 8., a=16.00*g/mole);
142  storeElement(name="Silicon",symbol="Si" , z= 14., a=28.09*g/mole);
143  storeElement(name="Argon",symbol="Ar",z=18.,a=39.95*g/mole);
144  storeElement(name="Iron" ,symbol="Fe", z=26., a=55.85*g/mole);
145  storeElement(name="Aluminum",symbol="Al",z=13.,a=26.98*g/mole);
146  storeElement(name="Lead",symbol="Pb",z=82.,a=207.19*g/mole);
147  storeElement(name="Fluorine",symbol="F",z=9.,a=18.99*g/mole);
148  storeElement(name="Chlorine",symbol="Cl",z=17.,a=35.45*g/mole);
149  storeElement(name="Tungsten",symbol="W",z=74.,a=183.85*g/mole);
150  storeMaterial(name="Aluminium", z=13., a = 26.98*g/mole, density = 2.700*g/cm3);
151  storeMaterial(name="Iron",z=26., a=55.85*g/mole, density=7.87*g/cm3);
152  storeMaterial(name="Copper",z=29.,a=63.546*g/mole, density=8.96*g/cm3);
153  storeMaterial(name="Silicon",z=14.,a=28.0855*g/mole, density=2.33*g/cm3);
154  storeMaterial(name="Tungsten",z=74.,a=183.85*g/mole, density = 19.3*g/cm3 );
155  storeMaterial(name="Lead" , z=82., a= 207.19*g/mole,density = 11.35*g/cm3);
156  storeMaterial(name="LAr",z=18.,a=39.95*g/mole,density =1.39*g/cm3);
157  storeMaterial(name="Scintillator", density=1.032*g/cm3, ncomponents=2);
158  addElement("Scintillator","C",natoms=9);
159  addElement("Scintillator","H",natoms=10);
160  storeMaterial(name="PbWO4", density=8.28*g/cm3, ncomponents=3);
161  addElement("PbWO4","Pb",natoms=1);
162  addElement("PbWO4","W",natoms=1);
163  addElement("PbWO4","O",natoms=4);
164  // addElement("PbWO4","Pb", fraction=0.45532661 );
165  // addElement("PbWO4","W", fraction=0.40403397 );
166  // addElement("PbWO4","O", fraction=0.14063942);
167  storeMaterial(name="Air" , density=1.290*mg/cm3, ncomponents=2);
168  addElement("Air", "N", .7);
169  addElement("Air", "O", .3);
170  storeMaterial(name="CO2", density=1.977*mg/1000*cm3,ncomponents=2);
171  addElement("CO2","C",natoms=1);
172  addElement("CO2","O",natoms=2);
173  storeMaterial(name="ArCO2",density=1.8*mg/1000*cm3,ncomponents=2);
174  addElement("ArCO2","Ar",.93);
175  addMaterial("ArCO2","CO2",.07);
176  storeMaterial(name="RPCgas", density=1.977*mg/1000*cm3,ncomponents=3);
177  addElement("RPCgas","C",natoms=2);
178  addElement("RPCgas","H",natoms=2);
179  addElement("RPCgas","F",natoms=4);
180  storeMaterial(name="RPVC", density=1.4*g/cm3,ncomponents=3);
181  addElement("RPVC","C",natoms=2);
182  addElement("RPVC","H",natoms=3);
183  addElement("RPVC","Cl",natoms=1);
184  storeMaterial(name="Bakelite", density=1.4*g/cm3,ncomponents=3);
185  addElement("Bakelite","C",natoms=1);
186  addElement("Bakelite","H",natoms=4);
187  addElement("Bakelite","O",natoms=2);
188 }
189 
190 
191 
192 
193 
194 
195 
196 
197 
198 
199 
200