Fitting exponential decays

Hi,

I have an ntuple which contains -ve voltages as a function of time. Its the output from a PMT.

I am trying to fit an exponential decay to the pulse shape over around 5 bins each of the same size in time. Perhaps for 3 or 4 pulses.

I then want to try to fit this shape to every pulse in the ntuple as some pulses have been saturated and it would be nice to try to construct the height from the tail shape.

I am wondering if there exists any example of doing anything similar to this.

I tried fitting an exponential to the range of the pulse but it didn’t seem to work correctly. I tried:

TFile f1(“target_20061102_225112.root”)
f1.GetObject(“LeCroy61 channel 3”,histo)
TH1F* histo;
histo->Fit(“expo”,“R”,"",8.64320E-3,8.64324E-3);

The curve it draws is an almost straight line over the correct range, it doesn’t fit an exponential decay:

root [8] histo->Fit(“expo”,“R”,"",8.64320E-3,8.64324E-3);
FCN=0.79341 FROM MIGRAD STATUS=CONVERGED 64 CALLS 65 TOTAL
EDM=2.10598e-12 STRATEGY= 1 ERR MATRIX NOT POS-DEF
EXT PARAMETER APPROXIMATE STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 Constant -2.72050e+01 4.97564e+05 3.71605e+00 6.19786e-12
2 Slope -7.92264e+01 1.93575e+07 8.28359e+02 5.33688e-14
: created default TCanvas with name c1
root [9] .q

Thanks,

Kenny

Could you send a short running script and also the input file?

Rene