Ballistic analysis of a two-cavity finite beam klystron