# 4vector transformation

**URL:** <https://root-forum.cern.ch/t/4vector-transformation/50772>\
**Category:** Newbie\
**Created:** [July 12, 2022, 3:06pm UTC](https://root-forum.cern.ch/t/4vector-transformation/50772 "2022-07-12T15:06:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![psyduck](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/96bed5/32.png) [@psyduck](https://root-forum.cern.ch/u/psyduck)\
**Post date:** [July 12, 2022, 3:06pm UTC](https://root-forum.cern.ch/t/4vector-transformation/50772/1 "2022-07-12T15:06:03Z")

</div>

Hello!  
I am currently working on a decay of a moving particle and I want to transform the 4vector energy-momentum of the products, to the frame of reference of the mother particle. My TLorentzVector is defined with Set.PxPyPzE and I cannot use the boost function as it only applies to coordinates. Is there another way to do the transformation? Thank you!

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [July 12, 2022, 3:48pm UTC](https://root-forum.cern.ch/t/4vector-transformation/50772/2 "2022-07-12T15:48:48Z")

</div>

What’s wrong with this (see the [TLorentzVector](https://root.cern/doc/master/classTLorentzVector.html) class reference):

```cpp
{
  Double_t Px = 1., Py = 2., Pz = 3., E = 4.; // M = std::sqrt(2.)
  TLorentzVector v;
  v.SetPxPyPzE(Px, Py, Pz, E); v.Print(); // same as SetXYZT(Px, Py, Pz, E)
  v.Boost(-Px / E, -Py / E, -Pz / E); v.Print(); // to the rest frame
  v.Boost(Px / E, Py / E, Pz / E); v.Print(); // back to the original frame
  v.Boost( 0.1, 0.2, 0.3); v.Print(); // beta = (+0.1, +0.2, +0.3)
  v.Boost(-0.1, -0.2, -0.3); v.Print(); // beta = (-0.1, -0.2, -0.3)
}

```

BTW. See also: [ROOT Reference Documentation → Functional Parts → Math → Physics Vectors](https://root.cern/doc/master/group__GenVector.html)
