summaryrefslogtreecommitdiff
path: root/detectors/lbne.py
diff options
context:
space:
mode:
authorStan Seibert <stan@mtrr.org>2011-06-21 15:45:05 -0400
committerStan Seibert <stan@mtrr.org>2011-06-21 15:45:05 -0400
commitd41ad45a2d1c4ffd32375c6b8e24f09d34585913 (patch)
tree86e1beee4f4a95d0867357cd02b193e2f01eef39 /detectors/lbne.py
parent8f51be58c07772585cb7522c18c32465d20120e1 (diff)
downloadchroma-d41ad45a2d1c4ffd32375c6b8e24f09d34585913.tar.gz
chroma-d41ad45a2d1c4ffd32375c6b8e24f09d34585913.tar.bz2
chroma-d41ad45a2d1c4ffd32375c6b8e24f09d34585913.zip
Create a r7081_cut mesh that uses the cut PMT model.
Modify LBNE class to take a cut_pmt option to switch to cut PMT model. Add corresponding lbne_cut, minilbne_cut, microlbne_cut detectors.
Diffstat (limited to 'detectors/lbne.py')
-rw-r--r--detectors/lbne.py14
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))