Fast, accurate pulse counting and discrimination for sodium iodide and lanthanum halide scintillators, and photodiodes.