I’ve seen a post on a similar topic but it’s quite old, so I dare asking.
Consider the python interactive session below. Using ROOT 5.27/06b, python 2.6.4.
What makes TVector3 different from XYZVector as far as operator + is concerned ?
Oddly enough, operator += works for XYZVector.
CMS is using XYZVector,XYZPoint extensively, it would be great to be able to use
v3 = v1+v2
Traceback (most recent call last):
File “”, line 1, in
TypeError: unsupported operand type(s) for +: ‘ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D,ROOT::Math::DefaultCoordinateSystem’ and ‘ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D,ROOT::Math::DefaultCoordinateSystem’