00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TROBUSTLINEFITTER_FLAG_
00014 #define TROBUSTLINEFITTER_FLAG_
00015
00016 #ifdef TRKRECO_DEBUG_DETAIL
00017 #ifndef TRKRECO_DEBUG
00018 #define TRKRECO_DEBUG
00019 #endif
00020 #endif
00021
00022 #include <string>
00023
00024 #define HEP_SHORT_NAMES
00025 #include "TrkReco/TLineFitter.h"
00026
00028 class TRobustLineFitter : public TLineFitter {
00029
00030 public:
00032 TRobustLineFitter(const std::string & name);
00033
00035 virtual ~TRobustLineFitter();
00036
00037 public:
00039 void dump(const std::string & message = std::string(""),
00040 const std::string & prefix = std::string("")) const;
00041 double a(void) const;
00042 double b(void) const;
00043 double det(void) const;
00044
00045 public:
00046 virtual int fit(TTrackBase &) const;
00047
00048 private:
00049 double rofunc(const TTrackBase &, double) const;
00050 double select(unsigned k, unsigned n, double *) const;
00051
00052 private:
00053 mutable double _a;
00054 mutable double _b;
00055 mutable double _det;
00056 mutable unsigned _n;
00057 };
00058
00059
00060
00061 #ifdef TRKRECO_NO_INLINE
00062 #define inline
00063 #else
00064 #undef inline
00065 #define TROBUSTLINEFITTER_INLINE_DEFINE_HERE
00066 #endif
00067
00068 #ifdef TROBUSTLINEFITTER_INLINE_DEFINE_HERE
00069
00070 inline
00071 double
00072 TRobustLineFitter::a(void) const {
00073 return _a;
00074 }
00075
00076 inline
00077 double
00078 TRobustLineFitter::b(void) const {
00079 return _b;
00080 }
00081
00082 inline
00083 double
00084 TRobustLineFitter::det(void) const {
00085 return _det;
00086 }
00087
00088 #endif
00089
00090 #undef inline
00091
00092 #endif