# A Missing transverse momentum azimuthial angle

1. May 15, 2017

### ChrisVer

A pretty straightforward question because right now I can't think how it works:
The missing transverse momentum azimuthial angle (φ) is calculated by measuring the x- and y- components of the missing transverse momentum $E_x,E_y$ and taking:
$\phi^{miss} = arctan(E_y/E_x)$
https://cds.cern.ch/record/2037904/files/ATL-PHYS-PUB-2015-027.pdf (equation 3)

So if that's the final formula, then the $\phi^{miss} \in [- \pi/2, \pi/2]$...
how is it possible to span the whole range, $\phi^{miss} \in [-\pi, \pi]$ ?
wouldn't there have to be a case when $E_x<0$ to take an alternative formula?

2. May 15, 2017

### Staff: Mentor

You have to take the signs into account. ATan2(x,y) in TMath (and similar functions in other libraries) take care of that.

3. May 15, 2017

### BvU

So how come this respectable collaboration doesn't mention such a simple thing ?

4. May 15, 2017

### ChrisVer

Sometimes jargon or "common sense" passes through papers or notes I guess... I guess everyone is used in this convention for such formulae for the azimuthial angle, while in real a different (yet similar one) is used.

5. May 15, 2017

### Staff: Mentor

It is something every particle physicist has to learn exactly once. Nearly all readers will know it, and reading the same description of both cases in every paper gets annoying quickly, so it might get skipped sometimes, especially in more technical notes.

6. May 15, 2017

### BvU

How much trouble is it to write (or read) $\ \operatorname{atan2}(E_y, E_x) \$ instead of $\ \arctan {E_y/ E_x} \$ ?

It wrong-footed Chris !

7. May 15, 2017

### Staff: Mentor

atan2 is not a standard mathematical function.
C++ (and various other languages) and ROOT know what it is, however.

I don't say the note made the optimal presentation, but writing atan2 would be even worse I think.

8. May 15, 2017

### BvU

Granted. The way it's written now is simply wrong -- what's the bigger crime ?

9. May 16, 2017

### ChrisVer

In a previous paper (from run1) they had written arctan(Ey,Ex) ... that made it more clear... but even better was the fact that I could retrieve the missing ET phi straight from my truth derivation by asking for it instead of calculating it (math.h atan was more misleading there)...
Then there is also this seasonal thing that under heavy stress I cannot think properly

10. May 16, 2017

### BvU

Lucky you ! I have it all year round !

11. May 16, 2017

### vanhees71

Well, you are obviously a Fortran guy, as I am myself (I'm getting old...). Anyway, the troupbe with atan2 is that it is not uniquely defined. In some programming languages it's $\mathrm{atan2}(E_x,E_y)$.

I'll never forget this function, because I once used the infopage of gfortran (I don't remember the version number), and there they gave the wrong definition, i.e., the latter way, while in gfortran it is, of course defined in the fortran way with the order $\mathrm{atan2}(E_y,E_x)$. It took me quite a while to debug this :-(.

A nice definition is
$$\phi=\mathrm{sign}E_y \arccos \left(\frac{E_x}{\sqrt{E_x^2+E_y^2}} \right ) \in (-\pi,\pi].$$