BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/TrkReco/include/TrkReco/TBuilder.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// $Id: TBuilder.h,v 1.10 2011/05/19 16:33:07 jialk Exp $
3//-----------------------------------------------------------------------------
4// Filename : TBuilder.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 TBuilder_FLAG_
14#define TBuilder_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/THelixFitter.h"
27
28class TTrack;
29class TMLink;
30class TMLine;
31class TSegment;
32
33/// A class to build a track.
34class TBuilder {
35
36public:
37 /// Constructor with salvage level.
38 TBuilder( const std::string& name, float maxSigma, float maxSigmaStereo, float salvageLevel,
39 float szSegmentDistance, float szLinkDistance, unsigned fittingFlag );
40
41 /// Destructor
42 virtual ~TBuilder();
43
44public: // Selectors
45 /// returns name.
46 const std::string& name( void ) const;
47
48 /// dumps debug information.
49 void dump( const std::string& message = std::string( "" ),
50 const std::string& prefix = std::string( "" ) ) const;
51
52 /// builds a r/phi track from TMLinks or from Segments.
53 TTrack* buildRphi( const AList<TMLink>& ) const;
55 TTrack* buildStereoNew( const TTrack& t, AList<TSegment>& goodSegments,
56 AList<TSegment>& badSegments ) const;
58 TTrack* buildStereo( TTrack& t, TMLine& l, const AList<TMLink>& links ) const;
60 const AList<TMLink>& isolatedLinks ) const;
61 TTrack* build( TTrack& t, const TMLine& l ) const;
62
63 /// salvages hits.
64 void salvage( TTrack& t, AList<TMLink>& hits ) const;
65 void salvage( TTrack& t, AList<TSegment>& segments ) const;
66
67 /// makes a line.
70 TMLine* initialLine1( const TTrack&, const AList<TSegment>&, const AList<TMLink>& ) const;
71 TMLine* initialLine2( const TTrack&, const AList<TMLink>& ) const;
72
73 AList<TMLine> searchInitialLines( unsigned nSuperLayers ) const;
81
83 const AList<TMLink>& szList ) const;
85
86private:
87 /// select good stereo segments.
88 // void selectStereoSegments(const TTrack &, AList<TSegment> & list) const;
89
90 /// initializes internal variables for stereo reconstruction. This should be called with new
91 /// stereo codes.
92 bool initializeForStereo( const TTrack&, const AList<TSegment>&,
93 const AList<TSegment>& ) const;
94
95 /// checks stereo quality of a track.
96 unsigned stereoQuality( const AList<TMLink>& links ) const;
97
98private:
99 std::string _name;
100 THelixFitter _fitter;
101 const float _maxSigma;
102 const float _maxSigmaStereo;
103 const float _salvageLevel;
104 const float _szSegmentDistance;
105 const float _szLinkDistance;
106
107private: // Parameters
108 unsigned _minNLinksForCircle;
109 unsigned _minNCores;
110
111private:
112 mutable AList<TMLink> _allLinks;
113 mutable AList<TMLink> _links[6]; // stereo
114 mutable AList<TMLink> _forLine;
115 mutable unsigned _nSuperLayers;
116 mutable unsigned _nHits[5]; // axial
117};
118
119//-----------------------------------------------------------------------------
120
121#ifdef TBuilder_NO_INLINE
122# define inline
123#else
124# undef inline
125# define TBuilder_INLINE_DEFINE_HERE
126#endif
127
128#ifdef TBuilder_INLINE_DEFINE_HERE
129
130inline const std::string& TBuilder::name( void ) const { return _name; }
131
132#endif
133
134#undef inline
135
136#endif /* TBuilder_FLAG_ */
TMLine * initialLine(const TTrack &, AList< TSegment > &) const
makes a line.
AList< TMLine > searchLines5(void) const
AList< TMLine > searchLines1(void) const
TMLine * initialLineOld(const TTrack &, AList< TSegment > &) const
void removeFarSegment(const TMLine &, AList< TSegment > &, AList< TMLink > &) const
const std::string & name(void) const
returns name.
AList< TMLine > searchLines6(void) const
TTrack * buildRphi(const AList< TMLink > &) const
builds a r/phi track from TMLinks or from Segments.
TMLine * initialLine2(const TTrack &, const AList< TMLink > &) const
TTrack * buildRphi(const AList< TSegment > &) const
TTrack * build(TTrack &t, const TMLine &l) const
void salvage(TTrack &t, AList< TMLink > &hits) const
salvages hits.
AList< TMLine > searchLines2(void) const
TBuilder(const std::string &name, float maxSigma, float maxSigmaStereo, float salvageLevel, float szSegmentDistance, float szLinkDistance, unsigned fittingFlag)
Constructor with salvage level.
void salvage(TTrack &t, AList< TSegment > &segments) const
TTrack * buildStereoNew(const TTrack &t, AList< TSegment > &goodSegments, AList< TSegment > &badSegments) const
TTrack * buildStereo(const TTrack &t, AList< TSegment > &) const
AList< TSegment > selectStereoSegment(const TMLine &line, const AList< TSegment > &list, const AList< TMLink > &szList) const
virtual ~TBuilder()
Destructor.
TTrack * buildStereoOld(TTrack &t, const AList< TMLink > &allLinks, const AList< TMLink > &isolatedLinks) const
TMLine * initialLine1(const TTrack &, const AList< TSegment > &, const AList< TMLink > &) const
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
AList< TMLine > searchLines4(void) const
AList< TMLine > searchInitialLines(unsigned nSuperLayers) const
TTrack * buildStereo(TTrack &t, TMLine &l, const AList< TMLink > &links) const
AList< TMLine > searchLines3(void) const
TMLine searchLine(const TMLine &initialLine) const
A class to fit a TTrackBase object to a helix.
A class to represent a track in tracking.
A class to relate TMDCWireHit and TTrack objects.
A class to represent a track in tracking.
int t()
Definition t.c:1