From bb0aada7e6c82080bad47b1ea582d4ed51a4018a Mon Sep 17 00:00:00 2001 From: Vanya Belyaev Date: Tue, 20 Feb 2024 17:02:18 +0100 Subject: [PATCH] twek creation fo variablees --- ostap/fitting/pyselectors.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ostap/fitting/pyselectors.py b/ostap/fitting/pyselectors.py index a57f140e..e8260103 100644 --- a/ostap/fitting/pyselectors.py +++ b/ostap/fitting/pyselectors.py @@ -1862,8 +1862,11 @@ def make_dataset ( tree , from ostap.frames.frames import frame_progress pb = frame_progress ( frame , total ) - - columns = set ( tree.branches() ) | set ( tree.leaves() ) + + if ( 6,16 ) <= root_info : + columns = set ( frame_columns ( frame ) ) + else : + columns = set ( tree.branches() ) | set ( tree.leaves() ) scuts = [] limits = [] @@ -1885,8 +1888,11 @@ def make_dataset ( tree , if v.name == v.formula and v.name in columns : continue - ## define new variable - frame = frame.Define ( v.name , v.formula ) + ## define new variable + if ( 6 , 26 ) <=root_info and v.name in columns : + frame = frame.Redefine ( v.name , v.formula ) ## REDEFINE + else : + frame = frame.Define ( v.name , v.formula ) columns |= set ( frame_columns ( frame ) )