A method determines an error in aligning a patient with a radiation beam. A planning volume V is acquired during treatment planning, and a treatment volume I is acquired during treatment. For each point r in the planning volume and treatment volume to be aligned by a coordinate transformation T, a weighted error DWE is minimized using an objective function F(r, T) applied to the planning volume and the treatment volume weighted by a weighting function W(r) asWE(T)=∑rW(r)F(r,T), where W(r) is a function of a target weight WT, a tissue at risk weight WR, and a delivered dose weight WD.