00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TConformalFinder0_FLAG_
00014 #define TConformalFinder0_FLAG_
00015
00016 #ifdef TRKRECO_DEBUG_DETAIL
00017 #ifndef TRKRECO_DEBUG
00018 #define TRKRECO_DEBUG
00019 #endif
00020 #endif
00021 #define HEP_SHORT_NAMES
00022
00023 #include "TrkReco/TFinderBase.h"
00024 #include "TrkReco/TBuilder0.h"
00025
00026 #ifndef CLHEP_POINT3D_H
00027 #include "CLHEP/Geometry/Point3D.h"
00028 #endif
00029 #ifndef ENABLE_BACKWARDS_COMPATIBILITY
00030 typedef HepGeom::Point3D<double> HepPoint3D;
00031 #endif
00032
00033
00034 class TMLink;
00035 class THistogram;
00036 class TCircle;
00037 class TSegment0;
00038
00040 class TConformalFinder0 : public TFinderBase {
00041
00042 public:
00044 TConformalFinder0(float maxSigma,
00045 float fraction,
00046 float stereoZ3,
00047 float stereoZ4,
00048 float stereoChisq3,
00049 float stereoChisq4,
00050 float stereoMaxSigma,
00051 unsigned fittingCorrections,
00052 float salvageLevel,
00053 bool cosmic);
00054
00056 virtual ~TConformalFinder0();
00057
00058 public:
00060 std::string name(void) const;
00061
00063 std::string version(void) const;
00064
00066 void dump(const std::string & message = std::string(""),
00067 const std::string & prefix = std::string("")) const;
00068
00070 const AList<TMLink> & axialConformalLinks(void) const;
00071
00073 const AList<TMLink> & stereoConformalLinks(void) const;
00074
00075 public:
00077 void clear(void);
00078
00080 int doit(const AList<TMDCWireHit> & axialHits,
00081 const AList<TMDCWireHit> & stereoHits,
00082 AList<TTrack> & tracks,
00083 AList<TTrack> & tracks3D);
00084
00086 static void conformalTransformation(const HepPoint3D & center,
00087 const AList<TMDCWireHit> & hits,
00088 AList<TMLink> & links);
00089
00091 static void conformalTransformationDriftCircle(const HepPoint3D & center,
00092 const AList<TMDCWireHit> & hits,
00093 AList<TMLink> & links);
00094
00096 static void conformalTransformationRphi(const HepPoint3D & center,
00097 const AList<TMDCWireHit> & hits,
00098 AList<TMLink> & links);
00099
00101 AList< AList<TSegment0> > findSegments(const AList<TMLink> & in) const;
00102 AList< AList<TSegment0> > findSegments2(const AList<TMLink> & in) const;
00103
00105 AList<TSegment0> findClusters(const THistogram &) const;
00106 AList<TSegment0> findClusters2(const THistogram &) const;
00107
00108
00110 bool doStereo(bool);
00111
00113 bool doSalvage(bool);
00114
00115 private:
00117 AList<TMLink> findCloseHits(const AList<TMLink> & in,
00118 const TTrack & track) const;
00119
00121 TSegment0 * findBestLink(const TSegment0 &,
00122 const AList<TSegment0> & in) const;
00123
00125 TSegment0 * appendCluster(TTrack & track, AList<TSegment0> & in) const;
00126
00128 AList<TSegment0> findClusterLink(TSegment0 &,
00129 const AList<TSegment0> * const) const;
00130
00132 TTrack * makeTrack(const AList<TSegment0> &) const;
00133
00135 void appendClusters2(TTrack & track, AList<TSegment0> &) const;
00136
00138 AList<TSegment0> findCloseClusters(const TTrack &,
00139 const AList<TSegment0> &,
00140 double maxDistance) const;
00141
00143 void standardFinding(AList<TMLink> & seeds,
00144 AList<TMLink> & unusedLinks,
00145 double fraction);
00146
00148 void specialFinding(AList<TMLink> & seeds,
00149 AList<TMLink> & unusedLinks,
00150 double fraction);
00151
00152 private:
00154 TBuilder0 * _builder;
00155
00157 TMSelector _circleSelector;
00158 TMSelector _trackSelector;
00159 float _fraction;
00160
00162 AList<TMLink> _axialConfLinks;
00163 AList<TMLink> _stereoConfLinks;
00164 AList<TMLink> _unusedAxialConfLinks;
00165 AList<TMLink> _unusedStereoConfLinks;
00166 AList<TMLink> _goodAxialConfLinks;
00167
00169 AList<TCircle> _circles;
00170 AList<TTrack> _tracks;
00171
00173 bool _doStereo;
00174 bool _doSalvage;
00175 };
00176
00177
00178
00179 #ifdef TConformalFinder0_NO_INLINE
00180 #define inline
00181 #else
00182 #undef inline
00183 #define TConformalFinder0_INLINE_DEFINE_HERE
00184 #endif
00185
00186 #ifdef TConformalFinder0_INLINE_DEFINE_HERE
00187
00188 inline
00189 const AList<TMLink> &
00190 TConformalFinder0::axialConformalLinks(void) const {
00191 return _axialConfLinks;
00192 }
00193
00194 inline
00195 const AList<TMLink> &
00196 TConformalFinder0::stereoConformalLinks(void) const {
00197 return _stereoConfLinks;
00198 }
00199
00200 inline
00201 bool
00202 TConformalFinder0::doStereo(bool a) {
00203 return _doStereo = a;
00204 }
00205
00206 inline
00207 bool
00208 TConformalFinder0::doSalvage(bool a) {
00209 return _doSalvage = a;
00210 }
00211
00212 inline
00213 std::string
00214 TConformalFinder0::name(void) const {
00215 return "Conformal Finder 0";
00216 }
00217
00218 #endif
00219
00220 #undef inline
00221
00222 #endif
00223