BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
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 : [email protected]
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"
27
28class TTrack;
29class TMLink;
30class TMLine;
31class TSegment;
32
33/// A class to build a track.
34class TBuilder {
35
36 public:
37 /// Constructor with salvage level.
38 TBuilder(const std::string & name,
39 float maxSigma,
40 float maxSigmaStereo,
41 float salvageLevel,
42 float szSegmentDistance,
43 float szLinkDistance,
44 unsigned fittingFlag);
45
46 /// Destructor
47 virtual ~TBuilder();
48
49 public:// Selectors
50 /// returns name.
51 const std::string & name(void) const;
52
53 /// dumps debug information.
54 void dump(const std::string & message = std::string(""),
55 const std::string & prefix = std::string("")) const;
56
57 /// builds a r/phi track from TMLinks or from Segments.
58 TTrack * buildRphi(const AList<TMLink> &) const;
59 TTrack * buildRphi(const AList<TSegment> &) const;
60 TTrack * buildStereoNew(const TTrack & t,
61 AList<TSegment> & goodSegments,
62 AList<TSegment> & badSegments) const;
63 TTrack * buildStereo(const TTrack & t, AList<TSegment> &) const;
65 TMLine & l,
66 const AList<TMLink> & links) const;
68 const AList<TMLink> & allLinks,
69 const AList<TMLink> & isolatedLinks) const;
70 TTrack * build(TTrack & t, const TMLine & l) const;
71
72 /// salvages hits.
73 void salvage(TTrack & t, AList<TMLink> & hits) const;
74 void salvage(TTrack & t, AList<TSegment> & segments) const;
75
76 /// makes a line.
77 TMLine * initialLine(const TTrack &, AList<TSegment> &) const;
78 TMLine * initialLineOld(const TTrack &, AList<TSegment> &) const;
79 TMLine * initialLine1(const TTrack &,
80 const AList<TSegment> &,
81 const AList<TMLink> &) const;
82 TMLine * initialLine2(const TTrack &, const AList<TMLink> &) const;
83
84 AList<TMLine> searchInitialLines(unsigned nSuperLayers) const;
85 AList<TMLine> searchLines6(void) const;
86 AList<TMLine> searchLines5(void) const;
87 AList<TMLine> searchLines4(void) const;
88 AList<TMLine> searchLines3(void) const;
89 AList<TMLine> searchLines2(void) const;
90 AList<TMLine> searchLines1(void) const;
91 TMLine searchLine(const TMLine & initialLine) const;
92
94 const AList<TSegment> & list,
95 const AList<TMLink> & szList) const;
96 void removeFarSegment(const TMLine &,
98 AList<TMLink> &) const;
99
100 private:
101 /// select good stereo segments.
102 //void selectStereoSegments(const TTrack &, AList<TSegment> & list) const;
103
104 /// initializes internal variables for stereo reconstruction. This should be called with new stereo codes.
105 bool initializeForStereo(const TTrack &,
106 const AList<TSegment> &,
107 const AList<TSegment> &) const;
108
109 /// checks stereo quality of a track.
110 unsigned stereoQuality(const AList<TMLink> & links) const;
111
112 private:
113 std::string _name;
114 THelixFitter _fitter;
115 const float _maxSigma;
116 const float _maxSigmaStereo;
117 const float _salvageLevel;
118 const float _szSegmentDistance;
119 const float _szLinkDistance;
120
121 private:// Parameters
122 unsigned _minNLinksForCircle;
123 unsigned _minNCores;
124
125 private:
126 mutable AList<TMLink> _allLinks;
127 mutable AList<TMLink> _links[6]; //stereo
128 mutable AList<TMLink> _forLine;
129 mutable unsigned _nSuperLayers;
130 mutable unsigned _nHits[5]; //axial
131};
132
133//-----------------------------------------------------------------------------
134
135#ifdef TBuilder_NO_INLINE
136#define inline
137#else
138#undef inline
139#define TBuilder_INLINE_DEFINE_HERE
140#endif
141
142#ifdef TBuilder_INLINE_DEFINE_HERE
143
144inline
145const std::string &
146TBuilder::name(void) const {
147 return _name;
148}
149
150#endif
151
152#undef inline
153
154#endif /* TBuilder_FLAG_ */
TTree * t
Definition: binning.cxx:23
A class to build a track.
Definition: TBuilder.h:34
TMLine * initialLine(const TTrack &, AList< TSegment > &) const
makes a line.
Definition: TBuilder.cxx:315
AList< TMLine > searchLines5(void) const
Definition: TBuilder.cxx:798
AList< TMLine > searchLines1(void) const
Definition: TBuilder.cxx:1155
TMLine * initialLineOld(const TTrack &, AList< TSegment > &) const
Definition: TBuilder.cxx:405
void removeFarSegment(const TMLine &, AList< TSegment > &, AList< TMLink > &) const
Definition: TBuilder.cxx:510
const std::string & name(void) const
returns name.
Definition: TBuilder.h:146
AList< TMLine > searchLines6(void) const
Definition: TBuilder.cxx:753
TTrack * buildRphi(const AList< TMLink > &) const
builds a r/phi track from TMLinks or from Segments.
Definition: TBuilder.cxx:107
TMLine * initialLine2(const TTrack &, const AList< TMLink > &) const
Definition: TBuilder.cxx:296
virtual ~TBuilder()
Destructor.
Definition: TBuilder.cxx:58
TTrack * build(TTrack &t, const TMLine &l) const
Definition: TBuilder.cxx:1255
void salvage(TTrack &t, AList< TMLink > &hits) const
salvages hits.
Definition: TBuilder.cxx:211
AList< TMLine > searchLines2(void) const
Definition: TBuilder.cxx:1069
TTrack * buildStereoNew(const TTrack &t, AList< TSegment > &goodSegments, AList< TSegment > &badSegments) const
Definition: TBuilder.cxx:1535
TTrack * buildStereo(const TTrack &t, AList< TSegment > &) const
Definition: TBuilder.cxx:658
AList< TSegment > selectStereoSegment(const TMLine &line, const AList< TSegment > &list, const AList< TMLink > &szList) const
Definition: TBuilder.cxx:497
TTrack * buildStereoOld(TTrack &t, const AList< TMLink > &allLinks, const AList< TMLink > &isolatedLinks) const
TMLine * initialLine1(const TTrack &, const AList< TSegment > &, const AList< TMLink > &) const
Definition: TBuilder.cxx:247
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
Definition: TBuilder.cxx:62
AList< TMLine > searchLines4(void) const
Definition: TBuilder.cxx:867
AList< TMLine > searchInitialLines(unsigned nSuperLayers) const
Definition: TBuilder.cxx:724
AList< TMLine > searchLines3(void) const
Definition: TBuilder.cxx:964
TMLine searchLine(const TMLine &initialLine) const
Definition: TBuilder.cxx:1176
A class to fit a TTrackBase object to a helix.
Definition: THelixFitter.h:48
A class to represent a track in tracking.
Definition: TMLine.h:40
A class to relate TMDCWireHit and TTrack objects.
Definition: TSegment.h:43
A class to represent a track in tracking.
Definition: TTrack.h:129