Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include "DetectorConstruction.h"
#include "G4SystemOfUnits.hh"
#include "G4PhysicalConstants.hh"
#include "G4Isotope.hh"
#include "G4Element.hh"
#include "G4MaterialPropertiesTable.hh"
#include "G4Box.hh"
#include "G4Sphere.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4SDManager.hh"
#include "G4Region.hh"
#include "G4RegionStore.hh"
#include "G4LogicalBorderSurface.hh"
#include "G4PhysicalVolumeStore.hh"
#include "G4OpticalSurface.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "G4ios.hh"
DetectorConstruction::DetectorConstruction() {
}
DetectorConstruction::~DetectorConstruction() {
}
G4VPhysicalVolume*
DetectorConstruction::Construct() {
// =======================================================================
// Materials
// =======================================================================
bool any_warnings = false;
G4Material* Galactic = G4Material::GetMaterial("Galactic", any_warnings);
if (not Galactic) {
Galactic = new G4Material("Galactic", 1., 1.01*g/mole, universe_mean_density, kStateGas, 2.73*kelvin, 3.e-18*pascal);
}
// =======================================================================
// World
// =======================================================================
G4VSolid* solidWorld= new G4Box("sWorld", 60*m, 60*m, 60*m);
G4LogicalVolume* logicWorld= new G4LogicalVolume( solidWorld, Galactic, "lWorld", 0, 0, 0);
G4VPhysicalVolume* physiWorld = new G4PVPlacement(0, // no rotation
G4ThreeVector(), // at (0,0,0)
logicWorld, // its logical volume
"pWorld", // its name
0, // its mother volume
false, // no boolean operations
0); // no field specific to volume
return physiWorld;
}