Added extra run option "RunSpecCal2" so that new calibration method can be implemented without disturbing the working code from the existing method.
Getting messy quick.
New files CalibTools2.[C,h] hosting the new fit function.  Will probably integrate later but working like this for now.
Basic plan laid out in comments for simultaneous fitting of all peaks with global gain/offset and local height,sigma, background.
ROOT headers included for required functions. Objects declared.  Still compiling.  Onward...
Some more of the functionality for simultaneous multi-peak fitting added.
Improved naming of new fit functions.
Added basic outline of GlobalChi2 class.
Merge branch 'master' into SegCalib
More work on new fitting routines.
Merge branch 'master' into SegCalib
Merge branch 'master' into SegCalib
Updated compile instructions.
Merge branch 'master' into SegCalib
Added 2D matrices to Calib() output.  They plot Seg charge vs core charge for each segment and will be used to piggy back seg calibration on core calibration.
Added CHARGE_BINS2D to Config.txt and code to read it back in Options.C:ReadConfigFile().
Added item to Config struct to control if 2D Seg-Core charge spectra will be generated by Calib().
Added timing output to record how long was spent on initialisation.
Commented line in CalibTools2.C:FitGammaSpectrumGlobalMulti() because it causes compilation fail on SLinux.
Will come back and look at this later but for now needed to get it running to test other work.
Added CloverSegFold=1 filter to Core-Seg charge matrices.
Better timing on SortHistos.
Fixed bug in Calib() seg fold calculation.
- Removed code for simulataneous fit of all peaks (CalibTools2) as it was not working and don't have time to fix it now.
- 2D Core-Seg Charge spectra left in and will be used to calibrate segments.
- Other minor changes left in.