summaryrefslogtreecommitdiff
path: root/detectors
diff options
context:
space:
mode:
authorStan Seibert <stan@mtrr.org>2011-08-08 15:37:21 -0400
committerStan Seibert <stan@mtrr.org>2011-08-08 15:37:21 -0400
commitfd2cba0f96e2d145e6a2b6e3df91cb6e942c114c (patch)
treebcb6b902c10d8cafa00e228b634e5a0fbd6bf6ae /detectors
parent09e042b8888342ed8fc7a8c5b05ea1caa47a3842 (diff)
parented642493fccbcf13efef5491f73241c6a9434ad8 (diff)
downloadchroma-fd2cba0f96e2d145e6a2b6e3df91cb6e942c114c.tar.gz
chroma-fd2cba0f96e2d145e6a2b6e3df91cb6e942c114c.tar.bz2
chroma-fd2cba0f96e2d145e6a2b6e3df91cb6e942c114c.zip
Merge Tony's changes.
Diffstat (limited to 'detectors')
-rw-r--r--detectors/__init__.py4
-rw-r--r--detectors/lbne.py11
2 files changed, 11 insertions, 4 deletions
diff --git a/detectors/__init__.py b/detectors/__init__.py
index 043bdbd..8550751 100644
--- a/detectors/__init__.py
+++ b/detectors/__init__.py
@@ -17,6 +17,10 @@ nstrings = 230
pmts_per_string = 88
endcap_spacing = 0.86
+@buildable('lbne_event_view')
+def build_lbne_200kton_event_view():
+ return build_lbne(radius, height, nstrings, pmts_per_string, endcap_spacing, physical_model=False)
+
@buildable('lbne')
def build_lbne_200kton():
return build_lbne(radius, height, nstrings, pmts_per_string, endcap_spacing)
diff --git a/detectors/lbne.py b/detectors/lbne.py
index 8fe2c18..3e8ae7b 100644
--- a/detectors/lbne.py
+++ b/detectors/lbne.py
@@ -6,21 +6,24 @@ dir = os.path.split(os.path.realpath(__file__))[0]
sys.path.append(dir + '/..')
from geometry import *
-from solids import build_12inch_pmt, build_12inch_pmt_with_lc
+from solids import build_12inch_pmt, build_12inch_pmt_with_lc, build_12inch_pmt_shell
from optics import *
from transform import rotate, make_rotation_matrix
from itertools import product
from make import cylinder
-def build_lbne(radius, height, nstrings, pmts_per_string, endcap_spacing):
- pmt = build_12inch_pmt_with_lc()
+def build_lbne(radius, height, nstrings, pmts_per_string, endcap_spacing, physical_model=True):
+ if physical_model:
+ pmt = build_12inch_pmt_with_lc()
+ else:
+ pmt = build_12inch_pmt_shell()
lbne = Geometry()
# outer cylinder
cylinder_mesh = cylinder(radius, radius, height+height/(pmts_per_string-1), theta=(2*np.pi/nstrings)/4)
cylinder_mesh.vertices = rotate(cylinder_mesh.vertices, np.pi/2, (-1,0,0))
- lbne.add_solid(Solid(cylinder_mesh, water, vacuum, black_surface, 0x990000ff))
+ lbne.add_solid(Solid(cylinder_mesh, water, vacuum, black_surface, 0xff0000ff))
lbne.pmtids = []