BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TConformalFinder0.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// $Id: TConformalFinder0.h,v 1.8 2010/03/31 09:58:59 liucy Exp $
3//-----------------------------------------------------------------------------
4// Filename : TConformalFinder0.h
5// Section : Tracking
6// Owner : Yoshi Iwasaki
7// Email : [email protected]
8//-----------------------------------------------------------------------------
9// Description : A class to find tracks with the conformal method.
10// See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
11//-----------------------------------------------------------------------------
12
13#ifndef TConformalFinder0_FLAG_
14#define TConformalFinder0_FLAG_
15
16#ifdef TRKRECO_DEBUG_DETAIL
17#ifndef TRKRECO_DEBUG
18#define TRKRECO_DEBUG
19#endif
20#endif
21#define HEP_SHORT_NAMES
22
23#include "TrkReco/TFinderBase.h"
24#include "TrkReco/TBuilder0.h"
25
26#ifndef CLHEP_POINT3D_H
27#include "CLHEP/Geometry/Point3D.h"
28#endif
29#ifndef ENABLE_BACKWARDS_COMPATIBILITY
31#endif
32
33//class HepPoint3D;
34class TMLink;
35class THistogram;
36class TCircle;
37class TSegment0;
38
39/// A class to find tracks with the conformal method.
41
42 public:
43 /// Constructor.
44 TConformalFinder0(float maxSigma,
45 float fraction,
46 float stereoZ3,
47 float stereoZ4,
48 float stereoChisq3,
49 float stereoChisq4,
50 float stereoMaxSigma,
51 unsigned fittingCorrections,
52 float salvageLevel,
53 bool cosmic);
54
55 /// Destructor
56 virtual ~TConformalFinder0();
57
58 public:// Selectors
59 /// returns name.
60 std::string name(void) const;
61
62 /// returns version.
63 std::string version(void) const;
64
65 /// dumps debug information.
66 void dump(const std::string & message = std::string(""),
67 const std::string & prefix = std::string("")) const;
68
69 /// returns a list of conformal links.
70 const AList<TMLink> & axialConformalLinks(void) const;
71
72 /// returns a list of conformal links.
73 const AList<TMLink> & stereoConformalLinks(void) const;
74
75 public:// Modifiers
76 /// clear internal information.
77 void clear(void);
78
79 /// finds tracks.
80 int doit(const AList<TMDCWireHit> & axialHits,
81 const AList<TMDCWireHit> & stereoHits,
82 AList<TTrack> & tracks,
83 AList<TTrack> & tracks3D);
84
85 /// transforms hits into a conformal plane. 'center' is a center of the transformation. Z position of 'center' must be zero. Transformed positions are newly created, and are stored in 'links'.
86 static void conformalTransformation(const HepPoint3D & center,
87 const AList<TMDCWireHit> & hits,
88 AList<TMLink> & links);
89
90 /// transforms drift circle of hits into a conformal plane. transformed positions( x0, y0, r) are stored in 'links'.
91 static void conformalTransformationDriftCircle(const HepPoint3D & center,
92 const AList<TMDCWireHit> & hits,
93 AList<TMLink> & links);
94
95 /// transforms hits into a conformal plane. 'center' is a center of the transformation. Z position of 'center' must be zero. Transformed positions are newly created, and are stored in 'links'.
96 static void conformalTransformationRphi(const HepPoint3D & center,
97 const AList<TMDCWireHit> & hits,
98 AList<TMLink> & links);
99
100 /// finds segments.
103
104 /// finds segments. (obsolete functions)
107
108
109 /// sets swtich for stereo reconstruction.
110 bool doStereo(bool);
111
112 /// sets switch for salvaging.
113 bool doSalvage(bool);
114
115 private:
116 /// returns a list of links close to a track.
117 AList<TMLink> findCloseHits(const AList<TMLink> & in,
118 const TTrack & track) const;
119
120 /// returns a pointer to the best cluster to be linked.
121 TSegment0 * findBestLink(const TSegment0 &,
122 const AList<TSegment0> & in) const;
123
124 /// appends the best cluster in 'list' to 'track'.
125 TSegment0 * appendCluster(TTrack & track, AList<TSegment0> & in) const;
126
127 /// returns a list of clusters to be a track.
128 AList<TSegment0> findClusterLink(TSegment0 &,
129 const AList<TSegment0> * const) const;
130
131 /// makes a track.
132 TTrack * makeTrack(const AList<TSegment0> &) const;
133
134 /// appends TMLinks in a list.
135 void appendClusters2(TTrack & track, AList<TSegment0> &) const;
136
137 /// returns a list of clusters close to a cluster.
138 AList<TSegment0> findCloseClusters(const TTrack &,
139 const AList<TSegment0> &,
140 double maxDistance) const;
141
142 /// main loop with salvaging.
143 void standardFinding(AList<TMLink> & seeds,
144 AList<TMLink> & unusedLinks,
145 double fraction);
146
147 /// main loop with salvaging for second trial.
148 void specialFinding(AList<TMLink> & seeds,
149 AList<TMLink> & unusedLinks,
150 double fraction);
151
152 private:
153 /// Track builder.
154 TBuilder0 * _builder;
155
156 /// Parameters.
157 TMSelector _circleSelector;
158 TMSelector _trackSelector;
159 float _fraction;
160
161 /// List of hit positions in the conformal plane.
162 AList<TMLink> _axialConfLinks;
163 AList<TMLink> _stereoConfLinks;
164 AList<TMLink> _unusedAxialConfLinks;
165 AList<TMLink> _unusedStereoConfLinks;
166 AList<TMLink> _goodAxialConfLinks;
167
168 /// Internal lists.
169 AList<TCircle> _circles;
170 AList<TTrack> _tracks;
171
172 /// Switches
173 bool _doStereo;
174 bool _doSalvage;
175};
176
177//-----------------------------------------------------------------------------
178
179#ifdef TConformalFinder0_NO_INLINE
180#define inline
181#else
182#undef inline
183#define TConformalFinder0_INLINE_DEFINE_HERE
184#endif
185
186#ifdef TConformalFinder0_INLINE_DEFINE_HERE
187
188inline
189const AList<TMLink> &
191 return _axialConfLinks;
192}
193
194inline
195const AList<TMLink> &
197 return _stereoConfLinks;
198}
199
200inline
201bool
203 return _doStereo = a;
204}
205
206inline
207bool
209 return _doSalvage = a;
210}
211
212inline
213std::string
215 return "Conformal Finder 0";
216}
217
218#endif
219
220#undef inline
221
222#endif /* TConformalFinder0_FLAG_ */
223
HepGeom::Point3D< double > HepPoint3D
A class to build a track.
Definition: TBuilder0.h:35
A class to represent a circle in tracking.
Definition: TCircle.h:42
A class to find tracks with the conformal method.
void clear(void)
clear internal information.
AList< AList< TSegment0 > > findSegments(const AList< TMLink > &in) const
finds segments.
AList< TSegment0 > findClusters2(const THistogram &) const
static void conformalTransformationRphi(const HepPoint3D &center, const AList< TMDCWireHit > &hits, AList< TMLink > &links)
transforms hits into a conformal plane. 'center' is a center of the transformation....
bool doSalvage(bool)
sets switch for salvaging.
bool doStereo(bool)
sets swtich for stereo reconstruction.
AList< AList< TSegment0 > > findSegments2(const AList< TMLink > &in) const
static void conformalTransformation(const HepPoint3D &center, const AList< TMDCWireHit > &hits, AList< TMLink > &links)
transforms hits into a conformal plane. 'center' is a center of the transformation....
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
const AList< TMLink > & stereoConformalLinks(void) const
returns a list of conformal links.
std::string name(void) const
returns name.
virtual ~TConformalFinder0()
Destructor.
int doit(const AList< TMDCWireHit > &axialHits, const AList< TMDCWireHit > &stereoHits, AList< TTrack > &tracks, AList< TTrack > &tracks3D)
finds tracks.
std::string version(void) const
returns version.
AList< TSegment0 > findClusters(const THistogram &) const
finds segments. (obsolete functions)
const AList< TMLink > & axialConformalLinks(void) const
returns a list of conformal links.
static void conformalTransformationDriftCircle(const HepPoint3D &center, const AList< TMDCWireHit > &hits, AList< TMLink > &links)
transforms drift circle of hits into a conformal plane. transformed positions( x0,...
A virtual class for a track finder in tracking.
Definition: TFinderBase.h:31
A class for a histogram used in tracking.
Definition: THistogram.h:34
A class to select a TTrackBase object.
Definition: TMSelector.h:32
A class to relate TMDCWireHit and TTrack objects.
Definition: TSegment0.h:41
A class to represent a track in tracking.
Definition: TTrack.h:129