BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/TrkReco/include/TrkReco/TMFitter.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// $Id: TMFitter.h,v 1.3 2010/03/31 09:58:59 liucy Exp $
3//-----------------------------------------------------------------------------
4// Filename : TMFitter.h
5// Section : Tracking
6// Owner : Yoshi Iwasaki
7// Email : yoshihito.iwasaki@kek.jp
8//-----------------------------------------------------------------------------
9// Description : A class to fit a TTrackBase object.
10// See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
11//-----------------------------------------------------------------------------
12
13#ifndef TMFITTER_FLAG_
14#define TMFITTER_FLAG_
15
16#ifdef TRKRECO_DEBUG_DETAIL
17# ifndef TRKRECO_DEBUG
18# define TRKRECO_DEBUG
19# endif
20#endif
21// #define HEP_SHORT_NAMES
22
23#include <string>
24
25class TTrackBase;
26class TTrack;
27
28#define TFitAlreadyFitted 1;
29#define TFitErrorFewHits -1;
30#define TFitFailed -2;
31#define TFitUnavailable -3;
32
33/// A class to fit a TTrackBase object.
34class TMFitter {
35
36public:
37 /// Constructor.
38 TMFitter( const std::string& name );
39
40 /// Destructor
41 virtual ~TMFitter();
42
43public: // Selectors
44 /// returns name.
45 const std::string& name( void ) const;
46 void dump( const std::string& message = std::string( "" ),
47 const std::string& prefix = std::string( "" ) ) const;
48
49public: // Fit functions.
50 virtual int fit( TTrackBase& ) const = 0;
51
52protected:
53 /// sets the fitted flag. (Bad implementation)
54 void fitDone( TTrackBase& ) const;
55
56private:
57 std::string _name;
58};
59
60//-----------------------------------------------------------------------------
61
62#ifdef TRKRECO_NO_INLINE
63# define inline
64#else
65# undef inline
66# define TMFITTER_INLINE_DEFINE_HERE
67#endif
68
69#ifdef TMFITTER_INLINE_DEFINE_HERE
70
71inline const std::string& TMFitter::name( void ) const { return _name; }
72
73#endif
74
75#undef inline
76
77#endif /* TMFITTER_FLAG_ */
const std::string & name(void) const
returns name.
virtual int fit(TTrackBase &) const =0
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
virtual ~TMFitter()
Destructor.
TMFitter(const std::string &name)
Constructor.
void fitDone(TTrackBase &) const
sets the fitted flag. (Bad implementation)
A virtual class for a track class in tracking.
A class to represent a track in tracking.