MarlinTrk  2.2.0
HelixTrack.h
1 #ifndef HelixTrack_h
2 #define HelixTrack_h
3 
4 #include <cmath>
5 
6 class HelixTrack {
7 
8 public:
9 
10  HelixTrack( double ref_point_x, double ref_point_y, double ref_point_z, double d0, double z0, double phi0, double omega, double tanLambda )
11  : _ref_point_x(ref_point_x), _ref_point_y(ref_point_y), _ref_point_z(ref_point_z), _d0(d0), _z0(z0), _phi0(phi0), _omega(omega), _tanLambda(tanLambda)
12  {
13  while ( _phi0 < -M_PI ) _phi0 += 2.0*M_PI ;
14  while ( _phi0 >= M_PI ) _phi0 -= 2.0*M_PI;
15  }
16 
17  HelixTrack( const double* x1, const double* x2, const double* x3, double Bz, bool direction );
18 
19 
20 
21  HelixTrack( const double* position, const double* p, double charge, double Bz ) ;
22 
23  double moveRefPoint( double x, double y, double z) ;
24 
25  double getRefPointX() const { return _ref_point_x ; }
26  double getRefPointY() const { return _ref_point_y ; }
27  double getRefPointZ() const { return _ref_point_z ; }
28  double getD0() const { return _d0 ; }
29  double getZ0() const { return _z0 ; }
30  double getPhi0() const { return _phi0; }
31  double getOmega() const { return _omega ; }
32  double getTanLambda() const { return _tanLambda ; }
33 
34  // defines if s of the helix increases in the direction of x2 to x3
35  static bool forwards;
36 
37 private:
38 
39  double _ref_point_x ;
40  double _ref_point_y ;
41  double _ref_point_z ;
42  double _d0 ;
43  double _z0 ;
44  double _phi0 ;
45  double _omega ;
46  double _tanLambda ;
47 
49  inline double toBaseRange( double phi) const {
50  while( phi <= -M_PI ){ phi += 2. * M_PI ; }
51  while( phi > M_PI ){ phi -= 2. * M_PI ; }
52  return phi ;
53  }
54 
55 } ;
56 
57 
58 
59 
60 #endif
Definition: HelixTrack.h:6