-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathworldGround.cc
80 lines (62 loc) · 1.39 KB
/
worldGround.cc
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// Geant4 Libraries
//
#include "G4VUserDetectorConstruction.hh"
#include "G4PVPlacement.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4Material.hh"
#include "G4Element.hh"
#include "G4LogicalVolume.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
#include "G4OpticalSurface.hh"
#include "G4LogicalBorderSurface.hh"
#include "G4NistManager.hh"
// Local Libraries
//
#include "worldGround.hh"
worldGround::worldGround()
{}
worldGround::~worldGround()
{}
void worldGround::DefineMaterials()
{
G4NistManager* nist = G4NistManager::Instance();
worldGround_matter = nist->FindOrBuildMaterial("G4_AIR");
}
void worldGround::buildDetector(G4LogicalVolume* log_mother, G4bool* overLaps)
{
worldGround_size = 50.*m;
worldGround_geo =
new G4Box("worldGround",
worldGround_size,
worldGround_size,
worldGround_size
);
worldGround_log =
new G4LogicalVolume(worldGround_geo,
worldGround_matter,
worldGround_geo->GetName(),
0,
0,
0
);
worldGround_phys =
new G4PVPlacement(0,
G4ThreeVector(0.*m, 0.*m, 0.*m),
worldGround_log,
worldGround_log->GetName(),
log_mother,
false,
0,
overLaps
);
}
G4VPhysicalVolume* worldGround::getPhysVolume()
{
return worldGround_phys;
}
G4LogicalVolume* worldGround::getLogVolume()
{
return worldGround_log;
}