Transverse mass calculaton with TLorentzVector gives wrong results

Hi all,
I have the following question: Why does the .Mt() value from TLorentzVector give me a different result for the mass distribution of the W boson than the known short formula for 2 leptons? The formula gives me a peak at around 80 GeV which is correct, but the value from the TLorentzVector gives me a peak at around 130 GeV. This is the code I have:

   int n_el = el_pt.GetSize();
   for (int i=0; i < n_el; i++){
		if(el_pt[i]/1000 > 27 && *met_met/1000 > 30){	     
   		TLorentzVector P_elec;
		 TLorentzVector P_neut;
                 P_elec.SetPtEtaPhiM(el_pt[i]/1000, el_eta[i], el_phi[i], 0);         //pt in GeV
      	         P_neut.SetPtEtaPhiM(*met_met/1000, 0, *met_phi, 0);  

                //Calculation of W_mT
                Double_t deltaPhi = TMath::Abs(el_phi[i] - *met_phi); 
                Double_t CosdeltaPhi = TMath::Cos(deltaPhi);

                 Double_t W_mT _1= TMath::Sqrt(2.0 * el_pt[i]/1000 * (*met_met)/1000 * (1.0 - CosdeltaPhi));  
		 Double_t W_mT_2 = (P_elec + P_neut).Mt();


Hi @helton ,

Maybe @moneta has a clue about this.


You are referring to 2 different definitions, see for example: Transverse mass - Wikipedia

TLorentzVector and the recomended to use ROOT::Math::LorentzVector returns as Mt the transverse mass of a particle defined as sqrt(M2 + Pt2), and it is always greater than M, while the other formula computes the transverse mass of a 2 -particle system, which is a different definition as shown in the linked Wikipedia article.

Best regards,


Hi Lorenzo,

I see, thanks for the clarification. Since only the second formula gives me the “right” result (aka the right mass) I wonder; If I wanted to calculate the transverse mass where say a lepton, neutrino and a jet or so are involved, so in total 3 “particles”, I cant really analytically calculate a formula like in the 2 particle case. What do I do then?


The second formula is used when you have invisible decays (e.g. W decays) and you have then a quantity that is sensible to the mass of the original particle (W). I guess you can probably build a similar formula in case of a 3 body decays, but I don’t know the analytical form/



When I try to use LorentzVector instead of TLorentzVector I get a weird error in the header files that it cant find for example #include <Math/Vector4D.h> or Math/GenVector/PxPyPzE4D.h’. Are these outdated headers?

I am using ROOT 6.24/08 on a analysis facility for ATLAS so it should be setup correctly


This is strange, the headers should be installed as the other ROOT headers. How are you building the code ?


Not sure if I understand the question. But I made a file with MakeSelector(). But doesnt matter if I add it in the .h or the .C file it doesnt seem to find it.


Nut how are you compiling the code made from MakeSelector() ? Or are you using the code directly from the ROOT prompt ? In this last case you don’t need to add any include files


I just save the .C file and run it with ->Process(… .C) from the prompt


Ah I see, this is an old way to process a TTree. But what is happening if you are just doing at the ROOT prompt:

root [1]  #include "Math/Vector4D.h"



even when I do that it gives me: ROOT_prompt_3:1:10: fatal error: ‘Math/Vector4D.h’ file not found
#include “Math/Vector4D.h”

Strange, which ROOT version are you using ?

I am using ROOT 6.24/08