# TGenPhaseSpace decay: why outcome depends on the order of Lorentzvectors defined

**URL:** <https://root-forum.cern.ch/t/tgenphasespace-decay-why-outcome-depends-on-the-order-of-lorentzvectors-defined/59492>\
**Category:** Newbie\
**Tags:** root\
**Created:** [May 28, 2024, 11:54am UTC](https://root-forum.cern.ch/t/tgenphasespace-decay-why-outcome-depends-on-the-order-of-lorentzvectors-defined/59492 "2024-05-28T11:54:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![santuroot](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/7993a0/32.png) [@santuroot](https://root-forum.cern.ch/u/santuroot)\
**Post date:** [May 28, 2024, 11:54am UTC](https://root-forum.cern.ch/t/tgenphasespace-decay-why-outcome-depends-on-the-order-of-lorentzvectors-defined/59492/1 "2024-05-28T11:54:01Z")

</div>

I am using the class TGenPhaseSpace for a 3 body decay of 7Li. Here the energy spectra obtained for decay particles should not depend on the order at which I am defining the corresponding Lorentzvectors. However, I am seeing a difference in the energy spectra when I’m changing the order. For example, the following are the lines from my code where the order is first N1, then D1 and then A2.

```auto
TLorentzVector Li7(0.0,0.0,0.0,m7li+Ex2);
Double_t m1[3] = {mn, md, ma};
TGenPhaseSpace A2D1N1;

A2D1N1.SetDecay(Li7,3,m1);
A2D1N1.Generate(); //--------------------- n+d+alpha decay of 7Li ************
TLorentzVector *N1 = A2D1N1.GetDecay(0);
TLorentzVector *D1 = A2D1N1.GetDecay(1);
TLorentzVector *A2 = A2D1N1.GetDecay(2);
Using this I'm getting an energy output for N1.
Now if I change it to say D1, then N1 and then A2 then the code will be:
TLorentzVector Li7(0.0,0.0,0.0,m7li+Ex2);
Double_t m1[3] = {md, mn, ma};
TGenPhaseSpace A2D1N1;

A2D1N1.SetDecay(Li7,3,m1);
A2D1N1.Generate(); //--------------------- n+d+alpha decay of 7Li ************
TLorentzVector *D1 = A2D1N1.GetDecay(0);
TLorentzVector *N1 = A2D1N1.GetDecay(1);
TLorentzVector *A2 = A2D1N1.GetDecay(2);

```

The output for this should be same as the earlier as the decay happens simultaneously. But I’m getting different results. Can anyone help what’s happening here?

* * *

_ROOT Version:_ 6.2  
_Platform:_ Ubuntu

* * *

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [May 28, 2024, 12:05pm UTC](https://root-forum.cern.ch/t/tgenphasespace-decay-why-outcome-depends-on-the-order-of-lorentzvectors-defined/59492/2 "2024-05-28T12:05:03Z")

</div>

Welcome to the ROOT Forum!  
Maybe @moneta can help

---

<div class="post-metadata">

**Author:** ![santuroot](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/7993a0/32.png) [@santuroot](https://root-forum.cern.ch/u/santuroot)\
**Post date:** [May 29, 2024, 12:47pm UTC](https://root-forum.cern.ch/t/tgenphasespace-decay-why-outcome-depends-on-the-order-of-lorentzvectors-defined/59492/3 "2024-05-29T12:47:17Z")

</div>

Thanks.please help.

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [May 29, 2024, 2:06pm UTC](https://root-forum.cern.ch/t/tgenphasespace-decay-why-outcome-depends-on-the-order-of-lorentzvectors-defined/59492/4 "2024-05-29T14:06:04Z")

</div>

Let’s ping @moneta again…
