BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/TrkReco/include/TrkReco/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 : yoshihito.iwasaki@kek.jp
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.
31class TFinderBase {
32
33public:
34 /// Constructor
36
37 /// Destructor
38 virtual ~TFinderBase();
39
40public: // 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
54public: // 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
68 /// outputs. Return value = (0, +, -) means (success, warning, fatal error).
69 virtual int doit( const AList<TMDCWireHit>& axialHits, const AList<TMDCWireHit>& stereoHits,
70 AList<TTrack>& tracks3D, AList<TTrack>& tracks2D ) = 0;
71
72private:
73 int _debugLevel;
74};
75
76//-----------------------------------------------------------------------------
77
78#ifdef TFinderBase_NO_INLINE
79# define inline
80#else
81# undef inline
82# define TFinderBase_INLINE_DEFINE_HERE
83#endif
84
85#ifdef TFinderBase_INLINE_DEFINE_HERE
86
87inline int TFinderBase::debugLevel( void ) const { return _debugLevel; }
88
89inline int TFinderBase::debugLevel( int a ) { return _debugLevel = a; }
90
91inline bool TFinderBase::doStereo( bool a ) { return a; }
92
93inline bool TFinderBase::doSalvage( bool a ) { return a; }
94
95#endif
96
97#undef inline
98
99#endif /* TFinderBase_FLAG_ */
A virtual class for a track finder in tracking.
virtual int debugLevel(void) const
returns debug level.
virtual std::string version(void) const =0
returns version.
virtual int debugLevel(void) const
returns debug level.
virtual bool doStereo(bool)
sets flag to reconstruct 3D.
virtual bool doSalvage(bool)
sets flag to salvage hits.
virtual void clear(void)=0
clear internal information.
virtual int debugLevel(int)
sets debug level.
TFinderBase()
Constructor.
virtual bool doStereo(bool)
sets flag to reconstruct 3D.
virtual int doit(const AList< TMDCWireHit > &axialHits, const AList< TMDCWireHit > &stereoHits, AList< TTrack > &tracks3D, AList< TTrack > &tracks2D)=0
virtual std::string name(void) const =0
returns name.
virtual void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
virtual ~TFinderBase()
Destructor.
virtual bool doSalvage(bool)
sets flag to salvage hits.
A class to represent a track in tracking.