一辺2メートルの立方体の空気(不可視)に、一辺2メートルの立方体のアルゴンガスを詰めた例
G4VPhysicalVolume* Geometry::Construct() { G4NistManager* materi_Man = G4NistManager::Instance(); G4double leng_X_World = 2.0 * m; G4double leng_Y_World = 2.0 * m; G4double leng_Z_World = 2.0 * m; G4VSolid* solid_World = new G4Box("Solid_World", leng_X_World / 2.0, leng_Y_World / 2.0, leng_Z_World / 2.0); G4Material* materi_World = materi_Man->FindOrBuildMaterial("G4_AIR"); G4LogicalVolume* logVol_World = new G4LogicalVolume(solid_World, materi_World, "LogVol_World"); logVol_World->SetVisAttributes(G4VisAttributes::GetInvisible()); G4VPhysicalVolume* physVol_World = new G4PVPlacement(G4Transform3D(), "PhysVol_World", logVol_World, 0, false, 0); G4VSolid* solid_Box = new G4Box("Solid_Box", leng_X_World / 2.0, leng_X_World / 2.0, leng_X_World / 2.0); G4Material* materi_Box = materi_Man->FindOrBuildMaterial("G4_Ar"); G4LogicalVolume* logVol_Box = new G4LogicalVolume(solid_Box, materi_Box, "LogVol_Box", 0, 0, 0); G4VPhysicalVolume* PhysVol_Box = new G4PVPlacement(G4Transform3D(), "PhysVol_Box", logVol_Box, physVol_World, false, 1000, true); //上記のポインタは使わないので下記のように表現されることが多い //new G4PVPlacement(G4Transform3D(), "PhysVol_Box", logVol_Box, physVol_World, false, 1000, true); return physVol_World; }