TLorentzVector in TTree: difference between fE and E()

Hi,

I have a ROOT file (attached, size is 15Kb) with a TTree (1 entry only).

Now I run TTree::Scan() command on a TLorentzVector variable ‘lv_K’:

root [1] Dtree.Scan("lv_K.E():lv_K.fE")            
***********************************************
*    Row   * Instance *  lv_K.E() *   lv_K.fE *
***********************************************
*        0 *        0 * 52.616071 * 36.029923 *
*        0 *        1 *         0 * 36.029923 *
***********************************************

And now come the questions…

  1. Why there are two lines from the printout (with “Instance” 0 and 1)?
  2. The ‘correct’ value for ‘lv_K.fE’ is 36.0299 (which is also displayed by Dtree.Show(0). So why lv_K.E() reports the different numbers?

Thanks in advance,
Alexander.
Dmeson.root (14.7 KB)

Hi,

I can reproduce the problem. You can work around the problem (at the time of writing the TTree) by adding a trailing ‘.’ at the end of the top level branch name.

Cheers,
Philippe.

The problem is still present in the ROOT

Version 5.26/00 14 December 2009

:frowning:

Hi,

Indeed, We have not yet solved the problem :frowning:. I hope to get to it within the next 3 weeks.

Cheers,
Philippe.