-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgrdFloor.cc
115 lines (90 loc) · 1.81 KB
/
grdFloor.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// Database of materials:
// http://geant4-userdoc.web.cern.ch/geant4-userdoc/UsersGuides/ForApplicationDeveloper/BackupVersions/V9.3/html/apas09.html
// Geant4 Libraries
//
#include "G4Element.hh"
#include "G4Material.hh"
#include "G4NistManager.hh"
// Local Libraries
//
#include "grdFloor.hh"
grdFloor::grdFloor()
{
G4cout << "...Creating Ground..." << G4endl;
}
grdFloor::~grdFloor()
{}
void grdFloor::DefineMaterials()
{
G4double a = 0.;
G4double z;
G4String symbol;
G4int natoms;
G4double density = 2.65*g/cm3;
// Creating Si
//
a = 28.09*g/mole;
G4Element* elSi
= new G4Element(
"Silicon",
symbol="Si",
z=14.,
a
);
// Creating Oxigen
//
a = 16.00*g/mole;
G4Element* elO
= new G4Element(
"Oxygen",
symbol="O",
z= 8.,
a
);
// Creating Standard Rock
//
grdFloor_mat = new G4Material(
"Rockgrd",
density,
2
);
grdFloor_mat->AddElement(elSi, natoms=1);
grdFloor_mat->AddElement(elO, natoms=2);
}
void grdFloor::buildDetector(G4double grd_size, G4LogicalVolume* log_mother, G4bool* overLaps)
{
//grd_size = grd_size * 0.5;
G4double posZ = grd_size + grd_size/1.9; // * 0.3;
grdFloor_geo
= new G4Box(
"Ground_geo",
grd_size*10.,
grd_size*10.,
grd_size
);
grdFloor_log
= new G4LogicalVolume(
grdFloor_geo,
grdFloor_mat,
grdFloor_geo->GetName()
);
grdFloor_phys
= new G4PVPlacement(
0,
G4ThreeVector(0.*m, 0.*m, -posZ),
grdFloor_log,
grdFloor_geo->GetName(),
log_mother,
false,
0,
overLaps
);
}
G4VPhysicalVolume* grdFloor::getPhysVolume()
{
return grdFloor_phys;
}
G4LogicalVolume* grdFloor::getLogVolume()
{
return grdFloor_log;
}