Updated macros for PHOS alignment calculation