diff options
author | Stan Seibert <stan@mtrr.org> | 2011-10-07 12:08:12 -0400 |
---|---|---|
committer | Stan Seibert <stan@mtrr.org> | 2011-10-07 12:08:12 -0400 |
commit | b264fdd62fc2e641973774dfef99e36d90f21a27 (patch) | |
tree | 95a9ecfa1c6661df5e019494f5921c60b36e2bff /test/test_pdf.py | |
parent | 8c57794e94f9a9321f76946b33dbff6ab1b4d964 (diff) | |
download | chroma-b264fdd62fc2e641973774dfef99e36d90f21a27.tar.gz chroma-b264fdd62fc2e641973774dfef99e36d90f21a27.tar.bz2 chroma-b264fdd62fc2e641973774dfef99e36d90f21a27.zip |
Create a Detector class to hold information about the PMTs in a
geometry, like the mapping from solid IDs to channels, and the time
and charge distributions.
Detector is a subclass of Geometry, so that a Detector can be used
wherever a Geometry is used. Only code (like the DAQ stuff) that
needs to know how PMT solids map to channels should look for a
Detector object.
There is a corresponding GPUDetector class as well, with its own
device side struct to hold PMT channel information.
The GPU code now can sample an arbitrary time and charge PDF, but
on the host side, the only interface exposed right now creates
a Gaussian distribution.
Diffstat (limited to 'test/test_pdf.py')
-rw-r--r-- | test/test_pdf.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_pdf.py b/test/test_pdf.py index 2eafd67..df13a2a 100644 --- a/test/test_pdf.py +++ b/test/test_pdf.py @@ -22,15 +22,15 @@ class TestPDF(unittest.TestCase): context = gpu.create_cuda_context() - gpu_geometry = gpu.GPUGeometry(self.detector) + gpu_geometry = gpu.GPUDetector(self.detector) nthreads_per_block, max_blocks = 64, 1024 rng_states = gpu.get_rng_states(nthreads_per_block*max_blocks) - gpu_daq = gpu.GPUDaq(gpu_geometry, max(self.detector.pmtids)) + gpu_daq = gpu.GPUDaq(gpu_geometry) gpu_pdf = gpu.GPUPDF() - gpu_pdf.setup_pdf(max(self.detector.pmtids), 100, (-0.5, 999.5), 10, (-0.5, 9.5)) + gpu_pdf.setup_pdf(self.detector.num_channels(), 100, (-0.5, 999.5), 10, (-0.5, 9.5)) gpu_pdf.clear_pdf() |