LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "SurfXYZPlane.h"
Public Types | |
enum | TrackDirection { FORWARD, BACKWARD, UNKNOWN } |
Track direction enum. More... | |
Public Member Functions | |
SurfXYZPlane () | |
Default constructor. More... | |
SurfXYZPlane (double x0, double y0, double z0, double phi, double theta) | |
Initializing constructor (angles). More... | |
SurfXYZPlane (double x0, double y0, double z0, double nx, double ny, double nz) | |
Initializing constructor (normal vector). More... | |
virtual | ~SurfXYZPlane () |
Destructor. More... | |
double | x0 () const |
X origin. More... | |
double | y0 () const |
Y origin. More... | |
double | z0 () const |
Z origin. More... | |
double | phi () const |
Rot. angle about x-axis (wire angle). More... | |
double | theta () const |
Rot. angle about y'-axis (projected Lorentz angle). More... | |
virtual Surface * | clone () const |
Clone method. More... | |
virtual bool | isTrackValid (const TrackVector &vec) const |
Surface-specific tests of validity of track parameters. More... | |
virtual void | toLocal (const double xyz[3], double uvw[3]) const |
Transform global to local coordinates. More... | |
virtual void | toGlobal (const double uvw[3], double xyz[3]) const |
Transform local to global coordinates. More... | |
virtual void | getPosition (const TrackVector &vec, double xyz[3]) const |
Get position of track. More... | |
virtual void | getMomentum (const TrackVector &vec, double mom[3], TrackDirection dir=UNKNOWN) const |
Get momentum vector of track. More... | |
virtual bool | isParallel (const Surface &surf) const |
Test whether two surfaces are parallel, within tolerance. More... | |
virtual double | distanceTo (const Surface &surf) const |
Find perpendicular forward distance to a parallel surface. More... | |
virtual bool | isEqual (const Surface &surf) const |
Test two surfaces for equality, within tolerance. More... | |
virtual std::ostream & | Print (std::ostream &out) const |
Printout. More... | |
double | PointingError (const TrackVector &vec, const TrackError &err) const |
Get pointing error of track. More... | |
void | getStartingError (TrackError &err) const |
Get starting error matrix for Kalman filter. More... | |
virtual TrackVector | getDiff (const TrackVector &vec1, const TrackVector &vec2) const |
Calculate difference of two track parameter vectors. More... | |
virtual TrackDirection | getDirection (const TrackVector &, TrackDirection dir=UNKNOWN) const |
Get direction of track (default UNKNOWN). More... | |
Private Attributes | |
double | fX0 |
X origin. More... | |
double | fY0 |
Y origin. More... | |
double | fZ0 |
Z origin. More... | |
double | fPhi |
Rotation angle about x-axis (wire angle). More... | |
double | fTheta |
Rotation angle about y'-axis (projected Lorentz angle). More... | |
Static Private Attributes | |
static double | fPhiTolerance = 1.e-10 |
Phi tolerance for parallel. More... | |
static double | fThetaTolerance = 1.e-10 |
Theta tolerance for parallel. More... | |
static double | fSepTolerance = 1.e-6 |
Separation tolerance for equal. More... | |
Definition at line 83 of file SurfXYZPlane.h.
|
inherited |
Track direction enum.
Enumerator | |
---|---|
FORWARD | |
BACKWARD | |
UNKNOWN |
trkf::SurfXYZPlane::SurfXYZPlane | ( | ) |
Default constructor.
Definition at line 25 of file SurfXYZPlane.cxx.
Referenced by clone().
trkf::SurfXYZPlane::SurfXYZPlane | ( | double | x0, |
double | y0, | ||
double | z0, | ||
double | phi, | ||
double | theta | ||
) |
Initializing constructor (angles).
Initializing constructor.
Arguments:
x0, y0, z0 - Global coordinates of local origin. phi - Rotation angle about x-axis (wire angle). theta - Rotation angle about y'-axis (projected Lorentz angle).
Definition at line 41 of file SurfXYZPlane.cxx.
trkf::SurfXYZPlane::SurfXYZPlane | ( | double | x0, |
double | y0, | ||
double | z0, | ||
double | nx, | ||
double | ny, | ||
double | nz | ||
) |
Initializing constructor (normal vector).
Initializing constructor (normal vector).
Arguments:
x0, y0, z0 - Global coordinates of local origin. nx, ny, nz - Normal vector in global coordinate system.
Definition at line 56 of file SurfXYZPlane.cxx.
|
virtual |
|
virtual |
Clone method.
Implements trkf::Surface.
Definition at line 78 of file SurfXYZPlane.cxx.
References SurfXYZPlane().
Referenced by theta().
|
virtual |
Find perpendicular forward distance to a parallel surface.
Find perpendicular forward distance to a parallel surface.
Throw an exception if the other surface is not parallel.
Assuming the other surface is parallel, the distance is simply the w-coordinate of the other surface, and is signed.
Arguments:
surf - Other surface.
Returned value: Distance.
Implements trkf::Surface.
Definition at line 253 of file SurfXYZPlane.cxx.
References isParallel(), trkf::Surface::toGlobal(), and toLocal().
Referenced by isEqual(), and theta().
|
virtualinherited |
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 33 of file Surface.cxx.
|
inlinevirtualinherited |
Get direction of track (default UNKNOWN).
Definition at line 85 of file Surface.h.
References dir, trkf::Surface::distanceTo(), trkf::Surface::getMomentum(), trkf::Surface::getStartingError(), trkf::Surface::isEqual(), trkf::Surface::isParallel(), trkf::operator<<(), trkf::Surface::PointingError(), and trkf::Surface::Print().
Referenced by trkf::SurfYZPlane::getMomentum(), and getMomentum().
|
virtual |
Get momentum vector of track.
Get momentum vector of track.
Arguments:
vec - Track state vector. mom - Momentum vector in global coordinate system. dir - Track direction.
Implements trkf::Surface.
Definition at line 167 of file SurfXYZPlane.cxx.
References trkf::Surface::BACKWARD, e, trkf::Surface::FORWARD, fPhi, fTheta, trkf::Surface::getDirection(), and max.
Referenced by theta().
|
virtual |
Get position of track.
Get position of track.
Arguments:
vec - Track state vector. xyz - Position in global coordinate system.
Implements trkf::Surface.
Definition at line 144 of file SurfXYZPlane.cxx.
References toGlobal().
Referenced by theta().
|
virtualinherited |
Get starting error matrix for Kalman filter.
Get starting error matrix for Kalman filter.
Arguments:
err - Error matrix.
Implements trkf::Surface.
Definition at line 80 of file SurfPlane.cxx.
|
virtual |
Test two surfaces for equality, within tolerance.
Test two surfaces for equality, within tolerance. Here equal is defined as parallel and having zero separation, within tolerance. Note that this definition of equality allows the two surfaces to have different origins.
Arguments:
surf - Other surface.
Returned values: true if equal.
Implements trkf::Surface.
Definition at line 286 of file SurfXYZPlane.cxx.
References distanceTo(), fSepTolerance, and isParallel().
Referenced by theta().
|
virtual |
Test whether two surfaces are parallel, within tolerance.
Test whether two surfaces are parallel, within tolerance. This method will only return true if the other surface is a SurfXYZPlane.
Arguments:
surf - Other surface.
Returned value: true if parallel.
Implements trkf::Surface.
Definition at line 220 of file SurfXYZPlane.cxx.
References fPhi, fPhiTolerance, fTheta, fThetaTolerance, phi(), and theta().
Referenced by distanceTo(), isEqual(), and theta().
|
virtual |
Surface-specific tests of validity of track parameters.
Implements trkf::Surface.
Definition at line 84 of file SurfXYZPlane.cxx.
Referenced by theta().
|
inline |
Rot. angle about x-axis (wire angle).
Definition at line 104 of file SurfXYZPlane.h.
References fPhi.
Referenced by isParallel(), trkf::PropXYZPlane::origin_vec_prop(), and trkf::PropXYZPlane::short_vec_prop().
|
virtualinherited |
Get pointing error of track.
Get pointing error of track.
Arguments:
vec - Track parameters. err - Track error matrix.
Returns: Pointing error.
This method calculates the track pointing error based on the slope track paramers and errors (parameters 2 and 3).
Implements trkf::Surface.
Definition at line 36 of file SurfPlane.cxx.
References den.
|
virtual |
Printout.
Implements trkf::Surface.
Definition at line 303 of file SurfXYZPlane.cxx.
References fPhi, fTheta, fX0, fY0, and fZ0.
Referenced by theta().
|
inline |
Rot. angle about y'-axis (projected Lorentz angle).
Definition at line 105 of file SurfXYZPlane.h.
References clone(), dir, distanceTo(), fTheta, getMomentum(), getPosition(), isEqual(), isParallel(), isTrackValid(), Print(), toGlobal(), toLocal(), and trkf::Surface::UNKNOWN.
Referenced by isParallel(), trkf::PropXYZPlane::origin_vec_prop(), and trkf::PropXYZPlane::short_vec_prop().
|
virtual |
Transform local to global coordinates.
Transform local to global coordinates.
Arguments:
uvw - Cartesian coordinates in local coordinate system. xyz - Cartesian coordinates in global coordinate system.
Implements trkf::Surface.
Definition at line 120 of file SurfXYZPlane.cxx.
References fPhi, fTheta, fX0, fY0, and fZ0.
Referenced by getPosition(), and theta().
|
virtual |
Transform global to local coordinates.
Transform global to local coordinates.
Arguments:
xyz - Cartesian coordinates in global coordinate system. uvw - Cartesian coordinates in local coordinate system.
Implements trkf::Surface.
Definition at line 96 of file SurfXYZPlane.cxx.
References fPhi, fTheta, fX0, fY0, and fZ0.
Referenced by distanceTo(), and theta().
|
inline |
X origin.
Definition at line 101 of file SurfXYZPlane.h.
References fX0.
Referenced by trkf::PropXYZPlane::short_vec_prop().
|
inline |
Y origin.
Definition at line 102 of file SurfXYZPlane.h.
References fY0.
Referenced by trkf::PropXYZPlane::short_vec_prop().
|
inline |
Z origin.
Definition at line 103 of file SurfXYZPlane.h.
References fZ0.
Referenced by trkf::PropXYZPlane::short_vec_prop().
|
private |
Rotation angle about x-axis (wire angle).
Definition at line 151 of file SurfXYZPlane.h.
Referenced by getMomentum(), isParallel(), phi(), Print(), SurfXYZPlane(), toGlobal(), and toLocal().
|
staticprivate |
Phi tolerance for parallel.
Definition at line 142 of file SurfXYZPlane.h.
Referenced by isParallel().
|
staticprivate |
Separation tolerance for equal.
Definition at line 144 of file SurfXYZPlane.h.
Referenced by isEqual().
|
private |
Rotation angle about y'-axis (projected Lorentz angle).
Definition at line 152 of file SurfXYZPlane.h.
Referenced by getMomentum(), isParallel(), Print(), SurfXYZPlane(), theta(), toGlobal(), and toLocal().
|
staticprivate |
Theta tolerance for parallel.
Definition at line 143 of file SurfXYZPlane.h.
Referenced by isParallel().
|
private |
X origin.
Definition at line 148 of file SurfXYZPlane.h.
Referenced by Print(), toGlobal(), toLocal(), and x0().
|
private |
Y origin.
Definition at line 149 of file SurfXYZPlane.h.
Referenced by Print(), toGlobal(), toLocal(), and y0().
|
private |
Z origin.
Definition at line 150 of file SurfXYZPlane.h.
Referenced by Print(), toGlobal(), toLocal(), and z0().