BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkSimpTraj Class Referenceabstract

#include <TrkSimpTraj.h>

+ Inheritance diagram for TrkSimpTraj:

Public Member Functions

 TrkSimpTraj (const HepVector &params, const HepSymMatrix &cov, const double startRange=-99999., const double endRange=99999., const HepPoint3D &refpoint=_theOrigin)
 
 TrkSimpTraj (const TrkParams &params, const double startRange=-99999., const double endRange=99999., const HepPoint3D &refpoint=_theOrigin)
 
virtual ~TrkSimpTraj ()
 
virtual TrkSimpTrajclone () const =0
 
TrkParamsparameters ()
 
const TrkParamsparameters () const
 
virtual const TrkSimpTrajlocalTrajectory (double fltLen, double &localFlt) const
 
const HepPoint3DreferencePoint () const
 
virtual void print (std::ostream &os) const
 
virtual void printAll (std::ostream &os) const
 
virtual int nPar () const
 
void changePoint (const HepPoint3D &newpoint, double &fltlen)
 
void setPoint (const HepPoint3D &newpoint)
 
TrkSimpTrajinvert ()
 
virtual void invertParams (TrkParams *newparams, std::vector< bool > &flags) const =0
 
virtual TranslateParams paramFunction () const =0
 
virtual void visitAccept (TrkVisitor *vis) const =0
 
bool operator== (const TrkSimpTraj &) const
 
 TrkSimpTraj (const HepVector &params, const HepSymMatrix &cov, const double startRange=-99999., const double endRange=99999., const HepPoint3D &refpoint=_theOrigin)
 
 TrkSimpTraj (const TrkParams &params, const double startRange=-99999., const double endRange=99999., const HepPoint3D &refpoint=_theOrigin)
 
virtual ~TrkSimpTraj ()
 
virtual TrkSimpTrajclone () const =0
 
TrkParamsparameters ()
 
const TrkParamsparameters () const
 
virtual const TrkSimpTrajlocalTrajectory (double fltLen, double &localFlt) const
 
const HepPoint3DreferencePoint () const
 
virtual void print (std::ostream &os) const
 
virtual void printAll (std::ostream &os) const
 
virtual int nPar () const
 
void changePoint (const HepPoint3D &newpoint, double &fltlen)
 
void setPoint (const HepPoint3D &newpoint)
 
TrkSimpTrajinvert ()
 
virtual void invertParams (TrkParams *newparams, std::vector< bool > &flags) const =0
 
virtual TranslateParams paramFunction () const =0
 
virtual void visitAccept (TrkVisitor *vis) const =0
 
bool operator== (const TrkSimpTraj &) const
 
- Public Member Functions inherited from TrkDifTraj
 TrkDifTraj (const double lowlim=-99999., const double hilim=99999.)
 
virtual ~TrkDifTraj ()
 
virtual void getDFInfo (double fltLen, DifPoint &pos, DifVector &direction, DifVector &delDirect) const =0
 
virtual void getDFInfo2 (double fltLen, DifPoint &pos, DifVector &direction) const
 
virtual const TrkSimpTrajlocalTrajectory (double fltLen, double &localFlt) const =0
 
 TrkDifTraj (const double lowlim=-99999., const double hilim=99999.)
 
virtual ~TrkDifTraj ()
 
virtual void getDFInfo (double fltLen, DifPoint &pos, DifVector &direction, DifVector &delDirect) const =0
 
virtual void getDFInfo2 (double fltLen, DifPoint &pos, DifVector &direction) const
 
virtual const TrkSimpTrajlocalTrajectory (double fltLen, double &localFlt) const =0
 
- Public Member Functions inherited from Trajectory
 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
 
 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
 
- Public Member Functions inherited from TrkKalDeriv
virtual HepMatrix derivDeflect (double fltlen, deflectDirection idir) const =0
 
virtual HepMatrix derivDisplace (double fltlen, deflectDirection idir) const =0
 
virtual HepMatrix derivPFract (double fltlen) const =0
 
virtual HepMatrix derivDeflect (double fltlen, deflectDirection idir) const =0
 
virtual HepMatrix derivDisplace (double fltlen, deflectDirection idir) const =0
 
virtual HepMatrix derivPFract (double fltlen) const =0
 

Static Public Attributes

static HepPoint3D _theOrigin
 

Protected Attributes

TrkParams _dtparams
 
HepPoint3D _refpoint
 
- Protected Attributes inherited from Trajectory
double flightrange [2]
 

Additional Inherited Members

- Protected Member Functions inherited from Trajectory
Trajectoryoperator= (const Trajectory &)
 
Trajectoryoperator= (const Trajectory &)
 

Detailed Description

Constructor & Destructor Documentation

◆ TrkSimpTraj() [1/4]

