Added one parameter to function Fit, to avoid searching objects via gROOT