BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/TrkReco/include/TrkReco/TRobustLineFitter.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// $Id: TRobustLineFitter.h,v 1.4 2010/03/31 09:58:59 liucy Exp $
3//-----------------------------------------------------------------------------
4// Filename : TRobustLineFitter.h
5// Section : Tracking
6// Owner : Yoshi Iwasaki
7// Email : yoshihito.iwasaki@kek.jp
8//-----------------------------------------------------------------------------
9// Description : A class to fit a TTrackBase object to a line.
10// See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
11//-----------------------------------------------------------------------------
12
13#ifndef TROBUSTLINEFITTER_FLAG_
14#define TROBUSTLINEFITTER_FLAG_
15
16#ifdef TRKRECO_DEBUG_DETAIL
17# ifndef TRKRECO_DEBUG
18# define TRKRECO_DEBUG
19# endif
20#endif
21
22#include <string>
23
24// #define HEP_SHORT_NAMES
25#include "TrkReco/TLineFitter.h"
26
27/// A class to fit a TTrackBase object to a line.
28class TRobustLineFitter : public TLineFitter {
29
30public:
31 /// Constructor.
32 TRobustLineFitter( const std::string& name );
33
34 /// Destructor
36
37public: // Selectors
38 /// dumps debug information.
39 void dump( const std::string& message = std::string( "" ),
40 const std::string& prefix = std::string( "" ) ) const;
41 double a( void ) const;
42 double b( void ) const;
43 double det( void ) const;
44
45public: // Modifiers
46 virtual int fit( TTrackBase& ) const;
47
48private:
49 double rofunc( const TTrackBase&, double ) const;
50 double select( unsigned k, unsigned n, double* ) const;
51
52private:
53 mutable double _a;
54 mutable double _b;
55 mutable double _det;
56 mutable unsigned _n;
57};
58
59//-----------------------------------------------------------------------------
60
61#ifdef TRKRECO_NO_INLINE
62# define inline
63#else
64# undef inline
65# define TROBUSTLINEFITTER_INLINE_DEFINE_HERE
66#endif
67
68#ifdef TROBUSTLINEFITTER_INLINE_DEFINE_HERE
69
70inline double TRobustLineFitter::a( void ) const { return _a; }
71
72inline double TRobustLineFitter::b( void ) const { return _b; }
73
74inline double TRobustLineFitter::det( void ) const { return _det; }
75
76#endif
77
78#undef inline
79
80#endif /* TROBUSTLINEFITTER_FLAG_ */
const Int_t n
A class to fit a TTrackBase object to a line.
const std::string & name(void) const
returns name.
double a(void) const
virtual ~TRobustLineFitter()
Destructor.
virtual int fit(TTrackBase &) const
double b(void) const
TRobustLineFitter(const std::string &name)
Constructor.
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
double det(void) const
A virtual class for a track class in tracking.