TTreeFormula
TTreeFormula is a class in the ROOT data analysis framework that provides a lightweight expression engine for data stored in a TTree or TChain. It parses a user-supplied formula and evaluates it against the values of tree branches. The primary use is to compute derived variables or to specify event selections without writing explicit C++ code for every entry.
The expression language supports standard arithmetic operators (+, -, *, /, %), logical and relational operators, and a variety of mathematical
Usage typically involves constructing a TTreeFormula with a formula string and a TTree or TChain, then evaluating
Performance considerations: TTreeFormula is interpreted rather than compiled, so it may be slower than hand-written code,