diff options
author | Anthony LaTorre <tlatorre9@gmail.com> | 2011-08-08 11:03:07 -0400 |
---|---|---|
committer | Anthony LaTorre <tlatorre9@gmail.com> | 2011-08-08 11:03:07 -0400 |
commit | f6109fc8939c55a9ef8244806d00b3ee07ee1b13 (patch) | |
tree | 0a3d84cc5fb29412743999b3d28654442389422f /detectors | |
parent | 3a8a4c4dd095ff25a1dbe70e387e166f43a5644b (diff) | |
download | chroma-f6109fc8939c55a9ef8244806d00b3ee07ee1b13.tar.gz chroma-f6109fc8939c55a9ef8244806d00b3ee07ee1b13.tar.bz2 chroma-f6109fc8939c55a9ef8244806d00b3ee07ee1b13.zip |
add a simple event viewer. view events by running ./camera.py <detector_name> -i <name_of_io_file>.
Diffstat (limited to 'detectors')
-rw-r--r-- | detectors/__init__.py | 4 | ||||
-rw-r--r-- | detectors/lbne.py | 11 |
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 = [] |