diff options
author | Stan Seibert <stan@mtrr.org> | 2011-09-28 17:34:27 -0400 |
---|---|---|
committer | Stan Seibert <stan@mtrr.org> | 2011-09-28 17:34:27 -0400 |
commit | 545ff65f95200266d45cb1264a3e2a376fed490d (patch) | |
tree | 9402006ec2690576949f355e4b55f0607b2b69e0 | |
parent | a01bcf3748af2e473d27770d153d3bee4a81af08 (diff) | |
download | chroma-545ff65f95200266d45cb1264a3e2a376fed490d.tar.gz chroma-545ff65f95200266d45cb1264a3e2a376fed490d.tar.bz2 chroma-545ff65f95200266d45cb1264a3e2a376fed490d.zip |
Remove LBNE detector
-rw-r--r-- | chroma/detectors/__init__.py | 24 | ||||
-rw-r--r-- | chroma/detectors/lbne.py | 49 | ||||
-rw-r--r-- | chroma/pmt.py (renamed from chroma/solids/pmts.py) | 0 | ||||
-rw-r--r-- | chroma/solids/__init__.py | 28 | ||||
-rw-r--r-- | chroma/solids/hamamatsu_12inch.txt | 55 |
5 files changed, 1 insertions, 155 deletions
diff --git a/chroma/detectors/__init__.py b/chroma/detectors/__init__.py index 2028300..90d69d0 100644 --- a/chroma/detectors/__init__.py +++ b/chroma/detectors/__init__.py @@ -1,30 +1,6 @@ -from lbne import build_lbne from sno import build_sno as build_sno_detector from miniclean import build_miniclean as build_miniclean_detector -# from LBNE document #3951 -radius = 63.30/2 -height = 76.60 -nstrings = 230 -pmts_per_string = 88 -endcap_spacing = 0.86 - -def lbne_event_view(): - return build_lbne(radius, height, nstrings, pmts_per_string, - endcap_spacing, physical_model=False) - -def lbne(): - return build_lbne(radius, height, nstrings, pmts_per_string, - endcap_spacing) - -def minilbne(): - return build_lbne(radius/10, height/10, nstrings//10, pmts_per_string//10, - endcap_spacing) - -def microlbne(): - return build_lbne(radius/40, height/40, nstrings//40, pmts_per_string//40, - endcap_spacing) - def sno(): return build_sno_detector() diff --git a/chroma/detectors/lbne.py b/chroma/detectors/lbne.py deleted file mode 100644 index 97d09e9..0000000 --- a/chroma/detectors/lbne.py +++ /dev/null @@ -1,49 +0,0 @@ -import numpy as np -from chroma.geometry import Solid, Geometry -import chroma.solids as solids -from chroma.optics import vacuum, water, water_wcsim, black_surface -from chroma.transform import rotate, make_rotation_matrix -from itertools import product -import chroma.make as make - -def build_lbne(radius, height, nstrings, pmts_per_string, endcap_spacing, detector_material=water_wcsim, physical_model=True): - if physical_model: - pmt = solids.build_12inch_pmt_with_lc(outer_material=detector_material) - else: - pmt = solids.build_12inch_pmt_shell(outer_material=detector_material) - - lbne = Geometry(detector_material) - - # outer cylinder - cylinder_mesh = make.segmented_cylinder(radius, height+height/(pmts_per_string-1), nsteps=16*nstrings, nsegments=1200) - cylinder_mesh.vertices = rotate(cylinder_mesh.vertices, np.pi/2, (-1,0,0)) - lbne.add_solid(Solid(cylinder_mesh, detector_material, vacuum, black_surface, 0xff0000ff)) - - lbne.pmtids = [] - - # construct the barrel - for i in range(pmts_per_string): - for j in range(nstrings): - rotation = make_rotation_matrix(j*2*np.pi/nstrings, (0,0,1)) - displacement = rotate((0,-radius,-height/2+i*height/(pmts_per_string-1)), j*2*np.pi/nstrings, (0,0,1)) - lbne.pmtids.append(lbne.add_solid(pmt, rotation, displacement)) - - # construct the top endcap - for x, y in np.array(tuple(product(\ - np.arange(-radius+0.075, radius, endcap_spacing), - np.arange(-radius+0.075, radius, endcap_spacing)))): - if np.sqrt(x**2 + y**2) < radius - endcap_spacing/2: - rotation = make_rotation_matrix(+np.pi/2, (1,0,0)) - displacement = (x,y,+height/2+height/(pmts_per_string-1)/2) - lbne.pmtids.append(lbne.add_solid(pmt, rotation, displacement)) - - # construct the bottom endcap - for x, y in np.array(tuple(product(\ - np.arange(-radius+0.075, radius, endcap_spacing), - np.arange(-radius+0.075, radius, endcap_spacing)))): - if np.sqrt(x**2 + y**2) < radius - endcap_spacing/2: - rotation = make_rotation_matrix(-np.pi/2, (1,0,0)) - displacement = (x,y,-height/2-height/(pmts_per_string-1)/2) - lbne.pmtids.append(lbne.add_solid(pmt, rotation, displacement)) - - return lbne diff --git a/chroma/solids/pmts.py b/chroma/pmt.py index 43aed3f..43aed3f 100644 --- a/chroma/solids/pmts.py +++ b/chroma/pmt.py diff --git a/chroma/solids/__init__.py b/chroma/solids/__init__.py index c4d227f..9654b19 100644 --- a/chroma/solids/__init__.py +++ b/chroma/solids/__init__.py @@ -1,33 +1,7 @@ -from pmts import build_pmt, build_light_collector, build_light_collector_from_file, build_pmt_shell +from chroma.pmt import build_pmt, build_light_collector, build_light_collector_from_file, build_pmt_shell from chroma.optics import * from os.path import dirname -def build_12inch_pmt(outer_material=water, nsteps=16): - return build_pmt(dirname(__file__) + '/hamamatsu_12inch.txt', 0.003, - outer_material, nsteps) - -def build_12inch_pmt_shell(outer_material=water, nsteps=16): - return build_pmt_shell(dirname(__file__) + '/hamamatsu_12inch.txt') - -# from Jelena Maricic -lc_12inch_a = 0.16597 -lc_12inch_b = 0.584525 -lc_12inch_d = 0.09548 -lc_12inch_rmin = 0.1524 -lc_12inch_rmax = 0.235072 - -def build_12inch_pmt_with_lc(outer_material=water, nsteps=16): - pmt = build_12inch_pmt(outer_material, nsteps) - 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) - -def build_12inch_pmt_with_lc_hd(outer_material=water, nsteps=128): - pmt = build_12inch_pmt(outer_material, nsteps) - 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, npoints=100) - def build_8inch_pmt(outer_material=water, nsteps=24): return build_pmt(dirname(__file__) + '/sno_pmt.txt', 0.003, outer_material, nsteps) diff --git a/chroma/solids/hamamatsu_12inch.txt b/chroma/solids/hamamatsu_12inch.txt deleted file mode 100644 index e896b94..0000000 --- a/chroma/solids/hamamatsu_12inch.txt +++ /dev/null @@ -1,55 +0,0 @@ -#DataThief /Users/stan/Downloads/./Dimension_of_12inch_bulb_100826.png Monday 16-May-2011 12:22:34 PM -109.1514, 83.9786 -123.0527, 70.9583 -134.8946, 56.9466 -145.1919, 40.944 -150.8554, 23.4594 -152.4, 3.9922 -150.8554, -15.4649 -145.7067, -32.914 -136.4392, -49.3517 -123.0527, -64.2787 -108.6364, -75.2102 -92.1608, -86.1349 -76.2, -97.0612 -66.4176, -112.0001 -63.3284, -130.9531 -63.3284, -150.9143 -63.3284, -170.3764 -56.6351, -187.8206 -44.7932, -202.7527 -28.8324, -211.1839 -10.8122, -212.6219 --9.2676, -213.5543 --28.8324, -210.995 --45.823, -201.9569 --57.6649, -186.9473 --63.8432, -169.96 --63.8432, -150.4979 --63.8432, -130.5367 --66.4176, -111.0661 --76.7149, -96.0615 --93.1905, -85.0289 --108.6364, -74.4987 --123.0527, -63.4727 --135.4095, -49.9586 --144.677, -33.9593 --150.3405, -16.4747 --152.9149, 2.4968 --151.3703, 21.4549 --146.2216, 39.4031 --136.4392, 55.34 --124.0824, 70.2704 --109.6662, 83.198 --93.7054, 94.1244 --76.7149, 103.0513 --59.2095, 109.4813 --40.6743, 113.9119 --21.1095, 117.3411 --1.0297, 118.2734 -19.05, 117.2096 -38.6149, 114.1513 -57.15, 109.5994 -75.1703, 103.053 -92.1608, 94.5138 -104.0027, 88.4867 |