All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SurfYZPlane.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 ///
3 /// \file SurfYZPlane.h
4 ///
5 /// \brief Planar surface parallel to x-axis.
6 ///
7 /// \author H. Greenlee
8 ///
9 /// This class represents a planar surface parallel to the global
10 /// x-axis, or equivalently, the normal vector is in the yz-plane.
11 ///
12 /// This surface is defined by four parameters, which are,
13 /// (x0, y0, z0) - Local origin in yz-plane.
14 /// phi - Rotation angle around x-axis.
15 ///
16 /// The local uvw coordinate system is related to the global xyz
17 /// coordinate system as follows.
18 ///
19 /// u = x-x0
20 /// v = (y-y0)*cos(phi) + (z-z0)*sin(phi)
21 /// w = -(y-y0)*sin(phi) + (z-z0)*cos(phi)
22 ///
23 /// or inversely,
24 ///
25 /// x = x0 + u
26 /// y = y0 + v*cos(phi) - w*sin(phi)
27 /// z = z0 + v*sin(phi) + w*cos(phi)
28 ///
29 /// Track parameters on this type of surface are as follows.
30 ///
31 /// 1. u
32 /// 2. v
33 /// 3. du/dw
34 /// 4. dv/dw
35 /// 5. 1/p (nonmagnetic) or q/p (magnetic)
36 ///
37 ////////////////////////////////////////////////////////////////////////
38 
39 #ifndef SURFYZPLANE_H
40 #define SURFYZPLANE_H
41 
43 
44 namespace trkf {
45 
46  class SurfYZPlane : public SurfPlane
47  {
48  public:
49 
50  /// Default constructor.
51  SurfYZPlane();
52 
53  /// Initializing constructor.
54  SurfYZPlane(double x0, double y0, double z0, double phi);
55 
56  /// Destructor.
57  virtual ~SurfYZPlane();
58 
59  // Accessors.
60  double x0() const {return fX0;} ///< X origin.
61  double y0() const {return fY0;} ///< Y origin.
62  double z0() const {return fZ0;} ///< Z origin.
63  double phi() const {return fPhi;} ///< Rotation angle about x-axis.
64 
65  /// Clone method.
66  virtual Surface* clone() const;
67 
68  /// Surface-specific tests of validity of track parameters.
69  virtual bool isTrackValid(const TrackVector& vec) const;
70 
71  /// Transform global to local coordinates.
72  virtual void toLocal(const double xyz[3], double uvw[3]) const;
73 
74  /// Transform local to global coordinates.
75  virtual void toGlobal(const double uvw[3], double xyz[3]) const;
76 
77  /// Get position of track.
78  virtual void getPosition(const TrackVector& vec, double xyz[3]) const;
79 
80  /// Get momentum vector of track.
81  virtual void getMomentum(const TrackVector& vec, double mom[3],
82  TrackDirection dir=UNKNOWN) const;
83 
84  /// Test whether two surfaces are parallel, within tolerance.
85  virtual bool isParallel(const Surface& surf) const;
86 
87  /// Find perpendicular forward distance to a parallel surface
88  virtual double distanceTo(const Surface& surf) const;
89 
90  /// Test two surfaces for equality, within tolerance.
91  virtual bool isEqual(const Surface& surf) const;
92 
93  /// Printout
94  virtual std::ostream& Print(std::ostream& out) const;
95 
96  private:
97 
98  // Static attributes.
99 
100  static double fPhiTolerance; ///< Phi tolerance for parallel.
101  static double fSepTolerance; ///< Separation tolerance for equal.
102 
103  // Attributes.
104 
105  double fX0; ///< X origin.
106  double fY0; ///< Y origin.
107  double fZ0; ///< Z origin.
108  double fPhi; ///< Rotation angle about x-axis.
109  };
110 }
111 
112 #endif
static double fSepTolerance
Separation tolerance for equal.
Definition: SurfYZPlane.h:101
TrackDirection
Track direction enum.
double fPhi
Rotation angle about x-axis.
Definition: SurfYZPlane.h:108
double z0() const
Z origin.
Definition: SurfYZPlane.h:62
double x0() const
X origin.
Definition: SurfYZPlane.h:60
static double fPhiTolerance
Phi tolerance for parallel.
Definition: SurfYZPlane.h:100
virtual ~SurfYZPlane()
Destructor.
Definition: SurfYZPlane.cxx:46
virtual bool isParallel(const Surface &surf) const
Test whether two surfaces are parallel, within tolerance.
virtual double distanceTo(const Surface &surf) const
Find perpendicular forward distance to a parallel surface.
virtual void getMomentum(const TrackVector &vec, double mom[3], TrackDirection dir=UNKNOWN) const
Get momentum vector of track.
double y0() const
Y origin.
Definition: SurfYZPlane.h:61
virtual bool isTrackValid(const TrackVector &vec) const
Surface-specific tests of validity of track parameters.
Definition: SurfYZPlane.cxx:56
KVector< 5 >::type TrackVector
Track state vector, dimension 5.
tuple dir
Definition: dropbox.py:28
virtual void toLocal(const double xyz[3], double uvw[3]) const
Transform global to local coordinates.
Definition: SurfYZPlane.cxx:68
virtual std::ostream & Print(std::ostream &out) const
Printout.
virtual void toGlobal(const double uvw[3], double xyz[3]) const
Transform local to global coordinates.
Definition: SurfYZPlane.cxx:90
SurfYZPlane()
Default constructor.
Definition: SurfYZPlane.cxx:24
virtual bool isEqual(const Surface &surf) const
Test two surfaces for equality, within tolerance.
Base class for Kalman filter planar surfaces.
double phi() const
Rotation angle about x-axis.
Definition: SurfYZPlane.h:63
double fZ0
Z origin.
Definition: SurfYZPlane.h:107
virtual void getPosition(const TrackVector &vec, double xyz[3]) const
Get position of track.
virtual Surface * clone() const
Clone method.
Definition: SurfYZPlane.cxx:50
double fX0
X origin.
Definition: SurfYZPlane.h:105
double fY0
Y origin.
Definition: SurfYZPlane.h:106