LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
Surface.h
Go to the documentation of this file.
1 
43 #ifndef SURFACE_H
44 #define SURFACE_H
45 
46 #include <ostream>
48 
49 namespace trkf {
50 
51  class Surface
52  {
53  public:
54 
57 
59  Surface();
60 
62  virtual ~Surface();
63 
64  // Virtual methods.
65 
67  virtual Surface* clone() const = 0;
68 
70  virtual bool isTrackValid(const TrackVector& vec) const = 0;
71 
73  virtual void toLocal(const double xyz[3], double uvw[3]) const = 0;
74 
76  virtual void toGlobal(const double uvw[3], double xyz[3]) const = 0;
77 
79  virtual TrackVector getDiff(const TrackVector& vec1, const TrackVector& vec2) const;
80 
82  virtual void getPosition(const TrackVector& vec, double xyz[3]) const = 0;
83 
85  virtual TrackDirection getDirection(const TrackVector& /* vec */,
86  TrackDirection dir=UNKNOWN) const {return dir;}
87 
89  virtual void getMomentum(const TrackVector& vec, double mom[3],
90  TrackDirection dir=UNKNOWN) const = 0;
91 
93  virtual double PointingError(const TrackVector& vec, const TrackError& err) const = 0;
94 
96  virtual void getStartingError(TrackError& err) const = 0;
97 
99  virtual bool isParallel(const Surface& surf) const = 0;
100 
102  virtual double distanceTo(const Surface& surf) const = 0;
103 
105  virtual bool isEqual(const Surface& surf) const = 0;
106 
108  virtual std::ostream& Print(std::ostream& out) const = 0;
109  };
110 
112  std::ostream& operator<<(std::ostream& out, const Surface& surf);
113 }
114 
115 #endif
virtual void getStartingError(TrackError &err) const =0
Get starting error matrix for Kalman filter.
TrackDirection
Track direction enum.
Definition: Surface.h:56
virtual std::ostream & Print(std::ostream &out) const =0
Printout.
virtual double PointingError(const TrackVector &vec, const TrackError &err) const =0
Get pointing error of track.
KSymMatrix< 5 >::type TrackError
Track error matrix, dimension 5x5.
virtual bool isTrackValid(const TrackVector &vec) const =0
Surface-specific tests of validity of track parameters.
virtual Surface * clone() const =0
Clone method.
virtual bool isEqual(const Surface &surf) const =0
Test two surfaces for equality, within tolerance.
virtual bool isParallel(const Surface &surf) const =0
Test whether two surfaces are parallel, within tolerance.
virtual TrackVector getDiff(const TrackVector &vec1, const TrackVector &vec2) const
Calculate difference of two track parameter vectors.
Definition: Surface.cxx:33
std::ostream & operator<<(std::ostream &out, const KGTrack &trg)
Output operator.
Definition: KGTrack.cxx:306
virtual void toLocal(const double xyz[3], double uvw[3]) const =0
Transform global to local coordinates.
KVector< 5 >::type TrackVector
Track state vector, dimension 5.
virtual double distanceTo(const Surface &surf) const =0
Find perpendicular forward distance to a parallel surface.
Kalman filter linear algebra typedefs.
Surface()
Default constructor.
Definition: Surface.cxx:16
TDirectory * dir
Definition: macro.C:5
virtual void getMomentum(const TrackVector &vec, double mom[3], TrackDirection dir=UNKNOWN) const =0
Get momentum vector of track.
virtual ~Surface()
Destructor.
Definition: Surface.cxx:20
virtual TrackDirection getDirection(const TrackVector &, TrackDirection dir=UNKNOWN) const
Get direction of track (default UNKNOWN).
Definition: Surface.h:85
virtual void getPosition(const TrackVector &vec, double xyz[3]) const =0
Get position of track.
virtual void toGlobal(const double uvw[3], double xyz[3]) const =0
Transform local to global coordinates.