TrkLineTraj Class Reference

#include <TrkLineTraj.h>

Inheritance diagram for TrkLineTraj:

TrkGeomTraj Trajectory List of all members.

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 &)
TrkLineTrajclone () const
 ~TrkLineTraj ()
TrkLineTrajoperator= (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

Detailed Description

Definition at line 19 of file TrkLineTraj.h.


Constructor & Destructor Documentation

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 (  ) 

Definition at line 53 of file TrkLineTraj.cxx.

00054 {
00055 }


Member Function Documentation

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]

Implements Trajectory.

Definition at line 104 of file TrkLineTraj.cxx.

00105 {
00106   return 0.0;
00107 }

Hep3Vector TrkLineTraj::delDirect ( double   )  const [virtual]

Implements Trajectory.

Definition at line 86 of file TrkLineTraj.cxx.

Referenced by getInfo().

00087 {
00088   return Hep3Vector(0.,0.,0.);
00089 }

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]

Definition at line 51 of file Trajectory.cxx.

00052 {
00053   return fabs(tolerance);
00054 }

double TrkLineTraj::distTo1stError ( double  s,
double  tol,
int  pathDir 
) const [virtual]

Implements Trajectory.

Definition at line 92 of file TrkLineTraj.cxx.

00093 {
00094   return 999.e4;
00095 }

double TrkLineTraj::distTo2ndError ( double  s,
double  tol,
int  pathDir 
) const [virtual]

Implements Trajectory.

Definition at line 98 of file TrkLineTraj.cxx.

00099 {
00100   return 999.e4;
00101 }

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().

00111 {
00112   pos = position(fltLen);
00113   dir = direction(fltLen);
00114 }

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().

00093 { return hiRange()-lowRange(); }

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 }


Member Data Documentation

Hep3Vector TrkLineTraj::_direction [private]

Definition at line 56 of file TrkLineTraj.h.

Referenced by direction(), operator=(), position(), and TrkLineTraj().

HepPoint3D TrkLineTraj::_start [private]

Definition at line 55 of file TrkLineTraj.h.

Referenced by operator=(), and position().

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().


Generated on Tue Nov 29 23:36:15 2016 for BOSS_7.0.2 by  doxygen 1.4.7