-
Notifications
You must be signed in to change notification settings - Fork 2
/
collimating_hallbar.py
138 lines (115 loc) · 4.8 KB
/
collimating_hallbar.py
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
from pypolyfab.device_geo import Device, Feature
class CHB(Device):
'''
CHB creates a collimating Hall bar
'''
def __init__(self, L, W, pad=0.1, apt_width=0.3, s1_layer=1, f1_layer=2):
Device.__init__(self)
self.body_length = L
self.body_width = W
self.pad = pad
self.apt_width = apt_width
self.apt_bottom = .05
self.apt_overhang = 0.5
self.edgeslope = 0.3
self.col_ohmic_gap = 0.2
self.col_ohmic_offset = 0.05
self.inj_width = 0.8
self.inj_length = 0.6
self.inj_separation = 2.76
self.col_length = 0.8
self.fractional_cover = 0.2
self.s1_layer = s1_layer
self.f1_layer = f1_layer
self.generate_body()
self.add_collimators()
self.add_side_ohmics()
self.heal()
def generate_body(self):
L = self.body_length
W = self.body_width
ps = [(-L/2.0, W/2.0),
(L/2.0, W/2.0),
(L/2.0, -W/2.0),
(-L/2.0, -W/2.0)]
body = Feature(ps)
self.register_feature(body, 0, 0, 0, 0)
def add_collimators(self):
self.generate_collimator(-self.inj_separation /
2, -self.body_width/2, 0, self.s1_layer, self.f1_layer)
self.generate_collimator(
self.inj_separation/2, -self.body_width/2, 0, 2, 2)
self.generate_collimator(-self.inj_separation/2,
self.body_width/2, 180, 2, 2)
self.generate_collimator(
self.inj_separation/2, self.body_width/2, 180, 2, 2)
def add_side_ohmics(self):
W = self.body_width
L = self.body_length
pad = self.pad
Dx = -L/2 + L*self.fractional_cover - 0.5
ps = [(-L/2-pad, -W/2-pad),
(-L/2-pad, W/2+pad),
(Dx, W/2+pad),
(Dx, -W/2-pad)]
left_ohmic = Feature(ps)
self.register_feature(left_ohmic, 0, 0, 0, 2)
Dx = L/2 - L*self.fractional_cover + 0.5
ps = [(L/2+pad, W/2+pad),
(L/2+pad, -W/2-pad),
(Dx, -W/2-pad),
(Dx, W/2+pad)]
right_ohmic = Feature(ps)
self.register_feature(right_ohmic, 0, 0, 0, 2)
def generate_collimator(self, dx, dy, dtheta, s_layer, f_layer):
inj_height = self.inj_length + self.col_length + self.apt_bottom
col_topcorner = self.apt_bottom + self.edgeslope / \
2 * (self.inj_width-self.apt_width)
col_bottom = self.apt_bottom + self.col_length
# collimator body
ps = [(self.apt_width/2, self.apt_overhang),
(self.apt_width/2, -self.apt_bottom),
(self.inj_width/2, -col_topcorner),
(self.inj_width/2, -col_bottom),
(self.apt_width/2, -col_bottom),
(self.inj_width/2, -inj_height),
(-self.inj_width/2, -inj_height),
(-self.apt_width/2, -col_bottom),
(-self.inj_width/2, -col_bottom),
(-self.inj_width/2, -col_topcorner),
(-self.apt_width/2, -self.apt_bottom),
(-self.apt_width/2, self.apt_overhang)]
injector = Feature(ps)
self.register_feature(injector, dx, dy, dtheta, 0, origin=(0, 0))
# ohmic around filter chamber
pad = self.pad
col_ohmic_W = self.inj_width + pad
col_ohmic_L = self.col_length + pad
apt_ohmic_W = self.apt_width + pad/2
apt_ohmic_bottom = self.apt_bottom - pad/8
col_ohmic_topcorner = col_topcorner - pad/2
ps = [(-apt_ohmic_W/2, self.col_ohmic_offset),
(apt_ohmic_W/2, self.col_ohmic_offset),
(apt_ohmic_W/2, -apt_ohmic_bottom),
(col_ohmic_W/2, -col_ohmic_topcorner),
(col_ohmic_W/2, -col_ohmic_L),
(-col_ohmic_W/2, -col_ohmic_L),
(-col_ohmic_W/2, -col_ohmic_topcorner),
(-apt_ohmic_W/2, -apt_ohmic_bottom)]
ohm1 = Feature(ps)
self.register_feature(ohm1, dx, dy, dtheta, f_layer, origin=(0, 0))
# Ohmic around collimator source
inj_ohmic_W = col_ohmic_W * 1.1
inj_ohmic_H = self.inj_length * 0.6
inj_ohmic_offset = self.inj_length * self.apt_bottom
inj_base_dydx = (self.inj_width/2 - self.apt_width/2) / \
(col_bottom - inj_height)
inj_ohmic_dx = -inj_ohmic_H * inj_base_dydx
ps = [(-inj_ohmic_W/2, -inj_ohmic_offset - inj_height),
(-inj_ohmic_W/2 + inj_ohmic_dx,
inj_ohmic_H-inj_ohmic_offset - inj_height),
(inj_ohmic_W/2 - inj_ohmic_dx,
inj_ohmic_H-inj_ohmic_offset - inj_height),
(inj_ohmic_W/2, -inj_ohmic_offset - inj_height)]
ohm2 = Feature(ps)
self.register_feature(ohm2, dx, dy, dtheta, s_layer, origin=(0, 0))