This repository is primarily to practice. The stucture is probably not optimal for a proper package structure, but this might evolve. For now, it is just to better undertand how to create/manipulate the go langage. The maths are mostly taken from TLorentzVector ROOT class.
The lorentz vector object is a four-component object used in high energy physics, and is implemented as a 3D vector and a fourth component {r2.Vector, P4}
object. The package relies then naturally on github.com/golang/geo/r3
package (3D vectors).
The repository is structured as follow:
lv/lorentzvector.go
: code of of the packagelv
(which should be in$GOPATH/src/<something>
in order to be used in a go program)cmd/main.go
: usage example of thelv
package
- cross-check the definition of
gamma2
since it is notgamma*gamma
, change the variable name - cross-check the
v.Phi()
value if this is in [0, 2pi] as in HEP convention - compare values, boosted vectors, etc with other existing codes