The solutions are indicated in blue.
Exercise 2-2
In the class DetectorConstruction.cc define the following G4Isotopes (stable isotopes of
germanium) and then define a G4Element, which is germanium enriched in
Ge-76.
G4VPhysicalVolume* DetectorConstruction::Construct() { ... G4String name,symbol; G4double abundance,density; G4int nIsotopes,nAtoms; //Define isotopes G4Isotope* Ge72 = new G4Isotope(name="Ge72", 32, 72, 71.92*g/mole); G4Isotope* Ge73 = new G4Isotope(name="Ge73", 32, 73, 73.0*g/mole); G4Isotope* Ge74 = new G4Isotope(name="Ge74", 32, 74, 74.0*g/mole); G4Isotope* Ge76 = new G4Isotope(name="Ge76", 32, 76, 76.0*g/mole); //Define element from isotopes G4Element* elGeEnr = new G4Element(name="enrichedGermanium", symbol="GeEnr",nIsotopes=4); elGeEnr->AddIsotope(Ge72,abundance= 0.1*perCent); elGeEnr->AddIsotope(Ge73,abundance= 0.2*perCent); elGeEnr->AddIsotope(Ge74,abundance= 13.1*perCent); elGeEnr->AddIsotope(Ge76,abundance= 86.6*perCent); //Define material G4Material* enrGe = new G4Material(name="EnrichedGe", density=5.32*g/cm3,1); enrGe->AddElement(elGeEnr,nAtoms=1); }Source code
Exercise 2-3
G4VPhysicalVolume* DetectorConstruction::Construct() { ... G4String name, symbol; G4double abundance, density, fractionMass; G4int nIsotopes, nAtoms; G4double A,Z; G4double temperature, pressure; G4Material* liquidNitrogen = new G4Material(name="LiquidNitrogen", Z=7., A=14.01*g/mole, density=0.808*g/cm3, kStateLiquid, temperature=77*kelvin); // // define elemental nitrogen and oxygen G4Element* elNitrogen = new G4Element(name="Nitrogen", symbol="N", Z=7., A=14.01*g/mole); G4Element* elOxygen = new G4Element(name="Oxygen", symbol="O", Z=8., A=15.9994*g/mole); // define air G4Material* air = new G4Material(name="air", density=1.29*mg/cm3, 2, kStateGas, temperature=300.*kelvin, pressure=1.*atmosphere); air->AddElement(elNitrogen, fractionMass=80.0*perCent); air->AddElement(elOxygen, fractionMass=20.0*perCent); }Source code