28 lines
700 B
C++
28 lines
700 B
C++
#include "Geometry.h"
|
|
|
|
#include "G4Box.hh"
|
|
#include "G4NistManager.hh"
|
|
#include "G4LogicalVolume.hh"
|
|
#include "G4SystemOfUnits.hh"
|
|
#include "G4PVPlacement.hh"
|
|
|
|
G4VPhysicalVolume* DetectorConstruction::Construct() {
|
|
// Solid
|
|
auto solid_world = new G4Box("world", 638 / 2 * mm, 630 / 2 * mm, 555. / 2 * mm);
|
|
// Logic
|
|
auto nist = G4NistManager::Instance();
|
|
auto logic_world = new G4LogicalVolume(solid_world, nist->FindOrBuildMaterial("G4_WATER"), "world");
|
|
// Physics
|
|
auto physics_world = new G4PVPlacement(
|
|
0,
|
|
G4ThreeVector(0, 0, 0),
|
|
logic_world,
|
|
"world",
|
|
0,
|
|
false,
|
|
0,
|
|
true
|
|
);
|
|
return physics_world;
|
|
}
|