What is the difference between an XYZPoint object and an XYZVector object?

Welcome to the ROOT Forum!

According to the Point 3D Page and the Vector 3D Page:

ROOT::Math::XYZPoint point based on x,y,z coordinates (cartesian) in double precision

ROOT::Math::XYZVector vector based on x,y,z coordinates (cartesian) in double precision

Hi, I have looked at those pages, but I don’t understand what the difference is (if any). I just see they both have the same members and functions.

Thanks

The `ROOT::Math::XYZPoint`

is a position and `ROOT::Math::XYZVector`

a displacement. Maybe @emoneta can give more details…

- a XYZVector is a ROOT: ROOT::Math::DisplacementVector3D< CoordSystem, Tag > Class Template Reference
- a XYZPoint is a ROOT: ROOT::Math::PositionVector3D< CoordSystem, Tag > Class Template Reference

For example, you can add two DisplacementVectors, but you cannot add two PositionVectors, as it does not make sense to ‘add’ two points.

Also, I think that, if you have two coordinate systems, one translated from each other, the PositionVector of a point P is different in each coordinate system, but a DisplacementVector would be exactly the same.