Hello ROOTers

I am trying to make a one dim histo with logarithmic bins:

short NumberofBins = 100;

float X[NumberOfBins+1];

float Xlow(1.e-1), Xhigh(1.e5);

float BinSize = (log10(Xhigh) - log10(Xlow))/NumberOfBins;

for(short i = 0; i < NumberOfBins; i++)

{

X[i] = Xlow*pow(10, BinSize*i);

}

TH1F *h = new TH1F(“Histname”, “Title”, NumberOfBins, X);

But when I define histo with normal bins:

TH1F *h = new TH1F(“Histname”, “Title”, 10000, 0, 10000); //with the bin size = 1. and try to fit the data set with power law function. So it gives me a slope value around -2.7.

But when I tried to fit the logarithmic bin histo with the same power law function then it gives me a slope parameter value of -1.7. I don’t know how the data slope is getting modified. Please help.

Kind Regards