BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
TFinderBase.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// $Id: TFinderBase.h,v 1.4 2010/03/31 09:58:59 liucy Exp $
3//-----------------------------------------------------------------------------
4// Filename : TFinderBase.h
5// Section : Tracking
6// Owner : Yoshi Iwasaki
7// Email : [email protected]
8//-----------------------------------------------------------------------------
9// Description : A virtual class for a track finder in tracking.
10// See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
11//-----------------------------------------------------------------------------
12
13#ifndef TFinderBase_FLAG_
14#define TFinderBase_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 "CLHEP/Alist/AList.h"
26
27class TMDCWireHit;
28class TTrack;
29
30/// A virtual class for a track finder in tracking.
32
33 public:
34 /// Constructor
36
37 /// Destructor
38 virtual ~TFinderBase();
39
40 public:// General interfaces
41 /// returns name.
42 virtual std::string name(void) const = 0;
43
44 /// returns version.
45 virtual std::string version(void) const= 0;
46
47 /// dumps debug information.
48 virtual void dump(const std::string & message = std::string(""),
49 const std::string & prefix = std::string("")) const;
50
51 /// returns debug level.
52 virtual int debugLevel(void) const;
53
54 public:// Modifiers
55 /// clear internal information.
56 virtual void clear(void) = 0;
57
58 /// sets debug level.
59 virtual int debugLevel(int);
60
61 /// sets flag to reconstruct 3D.
62 virtual bool doStereo(bool);
63
64 /// sets flag to salvage hits.
65 virtual bool doSalvage(bool);
66
67 /// finds tracks. 'hits' are used to reconstruct. 'tracks' can be used for both inputs and outputs. Return value = (0, +, -) means (success, warning, fatal error).
68 virtual int doit(const AList<TMDCWireHit> & axialHits,
69 const AList<TMDCWireHit> & stereoHits,
70 AList<TTrack> & tracks3D,
71 AList<TTrack> & tracks2D) = 0;
72
73 private:
74 int _debugLevel;
75};
76
77//-----------------------------------------------------------------------------
78
79#ifdef TFinderBase_NO_INLINE
80#define inline
81#else
82#undef inline
83#define TFinderBase_INLINE_DEFINE_HERE
84#endif
85
86#ifdef TFinderBase_INLINE_DEFINE_HERE
87
88inline
89int
91 return _debugLevel;
92}
93
94inline
95int
97 return _debugLevel = a;
98}
99
100inline
101bool
103 return a;
104}
105
106inline
107bool
109 return a;
110}
111
112#endif
113
114#undef inline
115
116#endif /* TFinderBase_FLAG_ */
A virtual class for a track finder in tracking.
Definition TFinderBase.h:31
virtual std::string version(void) const =0
returns version.
virtual int debugLevel(void) const
returns debug level.
Definition TFinderBase.h:90
virtual bool doStereo(bool)
sets flag to reconstruct 3D.
virtual void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
virtual bool doSalvage(bool)
sets flag to salvage hits.
virtual void clear(void)=0
clear internal information.
TFinderBase()
Constructor.
virtual int doit(const AList< TMDCWireHit > &axialHits, const AList< TMDCWireHit > &stereoHits, AList< TTrack > &tracks3D, AList< TTrack > &tracks2D)=0
finds tracks. 'hits' are used to reconstruct. 'tracks' can be used for both inputs and outputs....
virtual std::string name(void) const =0
returns name.
virtual ~TFinderBase()
Destructor.
A class to represent a track in tracking.
Definition TTrack.h:129