In situ production of terrestrial cosmogenic helium and some applications to geochronology