# Boosting e- to Z-boson rest frame using TLorentzVector

**URL:** <https://root-forum.cern.ch/t/boosting-e-to-z-boson-rest-frame-using-tlorentzvector/63208>\
**Category:** Newbie\
**Tags:** python, root\
**Created:** [March 25, 2025, 1:23pm UTC](https://root-forum.cern.ch/t/boosting-e-to-z-boson-rest-frame-using-tlorentzvector/63208 "2025-03-25T13:23:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_G](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/chris_g/32/38654_2.png) [@Chris\_G](https://root-forum.cern.ch/u/Chris_G)\
**Post date:** [March 25, 2025, 1:23pm UTC](https://root-forum.cern.ch/t/boosting-e-to-z-boson-rest-frame-using-tlorentzvector/63208/1 "2025-03-25T13:23:15Z")

</div>

Hi,

I am trying to boost my electron to the rest frame of the Z-boson. I am doing this in python using uproot and ROOT.TLorentzVector. My problem is that the code works when I boost the particle to its own rest frame, but not when I boost to a different particles rest frame. A perspective would be greatly appreciated.

```auto
# Boost electron to Z rest frame
electron = ROOT.TLorentzVector(e_px, e_py, e_pz, e_E) # lab frame values
Z_boson = ROOT.TLorentzVector(Z_px, Z_py, Z_pz, Z_E) # lab frame values

electron_boosted = ROOT.TLorentzVector(electron) # Copy the electron vector
electron_boosted.Boost(-Z_boson.BoostVector()) # Boost to Z rest frame

# Get the boosted electron's momentum components
e_px_rest = electron_boosted.Px()
e_py_rest = electron_boosted.Py()
e_pz_rest = electron_boosted.Pz()

```

Here is a comparison of the maximum values from the e- and Z in the lab frame vs boosted frame.

- max e lab 2712
- max Z lab 3381
- max e boosted 60658

This is clearly incorrect as the electron is being boosted to 60 TeV, when it should be around the same order of magnitude as the Z boson.

_ROOT Version:_ 6-30-02  
_Python Version:_ 3.9.12  
_Platform:_ Mac

* * *

---

<div class="post-metadata">

**Author:** ![mdessole](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mdessole/32/34021_2.png) [@mdessole](https://root-forum.cern.ch/u/mdessole)\
**Post date:** [March 25, 2025, 2:17pm UTC](https://root-forum.cern.ch/t/boosting-e-to-z-boson-rest-frame-using-tlorentzvector/63208/2 "2025-03-25T14:17:14Z")

</div>

Hi @Chris_G,

thanks for reaching out!

[TLorentzVector](https://root.cern/doc/master/classTLorentzVector.html) is legacy code, do you still encounter this inconsistency when using the [modern interface](https://root.cern/doc/v632/classROOT_1_1Math_1_1LorentzVector.html)?

Cheers,  
Monica

---

<div class="post-metadata">

**Author:** ![Chris\_G](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/chris_g/32/38654_2.png) [@Chris\_G](https://root-forum.cern.ch/u/Chris_G)\
**Post date:** [March 25, 2025, 2:32pm UTC](https://root-forum.cern.ch/t/boosting-e-to-z-boson-rest-frame-using-tlorentzvector/63208/3 "2025-03-25T14:32:22Z")

</div>

Hi @mdessole

Thank you for your response! I did not know TLorentzVector is a legacy code, so I will try with the modern interface.

Many thanks!
