#include "DetectorConstruction.hh" #include "G4Material.hh" #include "G4LogicalVolume.hh" #include "G4PVPlacement.hh" #include "G4SystemOfUnits.hh" #include "G4NistManager.hh" #include "G4Box.hh" #include "G4Orb.hh" DetectorConstruction::DetectorConstruction() :G4VUserDetectorConstruction() {} DetectorConstruction::~DetectorConstruction() {} G4VPhysicalVolume* DetectorConstruction::Construct() { G4double a, z, topt, fuelt, dt, fractionmass, abundance, htopt, hfuelt; G4double density; G4int ncomponents, natoms, iz, n, numisotopes; topt = 1.0 ; fuelt = 1.0 ; htopt = topt/2 ; hfuelt = fuelt/2; dt = 5.; G4Element* N = new G4Element("Nitrogen" ,"N" , z= 7., a=14.01*g/mole); G4Element* O = new G4Element("Oxygen" ,"O" , z=8., a=16.00*g/mole); G4Element* Cr = new G4Element("Chromium" ,"Cr" , z=24., a=51.99*g/mole); G4Element* Fe = new G4Element("Iron" ,"Fe" , z=26., a=55.84*g/mole); G4Element* Ni = new G4Element("Nickel" ,"Ni" , z=28., a=58.69*g/mole); // G4Element* U235 = new G4Element("Uranium-235", "U235", z=92., a=235.03*g/mole); // G4Element* U238 = new G4Element("Uranium-238", "U238", z=92., a=238.03*g/mole); // G4Element* Pu238 = new G4Element("Plutonium-238", "Pu238", z=94., a=238.03*g/mole); // G4Element* Pu239 = new G4Element("Plutonium-239", "Pu239", z=94., a=239.03*g/mole); // G4Element* Pu240 = new G4Element("Plutonium-240", "Pu240", z=94., a=240.03*g/mole); // G4Element* Pu241 = new G4Element("Plutonium-241", "Pu241", z=94., a=241.03*g/mole); // G4Element* Pu242 = new G4Element("Plutonium-242", "Pu242", z=94., a=242.03*g/mole); G4Element* Ua = new G4Element("Uranium-235", "U235", z=92., a=235.03*g/mole); G4Element* Ub = new G4Element("Uranium-238", "U238", z=92., a=238.03*g/mole); G4Element* Pua = new G4Element("Plutonium-238", "Pu238", z=94., a=238.03*g/mole); G4Element* Pub = new G4Element("Plutonium-239", "Pu239", z=94., a=239.03*g/mole); G4Element* Puc = new G4Element("Plutonium-240", "Pu240", z=94., a=240.03*g/mole); G4Element* Pud = new G4Element("Plutonium-241", "Pu241", z=94., a=241.03*g/mole); G4Element* Pue = new G4Element("Plutonium-242", "Pu242", z=94., a=242.03*g/mole); G4Element* C = new G4Element("Carbon","C" , z=6., a=12.01*g/mole); G4Element* B = new G4Element("Boron","B" , z=5., a=10.81*g/mole); G4Element* Zr = new G4Element("Zirconium","Zr" , z=40., a=91.22*g/mole); // G4Element* Ur = new G4Element("Ur", "U", numisotopes=2); // Ur->AddIsotope(U235, abundance=15.*perCent); // Ur->AddIsotope(U238, abundance=85.*perCent); G4NistManager* nist = G4NistManager::Instance(); G4Material* env_mat = nist->FindOrBuildMaterial("G4_AIR"); //G4Material* UO2 = new G4Material("UO2", 10.950*g/cm3, ncomponents=2); //UO2->AddElement(U238, 88*perCent); //UO2->AddElement(O, 12*perCent); G4Material* matU = new G4Material("matU", 18.950*g/cm3, ncomponents=1); matU->AddElement(Ua, natoms=1); G4Material* inox = new G4Material("Stainless-Steel", 5.84*g/cm3, ncomponents=7); inox->AddElement(Fe, fractionmass=38.518*perCent); inox->AddElement(Cr, fractionmass=4.681*perCent); inox->AddElement(Ni, fractionmass=2.359*perCent); inox->AddElement(C, fractionmass=0.17*perCent); inox->AddElement(Zr, fractionmass=42.15*perCent); inox->AddElement(B, fractionmass=0.612*perCent); inox->AddElement(O, fractionmass=11.51*perCent); G4Material* fuel = new G4Material("fuelbot", 10.95*g/cm3, ncomponents=8); fuel->AddElement(Ua, fractionmass=1.66*perCent); fuel->AddElement(Ub, fractionmass=85.628*perCent); fuel->AddElement(Pua, fractionmass=0.011*perCent); fuel->AddElement(Pub, fractionmass=0.460*perCent); fuel->AddElement(Puc, fractionmass=0.157*perCent); fuel->AddElement(Pud, fractionmass=0.054*perCent); fuel->AddElement(Pue, fractionmass=0.030*perCent); fuel->AddElement(O, fractionmass=12.*perCent); G4Material* M_diamond = new G4Material("diamond", density= 3.52*g/cm3, ncomponents=1); M_diamond->AddElement(C, 1); G4Box* solidWorld = new G4Box("World",200*cm,200*cm,200*cm); G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld, env_mat, "World"); G4VPhysicalVolume* physiWorld = new G4PVPlacement(0, G4ThreeVector(), logicWorld, "World", 0, false, 0); G4Box* box_detector = new G4Box("box_detector",0.5*cm,0.5*cm,dt*um); G4LogicalVolume* logicdetector = new G4LogicalVolume(box_detector, M_diamond, "detect"); new G4PVPlacement(0, G4ThreeVector(0,0,20*cm), logicdetector, "detector", logicWorld, false, 0); G4Box* box_top = new G4Box("box_top",0.5*cm,0.5*cm,htopt*cm); G4LogicalVolume* logictop = new G4LogicalVolume(box_top, inox, "toplogic"); new G4PVPlacement(0, G4ThreeVector(0,0,htopt*cm), logictop, "top", logicWorld, false, 0); G4Box* box_fuel = new G4Box("box_fuel",0.5*cm,0.5*cm,hfuelt*cm); G4LogicalVolume* logicfuel = new G4LogicalVolume(box_fuel, fuel, "fuel"); new G4PVPlacement(0, G4ThreeVector(0,0,-hfuelt*cm), logicfuel, "active", logicWorld, false, 0); return physiWorld; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......