diff options
author | Anthony LaTorre <tlatorre9@gmail.com> | 2011-08-17 10:36:22 -0400 |
---|---|---|
committer | Anthony LaTorre <tlatorre9@gmail.com> | 2011-08-17 10:36:22 -0400 |
commit | e33c6fab8b8dd8adb3d71af8517dfe45ba264cf7 (patch) | |
tree | 350af8a727bbb035214b6beea1915741119dd59c /detectors/lbne.py | |
parent | 1476f921813e60cf3749a5d03b9ed5cbf1951db6 (diff) | |
download | chroma-e33c6fab8b8dd8adb3d71af8517dfe45ba264cf7.tar.gz chroma-e33c6fab8b8dd8adb3d71af8517dfe45ba264cf7.tar.bz2 chroma-e33c6fab8b8dd8adb3d71af8517dfe45ba264cf7.zip |
import chroma modules from subpackages with import chroma.module_name
Diffstat (limited to 'detectors/lbne.py')
-rw-r--r-- | detectors/lbne.py | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/detectors/lbne.py b/detectors/lbne.py index 8942cb2..ca13c2d 100644 --- a/detectors/lbne.py +++ b/detectors/lbne.py @@ -1,27 +1,21 @@ -import os -import sys import numpy as np - -dir = os.path.split(os.path.realpath(__file__))[0] -sys.path.append(dir + '/..') - -from geometry import * -from solids import build_12inch_pmt, build_12inch_pmt_with_lc, build_12inch_pmt_shell -from optics import * -from transform import rotate, make_rotation_matrix +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 -from make import cylinder, segmented_cylinder +import chroma.make as make def build_lbne(radius, height, nstrings, pmts_per_string, endcap_spacing, physical_model=True): if physical_model: - pmt = build_12inch_pmt_with_lc(outer_material=water_wcsim) + pmt = solids.build_12inch_pmt_with_lc(outer_material=water_wcsim) else: - pmt = build_12inch_pmt_shell(outer_material=water_wcsim) + pmt = solids.build_12inch_pmt_shell(outer_material=water_wcsim) lbne = Geometry() # outer cylinder - cylinder_mesh = segmented_cylinder(radius, height+height/(pmts_per_string-1), nsteps=16*nstrings, nsegments=1200) + 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)) |