Belle II Software  release-08-01-10
Fitter.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 //-----------------------------------------------------------------------------
10 // Description : A class to fit a TTrackBase object.
11 //-----------------------------------------------------------------------------
12 
13 #ifndef TRGCDCFITTER_FLAG_
14 #define TRGCDCFITTER_FLAG_
15 
16 #include <string>
17 
18 namespace Belle2 {
24  class TRGCDCTrackBase;
25 
26 #ifdef TRGCDC_SHORT_NAMES
27 #define TCFitter TRGCDCFitter
28 #endif
29 
31 #define TRGCDCFitAlreadyFitted 1;
33 #define TRGCDCFitErrorFewHits -1;
35 #define TRGCDCFitFailed -2;
37 #define TRGCDCFitUnavailable -3;
38 
40  class TRGCDCFitter {
41 
42  public:
44  TRGCDCFitter(const std::string& name);
45 
47  virtual ~TRGCDCFitter();
48 
49  public:// Selectors
51  const std::string& name(void) const;
53  void dump(const std::string& message = std::string(""),
54  const std::string& prefix = std::string("")) const;
55 
56  public:
58  virtual int fit(TRGCDCTrackBase&) const = 0;
59 
60  protected:
62  void fitDone(TRGCDCTrackBase&) const;
63 
64  private:
66  std::string _name;
67  };
68 
69 //-----------------------------------------------------------------------------
70 
71 #ifdef TRASAN_NO_INLINE
72 #define inline
73 #else
74 #undef inline
75 #define TFITTER_INLINE_DEFINE_HERE
76 #endif
77 
78 #ifdef TFITTER_INLINE_DEFINE_HERE
79 
80  inline
81  const std::string&
82  TRGCDCFitter::name(void) const
83  {
84  return _name;
85  }
86 
87 #endif
88 
89 #undef inline
90 
92 } // namespace Belle2
93 
94 #endif /* TRGCDCFITTER_FLAG_ */
A class to fit a TRGCDCTrackBase object.
Definition: Fitter.h:40
virtual int fit(TRGCDCTrackBase &) const =0
Fit functions.
std::string _name
name
Definition: Fitter.h:66
A class to represent a track object in TRGCDC.
Definition: TrackBase.h:40
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dump debug info
Definition: Fitter.cc:39
virtual ~TRGCDCFitter()
Destructor.
Definition: Fitter.cc:28
const std::string & name(void) const
returns name.
Definition: Fitter.h:82
void fitDone(TRGCDCTrackBase &) const
sets the fitted flag. (Bad implementation)
Definition: Fitter.cc:33
TRGCDCFitter(const std::string &name)
Constructor.
Definition: Fitter.cc:24
Abstract base class for different kinds of events.