-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathworld.cc
83 lines (67 loc) · 1.28 KB
/
world.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
81
82
83
// Geant4 Libraries
//
#include "G4PVPlacement.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4Material.hh"
#include "G4LogicalVolume.hh"
#include "G4Box.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
#include "G4NistManager.hh"
// Local Libraries
//
#include "world.hh"
world::world()
{
G4cout << "...world..." << G4endl;
// Initializing for mechanical detector
//
expHall_geo = NULL;
expHall_log = NULL;
expHall_phys = NULL;
}
world::~world()
{}
void world::DefineMaterials()
{
G4NistManager* nist = G4NistManager::Instance();
expHall_mat
= nist->FindOrBuildMaterial("G4_AIR");
}
void world::buildDetector(G4bool* overLaps)
{
G4double dimenWorld = 200.*m;
expHall_geo =
new G4Box("expHall_geo",
dimenWorld,
dimenWorld,
dimenWorld
);
expHall_log =
new G4LogicalVolume(expHall_geo,
expHall_mat,
"expHall_log",
0,
0,
0
);
expHall_phys =
new G4PVPlacement(0,
G4ThreeVector(0.*cm, 0.*cm, 0.*cm),
expHall_log,
"expHall",
0,
false,
0,
overLaps
);
}
G4LogicalVolume* world::getLogVolume()
{
return expHall_log;
}
G4VPhysicalVolume* world::getPhysVolume()
{
return expHall_phys;
}