associate calorimeter hit via predicate

Also place source foil vertex extrapolation in a dedicated function (not
used now)
add function prototype
split main process function into several subprocess functions

Also add source foil vertex extrapolation as post process function