33 #include "G4Element.hh" 34 #include "G4Material.hh" 36 #include "G4LogicalVolume.hh" 37 #include "G4PVPlacement.hh" 38 #include "G4VisAttributes.hh" 39 #include "G4RunManager.hh" 40 #include "G4PhysicalConstants.hh" 66 (G4double dx, G4double dy, G4double dz)
70 G4Material* vacuum= G4Material::GetMaterial(
"_Vacuum",
false);
73 G4Element* elN=
new G4Element(
"_N",
"", 7., 14.00674*g/mole);
74 G4Element* elO=
new G4Element(
"_O",
"", 8., 15.9994*g/mole);
76 vacuum=
new G4Material(
"_Vacuum", universe_mean_density, 2);
77 vacuum-> AddElement(elN, 0.7);
78 vacuum-> AddElement(elO, 0.3);
81 G4Box* sdworld=
new G4Box(
"world", dx/2., dy/2., dz/2.);
82 G4LogicalVolume* lvworld=
new G4LogicalVolume(sdworld, vacuum,
"word");
83 G4PVPlacement* aworld=
new G4PVPlacement(0, G4ThreeVector(),
"world",
84 lvworld, 0,
false, 0);
87 G4VisAttributes* vaworld=
new G4VisAttributes(G4Color(1.,1.,1.));
88 vaworld-> SetForceWireframe(
true);
89 lvworld-> SetVisAttributes(vaworld);
103 G4RunManager* runManager= G4RunManager::GetRunManager();
104 runManager-> DefineWorldVolume(
world);
112 G4Box* box=
dynamic_cast<G4Box*
>(
world-> GetLogicalVolume()-> GetSolid());
113 box-> SetXHalfLength(dx/2.);
114 box-> SetYHalfLength(dy/2.);
115 box-> SetZHalfLength(dz/2.);
117 G4RunManager* runManager= G4RunManager::GetRunManager();
134 G4VisAttributes* vaworld=
const_cast<G4VisAttributes*
>(
135 world-> GetLogicalVolume()-> GetVisAttributes());
static G4VPhysicalVolume * CreateWorld(G4double dx=1.*m, G4double dy=1.*m, G4double dz=1.*m)
static void Resize(G4double dx, G4double dy, G4double dz)
static void Reset(G4double dx, G4double dy, G4double dz)
static G4VPhysicalVolume * world
static void SetVisibility(G4bool qvis)
static void SetMaterial(G4Material *amaterial)