diff options
Diffstat (limited to 'detectors/lbne.py')
-rw-r--r-- | detectors/lbne.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/detectors/lbne.py b/detectors/lbne.py index 04751e6..c98fa42 100644 --- a/detectors/lbne.py +++ b/detectors/lbne.py @@ -14,9 +14,15 @@ from itertools import product import make class LBNE(Geometry): - def __init__(self, radius, height, nstrings, pmts_per_string, endcap_spacing): + def __init__(self, radius, height, nstrings, pmts_per_string, endcap_spacing, + cut_pmt=False): super(LBNE, self).__init__() + if cut_pmt: + pmt_mesh = r7081_cut + else: + pmt_mesh = r7081 + # outer cylinder cylinder_mesh = \ make.cylinder(radius, height+height/(pmts_per_string-1)) @@ -30,7 +36,7 @@ class LBNE(Geometry): for j in range(nstrings): rotation = make_rotation_matrix(j*2*np.pi/nstrings, (0,0,1)) displacement = rotate((0,-radius,-height/2+i*height/(pmts_per_string-1)), j*2*np.pi/nstrings, (0,0,1)) - self.pmtids.append(self.add_solid(r7081, rotation, displacement)) + self.pmtids.append(self.add_solid(pmt_mesh, rotation, displacement)) # construct the top endcap for x, y in np.array(tuple(product(\ @@ -39,7 +45,7 @@ class LBNE(Geometry): if np.sqrt(x**2 + y**2) <= radius: rotation = make_rotation_matrix(+np.pi/2, (1,0,0)) displacement = (x,y,+height/2+height/(pmts_per_string-1)/2) - self.pmtids.append(self.add_solid(r7081, rotation, displacement)) + self.pmtids.append(self.add_solid(pmt_mesh, rotation, displacement)) # construct the bottom endcap for x, y in np.array(tuple(product(\ @@ -48,4 +54,4 @@ class LBNE(Geometry): if np.sqrt(x**2 + y**2) <= radius: rotation = make_rotation_matrix(-np.pi/2, (1,0,0)) displacement = (x,y,-height/2-height/(pmts_per_string-1)/2) - self.pmtids.append(self.add_solid(r7081, rotation, displacement)) + self.pmtids.append(self.add_solid(pmt_mesh, rotation, displacement)) |