00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef T3DLINEFITTER_FLAG_
00014 #define T3DLINEFITTER_FLAG_
00015
00016 #ifdef TRKRECO_DEBUG_DETAIL
00017 #ifndef TRKRECO_DEBUG
00018 #define TRKRECO_DEBUG
00019 #endif
00020 #endif
00021
00022 #include <string>
00023
00024 #define HEP_SHORT_NAMES
00025 #ifndef CLHEP_VECTOR3D_H
00026 #include "CLHEP/Geometry/Vector3D.h"
00027 #endif
00028 #ifndef ENABLE_BACKWARDS_COMPATIBILITY
00029 typedef HepGeom::Vector3D<double> HepVector3D;
00030 #endif
00031
00032
00033
00034 #include "TrackUtil/Helix.h"
00035 #include "TrkReco/TMFitter.h"
00036
00037 class TMLink;
00038 class T3DLine;
00039
00041 class T3DLineFitter : public TMFitter {
00042
00043 public:
00045 T3DLineFitter(const std::string & name);
00046 T3DLineFitter(const std::string & name,bool m_sag,int m_prop,bool m_tof);
00047
00049 virtual ~T3DLineFitter();
00050
00051 public:
00053 void dump(const std::string & message = std::string(""),
00054 const std::string & prefix = std::string("")) const;
00055
00056 public:
00057 virtual int fit(TTrackBase &) const;
00058 virtual int fit(TTrackBase &, float t0Offset) const;
00059
00060 void sag(bool);
00061 void propagation(int);
00062 void tof(bool);
00063
00064 private:
00066 int dxda(const TMLink&,
00067 const T3DLine&,
00068 Vector & dxda,
00069 Vector & dyda,
00070 Vector & dzda,
00071 HepVector3D & wireDirection) const;
00072
00074 void drift(const T3DLine &,
00075 const TMLink &,
00076 float t0Offset,
00077 double & distance,
00078 double & err) const;
00079
00080 private:
00081 bool _sag;
00082 int _propagation;
00083 bool _tof;
00084
00085 };
00086
00087
00088
00089 #ifdef TRKRECO_NO_INLINE
00090 #define inline
00091 #else
00092 #undef inline
00093 #define T3DLINEFITTER_INLINE_DEFINE_HERE
00094 #endif
00095
00096 #ifdef T3DLINEFITTER_INLINE_DEFINE_HERE
00097
00098 #endif
00099
00100 #undef inline
00101
00102 #endif