These scripts are designed to optimize linear cut selection using Minuit via the Root Migrad interface. Root Migrad was chosen because scipy is not available on kekcc, trying to use scipy via anaconda causes issues with pyROOT and requires a recompile. Recompile is not possible as it requires a c++11 compiler which I do not have permission to install on kekcc.
The current versions of the script function but the quality of the converged upon values are questionable. Instead of simultaneous optimisation it may be better to loop through all vars optimising one at a time (although from iteration based output it looks loke migrad already does this).