TrkSimpTraj::TrkSimpTraj ( const HepVector &  params,
const HepSymMatrix &  cov,
const double  startRange = -99999.,
const double  endRange = 99999.,
const HepPoint3D refpoint = _theOrigin 
)

Definition at line 30 of file TrkSimpTraj.cxx.

32 :
33//----------------------------------------------------------------------------
34 TrkDifTraj(lowlim, hilim),_dtparams(params, cov),_refpoint(refpoint)
35{;}

◆ TrkSimpTraj() [2/4]

TrkSimpTraj::TrkSimpTraj ( const TrkParams params,
const double  startRange = -99999.,
const double  endRange = 99999.,
const HepPoint3D refpoint = _theOrigin 
)

Definition at line 37 of file TrkSimpTraj.cxx.

39 :
40//----------------------------------------------------------------------------
41 TrkDifTraj(lowlim, hilim),_dtparams(params),_refpoint(refpoint)
42{;}

◆ ~TrkSimpTraj() [1/2]

TrkSimpTraj::~TrkSimpTraj ( )
virtual

Definition at line 53 of file TrkSimpTraj.cxx.

55{ }

◆ TrkSimpTraj() [3/4]

TrkSimpTraj::TrkSimpTraj ( const HepVector &  params,
const HepSymMatrix &  cov,
const double  startRange = -99999.,
const double  endRange = 99999.,
const HepPoint3D refpoint = _theOrigin 
)

◆ TrkSimpTraj() [4/4]

TrkSimpTraj::TrkSimpTraj ( const TrkParams params,
const double  startRange = -99999.,
const double  endRange = 99999.,
const HepPoint3D refpoint = _theOrigin 
)

◆ ~TrkSimpTraj() [2/2]

virtual TrkSimpTraj::~TrkSimpTraj ( )
virtual

Member Function Documentation

◆ changePoint() [1/2]

void TrkSimpTraj::changePoint ( const HepPoint3D newpoint,
double &  fltlen 
)

Definition at line 70 of file TrkSimpTraj.cxx.

70 {
71//----------------------------------------------------------------------------
72 if(newpoint != _refpoint){
73// find POCA to the new point
74 TrkPocaXY endpoca(*this,fltlen,newpoint);
75 if(endpoca.status().failure()){
76 std::cout<<"ErrMsg(error)" << "poca failure changing reference point" << std::endl;
77 return;
78 } else {
79// update flight length
80 fltlen = endpoca.flt1();
81// make a symmatrix from the covariance: temporary kludge
82 int nrow = parameters()->covariance().num_row();
83 HepSymMatrix cov(nrow);
84 for(int irow=0;irow<nrow;irow++)
85 for(int icol=0;icol<=irow;icol++)
86 cov.fast(irow+1,icol+1) = parameters()->covariance().fast(irow+1,icol+1);
87// Get the translation function
89// Use it on the SimpTraj parameters
90 pfunc(_refpoint,newpoint,
91 parameters()->parameter(),cov,
92 _dtparams.parameter(),cov,
93 fltlen);
94// put back the covariance
95 _dtparams.covariance() = cov;
96 _refpoint = newpoint;
97// update the flight range to correspond to the same range in space as before
98 double newrange[2];
99 newrange[0] = lowRange() - fltlen;
100 newrange[1] = hiRange() - fltlen;
101 setFlightRange(newrange);
102 }
103 }
104 return;
105}
void(* TranslateParams)(const HepPoint3D &oldpoint, const HepPoint3D &newpoint, const HepVector &oldpar, const HepSymMatrix &oldcov, HepVector &newpar, HepSymMatrix &newcov, double fltlen)
virtual void setFlightRange(double newrange[2])
Definition: Trajectory.cxx:57
virtual TranslateParams paramFunction() const =0
double precision pisqo6 parameter(pi=3.14159265358979d0, pisq=pi *pi, pisqo6=pisq/6d0) double precision zip

◆ changePoint() [2/2]

void TrkSimpTraj::changePoint ( const HepPoint3D newpoint,
double &  fltlen 
)

◆ clone() [1/2]

◆ clone() [2/2]

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

◆ invert() [1/2]

TrkSimpTraj & TrkSimpTraj::invert ( )

Definition at line 128 of file TrkSimpTraj.cxx.

129{
130 // Invert parameters
131 std::vector<bool> flags(parameters()->nPar(),false);
132 invertParams(parameters(), flags);
133 // loop over parameters and invert covariance matrix
134 for(int iparam=0;iparam<parameters()->nPar();iparam++){
135 bool iinvert = flags[iparam];
136// do covariance cross-terms too
137 for(int jparam=iparam+1;jparam<parameters()->nPar();jparam++){
138 bool jinvert = flags[jparam];
139 if( (iinvert && !jinvert) || (!iinvert && jinvert) ) {
140// cross-terms change sign
141 parameters()->covariance()[iparam][jparam] *= -1.0;
142 }
143 }
144 }
145// invert the flightlength
146 double range[2];
147 range[0] = -hiRange();
148 range[1] = -lowRange();
150// done
151 return *this;
152}
virtual void invertParams(TrkParams *newparams, std::vector< bool > &flags) const =0

