Belle II Software  release-05-02-19
Fitter.h
1 //-----------------------------------------------------------------------------
2 // $Id$
3 //-----------------------------------------------------------------------------
4 // Filename : Fitter.h
5 // Section : TRG CDC
6 // Owner : Yoshihito Iwasaki
7 // Email : yoshihito.iwasaki@kek.jp
8 //-----------------------------------------------------------------------------
9 // Description : A class to fit a TTrackBase object.
10 //-----------------------------------------------------------------------------
11 // $Log$
12 //-----------------------------------------------------------------------------
13 
14 #ifndef TRGCDCFITTER_FLAG_
15 #define TRGCDCFITTER_FLAG_
16 
17 #include <string>
18 
19 namespace Belle2 {
25  class TRGCDCTrackBase;
26 
27 #ifdef TRGCDC_SHORT_NAMES
28 #define TCFitter TRGCDCFitter
29 #endif
30 
32 #define TRGCDCFitAlreadyFitted 1;
33 #define TRGCDCFitErrorFewHits -1;
35 #define TRGCDCFitFailed -2;
37 #define TRGCDCFitUnavailable -3;
39 
41  class TRGCDCFitter {
42 
43  public:
45  TRGCDCFitter(const std::string& name);
46 
48  virtual ~TRGCDCFitter();
49 
50  public:// Selectors
52  const std::string& name(void) const;
54  void dump(const std::string& message = std::string(""),
55  const std::string& prefix = std::string("")) const;
56 
57  public:
59  virtual int fit(TRGCDCTrackBase&) const = 0;
60 
61  protected:
63  void fitDone(TRGCDCTrackBase&) const;
64 
65  private:
67  std::string _name;
68  };
69 
70 //-----------------------------------------------------------------------------
71 
72 #ifdef TRASAN_NO_INLINE
73 #define inline
74 #else
75 #undef inline
76 #define TFITTER_INLINE_DEFINE_HERE
77 #endif
78 
79 #ifdef TFITTER_INLINE_DEFINE_HERE
80 
81  inline
82  const std::string&
83  TRGCDCFitter::name(void) const
84  {
85  return _name;
86  }
87 
88 #endif
89 
90 #undef inline
91 
93 } // namespace Belle2
94 
95 #endif /* TRGCDCFITTER_FLAG_ */
Belle2::TRGCDCFitter::dump
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dump debug info
Definition: Fitter.cc:40
Belle2::TRGCDCFitter::~TRGCDCFitter
virtual ~TRGCDCFitter()
Destructor.
Definition: Fitter.cc:29
Belle2::TRGCDCFitter
A class to fit a TRGCDCTrackBase object.
Definition: Fitter.h:41
Belle2::TRGCDCFitter::_name
std::string _name
name
Definition: Fitter.h:67
Belle2::TRGCDCFitter::name
const std::string & name(void) const
returns name.
Definition: Fitter.h:83
Belle2::TRGCDCFitter::TRGCDCFitter
TRGCDCFitter(const std::string &name)
Constructor.
Definition: Fitter.cc:25
Belle2::TRGCDCFitter::fitDone
void fitDone(TRGCDCTrackBase &) const
sets the fitted flag. (Bad implementation)
Definition: Fitter.cc:34
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TRGCDCTrackBase
A class to represent a track object in TRGCDC.
Definition: TrackBase.h:41
Belle2::TRGCDCFitter::fit
virtual int fit(TRGCDCTrackBase &) const =0
Fit functions.