Fixing memory leaks. Using TMath functions instead of TF1

No match.