[807] | 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 | // Author: Mathieu Fontaine, Rachid Mazini |
---|
| 27 | // fontaine@lps.umontreal.ca Rachid.Mazini@cern.ch |
---|
| 28 | // |
---|
| 29 | // Language: C++ |
---|
| 30 | // Tested on: g++ |
---|
| 31 | // Prerequisites: None |
---|
| 32 | // Purpose: This is the place, where all the materials get defined. |
---|
| 33 | // Instead of coding those materials locally, where they |
---|
| 34 | // are needed, it is much easier to maintain, if we keep |
---|
| 35 | // all materials for a detector component in one place. |
---|
| 36 | // Everybody who needs some of these parameters, can |
---|
| 37 | // query the FCALMaterialConsultant. |
---|
| 38 | // --> This class is made a singleton by making the |
---|
| 39 | // constructor private and hiding it behind the |
---|
| 40 | // construct() method, which creates a first instance |
---|
| 41 | // if it does not exist. This is to prevent multiple |
---|
| 42 | // copies of this consultant with potentially different |
---|
| 43 | // contents (once the data is loaded from files and/or |
---|
| 44 | // can be changed by user interaction). |
---|
| 45 | // --> The method Material is provided to access to the data |
---|
| 46 | // stored, a routine ShowMeAllYouKnow can be queried to |
---|
| 47 | // dump the entire knowledge of this consultant. |
---|
| 48 | // |
---|
| 49 | // * Ideas on how the theFCALMaterialConsultant pointer |
---|
| 50 | // is made static are borrowed from G4VisManager. |
---|
| 51 | // |
---|
| 52 | //---------------------------------------------------------------------------------- |
---|
| 53 | |
---|
| 54 | #include "FCALMaterialConsultant.hh" |
---|
| 55 | |
---|
| 56 | #include "globals.hh" |
---|
| 57 | |
---|
| 58 | FCALMaterialConsultant *FCALMaterialConsultant::theFCALMaterialConsultant = NULL; |
---|
| 59 | |
---|
| 60 | FCALMaterialConsultant::FCALMaterialConsultant() |
---|
| 61 | { |
---|
| 62 | G4double a,z,density,fractionmass; |
---|
| 63 | G4String name,symbol; |
---|
| 64 | G4int nel,natoms; |
---|
| 65 | |
---|
| 66 | //------------ |
---|
| 67 | // elements |
---|
| 68 | //------------ |
---|
| 69 | |
---|
| 70 | a=1.01*g/mole; |
---|
| 71 | elH=new G4Element(name="Hydrogen",symbol="H2",z=1.,a); |
---|
| 72 | |
---|
| 73 | a=2.01*g/mole; |
---|
| 74 | elD=new G4Element(name="Deuterium",symbol="D",z=1.,a); |
---|
| 75 | |
---|
| 76 | a=4.*g/mole; |
---|
| 77 | elHe=new G4Element(name="Helium",symbol="He",z=2.,a); |
---|
| 78 | |
---|
| 79 | a=6.94*g/mole; |
---|
| 80 | elLi=new G4Element(name="Lithium",symbol="Li",z=3.,a); |
---|
| 81 | |
---|
| 82 | a=9.01*g/mole; |
---|
| 83 | elBe=new G4Element(name="Berillium",symbol="Be",z=4.,a); |
---|
| 84 | |
---|
| 85 | a=12.01*g/mole; |
---|
| 86 | elC=new G4Element(name="Carbon",symbol="C",z=6.,a); |
---|
| 87 | |
---|
| 88 | a=14.01*g/mole; |
---|
| 89 | elN=new G4Element(name="Nitrogen",symbol="N2",z=7.,a); |
---|
| 90 | |
---|
| 91 | a=16.*g/mole; |
---|
| 92 | elO=new G4Element(name="Oxygen",symbol="O2",z=8.,a); |
---|
| 93 | |
---|
| 94 | a=20.18*g/mole; |
---|
| 95 | elNe=new G4Element(name="Neon",symbol="Ne",z=10.,a); |
---|
| 96 | |
---|
| 97 | a=22.99*g/mole; |
---|
| 98 | elNa=new G4Element(name="Sodium",symbol="Na",z=11.,a); |
---|
| 99 | |
---|
| 100 | a=26.98*g/mole; |
---|
| 101 | elAl=new G4Element(name="Aluminium",symbol="Al",z=13.,a); |
---|
| 102 | |
---|
| 103 | a=28.085*g/mole; |
---|
| 104 | elSi=new G4Element(name="Silicon",symbol="Si",z=14.,a); |
---|
| 105 | |
---|
| 106 | a=40.08*g/mole; |
---|
| 107 | elCa=new G4Element(name="Calcium",symbol="Ca",z=20.,a); |
---|
| 108 | |
---|
| 109 | a=55.850*g/mole; |
---|
| 110 | elFe=new G4Element(name="Iron",symbol="Fe",z=26.,a); |
---|
| 111 | |
---|
| 112 | a=63.54*g/mole; |
---|
| 113 | elCu=new G4Element(name="Copper",symbol="Cu",z=29.,a); |
---|
| 114 | |
---|
| 115 | a=183.85*g/mole; |
---|
| 116 | elW=new G4Element(name="Tungstenm",symbol="W",z=74.,a); |
---|
| 117 | |
---|
| 118 | a=207.19*g/mole; |
---|
| 119 | elPb=new G4Element(name="Lead",symbol="Pb",z=82.,a); |
---|
| 120 | |
---|
| 121 | a=238.03*g/mole; |
---|
| 122 | elU=new G4Element(name="Uranium",symbol="U",z=92.,a); |
---|
| 123 | |
---|
| 124 | |
---|
| 125 | //------------------- |
---|
| 126 | // simple materials |
---|
| 127 | //------------------- |
---|
| 128 | |
---|
| 129 | density = 2.7*g/cm3; |
---|
| 130 | a = 26.98*g/mole; |
---|
| 131 | Aluminium = new G4Material(name="Aluminium",z=13.,a,density); |
---|
| 132 | |
---|
| 133 | density = 7.87*g/cm3; |
---|
| 134 | a = 55.85*g/mole; |
---|
| 135 | Iron = new G4Material(name="Iron",z=26.,a,density); |
---|
| 136 | |
---|
| 137 | density = 8.96*g/cm3; |
---|
| 138 | a = 63.54*g/mole; |
---|
| 139 | Copper = new G4Material(name="Copper",z=29.,a,density); |
---|
| 140 | |
---|
| 141 | density = 19.3*g/cm3; |
---|
| 142 | a = 183.85*g/mole; |
---|
| 143 | Tungsten = new G4Material(name="Tungsten",z=74.,a,density); |
---|
| 144 | |
---|
| 145 | density = 11.35*g/cm3; |
---|
| 146 | a = 207.19*g/mole; |
---|
| 147 | Lead = new G4Material(name="Lead",z=82.,a,density); |
---|
| 148 | |
---|
| 149 | density = 1.4*g/cm3; |
---|
| 150 | a = 39.95*g/mole; |
---|
| 151 | LiquidArgon = new G4Material(name="LiquidArgon",z=18.,a,density); |
---|
| 152 | |
---|
| 153 | density = 0.002*g/cm3; |
---|
| 154 | a = 39.95*g/mole; |
---|
| 155 | ArgonGas = new G4Material(name="ArgonGas",z=18.,a,density); |
---|
| 156 | |
---|
| 157 | density = 8.96*g/cm3; |
---|
| 158 | a = 58.69*g/mole; |
---|
| 159 | Nickel = new G4Material(name="Nickel",z=28.,a,density); |
---|
| 160 | |
---|
| 161 | |
---|
| 162 | //------------------ |
---|
| 163 | // mixtures |
---|
| 164 | //------------------ |
---|
| 165 | |
---|
| 166 | density = 1.290*mg/cm3; |
---|
| 167 | Air = new G4Material(name="Air",density, nel=2); |
---|
| 168 | Air->AddElement(elN, 0.7); |
---|
| 169 | Air->AddElement(elO, 0.3); |
---|
| 170 | |
---|
| 171 | RhoaCell = Air; |
---|
| 172 | |
---|
| 173 | |
---|
| 174 | density = 1.e-5*g/cm3; |
---|
| 175 | G4double pressure = 2.e-2*bar; |
---|
| 176 | G4double temperature = STP_Temperature; //from PhysicalConstants.h |
---|
| 177 | G4Material* Vacuum = new G4Material(name="Vacuum", density, nel=1, |
---|
| 178 | kStateGas,temperature,pressure); |
---|
| 179 | Vacuum->AddMaterial(Air, fractionmass=1.); |
---|
| 180 | |
---|
| 181 | |
---|
| 182 | density = 0.002*g/cm3; |
---|
| 183 | CO2 = new G4Material(name="CO2",density,nel=2); |
---|
| 184 | CO2->AddElement(elC, natoms=1); |
---|
| 185 | CO2->AddElement(elO, natoms=2); |
---|
| 186 | |
---|
| 187 | density = 1.42*g/cm3; |
---|
| 188 | Kapton = new G4Material(name="Kapton",density, nel=4); |
---|
| 189 | Kapton->AddElement(elH, fractionmass = 0.0273); |
---|
| 190 | Kapton->AddElement(elC, fractionmass = 0.7213); |
---|
| 191 | Kapton->AddElement(elN, fractionmass = 0.0765); |
---|
| 192 | Kapton->AddElement(elO, fractionmass = 0.1749); |
---|
| 193 | |
---|
| 194 | density = 1.032*g/cm3; |
---|
| 195 | Polystyrene = new G4Material(name="Polystyrene",density,nel=2); |
---|
| 196 | Polystyrene->AddElement(elC, natoms=8); |
---|
| 197 | Polystyrene->AddElement(elH, natoms=8); |
---|
| 198 | |
---|
| 199 | density = 5.185*g/cm3; |
---|
| 200 | FCAL1CuArKap = new G4Material(name="FCAL1CuArKap",density,nel=3); |
---|
| 201 | FCAL1CuArKap->AddMaterial(Copper, fractionmass = 0.864); |
---|
| 202 | FCAL1CuArKap->AddMaterial(Kapton, fractionmass = 0.068); |
---|
| 203 | FCAL1CuArKap->AddMaterial(LiquidArgon, fractionmass = 0.068); |
---|
| 204 | |
---|
| 205 | density = 8.701*g/cm3; |
---|
| 206 | FCAL1CuAr = new G4Material(name="FCAL1CuAr",density,nel=2); |
---|
| 207 | FCAL1CuAr->AddMaterial(Copper, fractionmass = 0.994); |
---|
| 208 | FCAL1CuAr->AddMaterial(LiquidArgon, fractionmass = 0.006); |
---|
| 209 | |
---|
| 210 | density = 5.185*g/cm3; |
---|
| 211 | FCAL2CuArKap = new G4Material(name="FCAL2CuArKap",density,nel=3); |
---|
| 212 | FCAL2CuArKap->AddMaterial(Copper, fractionmass = 0.864); |
---|
| 213 | FCAL2CuArKap->AddMaterial(Kapton, fractionmass = 0.068); |
---|
| 214 | FCAL2CuArKap->AddMaterial(LiquidArgon, fractionmass = 0.068); |
---|
| 215 | |
---|
| 216 | density = 18.6*g/cm3; |
---|
| 217 | FCAL2WFeNi = new G4Material(name="FCAL2WFeNi",density,nel=3); |
---|
| 218 | FCAL2WFeNi->AddMaterial(Tungsten, fractionmass = 0.97); |
---|
| 219 | FCAL2WFeNi->AddMaterial(Iron, fractionmass = 0.01); |
---|
| 220 | FCAL2WFeNi->AddMaterial(Nickel, fractionmass = 0.02); |
---|
| 221 | |
---|
| 222 | density = 15.366*g/cm3; |
---|
| 223 | FCAL2WFeNiCuAr = new G4Material(name="FCAL2WFeNiCuAr",density,nel=3); |
---|
| 224 | FCAL2WFeNiCuAr->AddMaterial(FCAL2WFeNi, fractionmass = 0.913); |
---|
| 225 | FCAL2WFeNiCuAr->AddMaterial(Copper, fractionmass = 0.077); |
---|
| 226 | FCAL2WFeNiCuAr->AddMaterial(LiquidArgon, fractionmass = 0.01); |
---|
| 227 | |
---|
| 228 | density = 0.002*g/cm3; |
---|
| 229 | MWPCArCO2 = new G4Material(name="MWPCArCO2",density,nel=2); |
---|
| 230 | MWPCArCO2->AddMaterial(CO2, fractionmass = 0.2); |
---|
| 231 | MWPCArCO2->AddMaterial(ArgonGas, fractionmass = 0.8); |
---|
| 232 | |
---|
| 233 | |
---|
| 234 | // must check recipe for concrete |
---|
| 235 | |
---|
| 236 | density = 2.5*g/cm3; |
---|
| 237 | ShieldingConcrete = new G4Material(name="ShieldingConcrete",density,nel=6); |
---|
| 238 | ShieldingConcrete->AddElement(elO, fractionmass = 0.52); |
---|
| 239 | ShieldingConcrete->AddElement(elSi, fractionmass = 0.325); |
---|
| 240 | ShieldingConcrete->AddElement(elCa, fractionmass = 0.06); |
---|
| 241 | ShieldingConcrete->AddElement(elNa, fractionmass = 0.015); |
---|
| 242 | ShieldingConcrete->AddElement(elFe, fractionmass = 0.04); |
---|
| 243 | ShieldingConcrete->AddElement(elAl, fractionmass = 0.04); |
---|
| 244 | |
---|
| 245 | // must have the right composition for stainless steel |
---|
| 246 | |
---|
| 247 | density = 8.96*g/cm3; |
---|
| 248 | StainlessSteel = new G4Material(name="StainlessSteel",density,nel=1); |
---|
| 249 | StainlessSteel->AddElement(elO, fractionmass = 1.); |
---|
| 250 | |
---|
| 251 | } |
---|
| 252 | |
---|
| 253 | FCALMaterialConsultant * FCALMaterialConsultant::construct() |
---|
| 254 | { |
---|
| 255 | if (theFCALMaterialConsultant == NULL) { |
---|
| 256 | theFCALMaterialConsultant = new FCALMaterialConsultant(); |
---|
| 257 | } |
---|
| 258 | return theFCALMaterialConsultant; |
---|
| 259 | } |
---|
| 260 | |
---|
| 261 | G4Material * FCALMaterialConsultant::Material(G4String what) |
---|
| 262 | { |
---|
| 263 | G4Material* material = 0; |
---|
| 264 | if(what == "Air") material = Air; |
---|
| 265 | if(what == "Vacuum") material = Vacuum; |
---|
| 266 | if(what == "LiquidArgon") material = LiquidArgon; |
---|
| 267 | if(what == "Aluminium") material = Aluminium; |
---|
| 268 | if(what == "Iron") material = Iron; |
---|
| 269 | if(what == "Copper") material = Copper; |
---|
| 270 | if(what == "Tungsten") material = Tungsten; |
---|
| 271 | if(what == "Lead") material = Lead; |
---|
| 272 | if(what == "CO2") material = CO2; |
---|
| 273 | if(what == "ArgonGas") material = ArgonGas; |
---|
| 274 | if(what == "ShieldingConcrete") material = ShieldingConcrete; |
---|
| 275 | if(what == "Polystyrene") material = Polystyrene; |
---|
| 276 | if(what == "StainlessSteel") material = StainlessSteel; |
---|
| 277 | if(what == "Nickel") material = Nickel; |
---|
| 278 | if(what == "FCAL1CuArKap") material = FCAL1CuArKap; |
---|
| 279 | if(what == "FCAL1CuAr") material = FCAL1CuAr; |
---|
| 280 | if(what == "FCAL2CuArKap") material = FCAL2CuArKap; |
---|
| 281 | if(what == "FCAL2WFeNi") material = FCAL2WFeNi; |
---|
| 282 | if(what == "FCAL2WFeNiCuAr") material = FCAL2WFeNiCuAr; |
---|
| 283 | if(what == "MWPCArCO2") material = MWPCArCO2; |
---|
| 284 | if(what == "RhoaCell") material = RhoaCell; |
---|
| 285 | |
---|
| 286 | return material; |
---|
| 287 | } |
---|
| 288 | |
---|