◆ invert() [2/2]

TrkSimpTraj & TrkSimpTraj::invert ( )

◆ invertParams() [1/2]

virtual void TrkSimpTraj::invertParams ( TrkParams newparams,
std::vector< bool > &  flags 
) const
pure virtual

◆ invertParams() [2/2]

virtual void TrkSimpTraj::invertParams ( TrkParams newparams,
std::vector< bool > &  flags 
) const
pure virtual

◆ localTrajectory() [1/2]

const TrkSimpTraj * TrkSimpTraj::localTrajectory ( double  fltLen,
double &  localFlt 
) const
virtual

Implements TrkDifTraj.

Definition at line 59 of file TrkSimpTraj.cxx.

59 {
60//----------------------------------------------------------------------------
61 localFlt = fltLen;
62 return this;
63}

◆ localTrajectory() [2/2]

virtual const TrkSimpTraj * TrkSimpTraj::localTrajectory ( double  fltLen,
double &  localFlt 
) const
virtual

Implements TrkDifTraj.

◆ nPar() [1/2]

virtual int TrkSimpTraj::nPar ( ) const
inlinevirtual

◆ nPar() [2/2]

virtual int TrkSimpTraj::nPar ( ) const
inlinevirtual

◆ operator==() [1/2]

bool TrkSimpTraj::operator== ( const TrkSimpTraj x) const

Definition at line 156 of file TrkSimpTraj.cxx.

157{
158 if (lowRange()!=x.lowRange() || hiRange()!=x.hiRange()) return false;
159 const HepVector &m=_dtparams.parameter();
160 unsigned int mp=m.num_row();
161 const HepVector &n=x._dtparams.parameter();
162 unsigned int np=n.num_row();
163 if (np!=mp) return false;
164 for(unsigned i=0;i<np;++i){
165 if(m[i] != n[i]) return false;
166 }
167 return _refpoint==x._refpoint;
168}
const Int_t n
Double_t x[10]
const double mp
Definition: incllambda.cxx:45

◆ operator==() [2/2]

bool TrkSimpTraj::operator== ( const TrkSimpTraj ) const

◆ parameters() [1/4]

◆ parameters() [2/4]

TrkParams * TrkSimpTraj::parameters ( )
inline

◆ parameters() [3/4]

const TrkParams * TrkSimpTraj::parameters ( ) const
inline

Definition at line 81 of file InstallArea/include/TrkBase/TrkBase/TrkSimpTraj.h.

81{return &_dtparams;}

◆ parameters() [4/4]

const TrkParams * TrkSimpTraj::parameters ( ) const
inline

◆ paramFunction() [1/2]

virtual TranslateParams TrkSimpTraj::paramFunction ( ) const
pure virtual

◆ paramFunction() [2/2]

virtual TranslateParams TrkSimpTraj::paramFunction ( ) const
pure virtual

◆ print() [1/2]

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

Reimplemented from Trajectory.

Reimplemented in HelixTraj, and HelixTraj.

◆ print() [2/2]

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

Reimplemented from Trajectory.

Reimplemented in HelixTraj, and HelixTraj.

◆ printAll() [1/2]

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

Reimplemented from Trajectory.

Reimplemented in HelixTraj, and HelixTraj.

◆ printAll() [2/2]

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

Reimplemented from Trajectory.

Reimplemented in HelixTraj, and HelixTraj.

◆ referencePoint() [1/2]

◆ referencePoint() [2/2]

const HepPoint3D & TrkSimpTraj::referencePoint ( ) const
inline

◆ setPoint() [1/2]

void TrkSimpTraj::setPoint ( const HepPoint3D newpoint)
inline

Definition at line 96 of file InstallArea/include/TrkBase/TrkBase/TrkSimpTraj.h.

96{_refpoint = newpoint;}

◆ setPoint() [2/2]

void TrkSimpTraj::setPoint ( const HepPoint3D newpoint)
inline

◆ visitAccept() [1/2]

virtual void TrkSimpTraj::visitAccept ( TrkVisitor vis) const
pure virtual

◆ visitAccept() [2/2]

virtual void TrkSimpTraj::visitAccept ( TrkVisitor vis) const
pure virtual

Member Data Documentation

◆ _dtparams

◆ _refpoint

◆ _theOrigin

static HepPoint3D TrkSimpTraj::_theOrigin
static

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