summaryrefslogtreecommitdiff
path: root/detectors/lbne.py
diff options
context:
space:
mode:
authorAnthony LaTorre <telatorre@gmail.com>2011-05-18 18:29:43 -0400
committerAnthony LaTorre <telatorre@gmail.com>2011-05-18 18:29:43 -0400
commit3a0571534185505a38dc992a7e21a3eb027aae97 (patch)
treec60b21f5b6fcc803a9f59c2fcd2d70a42c148600 /detectors/lbne.py
parent9306f888fea903accf827870a122a2f6f76e472e (diff)
downloadchroma-3a0571534185505a38dc992a7e21a3eb027aae97.tar.gz
chroma-3a0571534185505a38dc992a7e21a3eb027aae97.tar.bz2
chroma-3a0571534185505a38dc992a7e21a3eb027aae97.zip
added test likelihood
Diffstat (limited to 'detectors/lbne.py')
-rw-r--r--detectors/lbne.py30
1 files changed, 1 insertions, 29 deletions
diff --git a/detectors/lbne.py b/detectors/lbne.py
index 54e11a9..7cd666a 100644
--- a/detectors/lbne.py
+++ b/detectors/lbne.py
@@ -1,3 +1,4 @@
+import sys
import numpy as np
from copy import deepcopy
from chroma import layout
@@ -5,10 +6,7 @@ from chroma.stl import read_stl
from chroma.transform import rotate
from chroma.geometry import Geometry, Solid
from chroma.materials import glass, h2o
-from chroma.photon import uniform_sphere
-from chroma.gpu import GPU
from itertools import product
-from histogram import *
endcap_spacing = .485
@@ -19,7 +17,6 @@ nstrings = 324//10
pmts_per_string = 102//10
class LBNE(Geometry):
- """Miniature version of the LBNE water Cerenkov detector geometry."""
def __init__(self):
super(LBNE, self).__init__()
@@ -53,28 +50,3 @@ class LBNE(Geometry):
pmt.mesh = rotate(pmt.mesh, +np.pi/2, (0,1,0))
pmt.mesh += (x,y,-height/2-height/(pmts_per_string-1)/2)
self.add_solid(pmt)
-
- def load_geometry(self):
- self.gpu = GPU()
- self.texrefs = self.gpu.load_geometry(self)
- self.propagate = self.gpu.get_function('propagate')
-
-if __name__ == '__main__':
- import sys
- import optparse
- import pickle
-
- parser = optparse.OptionParser('prog filename')
- parser.add_option('-b', '--bits', type='int', dest='bits',
- help='bits for z-ordering space axes', default=6)
- options, args = parser.parse_args()
-
- if len(args) < 1:
- sys.exit(parser.format_help())
-
- lbne = LBNE()
- lbne.build(bits=options.bits)
-
- f = open(args[0], 'wb')
- pickle.dump(lbne, f)
- f.close()