32 #include "G4Element.hh" 33 #include "G4Material.hh" 35 #include "G4LogicalVolume.hh" 36 #include "G4PVPlacement.hh" 37 #include "G4VisAttributes.hh" 38 #include "G4RunManager.hh" 39 #include "G4PhysicalConstants.hh" 65 (G4double dx, G4double dy, G4double dz)
69 G4Material* vacuum= G4Material::GetMaterial(
"_Vacuum",
false);
72 G4Element* elN=
new G4Element(
"_N",
"", 7., 14.00674*g/mole);
73 G4Element* elO=
new G4Element(
"_O",
"", 8., 15.9994*g/mole);
75 vacuum=
new G4Material(
"_Vacuum", universe_mean_density, 2);
76 vacuum-> AddElement(elN, 0.7);
77 vacuum-> AddElement(elO, 0.3);
80 G4Box* sdworld=
new G4Box(
"world", dx/2., dy/2., dz/2.);
81 G4LogicalVolume* lvworld=
new G4LogicalVolume(sdworld, vacuum,
"word");
82 G4PVPlacement* aworld=
new G4PVPlacement(0, G4ThreeVector(),
"world",
83 lvworld, 0,
false, 0);
86 G4VisAttributes* vaworld=
new G4VisAttributes(G4Color(1.,1.,1.));
87 vaworld-> SetForceWireframe(
true);
88 lvworld-> SetVisAttributes(vaworld);
102 G4RunManager* runManager= G4RunManager::GetRunManager();
103 runManager-> DefineWorldVolume(
world);
111 G4Box* box=
dynamic_cast<G4Box*
>(
world-> GetLogicalVolume()-> GetSolid());
112 box-> SetXHalfLength(dx/2.);
113 box-> SetYHalfLength(dy/2.);
114 box-> SetZHalfLength(dz/2.);
116 G4RunManager* runManager= G4RunManager::GetRunManager();
133 G4VisAttributes* vaworld=
const_cast<G4VisAttributes*
>(
134 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)