#include <TrkLineTraj.h>
Inheritance diagram for TrkLineTraj:
Public Member Functions | |
TrkLineTraj (const HepPoint3D &point, const Hep3Vector &direction, double length) | |
TrkLineTraj (const HepPoint3D &point, const Hep3Vector &direction, double lorange, double hirange) | |
TrkLineTraj (const HepPoint3D &point1, const HepPoint3D &point2) | |
TrkLineTraj (const TrkLineTraj &) | |
TrkLineTraj * | clone () const |
~TrkLineTraj () | |
TrkLineTraj & | operator= (const TrkLineTraj &) |
HepPoint3D | position (double) const |
Hep3Vector | direction (double) const |
double | curvature (double f=0.) const |
Hep3Vector | delDirect (double) const |
void | getInfo (double fltLen, HepPoint3D &, Hep3Vector &direction) const |
void | getInfo (double fltLen, HepPoint3D &, Hep3Vector &direction, Hep3Vector &delDirect) const |
virtual double | distTo1stError (double s, double tol, int pathDir) const |
virtual double | distTo2ndError (double s, double tol, int pathDir) const |
void | accept (TrkGeomTrajVisitor &visitor) const |
double | distTo0thError (double s, double tol, int pathDir) const |
bool | validFlightDistance (double f, double tolerance=0.0) const |
virtual void | setFlightRange (double newrange[2]) |
double | lowRange () const |
double | hiRange () const |
double | range () const |
virtual void | print (std::ostream &os) const |
virtual void | printAll (std::ostream &os) const |
Protected Attributes | |
double | flightrange [2] |
Private Attributes | |
HepPoint3D | _start |
Hep3Vector | _direction |
Definition at line 19 of file TrkLineTraj.h.
TrkLineTraj::TrkLineTraj | ( | const HepPoint3D & | point, | |
const Hep3Vector & | direction, | |||
double | length | |||
) |
Definition at line 17 of file TrkLineTraj.cxx.
References _direction.
Referenced by clone().
00018 : 00019 TrkGeomTraj(0.0,length) , _start(point), 00020 _direction(direction) 00021 { 00022 _direction.setMag(1.0); 00023 }
TrkLineTraj::TrkLineTraj | ( | const HepPoint3D & | point, | |
const Hep3Vector & | direction, | |||
double | lorange, | |||
double | hirange | |||
) |
Definition at line 26 of file TrkLineTraj.cxx.
00029 : 00030 TrkGeomTraj(lorange,hirange), 00031 _start(point), 00032 _direction(direction) 00033 { 00034 _direction.setMag(1.0); 00035 }
TrkLineTraj::TrkLineTraj | ( | const HepPoint3D & | point1, | |
const HepPoint3D & | point2 | |||
) |
Definition at line 39 of file TrkLineTraj.cxx.
References _direction.
00040 : TrkGeomTraj(0.0,point1.distance2(point2)), _start(point1) 00041 { 00042 //_direction = point2 - point1; 00043 _direction = ((CLHEP::Hep3Vector) point2) - ((CLHEP::Hep3Vector) point1); 00044 _direction.setMag(1.0); 00045 }
TrkLineTraj::TrkLineTraj | ( | const TrkLineTraj & | ) |
Definition at line 47 of file TrkLineTraj.cxx.
00047 : 00048 TrkGeomTraj(other.lowRange(),other.hiRange()), _start(other._start), 00049 _direction(other._direction) 00050 { 00051 }
TrkLineTraj::~TrkLineTraj | ( | ) |
void TrkLineTraj::accept | ( | TrkGeomTrajVisitor & | visitor | ) | const [virtual] |
Reimplemented from TrkGeomTraj.
Definition at line 126 of file TrkLineTraj.cxx.
References TrkGeomTrajVisitor::visitLine().
00127 { 00128 visitor.visitLine(this); 00129 }
TrkLineTraj * TrkLineTraj::clone | ( | ) | const [virtual] |
Implements TrkGeomTraj.
Definition at line 68 of file TrkLineTraj.cxx.
References TrkLineTraj().
00069 { 00070 return new TrkLineTraj(*this); 00071 }
double TrkLineTraj::curvature | ( | double | f = 0. |
) | const [virtual] |
Hep3Vector TrkLineTraj::delDirect | ( | double | ) | const [virtual] |
Hep3Vector TrkLineTraj::direction | ( | double | ) | const [virtual] |
Implements Trajectory.
Definition at line 80 of file TrkLineTraj.cxx.
References _direction.
Referenced by getInfo().
00081 { 00082 return _direction; 00083 }
double Trajectory::distTo0thError | ( | double | s, | |
double | tol, | |||
int | pathDir | |||
) | const [inherited] |
double TrkLineTraj::distTo1stError | ( | double | s, | |
double | tol, | |||
int | pathDir | |||
) | const [virtual] |
double TrkLineTraj::distTo2ndError | ( | double | s, | |
double | tol, | |||
int | pathDir | |||
) | const [virtual] |
void TrkLineTraj::getInfo | ( | double | fltLen, | |
HepPoint3D & | , | |||
Hep3Vector & | direction, | |||
Hep3Vector & | delDirect | |||
) | const [virtual] |
Implements Trajectory.
Definition at line 117 of file TrkLineTraj.cxx.
References delDirect(), direction(), and position().
00119 { 00120 pos = position(fltLen); 00121 dir = direction(fltLen); 00122 delDir = delDirect(fltLen); 00123 }
void TrkLineTraj::getInfo | ( | double | fltLen, | |
HepPoint3D & | , | |||
Hep3Vector & | direction | |||
) | const [virtual] |
Implements Trajectory.
Definition at line 110 of file TrkLineTraj.cxx.
References direction(), and position().
double Trajectory::hiRange | ( | ) | const [inline, inherited] |
Definition at line 92 of file Trajectory.h.
References Trajectory::flightrange.
Referenced by TrkDifPieceTraj::append(), TrkSimpTraj::changePoint(), MdcUtilitySvc::docaPatPar(), TrkRep::endValidRange(), TrkCompTrk::endValidRange(), TrkSimpTraj::invert(), TrkDifPieceTraj::invert(), TrkDifPieceTraj::locallyValid(), MdcHitOnTrack::MdcHitOnTrack(), TrkSimpTraj::operator==(), TrkDifPieceTraj::prepend(), and Trajectory::range().
00092 {return flightrange[1];}
double Trajectory::lowRange | ( | ) | const [inline, inherited] |
Definition at line 91 of file Trajectory.h.
References Trajectory::flightrange.
Referenced by TrkDifPieceTraj::append(), TrkSimpTraj::changePoint(), MdcUtilitySvc::docaPatPar(), TrkSimpTraj::invert(), TrkDifPieceTraj::invert(), TrkDifPieceTraj::locallyValid(), MdcHitOnTrack::MdcHitOnTrack(), TrkSimpTraj::operator==(), TrkDifPieceTraj::prepend(), Trajectory::range(), TrkRep::startValidRange(), TrkCompTrk::startValidRange(), TrkDifPieceTraj::trajIndex(), and TrkDifPieceTraj::TrkDifPieceTraj().
00091 {return flightrange[0];}
TrkLineTraj & TrkLineTraj::operator= | ( | const TrkLineTraj & | ) |
Definition at line 57 of file TrkLineTraj.cxx.
References _direction, _start, Trajectory::operator=(), and EvtCyclic3::other().
00058 { 00059 if(&other != this){ 00060 Trajectory::operator=(other); 00061 _start = other._start; 00062 _direction = other._direction; 00063 } 00064 return *this; 00065 }
HepPoint3D TrkLineTraj::position | ( | double | ) | const [virtual] |
Implements Trajectory.
Definition at line 74 of file TrkLineTraj.cxx.
References _direction, and _start.
Referenced by getInfo().
00075 { 00076 return _start + _direction*flightlen; 00077 }
virtual void Trajectory::print | ( | std::ostream & | os | ) | const [virtual, inherited] |
Reimplemented in HelixTraj, TrkDifPieceTraj, and TrkSimpTraj.
virtual void Trajectory::printAll | ( | std::ostream & | os | ) | const [virtual, inherited] |
Reimplemented in HelixTraj, TrkDifPieceTraj, and TrkSimpTraj.
double Trajectory::range | ( | ) | const [inline, inherited] |
Definition at line 93 of file Trajectory.h.
References Trajectory::hiRange(), and Trajectory::lowRange().
Referenced by TrkDifPieceTraj::append(), TrkSimpTraj::invert(), TrkDifPieceTraj::invert(), and TrkDifPieceTraj::prepend().
void Trajectory::setFlightRange | ( | double | newrange[2] | ) | [virtual, inherited] |
Reimplemented in TrkDifPieceTraj.
Definition at line 57 of file Trajectory.cxx.
References Trajectory::flightrange.
Referenced by TrkDifPieceTraj::append(), TrkSimpTraj::changePoint(), TrkSimpTraj::invert(), TrkDifPieceTraj::invert(), TrkDifPieceTraj::prepend(), and TrkDifPieceTraj::TrkDifPieceTraj().
00058 { 00059 if (newrange[1] >= newrange[0]) { 00060 flightrange[0] = newrange[0]; 00061 flightrange[1] = newrange[1]; 00062 } else { 00063 std::cout<<"ErrMsg(error) "<< "Invalid Trajectory range requested." << std::endl; 00064 flightrange[0] = newrange[1]; 00065 flightrange[1] = newrange[0]; 00066 } 00067 }
bool Trajectory::validFlightDistance | ( | double | f, | |
double | tolerance = 0.0 | |||
) | const [inline, inherited] |
Definition at line 88 of file Trajectory.h.
References Trajectory::flightrange.
Referenced by TrkDifPieceTraj::trajIndex().
00088 { 00089 return f >= flightrange[0]-tol && f <= flightrange[1]+tol; 00090 }
Hep3Vector TrkLineTraj::_direction [private] |
Definition at line 56 of file TrkLineTraj.h.
Referenced by direction(), operator=(), position(), and TrkLineTraj().
HepPoint3D TrkLineTraj::_start [private] |
double Trajectory::flightrange[2] [protected, inherited] |
Definition at line 83 of file Trajectory.h.
Referenced by TrkDifPieceTraj::append(), Trajectory::hiRange(), Trajectory::lowRange(), TrkDifPieceTraj::operator=(), NeutTraj::operator=(), Trajectory::operator=(), MdcSagTraj::operator=(), TrkDifPieceTraj::prepend(), TrkDifPieceTraj::resize(), TrkDifPieceTraj::setFlightRange(), Trajectory::setFlightRange(), Trajectory::Trajectory(), TrkDifPieceTraj::TrkDifPieceTraj(), and Trajectory::validFlightDistance().