Refining ROOT trees