BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/TrkReco/include/TrkReco/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 : yoshihito.iwasaki@kek.jp
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/TBuilder0.h"
24#include "TrkReco/TFinderBase.h"
25
26#ifndef CLHEP_POINT3D_H
27# include "CLHEP/Geometry/Point3D.h"
28#endif
29#ifndef ENABLE_BACKWARDS_COMPATIBILITY
30typedef HepGeom::Point3D<double> HepPoint3D;
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.
40class TConformalFinder0 : public TFinderBase {
41
42public:
43 /// Constructor.
44 TConformalFinder0( float maxSigma, float fraction, float stereoZ3, float stereoZ4,
45 float stereoChisq3, float stereoChisq4, float stereoMaxSigma,
46 unsigned fittingCorrections, float salvageLevel, bool cosmic );
47
48 /// Destructor
50
51public: // Selectors
52 /// returns name.
53 std::string name( void ) const;
54
55 /// returns version.
56 std::string version( void ) const;
57
58 /// dumps debug information.
59 void dump( const std::string& message = std::string( "" ),
60 const std::string& prefix = std::string( "" ) ) const;
61
62 /// returns a list of conformal links.
63 const AList<TMLink>& axialConformalLinks( void ) const;
64
65 /// returns a list of conformal links.
66 const AList<TMLink>& stereoConformalLinks( void ) const;
67
68public: // Modifiers
69 /// clear internal information.
70 void clear( void );
71
72 /// finds tracks.
73 int doit( const AList<TMDCWireHit>& axialHits, const AList<TMDCWireHit>& stereoHits,
74 AList<TTrack>& tracks, AList<TTrack>& tracks3D );
75
76 /// transforms hits into a conformal plane. 'center' is a center of the transformation. Z
77 /// position of 'center' must be zero. Transformed positions are newly created, and are
78 /// stored in 'links'.
79 static void conformalTransformation( const HepPoint3D& center,
80 const AList<TMDCWireHit>& hits, AList<TMLink>& links );
81
82 /// transforms drift circle of hits into a conformal plane. transformed positions( x0, y0, r)
83 /// are stored in 'links'.
85 const AList<TMDCWireHit>& hits,
86 AList<TMLink>& links );
87
88 /// transforms hits into a conformal plane. 'center' is a center of the transformation. Z
89 /// position of 'center' must be zero. Transformed positions are newly created, and are
90 /// stored in 'links'.
91 static void conformalTransformationRphi( const HepPoint3D& center,
92 const AList<TMDCWireHit>& hits,
93 AList<TMLink>& links );
94
95 /// finds segments.
98
99 /// finds segments. (obsolete functions)
102
103 /// sets swtich for stereo reconstruction.
104 bool doStereo( bool );
105
106 /// sets switch for salvaging.
107 bool doSalvage( bool );
108
109private:
110 /// returns a list of links close to a track.
111 AList<TMLink> findCloseHits( const AList<TMLink>& in, const TTrack& track ) const;
112
113 /// returns a pointer to the best cluster to be linked.
114 TSegment0* findBestLink( const TSegment0&, const AList<TSegment0>& in ) const;
115
116 /// appends the best cluster in 'list' to 'track'.
117 TSegment0* appendCluster( TTrack& track, AList<TSegment0>& in ) const;
118
119 /// returns a list of clusters to be a track.
120 AList<TSegment0> findClusterLink( TSegment0&, const AList<TSegment0>* const ) const;
121
122 /// makes a track.
123 TTrack* makeTrack( const AList<TSegment0>& ) const;
124
125 /// appends TMLinks in a list.
126 void appendClusters2( TTrack& track, AList<TSegment0>& ) const;
127
128 /// returns a list of clusters close to a cluster.
129 AList<TSegment0> findCloseClusters( const TTrack&, const AList<TSegment0>&,
130 double maxDistance ) const;
131
132 /// main loop with salvaging.
133 void standardFinding( AList<TMLink>& seeds, AList<TMLink>& unusedLinks, double fraction );
134
135 /// main loop with salvaging for second trial.
136 void specialFinding( AList<TMLink>& seeds, AList<TMLink>& unusedLinks, double fraction );
137
138private:
139 /// Track builder.
140 TBuilder0* _builder;
141
142 /// Parameters.
143 TMSelector _circleSelector;
144 TMSelector _trackSelector;
145 float _fraction;
146
147 /// List of hit positions in the conformal plane.
148 AList<TMLink> _axialConfLinks;
149 AList<TMLink> _stereoConfLinks;
150 AList<TMLink> _unusedAxialConfLinks;
151 AList<TMLink> _unusedStereoConfLinks;
152 AList<TMLink> _goodAxialConfLinks;
153
154 /// Internal lists.
155 AList<TCircle> _circles;
156 AList<TTrack> _tracks;
157
158 /// Switches
159 bool _doStereo;
160 bool _doSalvage;
161};
162
163//-----------------------------------------------------------------------------
164
165#ifdef TConformalFinder0_NO_INLINE
166# define inline
167#else
168# undef inline
169# define TConformalFinder0_INLINE_DEFINE_HERE
170#endif
171
172#ifdef TConformalFinder0_INLINE_DEFINE_HERE
173
174inline const AList<TMLink>& TConformalFinder0::axialConformalLinks( void ) const {
175 return _axialConfLinks;
176}
177
178inline const AList<TMLink>& TConformalFinder0::stereoConformalLinks( void ) const {
179 return _stereoConfLinks;
180}
181
182inline bool TConformalFinder0::doStereo( bool a ) { return _doStereo = a; }
183
184inline bool TConformalFinder0::doSalvage( bool a ) { return _doSalvage = a; }
185
186inline std::string TConformalFinder0::name( void ) const { return "Conformal Finder 0"; }
187
188#endif
189
190#undef inline
191
192#endif /* TConformalFinder0_FLAG_ */
HepGeom::Point3D< double > HepPoint3D
HepGeom::Point3D< double > HepPoint3D
A class to represent a circle in tracking.
A class to find tracks with the conformal method.
void clear(void)
clear internal information.
static void conformalTransformationDriftCircle(const HepPoint3D &center, const AList< TMDCWireHit > &hits, AList< TMLink > &links)
AList< AList< TSegment0 > > findSegments(const AList< TMLink > &in) const
finds segments.
AList< TSegment0 > findClusters2(const THistogram &) const
virtual ~TConformalFinder0()
Destructor.
bool doSalvage(bool)
sets switch for salvaging.
static void conformalTransformationRphi(const HepPoint3D &center, const AList< TMDCWireHit > &hits, AList< TMLink > &links)
bool doStereo(bool)
sets swtich for stereo reconstruction.
AList< AList< TSegment0 > > findSegments2(const AList< TMLink > &in) const
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
static void conformalTransformation(const HepPoint3D &center, const AList< TMDCWireHit > &hits, AList< TMLink > &links)
const AList< TMLink > & stereoConformalLinks(void) const
returns a list of conformal links.
std::string name(void) const
returns name.
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.
TConformalFinder0(float maxSigma, float fraction, float stereoZ3, float stereoZ4, float stereoChisq3, float stereoChisq4, float stereoMaxSigma, unsigned fittingCorrections, float salvageLevel, bool cosmic)
Constructor.
A virtual class for a track finder in tracking.
A class for a histogram used in tracking.
A class to relate TMDCWireHit and TTrack objects.
A class to represent a track in tracking.