diff options
Diffstat (limited to 'detectors')
-rw-r--r-- | detectors/__init__.py | 7 | ||||
-rw-r--r-- | detectors/lbne.py | 14 |
2 files changed, 16 insertions, 5 deletions
diff --git a/detectors/__init__.py b/detectors/__init__.py index 285480d..90f8c22 100644 --- a/detectors/__init__.py +++ b/detectors/__init__.py @@ -7,6 +7,11 @@ nstrings = 324 pmts_per_string = 102 endcap_spacing = .485 -lbne = LBNE(radius, height, nstrings, pmts_per_string, endcap_spacing) minilbne = LBNE(radius/10, height/10, nstrings//10, pmts_per_string//10, endcap_spacing) microlbne = LBNE(radius/50, height/50, nstrings//50, pmts_per_string//50, endcap_spacing) + +minilbne_cut = LBNE(radius/10, height/10, nstrings//10, pmts_per_string//10, endcap_spacing, + cut_pmt=True) +microlbne_cut = LBNE(radius/50, height/50, nstrings//50, pmts_per_string//50, endcap_spacing, + cut_pmt=True) +lbne_cut = LBNE(radius, height, nstrings, pmts_per_string, endcap_spacing, cut_pmt=True) 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)) |