In addition to the compensation and allowances, there shall be allowed to the marshal and constable the right to a pension or retirement annuity in the same manner and amount and under the same terms and conditions as provided by law for county and township peace officers.