#include// ... TLorentzVector vector(10.0, 4.0, 5.0, 2.0); // E = 10, px = 4, py = 5, pz = 2
TLorentzVector vector1(10.0, 4.0, 5.0, 2.0); // E = 10, px = 4, py = 5, pz = 2 TLorentzVector vector2(5.0, 2.0, 3.0, 1.0); // E = 5, px = 2, py = 3, pz = 1 TLorentzVector vector_sum = vector1 + vector2;
TLorentzVector particle(10.0, 4.0, 5.0, 2.0); double inv_mass = particle.M(); // calculates invariant massThe TLorentzVector class is part of the ROOT package library. ROOT is a data analysis framework used primarily in high-energy physics research.