CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
Trajectory Class Referenceabstract

#include <Trajectory.h>

+ Inheritance diagram for Trajectory:

Public Member Functions

 Trajectory (double lowlim, double hilim)
 
virtual ~Trajectory ()
 
virtual HepPoint3D position (double) const =0
 
virtual Hep3Vector direction (double) const =0
 
virtual Hep3Vector delDirect (double) const =0
 
virtual double curvature (double) const =0
 
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &direction) const =0
 
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &direction, Hep3Vector &delDirect) const =0
 
double distTo0thError (double s, double tol, int pathDir) const
 
virtual double distTo1stError (double s, double tol, int pathDir) const =0
 
virtual double distTo2ndError (double s, double tol, int pathDir) const =0
 
virtual Trajectoryclone () const =0
 
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 Member Functions

Trajectoryoperator= (const Trajectory &)
 

Protected Attributes

double flightrange [2]
 

Detailed Description

Definition at line 35 of file Trajectory.h.

Constructor & Destructor Documentation

◆ Trajectory()

Trajectory::Trajectory ( double  lowlim,
double  hilim 
)

Definition at line 35 of file Trajectory.cxx.

36{
37 if (hilim < lowlim) {
38 std::cout<<"ErrMsg(error) " << "Invalid Trajectory range requested." << std::endl;
39 flightrange[0] = hilim;
40 flightrange[1] = lowlim;
41 }
42 flightrange[0] = lowlim;
43 flightrange[1] = hilim;
44}
double flightrange[2]
Definition: Trajectory.h:83

◆ ~Trajectory()

Trajectory::~Trajectory ( )
virtual

Definition at line 46 of file Trajectory.cxx.

47{
48}

Member Function Documentation

◆ clone()

virtual Trajectory * Trajectory::clone ( ) const
pure virtual

◆ curvature()

virtual double Trajectory::curvature ( double  ) const
pure virtual

◆ delDirect()

virtual Hep3Vector Trajectory::delDirect ( double  ) const
pure virtual

◆ direction()

◆ distTo0thError()

double Trajectory::distTo0thError ( double  s,
double  tol,
int  pathDir 
) const

Definition at line 51 of file Trajectory.cxx.

52{
53 return fabs(tolerance);
54}

◆ distTo1stError()

virtual double Trajectory::distTo1stError ( double  s,
double  tol,
int  pathDir 
) const
pure virtual

◆ distTo2ndError()

virtual double Trajectory::distTo2ndError ( double  s,
double  tol,
int  pathDir 
) const
pure virtual

◆ getInfo() [1/2]

◆ getInfo() [2/2]

virtual void Trajectory::getInfo ( double  fltLen,
HepPoint3D pos,
Hep3Vector &  direction,
Hep3Vector &  delDirect 
) const
pure virtual

◆ hiRange()

◆ lowRange()

◆ operator=()

Trajectory & Trajectory::operator= ( const Trajectory other)
protected

Definition at line 86 of file Trajectory.cxx.

87{
88 flightrange[0] = other.flightrange[0];
89 flightrange[1] = other.flightrange[1];
90 return *this;
91}
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

Referenced by HelixTraj::operator=(), TrkCircleTraj::operator=(), TrkDifLineTraj::operator=(), and TrkLineTraj::operator=().

◆ position()

◆ print()

void Trajectory::print ( std::ostream &  os) const
virtual

Reimplemented in HelixTraj, TrkDifPieceTraj, and TrkSimpTraj.

Definition at line 70 of file Trajectory.cxx.

71{
72 os << "Trajectory range from "
73 << flightrange[0] << " to "
74 << flightrange[1] << endl;
75}

Referenced by HelixTraj::print(), and TrkSimpTraj::print().

◆ printAll()

void Trajectory::printAll ( std::ostream &  os) const
virtual

Reimplemented in HelixTraj, TrkDifPieceTraj, and TrkSimpTraj.

Definition at line 78 of file Trajectory.cxx.

79{
80 os << "Trajectory range from "
81 << flightrange[0] << " to "
82 << flightrange[1] << endl;
83}

Referenced by TrkSimpTraj::printAll().

◆ range()

double Trajectory::range ( ) const
inline

Definition at line 93 of file Trajectory.h.

93{ return hiRange()-lowRange(); }
double lowRange() const
Definition: Trajectory.h:91
double hiRange() const
Definition: Trajectory.h:92

Referenced by TrkDifPieceTraj::append(), TrkDifPieceTraj::invert(), TrkSimpTraj::invert(), and TrkDifPieceTraj::prepend().

◆ setFlightRange()

void Trajectory::setFlightRange ( double  newrange[2])
virtual

Reimplemented in TrkDifPieceTraj.

Definition at line 57 of file Trajectory.cxx.

58{
59 if (newrange[1] >= newrange[0]) {
60 flightrange[0] = newrange[0];
61 flightrange[1] = newrange[1];
62 } else {
63 std::cout<<"ErrMsg(error) "<< "Invalid Trajectory range requested." << std::endl;
64 flightrange[0] = newrange[1];
65 flightrange[1] = newrange[0];
66 }
67}

Referenced by TrkDifPieceTraj::append(), TrkSimpTraj::changePoint(), TrkDifPieceTraj::invert(), TrkSimpTraj::invert(), TrkDifPieceTraj::prepend(), and TrkDifPieceTraj::TrkDifPieceTraj().

◆ validFlightDistance()

bool Trajectory::validFlightDistance ( double  f,
double  tolerance = 0.0 
) const
inline

Definition at line 88 of file Trajectory.h.

88 {
89 return f >= flightrange[0]-tol && f <= flightrange[1]+tol;
90}

Referenced by TrkDifPieceTraj::trajIndex().

Member Data Documentation

◆ flightrange


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