From a5193f9b6b3267ef1a3b436cdffe2dc0d3615adc Mon Sep 17 00:00:00 2001 From: Stan Seibert Date: Wed, 27 Jul 2011 16:23:27 -0400 Subject: Use the more realistic SNO database and add PMT concentrators. --- solids/__init__.py | 12 +++++++++--- solids/pmts.py | 11 +++++++++++ solids/sno_cone.txt | 6 +++--- 3 files changed, 23 insertions(+), 6 deletions(-) (limited to 'solids') diff --git a/solids/__init__.py b/solids/__init__.py index 338725c..9de5c8d 100644 --- a/solids/__init__.py +++ b/solids/__init__.py @@ -1,6 +1,6 @@ import numpy as np -from pmts import build_pmt, build_light_collector +from pmts import build_pmt, build_light_collector, build_light_collector_from_file import os import sys @@ -28,5 +28,11 @@ def build_12inch_pmt_with_lc(outer_material=water, theta=np.pi/8): return pmt + build_light_collector(pmt, a=lc_12inch_a, b=lc_12inch_b, d=lc_12inch_d, rmin=lc_12inch_rmin, rmax=lc_12inch_rmax) @buildable('8inch_pmt') -def build_8inch_pmt(outer_material=water, theta=np.pi/8): - return build_pmt(dir + '/sno_pmt.txt', 0.003, outer_material, theta) +def build_8inch_pmt(outer_material=water, theta=np.pi/12): + return build_pmt(dir + '/sno_pmt_reduced.txt', 0.003, outer_material, theta) + +@buildable('8inch_pmt_with_lc') +def build_8inch_pmt_with_lc(outer_material=water, theta=np.pi/12): + pmt = build_8inch_pmt(outer_material, theta) + lc = build_light_collector_from_file(dir + '/sno_cone.txt', outer_material, theta) + return pmt + lc diff --git a/solids/pmts.py b/solids/pmts.py index 6b10522..377024d 100644 --- a/solids/pmts.py +++ b/solids/pmts.py @@ -64,3 +64,14 @@ def build_pmt(filename, glass_thickness, outer_material=water, theta=np.pi/8): pmt.theta = theta return pmt + +def build_light_collector_from_file(filename, outer_material, theta=np.pi/24): + profile = read_csv(filename) + + # Convert mm to m + profile /= 1000.0 + + mesh = rotate_extrude(profile[:,0], profile[:,1], theta) + solid = Solid(mesh, outer_material, outer_material, color=0xFF0000, + surface=shiny_surface) + return solid diff --git a/solids/sno_cone.txt b/solids/sno_cone.txt index bf666cc..5b56792 100644 --- a/solids/sno_cone.txt +++ b/solids/sno_cone.txt @@ -4,10 +4,10 @@ -133.7058, 116.0503 -133.0342, 109.7357 -132.3659, 102.7194 --131.6944, 96.4048 +#-131.6944, 96.4048 -130.3251, 89.3909 --128.2481, 83.7831 --126.8788, 76.7691 +#-128.2481, 83.7831 +#-126.8788, 76.7691 -124.8018, 71.1613 -122.7282, 64.8516 -119.9503, 59.2462 -- cgit