#include #include #include "vertexfit.h" #include "binfile.h" // hit selection parameter #define TCLOSE 3. // timing difference to pass unchecked #define TRES 3. // timing resolution // ********************************************** // load PMT positions; decide fit volume and // test point radii // ********************************************** void vertexfit::loadgeom(void) { int *sizes,*numbers; void **starts; binfile bf("geom.bin",'r'); npmt=bf.read(sizes,numbers,starts); if (npmt!=1) { printf("Invalid Geometry file: %d Arrays\n",npmt); exit(1); } if (sizes[0]!=4) { printf("Invalid Geometry file: Array of size %d\n",sizes[0]); exit(1); } pmts=(float *)starts[0]; delete(sizes); delete(starts); npmt=numbers[0]/3; delete(numbers); } void vertexfit::set(float resolution) { int i; float r2,z; rmax=0; zmax=0; for(i=0; i