diff options
author | Stan Seibert <stan@mtrr.org> | 2011-07-28 16:08:43 -0400 |
---|---|---|
committer | Stan Seibert <stan@mtrr.org> | 2011-07-28 16:08:43 -0400 |
commit | 8f4281b554ae4478baa984e777460a9b3e16eae6 (patch) | |
tree | 441aa015ff7752cfdcbce594e8ce36b7f45feaa9 /detectors | |
parent | c507d760713abf5756c37b3eefd56c8ecd091227 (diff) | |
download | chroma-8f4281b554ae4478baa984e777460a9b3e16eae6.tar.gz chroma-8f4281b554ae4478baa984e777460a9b3e16eae6.tar.bz2 chroma-8f4281b554ae4478baa984e777460a9b3e16eae6.zip |
Alternate "real_sno" detector configuration using the CAD model of the
acrylic vessel. There are serious issues with this model which
probably make it unsuitable for photon propagation at the moment.
(Example: Why do you need to traverse 8 surfaces to cross the acrylic
vessel? There should only be 4.)
Diffstat (limited to 'detectors')
-rw-r--r-- | detectors/__init__.py | 4 | ||||
-rw-r--r-- | detectors/sno.py | 13 | ||||
-rw-r--r-- | detectors/sno_av_ascii.stl.bz2 | bin | 0 -> 10939133 bytes |
3 files changed, 14 insertions, 3 deletions
diff --git a/detectors/__init__.py b/detectors/__init__.py index 199b4d7..147fd59 100644 --- a/detectors/__init__.py +++ b/detectors/__init__.py @@ -27,3 +27,7 @@ def build_minilbne(): @buildable('sno') def build_sno(): return build_sno_detector() + +@buildable('real_sno') +def build_real_sno(): + return build_sno_detector(real_av=True) diff --git a/detectors/sno.py b/detectors/sno.py index 6d33c39..a850338 100644 --- a/detectors/sno.py +++ b/detectors/sno.py @@ -2,6 +2,7 @@ import numpy as np import numpy.linalg import math from make import rotate_extrude +from stl import mesh_from_stl from geometry import * from optics import * from solids import build_8inch_pmt_with_lc @@ -68,15 +69,21 @@ av_inside_mesh.vertices = rotate(av_inside_mesh.vertices, np.pi/2, (-1,0,0)) dir = os.path.split(os.path.realpath(__file__))[0] -def build_sno(): +def build_sno(real_av=False): import h5py pmtinfo = h5py.File(dir+'/sno_pmt_info.hdf5') pmt = build_8inch_pmt_with_lc() geo = Geometry() - geo.add_solid(Solid(av_outside_mesh, glass, water, color=0x33FFFFFF)) - geo.add_solid(Solid(av_inside_mesh, water, glass, color=0x330000FF)) + + if real_av: + real_av_mesh = mesh_from_stl(dir+'/sno_av_ascii.stl.bz2') + real_av_mesh.vertices *= 0.0254 # inch -> meter + geo.add_solid(Solid(real_av_mesh, glass, water, color=0xBBAAAAFF)) + else: + geo.add_solid(Solid(av_outside_mesh, glass, water, color=0x33FFFFFF)) + geo.add_solid(Solid(av_inside_mesh, water, glass, color=0x330000FF)) geo.pmtids = [] snoman_id_dict = {} diff --git a/detectors/sno_av_ascii.stl.bz2 b/detectors/sno_av_ascii.stl.bz2 Binary files differnew file mode 100644 index 0000000..1298a60 --- /dev/null +++ b/detectors/sno_av_ascii.stl.bz2 |