BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/TrkReco/include/TrkReco/TBuilder0.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// $Id: TBuilder0.h,v 1.6 2010/03/31 09:58:59 liucy Exp $
3//-----------------------------------------------------------------------------
4// Filename : TBuilder0.h
5// Section : Tracking
6// Owner : Yoshi Iwasaki
7// Email : yoshihito.iwasaki@kek.jp
8//-----------------------------------------------------------------------------
9// Description : A class to build a track.
10// See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
11//-----------------------------------------------------------------------------
12
13#ifndef TBuilder0_FLAG_
14#define TBuilder0_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#include "TrkReco/TCosmicFitter.h"
27#include "TrkReco/THelixFitter.h"
28#include "TrkReco/TMSelector.h"
29
30class TTrack;
31class TMLink;
32class TSegment;
33
34/// A class to build a track.
35class TBuilder0 {
36
37public:
38 /// Constructor.
39 TBuilder0( const std::string& name );
40
41 /// Constructor with salvage level.
42 TBuilder0( const std::string& name, float salvageLevel );
43
44 /// Constructor with parameters.
45 TBuilder0( const std::string& name, float stereoZ3, float stereoZ4, float stereoChisq3,
46 float stereoChisq4, float stereoMaxSigma, unsigned fittingCorrections,
47 float salvageLevel );
48
49 /// Destructor
50 virtual ~TBuilder0();
51
52public: // Selectors
53 /// returns name.
54 const std::string& name( void ) const;
55
56 /// dumps debug information.
57 void dump( const std::string& message = std::string( "" ),
58 const std::string& prefix = std::string( "" ) ) const;
59
60 /// returns a track selector.
61 const TMSelector& trackSelector( void ) const;
62
63 /// builds a r/phi track from TMLinks or from Segments.
64 TTrack* buildRphi( const AList<TMLink>& ) const;
65
66 /// appends stereo hits to a track. (old version)
67 TTrack* buildStereo0( TTrack& track, const AList<TMLink>& ) const;
68
69 /// appends stereo hits to a track.
70 virtual TTrack* buildStereo( TTrack& track, const AList<TMLink>& ) const;
71
72 /// appends TMLinks in a list.
73 void appendClusters( TTrack& track, const AList<TMLink>& ) const;
74
75 /// salvages links in a list. Used links will be removed from a list.
76 void salvage( TTrack& track, AList<TMLink>& list ) const;
77
78 /// fits a track using a private fitter.
79 virtual int fit( TTrackBase& ) const;
80
81public: // Modifiers
82 /// sets a track selector.
83 virtual const TMSelector& trackSelector( const TMSelector& );
84
85private: //
86 void selectHits( AList<TMLink>& list ) const;
87 // -50:bad consective, -20:not consective, -1:not in the same layer, 0:consective and
88 // chrg<=0, 1:consective and chrg>0
89 int consectiveHits( TMLink& l, TMLink& s, int ichg ) const;
90 int check2CnHits( TMLink& l, TMLink& s, int ichg ) const;
91 int checkHits( unsigned i, unsigned j, unsigned k ) const;
92 void salvageNormal( TTrack& track, AList<TMLink>& list ) const;
93
94private:
95 std::string _name;
96 // THelixFitter _fitter;
97 TCosmicFitter _fitter;
98 double _salvageLevel;
99
100protected: // for buildRphi
103
104protected: // for buildStereo
106 float _stereoZ3;
107 float _stereoZ4;
108 float _stereoChisq3;
109 float _stereoChisq4;
110 float _stereoMaxSigma;
111};
112
113//-----------------------------------------------------------------------------
114
115#ifdef TBuilder0_NO_INLINE
116# define inline
117#else
118# undef inline
119# define TBuilder0_INLINE_DEFINE_HERE
120#endif
121
122#ifdef TBuilder0_INLINE_DEFINE_HERE
123
124inline const TMSelector& TBuilder0::trackSelector( void ) const { return _trackSelector; }
125
126inline const std::string& TBuilder0::name( void ) const { return _name; }
127
128inline int TBuilder0::fit( TTrackBase& a ) const { return _fitter.fit( a ); }
129
130#endif
131
132#undef inline
133
134#endif /* TBuilder0_FLAG_ */
XmlRpcServer s
TTrack * buildRphi(const AList< TMLink > &) const
builds a r/phi track from TMLinks or from Segments.
virtual int fit(TTrackBase &) const
fits a track using a private fitter.
const TMSelector & trackSelector(void) const
returns a track selector.
TTrack * buildStereo0(TTrack &track, const AList< TMLink > &) const
appends stereo hits to a track. (old version)
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
TBuilder0(const std::string &name, float salvageLevel)
Constructor with salvage level.
const std::string & name(void) const
returns name.
TBuilder0(const std::string &name)
Constructor.
virtual ~TBuilder0()
Destructor.
virtual const TMSelector & trackSelector(const TMSelector &)
sets a track selector.
TBuilder0(const std::string &name, float stereoZ3, float stereoZ4, float stereoChisq3, float stereoChisq4, float stereoMaxSigma, unsigned fittingCorrections, float salvageLevel)
Constructor with parameters.
void salvage(TTrack &track, AList< TMLink > &list) const
salvages links in a list. Used links will be removed from a list.
virtual int fit(TTrackBase &) const
fits a track using a private fitter.
virtual TTrack * buildStereo(TTrack &track, const AList< TMLink > &) const
appends stereo hits to a track.
void appendClusters(TTrack &track, const AList< TMLink > &) const
appends TMLinks in a list.
A class to fit a TTrackBase object to a helix.
A class to relate TMDCWireHit and TTrack objects.
A virtual class for a track class in tracking.
A class to represent a track in tracking.