Move variables to limited scope in GlobalChi2Fitter
This creates the variables only in the scope they are used in, reducing mental load with branching.
This creates the variables only in the scope they are used in, reducing mental load with branching.