-
Notifications
You must be signed in to change notification settings - Fork 0
/
geometry.py
176 lines (137 loc) · 6.09 KB
/
geometry.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# -*- coding: utf-8 -*-
"""
Created on Fri Sep 30 08:29:51 2016
@author: Eric Schmidt
"""
'''
A file 'geo_pack' is created here, to unpack, use:
cal_theta = geo_pack[0]
cal_theta_start = geo_pack[1]
cal_rad = geo_pack[2]
cal_box_theta = geo_pack[3]
cal_box_theta_end = geo_pack[4]
so_z_max = geo_pack[5]
so_rad = geo_pack[6]
so_theta = geo_pack[7]
so_theta_start = geo_pack[8]
so_theta_end = geo_pack[9]
sp_rad = geo_pack[10]
sp_theta = geo_pack[11]
sp_theta_start = geo_pack[12]
sp_theta_end = geo_pack[13]
qel_z_max = geo_pack[14]
sqel_rad = geo_pack[15]
sqel_theta = geo_pack[16]
dqel_rad = geo_pack[17]
dqel_theta = geo_pack[18]
R = geo_pack[19]
R_i = geo_pack[20]
cal_width = geo_pack[21]
cal_height = geo_pack[22]
cal_theta_glob = geo_pack[23]
See README.md for information.
'''
import numpy as np
def geo():
R = 7.112 # (m) Radius of the ring
R_i = 6.805 # (m) Inner edge of the calorimeter
''' Calorimeters '''
cal_width = 0.225 # (m) Calorimeter width
cal_depth = 0.4572 # (m) Depth of calorimeter
cal_depth_det = 0.15 # (m) Depth of detector part of calorimeter
cal_height = 0.14 # (m) Height of the calorimeter
cal_theta_glob = 0.070 # (rad) Angle of cal w.r.t. radial
# (rad) Location as a function of theta. 0.001 subtracted from
# 'cal_theta_end' to prevent particles from being counted as contact with
# the calorimeter by contacting the 'top' of the calorimeter.
cal_theta_start = np.linspace(0,2*np.pi-np.pi/12,24) + np.pi/12
cal_det_theta_end = cal_theta_start - cal_depth_det/(R_i+cal_width)
cal_box_theta_end = cal_det_theta_end - (cal_depth-cal_depth_det)/(R_i+cal_width)
cal_theta_end = cal_theta_start - 0.001
cal_theta = np.column_stack((cal_theta_start,cal_theta_end))
cal_det_theta = np.column_stack((cal_theta_start -0.001,cal_det_theta_end))
cal_box_theta = np.column_stack((cal_det_theta_end,cal_box_theta_end))
# Radial position [r_min,r_max]
cal_rad = np.array([R_i,R_i+cal_width]) # (m)
''' HV Standoff '''
rot = 9.23 + 0.48
so_z_max = 3.8*10**-3 # (m) Top of standoff
so_length = 7.62*10**-3 # (m) Width of standoff
so_depth = 27.5*10**-3 # (m) Standoff depth
so_rad_start = 50.5*10**-3 # (m) Starting distance in from R
so_rad = np.array([R - (so_rad_start + so_depth), R - so_rad_start])
so_theta_start_base = np.array([2,8,13,15,21,26.75,32,38,43])+rot
so_theta_start = np.array([2,8,13,15,21,26.75,32,38,43])+rot
# Set each section of the ring identical to the first section above.
i = 1
while i < 5:
so_theta_start = np.concatenate((
so_theta_start, so_theta_start_base + i*90
))
i = i + 1
so_theta_start = so_theta_start*np.pi/180 + so_length/(2*(R-so_rad_start))
so_theta_end = so_theta_start - so_length/(R-so_rad_start)
# Theta position [theta_min, theta_max]
so_theta = np.column_stack((so_theta_start,so_theta_end))
''' Support plates '''
rot = 9.23
sp_length = 33*10**-3 # (m) Support plate width
sp_depth = 1.7*10**-3 # (m) Support plate thickness
sp_rad_start = 78*10**-3 # (m) Distance in from R
sp_rad = np.array([R - (sp_rad_start + sp_depth), R - sp_rad_start]) # (m)
sp_theta_start_base = np.array([2.48,8.48,13.48,15.48,21.48,27.23])+rot
sp_theta_start = np.array([2.48,8.48,13.48,15.48,21.48,27.23])+rot
# Set each section of the ring identical to the first section above.
i = 1
while i < 12:
sp_theta_start = np.concatenate((
sp_theta_start, sp_theta_start_base + i*30
))
i = i + 1
sp_theta_start = sp_theta_start*np.pi/180 + sp_length/(2*(R-sp_rad_start))
sp_theta_end = sp_theta_start - sp_length/(R-sp_rad_start)
# Theta position [theta_min, theta_max]
sp_theta = np.column_stack((sp_theta_start,sp_theta_end))
''' Variables for both quads '''
qel_z_max = 23.5*10**-3 # (m) Top of electrodes
qel_depth = 0.5*10**-3 # (m) Electrode thickness
qel_rad_start = 50*10**-3 # (m) Starting distance in from R
''' Single-quad electrodes (without edge curls) '''
rot = 3
sqel_rad = np.array([R - (qel_rad_start + qel_depth),R - qel_rad_start])
sqel_theta_base = 90 - np.array([33.39,46.39])-rot
sqel_theta = 90 - np.array([33.39,46.39])-rot
# Set each quarter of the ring identical to the first quarter above.
i = 1
while i < 4:
sqel_theta = np.row_stack((
sqel_theta, sqel_theta_base + i*90
))
i = i + 1
sqel_theta = sqel_theta*np.pi/180
''' Double-quad electrodes (without edge curls) '''
dqel_rad = np.array([R - (qel_rad_start + qel_depth),R - qel_rad_start])
dqel_theta_base = 90 - np.array([48.89,74.89])-4
dqel_theta = 90 - np.array([48.89,74.89])-4
# Set each section of the ring identical to the first section above.
i = 1
while i < 4:
dqel_theta = np.row_stack((
dqel_theta, dqel_theta_base + i*90
))
i = i + 1
dqel_theta = dqel_theta*np.pi/180
''' Trolley Rail '''
rail_height = 40*10**-3 # (m) Where the rail starts in y
rail_rad = R - np.array([56,46])*10**-3 # (m) Distance from R
# Pack up the geometry variables for easier transfer
geo_pack = np.array([cal_theta,cal_theta_start,cal_rad,
cal_box_theta,cal_box_theta_end,
so_z_max,so_rad,so_theta,so_theta_start,so_theta_end,
sp_rad,sp_theta,sp_theta_start,sp_theta_end,
qel_z_max,
sqel_rad,sqel_theta,
dqel_rad,dqel_theta,
R,R_i,cal_width,cal_height,cal_theta_glob,
rail_height,rail_rad,cal_det_theta,cal_det_theta_end])
return geo_pack