LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
trkf::Surface Class Referenceabstract

#include "Surface.h"

Inheritance diagram for trkf::Surface:
trkf::SurfLine trkf::SurfPlane trkf::SurfYZLine trkf::SurfXYZPlane trkf::SurfYZPlane trkf::SurfWireLine trkf::SurfWireX

Public Types

enum  TrackDirection { FORWARD, BACKWARD, UNKNOWN }
 Track direction enum. More...
 

Public Member Functions

 Surface ()
 Default constructor. More...
 
virtual ~Surface ()
 Destructor. More...
 
virtual Surfaceclone () const =0
 Clone method. More...
 
virtual bool isTrackValid (const TrackVector &vec) const =0
 Surface-specific tests of validity of track parameters. More...
 
virtual void toLocal (const double xyz[3], double uvw[3]) const =0
 Transform global to local coordinates. More...
 
virtual void toGlobal (const double uvw[3], double xyz[3]) const =0
 Transform local to global coordinates. More...
 
virtual TrackVector getDiff (const TrackVector &vec1, const TrackVector &vec2) const
 Calculate difference of two track parameter vectors. More...
 
virtual void getPosition (const TrackVector &vec, double xyz[3]) const =0
 Get position of track. More...
 
virtual TrackDirection getDirection (const TrackVector &, TrackDirection dir=UNKNOWN) const
 Get direction of track (default UNKNOWN). More...
 
virtual void getMomentum (const TrackVector &vec, double mom[3], TrackDirection dir=UNKNOWN) const =0
 Get momentum vector of track. More...
 
virtual double PointingError (const TrackVector &vec, const TrackError &err) const =0
 Get pointing error of track. More...
 
virtual void getStartingError (TrackError &err) const =0
 Get starting error matrix for Kalman filter. More...
 
virtual bool isParallel (const Surface &surf) const =0
 Test whether two surfaces are parallel, within tolerance. More...
 
virtual double distanceTo (const Surface &surf) const =0
 Find perpendicular forward distance to a parallel surface. More...
 
virtual bool isEqual (const Surface &surf) const =0
 Test two surfaces for equality, within tolerance. More...
 
virtual std::ostream & Print (std::ostream &out) const =0
 Printout. More...
 

Detailed Description

Definition at line 51 of file Surface.h.

Member Enumeration Documentation

Track direction enum.

Enumerator
FORWARD 
BACKWARD 
UNKNOWN 

Definition at line 54 of file Surface.h.

Constructor & Destructor Documentation

trkf::Surface::Surface ( )

Default constructor.

Definition at line 16 of file Surface.cxx.

16 {}
trkf::Surface::~Surface ( )
virtual

Destructor.

Definition at line 19 of file Surface.cxx.

19 {}

Member Function Documentation

virtual Surface* trkf::Surface::clone ( ) const
pure virtual

Clone method.

Implemented in trkf::SurfXYZPlane, trkf::SurfYZLine, and trkf::SurfYZPlane.

virtual double trkf::Surface::distanceTo ( const Surface surf) const
pure virtual

Find perpendicular forward distance to a parallel surface.

Implemented in trkf::SurfXYZPlane, trkf::SurfYZLine, and trkf::SurfYZPlane.

Referenced by getDirection().

TrackVector trkf::Surface::getDiff ( const TrackVector vec1,
const TrackVector vec2 
) const
virtual

Calculate difference of two track parameter vectors.

Calculate difference of two track parameter vectors. This method has a default implementation which is just the numeric difference. Surfaces that require a more sophisticated difference (e.g. phi-wrap difference) should override this method.

Reimplemented in trkf::SurfYZLine.

Definition at line 31 of file Surface.cxx.

32  {
33  return vec1 - vec2;
34  }
virtual TrackDirection trkf::Surface::getDirection ( const TrackVector ,
TrackDirection  dir = UNKNOWN 
) const
inlinevirtual

Get direction of track (default UNKNOWN).

Definition at line 83 of file Surface.h.

References dir, distanceTo(), getMomentum(), getStartingError(), isEqual(), isParallel(), trkf::operator<<(), PointingError(), and Print().

Referenced by trkf::SurfYZPlane::getMomentum(), and trkf::SurfXYZPlane::getMomentum().

85  {
86  return dir;
87  }
TDirectory * dir
Definition: macro.C:5
virtual void trkf::Surface::getMomentum ( const TrackVector vec,
double  mom[3],
TrackDirection  dir = UNKNOWN 
) const
pure virtual

Get momentum vector of track.

Implemented in trkf::SurfXYZPlane, trkf::SurfYZLine, and trkf::SurfYZPlane.

Referenced by getDirection().

virtual void trkf::Surface::getPosition ( const TrackVector vec,
double  xyz[3] 
) const
pure virtual

Get position of track.

Implemented in trkf::SurfXYZPlane, trkf::SurfYZLine, and trkf::SurfYZPlane.

virtual void trkf::Surface::getStartingError ( TrackError err) const
pure virtual

Get starting error matrix for Kalman filter.

Implemented in trkf::SurfLine, and trkf::SurfPlane.

Referenced by getDirection().

virtual bool trkf::Surface::isEqual ( const Surface surf) const
pure virtual

Test two surfaces for equality, within tolerance.

Implemented in trkf::SurfXYZPlane, trkf::SurfYZLine, and trkf::SurfYZPlane.

Referenced by getDirection().

virtual bool trkf::Surface::isParallel ( const Surface surf) const
pure virtual

Test whether two surfaces are parallel, within tolerance.

Implemented in trkf::SurfXYZPlane, trkf::SurfYZLine, and trkf::SurfYZPlane.

Referenced by getDirection().

virtual bool trkf::Surface::isTrackValid ( const TrackVector vec) const
pure virtual

Surface-specific tests of validity of track parameters.

Implemented in trkf::SurfXYZPlane, trkf::SurfYZLine, and trkf::SurfYZPlane.

virtual double trkf::Surface::PointingError ( const TrackVector vec,
const TrackError err 
) const
pure virtual

Get pointing error of track.

Implemented in trkf::SurfLine, and trkf::SurfPlane.

Referenced by getDirection().

virtual std::ostream& trkf::Surface::Print ( std::ostream &  out) const
pure virtual

Printout.

Implemented in trkf::SurfXYZPlane, trkf::SurfYZLine, and trkf::SurfYZPlane.

Referenced by getDirection(), and trkf::operator<<().

virtual void trkf::Surface::toGlobal ( const double  uvw[3],
double  xyz[3] 
) const
pure virtual
virtual void trkf::Surface::toLocal ( const double  xyz[3],
double  uvw[3] 
) const
pure virtual

Transform global to local coordinates.

Implemented in trkf::SurfXYZPlane, trkf::SurfYZLine, and trkf::SurfYZPlane.


The documentation for this class was generated from the following files: