From b264fdd62fc2e641973774dfef99e36d90f21a27 Mon Sep 17 00:00:00 2001 From: Stan Seibert Date: Fri, 7 Oct 2011 12:08:12 -0400 Subject: 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. --- test/test_pdf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/test_pdf.py') 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() -- cgit