summaryrefslogtreecommitdiff
path: root/detectors
diff options
context:
space:
mode:
authorStan Seibert <stan@mtrr.org>2011-09-03 09:21:36 -0400
committerStan Seibert <stan@mtrr.org>2011-09-03 09:21:36 -0400
commit38f05bf761490def1886016524f328528b08f549 (patch)
treee0ee6555ee8bdf02a9e0b832a33707bcee06a3fa /detectors
parent48550062440c5b7f1479ecbe17fd4b024a90fca2 (diff)
parent707ca1b366f11032682cc864ca2848905e6b485c (diff)
downloadchroma-38f05bf761490def1886016524f328528b08f549.tar.gz
chroma-38f05bf761490def1886016524f328528b08f549.tar.bz2
chroma-38f05bf761490def1886016524f328528b08f549.zip
merge
Diffstat (limited to 'detectors')
-rw-r--r--detectors/lbne.py10
-rw-r--r--detectors/miniclean.py4
2 files changed, 7 insertions, 7 deletions
diff --git a/detectors/lbne.py b/detectors/lbne.py
index ca13c2d..97d09e9 100644
--- a/detectors/lbne.py
+++ b/detectors/lbne.py
@@ -6,18 +6,18 @@ 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, physical_model=True):
+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=water_wcsim)
+ pmt = solids.build_12inch_pmt_with_lc(outer_material=detector_material)
else:
- pmt = solids.build_12inch_pmt_shell(outer_material=water_wcsim)
+ pmt = solids.build_12inch_pmt_shell(outer_material=detector_material)
- lbne = Geometry()
+ 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, water_wcsim, vacuum, black_surface, 0xff0000ff))
+ lbne.add_solid(Solid(cylinder_mesh, detector_material, vacuum, black_surface, 0xff0000ff))
lbne.pmtids = []
diff --git a/detectors/miniclean.py b/detectors/miniclean.py
index b0d4955..92dd019 100644
--- a/detectors/miniclean.py
+++ b/detectors/miniclean.py
@@ -42,7 +42,7 @@ def build_miniclean(real_av=False):
geo = Geometry()
simple_iv = sphere(0.818)
- geo.add_solid(Solid(simple_iv, liquid_argon, vacuum, color=0x33FF0000))
+ geo.add_solid(Solid(simple_iv, liquid_argon, vacuum, color=0xffFF0000))
polygons = read_polygons(os.path.join(dir, 'miniclean_polygons.txt'))
@@ -59,7 +59,7 @@ def build_miniclean(real_av=False):
triangles = mesh.assemble(group=True)
triangle_centroids = triangles.mean(axis=1)
face = triangle_centroids[:,2] < 0.1
- colors[face] = 0x1100FF00
+ colors[face] = 0xffffff
polygon_types[polygon_id] = (mesh, colors)