Hello,

I have a very general question regarding the calculation of a transverse mass. I have a MC data .root file from a ttbar->WbWb->lepton,neutrino,2jets decay. Lets say I wanted to calculate the transverse mass of the one W boson decaying to an electron and a neutrino. I now have the float arrays of the transverse momentum of the electron and the neutrino to calculate transverse mass via a given formula.

Now my question: What if the arrays are of different lengths/have different amount of entries? I get a mass for every pair of momentum of the leptons but what if there are more statistics in one than the other? (say 1000 entries for electron transverse momentum and 3000 for neutrino transverse momentum.) This is kind of the code I have so far, I just started using ROOT a week ago. This is in the .C file in the “Process” section corresponding to the .h file created by TSelector().

```
for (Float_t elphi : el_phi) {
for (Float_t elpt : el_pt){
TLorentzVector P_elec;
TLorentzVector P_neut;
// Set TLorentzVector values
P_elec.SetPtEtaPhiM(elpt, 0, elphi, 0);
P_neut.SetPtEtaPhiM(*met_met, 0, *met_phi, 0);
// Calculate transverse mass
Double_t W_transverse_mass = (P_elec + P_neut).Mt();
// Output the transverse mass
hist->Fill(W_transverse_mass);
}
}
```

el_pt and el_phi are TTreeReaderArray while met_met and met_phi are TTreeReaderValue<Float_t>.

In the code met_met is kind of the transverse momentum of the neutrino and phi the azimutal angle to calculate transverse mass.

Ive been having some trouble so hopefully someone can help me out. Thanks alot!