From 8f4281b554ae4478baa984e777460a9b3e16eae6 Mon Sep 17 00:00:00 2001 From: Stan Seibert Date: Thu, 28 Jul 2011 16:08:43 -0400 Subject: 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.) --- detectors/sno.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'detectors/sno.py') 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 = {} -- cgit