The weighting function of a neutron capture detection system