TLorentzVector vec(100, 0, 0, 100); // create a TLorentzVector object with px = 100, py = 0, pz = 0, E = 100 TLorentzVector newVec = vec.Boost(0.5,0,0); // boost to a new frame where the velocity along the x-axis is v = 0.5c
TLorentzVector vec(50, 50, 50, 200); // create a TLorentzVector object with px = 50, py = 50, pz = 50, E = 200 TLorentzVector newVec = vec.BoostVector(); // determine the four-velocity and boost to new frame with v = new_vec/cIn this example, we create a TLorentzVector object with specific values for its components. Then, we use the BoostVector function to determine the four-velocity of the vector, and then boost it to a new frame of reference with the velocity equal to this four-velocity divided by the speed of light. Overall, the TLorentzVector Boost function is a powerful tool for working with Lorentz vectors in C++. It can be used to transform a vector to a new frame of reference and allows for calculations involving relativistic motion.