diff options
| author | Stan Seibert <stan@mtrr.org> | 2011-10-05 17:37:26 -0400 |
|---|---|---|
| committer | Stan Seibert <stan@mtrr.org> | 2011-10-05 17:37:26 -0400 |
| commit | e4ea02720991b5e923e0b7b1045709aff0d6b0c0 (patch) | |
| tree | 461db2be1fdb4e3b543837c2f3832e0e50f7f7ca /chroma/cuda | |
| parent | c309d251232c45bb497da4859eb8cf1b2ab47417 (diff) | |
| download | chroma-e4ea02720991b5e923e0b7b1045709aff0d6b0c0.tar.gz chroma-e4ea02720991b5e923e0b7b1045709aff0d6b0c0.tar.bz2 chroma-e4ea02720991b5e923e0b7b1045709aff0d6b0c0.zip | |
Epic port of Chroma from units of meters/seconds/MeV to
millimeters/nanoseconds/MeV in order to match GEANT4, and also avoid
huge discrepancies in magnitude caused by values like 10e-9 sec.
Along the way, cleaned up a few things:
* Switch the PI and SPEED_OF_LIGHT constants from double to single
precision. This avoid some unnecessary double precision calculations
in the GPU code.
* Fixed a silly problem in the definition of the spherical spiral. Now
the demo detector looks totally awesome. Also wrapped it in a
black surface. Demo detector now has 10055 PMTs.
* Updated the test_ray_intersection data file to reflect the new units.
* Fix a missing import in chroma.gpu.tools
Diffstat (limited to 'chroma/cuda')
| -rw-r--r-- | chroma/cuda/physical_constants.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chroma/cuda/physical_constants.h b/chroma/cuda/physical_constants.h index 2ff87cd..0082503 100644 --- a/chroma/cuda/physical_constants.h +++ b/chroma/cuda/physical_constants.h @@ -1,7 +1,9 @@ #ifndef __PHYSICAL_CONSTANTS_H__ #define __PHYSICAL_CONSTANTS_H__ -#define SPEED_OF_LIGHT 2.99792458e8 -#define PI 3.141592653589793 +// mm/ns +#define SPEED_OF_LIGHT 299.792458f + +#define PI 3.141592653589793f #endif |
