Fitting exponentially

Hello ROOTers,

I want to fit the curve exponentially.
I tried this

TF1 *f1 =new TF1(“f1”,“expo(0)”,0,20);
g1->Fit(f1,“R”);

but not got what I really want?

What will be the correct code???

Thanks,
Summit
att2.root (14.6 KB)

Your distribution is certainly not an exponential distribution. You better fit it with a “pol2” or “pol3”

Rene