Hi,
I’m confused why this doesn’t work:
[code]In [5]: a = ROOT.TVector3(1, 2, 3)
In [6]: b = ROOT.TVector3(4, 5, 6)
In [7]: a-b
TypeError Traceback (most recent call last)
/home/elliottb/workspace/mycroot/ in ()
TypeError: unsupported operand type(s) for -: ‘TVector3’ and ‘TVector3’
In [8]: a -= b
In [9]: a.Print()
TVector3 A 3D physics vector (x,y,z)=(-3.000000,-3.000000,-3.000000) (rho,theta,phi)=(5.196152,125.264390,-135.000000)
[/code]
I’ve been dealing with this for a while. Mostly been working around, but I’m thinking that I should probably post it here.
Is there something I’m not understanding about python?
Elliott