// ESAF : Euso Simulation and Analysis Framework // $Id: MedianFit.hh,v 1.4 2005/06/14 14:56:04 pesce Exp $ // R. Pesce created Jan, 29 2004 /***************************************************************************** * ESAF: Euso Simulation and Analysis Framework * * * * Id: MedianFit * * Package: Fitting * * Coordinator: * * * *****************************************************************************/ #ifndef __MEDIANFIT_HH_ #define __MEDIANFIT_HH_ #include #include "euso.hh" //////////////////////////////////////////////////////////////////////////////// // // // MedianFit // // // // Implementation of the median fit for robust data analysis. // // See the "Numerical Recipes in C" for further details // // // //////////////////////////////////////////////////////////////////////////////// class MedianFit { public: // ctor MedianFit( Int_t numpoints, vector x, vector y ); // dtor virtual ~MedianFit(); // getters inline Double_t GetSlope() { return fSlope; } inline Double_t GetOffset() { return fOffset; } inline Double_t GetAbsoluteDeviation() { return fAbsoluteDeviation; } inline Int_t GetNumPoints() { return fNumPoints; } private: Int_t fNumPoints; vector fPointsX; vector fPointsY; Double_t fSlope; Double_t fOffset; Double_t fAbsoluteDeviation; // method of median fit void Do(); Double_t RoFunc( Double_t b ); Double_t Select( Int_t k, vector vec ); ClassDef(MedianFit,0) }; #endif /* __MEDIANFIT_HH_ */