//
Double_t dx = x-fX[index];
Double_t dxc = fX[index+1]-fX[index];
+ if (dxc<=0) return fY0[index];
Double_t y0 = fY0[index];
Double_t y1 = fY1[index];
Double_t y01 = fY0[index+1];
TGraph * graph = fGraph;
if (nder>1) nder=2;
Int_t nknots = fN;
+ if (nknots < 2 ) return;
Int_t npoints = graph->GetN();
+ if (npoints < fMinPoints ) return;
//
//
// spline fit
-void AliSplineFit::MakeSmooth(TGraph * graph, Float_t ratio, char * type){
+void AliSplineFit::MakeSmooth(TGraph * graph, Float_t ratio, Option_t * type){
//
// Interface to GraphSmooth
//
// deletes extra information to reduce amount of information stored on the data
// base
- delete fGraph; fGraph=0;
+ // delete fGraph; fGraph=0; // Don't delete fGraph -- input parameter
delete fParams; fParams=0;
delete fCovars; fCovars=0;
delete [] fIndex; fIndex=0;
// enter graph points directly to fit parameters
// (to bee used when too few points are available)
//
- fN = fGraph->GetN();
+ fN = fGraph->GetN();
fX = new Double_t[fN];
fY0 = new Double_t[fN];
fY1 = new Double_t[fN];
for (Int_t i=0; i<fN; i++ ) {
fX[i] = fGraph->GetX()[i];
- fY0[i] = fGraph->GetY()[i];
+ fY0[i] = fGraph->GetY()[i];
fY1[i] = 0;
}
}