#include "DetectorConstruction.h" #include "Material.h" #include "G4Box.hh" #include "G4LogicalVolume.hh" #include "G4PVPlacement.hh" #include "G4SystemOfUnits.hh" #include "G4Tubs.hh" DetectorConstruction::DetectorConstruction() {} DetectorConstruction::~DetectorConstruction() {} G4VPhysicalVolume* DetectorConstruction::Construct() { // Define materials DefineMaterials(); // World G4Box* solid_world = new G4Box("World", 3. * m, 3. * m, 10. * m); G4LogicalVolume* logic_world = new G4LogicalVolume(solid_world, G4Material::GetMaterial("Vacuum"), "World"); G4VPhysicalVolume* physics_world = new G4PVPlacement(0, G4ThreeVector(), logic_world, "World", 0, false, 0, true); // 大柱段 // 生活控制舱 G4double pRmin_big = 2.2 / 2 * m; G4double pRmax_big = 4.2 / 2 * m; G4double zLength = 4.32 * m; G4ThreeVector pos1 = G4ThreeVector(0, 0, -(0.815 * m + zLength / 2)); G4Tubs* solid_section_big_life = new G4Tubs("section_big_life", pRmin_big, pRmax_big, zLength / 2, 0, 360); G4LogicalVolume* logic_section_big_life = new G4LogicalVolume( solid_section_big_life, G4Material::GetMaterial("Aluminum alloy Series 5"), "section_big_life"); new G4PVPlacement(0, pos1, logic_section_big_life, "section_big_life", logic_world, false, 0, true); return physics_world; }