Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-10-14 08:09:01

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 /// @file Materials.cc
0028 /// @brief Define materials
0029 
0030 #include "Materials.hh"
0031 
0032 #include "G4Material.hh"
0033 #include "G4PhysicalConstants.hh"
0034 #include "G4SystemOfUnits.hh"
0035 
0036 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0037 Materials::Materials() {}
0038 
0039 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0040 Materials::~Materials() {}
0041 
0042 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0043 void Materials::Construct()
0044 {
0045   G4double A, Z;
0046 
0047   // ------------------------------------------------------------------------
0048   // Elements
0049   // ------------------------------------------------------------------------
0050   G4Element* elH = new G4Element("Hydrogen", "H", Z = 1., A = 1.00794 * g / mole);
0051   G4Element* elC = new G4Element("Carbon", "C", Z = 6., A = 12.011 * g / mole);
0052   G4Element* elN = new G4Element("Nitrogen", "N", Z = 7., A = 14.00674 * g / mole);
0053   G4Element* elO = new G4Element("Oxygen", "O", Z = 8., A = 15.9994 * g / mole);
0054   G4Element* elNa = new G4Element("Sodium", "Na", Z = 11., A = 22.989768 * g / mole);
0055   G4Element* elSi = new G4Element("Silicon", "Si", Z = 14., A = 28.0855 * g / mole);
0056   G4Element* elAr = new G4Element("Argon", "Ar", Z = 18., A = 39.948 * g / mole);
0057   G4Element* elI = new G4Element("Iodine", "I", Z = 53., A = 126.90447 * g / mole);
0058   G4Element* elCs = new G4Element("Cesium", "Cs", Z = 55., A = 132.90543 * g / mole);
0059 
0060   // ------------------------------------------------------------------------
0061   // Materials
0062   // ------------------------------------------------------------------------
0063   G4double density, massfraction;
0064   G4int natoms, nel;
0065 
0066   // temperature of experimental hall is controlled at 20 degree.
0067   const G4double expTemp = STP_Temperature + 20. * kelvin;
0068 
0069   // vacuum
0070   density = universe_mean_density;
0071   G4Material* Vacuum = new G4Material("Vacuum", density, nel = 2);
0072   Vacuum->AddElement(elN, .7);
0073   Vacuum->AddElement(elO, .3);
0074 
0075   // air
0076   density = 1.2929e-03 * g / cm3;  // at 20 degree
0077   G4Material* Air = new G4Material("Air", density, nel = 3, kStateGas, expTemp);
0078   G4double ttt = 75.47 + 23.20 + 1.28;
0079   Air->AddElement(elN, massfraction = 75.47 / ttt);
0080   Air->AddElement(elO, massfraction = 23.20 / ttt);
0081   Air->AddElement(elAr, massfraction = 1.28 / ttt);
0082 
0083   // Ar gas
0084   A = 39.948 * g / mole;
0085   const G4double denAr = 1.782e-03 * g / cm3 * STP_Temperature / expTemp;
0086   G4Material* Ar = new G4Material("ArgonGas", Z = 18., A, denAr, kStateGas, expTemp);
0087 
0088   // ethane (C2H6)
0089   const G4double denEthane = 1.356e-3 * g / cm3 * STP_Temperature / expTemp;
0090   G4Material* Ethane = new G4Material("Ethane", denEthane, nel = 2, kStateGas, expTemp);
0091   Ethane->AddElement(elC, natoms = 2);
0092   Ethane->AddElement(elH, natoms = 6);
0093 
0094   // Ar(50%) + ethane(50%) mixture
0095   density = (denAr + denEthane) / 2.;
0096   G4Material* ArEthane = new G4Material("ArEthane", density, nel = 2, kStateGas, expTemp);
0097   ArEthane->AddMaterial(Ar, massfraction = denAr / density / 2.);
0098   ArEthane->AddMaterial(Ethane, massfraction = denEthane / density / 2.);
0099 
0100   // silicon
0101   A = 28.0855 * g / mole;
0102   density = 2.33 * g / cm3;
0103   new G4Material("SiliconWafer", Z = 14., A, density);
0104 
0105   // alminium
0106   A = 26.98 * g / mole;
0107   density = 2.70 * g / cm3;
0108   new G4Material("Al", Z = 13., A, density);
0109 
0110   // iron
0111   A = 55.847 * g / mole;
0112   density = 7.87 * g / cm3;
0113   new G4Material("Iron", Z = 26., A, density);
0114 
0115   // lead
0116   A = 207.2 * g / mole;
0117   density = 11.35 * g / cm3;
0118   new G4Material("Lead", Z = 82., A, density);
0119 
0120   // scintillator (Polystyene(C6H5CH=CH2))
0121   density = 1.032 * g / cm3;
0122   G4Material* Scinti = new G4Material("Scinti", density, nel = 2);
0123   Scinti->AddElement(elC, natoms = 8);
0124   Scinti->AddElement(elH, natoms = 8);
0125 
0126   // quartz (SiO2, crystalline)
0127   density = 2.64 * g / cm3;
0128   G4Material* Quartz = new G4Material("Quartz", density, nel = 2);
0129   Quartz->AddElement(elSi, natoms = 1);
0130   Quartz->AddElement(elO, natoms = 2);
0131 
0132   // NaI crystal
0133   density = 3.67 * g / cm3;
0134   G4Material* NaI = new G4Material("NaI", density, nel = 2);
0135   NaI->AddElement(elNa, natoms = 1);
0136   NaI->AddElement(elI, natoms = 1);
0137 
0138   // CsI crystal
0139   density = 4.51 * g / cm3;
0140   G4Material* CsI = new G4Material("CsI", density, nel = 2);
0141   CsI->AddElement(elCs, natoms = 1);
0142   CsI->AddElement(elI, natoms = 1);
0143 }