I have two programs (code below) which virtually do the same things excepted the sorting principal is different. The programs take a root file that contains a TTree I made which has histograms of different variables. I then use:
TH1D* workingHist = (TH1D*) myTree->Get(histName);
I then draw the histograms to the default canvas. The first program draws the histogram in the “HIST” style without being prompted, and the second draws with the error bars unless you use the Draw(“HIST”) option.
Can you explain this discrepancy?
The code is attached (although perhaps in comprehensible) below. BinSorter_2018Feb8.C is program 1 and BinSorter_FC.C is program 2.
BinSorter_FC.C (10.4 KB)
BinSorter_2018Feb8.C (10.7 KB)
_ROOT Version: 6
_Platform: Linux
_Compiler: Whatever Fermilab has