BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
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 : [email protected]
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
36 public:
37 /// Constructor.
38 TMFitter(const std::string & name);
39
40 /// Destructor
41 virtual ~TMFitter();
42
43 public:// 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
49 public:// Fit functions.
50 virtual int fit(TTrackBase &) const = 0;
51
52 protected:
53 /// sets the fitted flag. (Bad implementation)
54 void fitDone(TTrackBase &) const;
55
56 private:
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
72const std::string &
73TMFitter::name(void) const {
74 return _name;
75}
76
77#endif
78
79#undef inline
80
81#endif /* TMFITTER_FLAG_ */
A class to fit a TTrackBase object.
Definition: TMFitter.h:34
const std::string & name(void) const
returns name.
Definition: TMFitter.h:73
virtual int fit(TTrackBase &) const =0
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
Definition: TMFitter.cxx:29
virtual ~TMFitter()
Destructor.
Definition: TMFitter.cxx:20
void fitDone(TTrackBase &) const
sets the fitted flag. (Bad implementation)
Definition: TMFitter.cxx:24
A virtual class for a track class in tracking.
Definition: TTrackBase.h:46
A class to represent a track in tracking.
Definition: TTrack.h:129