  Purpose: Cone-beam CT (CBCT) projection images provide anatomical data in
real-time over several respiratory cycles, forming a comprehensive picture of
tumor movement. We developed and validated a method which uses these
projections to determine the trajectory of and dose to highly mobile tumors
during each fraction of treatment.
  Methods: CBCT images of a respiration phantom were acquired, the trajectory
of which mimicked a lung tumor with high amplitude (up to 2.5 cm) and
hysteresis. A template-matching algorithm was used to identify the location of
a steel BB in each CBCT projection, and a Gaussian probability density function
for the absolute BB position was calculated which best fit the observed
trajectory of the BB in the imager geometry. Two modifications of the
trajectory reconstruction were investigated: first, using respiratory phase
information to refine the trajectory estimation (Phase), and second, using the
Monte Carlo (MC) method to sample the estimated Gaussian tumor position
distribution.
  Results: With all methods, the mean position of the BB was determined with
accuracy better than 0.1 mm, and trajectory errors averaged 3.8$\pm$1.1% of the
marker amplitude. Dosimetric calculations using Phase methods were more
accurate, with mean absolute error less than 0.5%, and with error less than 1%
in the highest-noise trajectory. MC-based trajectories prevent the
over-estimation of dose, but when viewed in an absolute sense, add a small
amount of dosimetric error (<0.1%).
  Conclusions: Marker trajectory and target dose-of-the-day were accurately
calculated using CBCT projections. This technique provides a method to evaluate
highly-mobile tumors using ordinary CBCT data, and could facilitate better
strategies to mitigate or compensate for motion during SBRT.
