mETRx


The mETRx function is documented in the D0 note 3895.

mETRx is a software tool for recalculating missingET on an event by event basis, with respect to a user-supplied vertex. It uses calorimeter energies from the missingET block of an event root-tuple. The source code is available in the missingET package, in versions v00-01-01, or larger.

This root macro loops over all values of eta for the calorimeter and recalculates the missing energy for an event, with respect to a user-supplied vertex. The eta loops are saved in pairs in the Thumbnail, 42 rings from eta of -4.6 to 4.6. Steps are mostly of 0.2 in eta.

To call the function, for example:
Float_t new_met = 0;
new_met = mETRx( vertex, N_NRETEMx, N_NRETEMy, N_NRETHDx, N_NRETHDy );
For each event, energies are passed as 4 arrays with 42 members each:
N_NRETEMx[42], N_NRETEMy[42], N_NRETHDx[42], and N_NRETHDy[42]

"vertex" is a float which expresses the vertex in centimeters along the Z axis.
(You must specify positive or negative.)



Running the Function


The source code resides in $D0RUNII_DIR/missingET/mETRx/mETRx.hpp. To run it, it is necessary to include a line:
#include $D0RUNII_DIR/missingET/mETRx/mETRx.hpp in the header of your ROOT macro.

Also, in the $D0RUNII_DIR/missingET/mETRx/test directory, there is an example macro, example_mETRx_root_macro.C, and a small root file, 100_ttbar_events.root. The example file runs in the test area. It revertexes the missingET for a monte carlo file of 100 inclusive top events, to the primary event vertex. i.e., it calculates a missingET which should be identical to the missingET in the sample.

In the test directory, one could open a ROOT session, and issue the following commands:

Root > new TFile("100_ttbar_events.root");
Root > .L example_mETRx_root_macro.C;
Root > example_mETRx_macro t;
Root > t.Loop(); // Loop on all entries