I have a couple of hists where I want to fit a function. The hists are generated with a specific cut. This cut has some parameters. Now I want to optimize these cut-parameters with the help of the fitted function. Is there an easy way in root to do this?