summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2011-10-05Epic port of Chroma from units of meters/seconds/MeV toStan
#ifndef RANDOM_H
#define RANDOM_H

#include "mt19937ar.h"

double randn(void);
void rand_sphere(double *dir);

#endif
nohover-highlight'>
2011-09-07fix bug in searchsorted() so that it properly searches a descending array.Anthony LaTorre
2011-09-06fix devious assumption in searchsorted that if searching a length one array ↵Anthony LaTorre
it assumed the array was meant to be in descending order; it now assumes ascending order and this assumption is documented.
2011-09-06make min_distance argument to intersect_node() optional.Anthony LaTorre
2011-09-06geometry on the GPU is now a struct created in the GPUGeometry class. coding ↵Anthony LaTorre
style for cuda code is now compliant with python PEP 7 -- Style Guide for C Code.
2011-09-03mergeStan Seibert
2011-09-03GPU-based sampling from an arbitrary distribition.Stan Seibert
The sample_cdf() device function will draw random numbers from an arbitrary disribution given a cumulative distribution function in the form of a list of x,y points, beginning with y=0 and ending with y=1. For an example of how to convert a ROOT histogram to this form, see the unit test in test_sample_cdf.py
2011-09-02update event structure. break gpu.GPU class into separate smaller ↵Anthony LaTorre
independent classes.
2011-08-26no more 3d headache! 3d viewing angle changes depending on the distance to ↵Anthony LaTorre
the object in the center of the screen.
2011-08-25mergeAnthony LaTorre
2011-08-25add 3d support to camera views by displaying images as an anaglyph. alpha ↵Anthony LaTorre
coloring is now calculated using the new searching/sorting algorithms.
2011-08-25add cuda sorting/searching algorithms in src/sorting.hAnthony LaTorre
2011-08-25A new PDF evaluation method that does not require storage proportionalStan Seibert
to [number of bins] * [number of PMTs]. Instead we accumulate information as the Monte Carlo runs in order to evaluate the PDFs only at the points required for the likelihood calculation. This new interface has been propagated all the way up from the GPU class through the Simulation class to the Likelihood class. We have preserved the full binned histogram implementation in case we need it in the future.
2011-08-22Enable creation of charge and time PDF on GPUStan Seibert
2011-08-18Replace Rayleigh scattering implementation with that from SNOMAN. TheStan Seibert
angular distribution is slightly different, and now fits with the distribution given in the GEANT4 physics reference manual. Unit test is now included to verify the correctness of the scattering.
2011-08-18Fix bug that caused photons to NAN_ABORT if they hit a triangleStan Seibert
at exactly normal incidence. The plane of incidence was undefined in that case, but should have been the plane normal to polarization vector.
2011-08-17import chroma modules from subpackages with import chroma.module_nameAnthony LaTorre
2011-08-16add linear_extrude() function to make.py. rotate_extrude() now takes the ↵Anthony LaTorre
number of rotational steps to extrude instead of the angle step size. updated documention in make.py.
2011-08-15mergeAnthony LaTorre
2011-08-15woops. dot product should be clamped to [-1.0,1.0].Anthony LaTorre
2011-08-15fix nan bug by clamping dot() of surface normal and -photon direction to ↵Anthony LaTorre
[0.0,1.0]
2011-08-14Rewrite the color_solid function in gpu.GPU (and associated CUDA code)Stan Seibert
to make it 100x faster. Instead of having each CUDA thread loop over the full triangle list, we give each thread a single triangle and ask it to look up the hit status and color for that triangle. The hit array and color array are small enough (approx 30,000 entries) to fit into the cache, so this goes much faster. Now the event viewer is quite snappy!
2011-08-13A faulty optical process can make the position or direction of theStan Seibert
photon into NaN on the GPU. Now we abort these photons rather than let them lock up the intersect_mesh() method. There is a new history bit (#31) that indicates when a NAN_ABORT has occurred, and this bit is checked for by GPU.propagate(). If set for any of the photons, a warning message is printed. While not as good as preventing the NaN problem in the first place, this at least ensures we are aware of the problem.
2011-08-12mergeAnthony LaTorre
2011-08-12do not check child nodes of a node at which the distance to the bounding box ↵Anthony LaTorre
is further than a triangle the ray/photon has already intersected
2011-08-12Use an input and output photon queue in order to consolidate all theStan Seibert
photons that didn't die during propagation into the beginning of the list. This speeds up propagation by reducing the number of partially filled CUDA warps on the next propagation step. 2.2 million photons/sec on LBNE!
2011-08-11No need for __noinline__ now that kernel caching works.Stan Seibert
2011-08-11Switch from texture to float3 array for upper and lower bounds. 10% speed ↵Stan Seibert
boost!
2011-08-10add the ability to cache a geometry along with its bounding volume ↵Anthony LaTorre
hierarchy. cached files are stored in $HOME/.chroma. fixed the timeit() decorator so that the decorated function is still able to pass back a return value.
2011-08-09merge headsAnthony LaTorre
2011-08-09switch to indexing child nodes by start and stop indices instead of start ↵Anthony LaTorre
and length; this reduces a bit of arithmetic when traversing the bounding volume hierarchy and makes the code in Geometry.build() more concise. add an untested cuda kernel to interleave the bits in three uint64 arrays.
2011-08-09Put number of detected photons into charge value for channel.Stan Seibert
2011-08-09Store a photon history for each hit channel. If multiple photons hit theStan Seibert
same channel, their history bits are OR'ed together.
2011-08-08propagate() takes an array of photon offsets and a range ofStan Seibert
offsets to load. Now events with more photons than RNG states can be propagated through multiple kernel calls. Also lays the groundwork for consolidating photons between steps to reduce the amount of propagation work required.
2011-08-08add a simple event viewer. view events by running ./camera.py ↵Anthony LaTorre
<detector_name> -i <name_of_io_file>.
2011-08-04Don't draw a random time delta in the daq kernel unless it is necessary.Stan Seibert