BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/TrkReco/include/TrkReco/T3DLineFitter.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// $Id: T3DLineFitter.h,v 1.15 2012/05/28 05:16:29 maoh Exp $
3//-----------------------------------------------------------------------------
4// Filename : T3DLineFitter.h
5// Section : Tracking
6// Owner : Kenji Inami
7// Email : inami@bmail.kek.jp
8//-----------------------------------------------------------------------------
9// Description : A class to fit a TTrackBase object to a 3D line.
10// See http://bsunsrv1.kek.jp/~yiwasaki/tracking/
11//-----------------------------------------------------------------------------
12
13#ifndef T3DLINEFITTER_FLAG_
14#define T3DLINEFITTER_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#ifndef CLHEP_VECTOR3D_H
26# include "CLHEP/Geometry/Vector3D.h"
27#endif
28#ifndef ENABLE_BACKWARDS_COMPATIBILITY
29typedef HepGeom::Vector3D<double> HepVector3D;
30#endif
31
32// #include "helix/Helix.h"
33// #include "TrkReco/Helix.h"
34#include "TrackUtil/Helix.h"
35#include "TrkReco/TMFitter.h"
36
37class TMLink;
38class T3DLine;
39
40/// A class to fit a TTrackBase object to a 3D line.
41class T3DLineFitter : public TMFitter {
42
43public:
44 /// Constructor.
45 T3DLineFitter( const std::string& name );
46 T3DLineFitter( const std::string& name, bool m_sag, int m_prop, bool m_tof );
47
48 /// Destructor
49 virtual ~T3DLineFitter();
50
51public: // Selectors
52 /// dumps debug information.
53 void dump( const std::string& message = std::string( "" ),
54 const std::string& prefix = std::string( "" ) ) const;
55
56public: // Modifiers
57 virtual int fit( TTrackBase& ) const;
58 virtual int fit( TTrackBase&, float t0Offset ) const;
59
60 void sag( bool );
61 void propagation( int );
62 void tof( bool );
63
64private:
65 /// calculates dXda. 'TMLink' and 'T3DLine' are inputs. Others are outputs.
66 int dxda( const TMLink&, const T3DLine&, Vector& dxda, Vector& dyda, Vector& dzda,
67 HepVector3D& wireDirection ) const;
68
69 /// calculates drift distance and its error.
70 void drift( const T3DLine&, const TMLink&, float t0Offset, double& distance,
71 double& err ) const;
72
73private:
74 bool _sag;
75 int _propagation;
76 bool _tof;
77};
78
79//-----------------------------------------------------------------------------
80
81#ifdef TRKRECO_NO_INLINE
82# define inline
83#else
84# undef inline
85# define T3DLINEFITTER_INLINE_DEFINE_HERE
86#endif
87
88#ifdef T3DLINEFITTER_INLINE_DEFINE_HERE
89
90#endif
91
92#undef inline
93
94#endif /* T3DLINEFITTER_FLAG_ */
HepGeom::Vector3D< double > HepVector3D
NTuple::Array< double > m_tof
HepGeom::Vector3D< double > HepVector3D
A class to fit a TTrackBase object to a 3D line.
T3DLineFitter(const std::string &name)
Constructor.
virtual int fit(TTrackBase &, float t0Offset) const
virtual ~T3DLineFitter()
Destructor.
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
void propagation(int)
void sag(bool)
void tof(bool)
virtual int fit(TTrackBase &) const
T3DLineFitter(const std::string &name, bool m_sag, int m_prop, bool m_tof)
A class to represent a track in tracking.
const std::string & name(void) const
returns name.
A virtual class for a track class in tracking.