Canonical transformations for relativistic particles