Problem in fitting (in function!)

You do NOT need to replace ROOT 5 with ROOT 6.
You can have MULTIPLE (different) ROOT versions installed SIMULTANEOUSLY in different directories (and easily switch between them).