Skip to content

Commit

Permalink
twek creation fo variablees
Browse files Browse the repository at this point in the history
  • Loading branch information
VanyaBelyaev committed Feb 20, 2024
1 parent 33e9ba3 commit bb0aada
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions ostap/fitting/pyselectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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 ) )

Expand Down

0 comments on commit bb0aada

Please sign in to comment.