00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef TRKSIMPTRAJ_HH
00026 #define TRKSIMPTRAJ_HH
00027
00028 #include "TrkBase/TrkDifTraj.h"
00029 #include "TrkBase/TrkKalDeriv.h"
00030 #include "TrkBase/TrkParams.h"
00031 #include "CLHEP/Geometry/Point3D.h"
00032 #ifndef ENABLE_BACKWARDS_COMPATIBILITY
00033 typedef HepGeom::Point3D<double> HepPoint3D;
00034 #endif
00035 #include "CLHEP/Matrix/Vector.h"
00036 #include "CLHEP/Matrix/SymMatrix.h"
00037
00038 #include <vector>
00039
00040 class TrkVisitor;
00041 using CLHEP::HepVector;
00042 using CLHEP::HepSymMatrix;
00043 #include <iosfwd>
00044
00045
00046 typedef void (*TranslateParams)(const HepPoint3D& oldpoint,
00047 const HepPoint3D& newpoint,
00048 const HepVector& oldpar,
00049 const HepSymMatrix& oldcov,
00050 HepVector& newpar,
00051 HepSymMatrix& newcov,
00052 double fltlen);
00053
00054
00055 class TrkSimpTraj : public TrkDifTraj, public TrkKalDeriv {
00056
00057 public:
00058
00059 static HepPoint3D _theOrigin;
00060
00061
00062 public:
00063
00064
00065
00066
00067 TrkSimpTraj(const HepVector& params, const HepSymMatrix& cov,
00068 const double startRange = -99999.,const double endRange =99999.,
00069 const HepPoint3D& refpoint = _theOrigin);
00070 TrkSimpTraj(const TrkParams& params,
00071 const double startRange = -99999.,const double endRange =99999.,
00072 const HepPoint3D& refpoint = _theOrigin);
00073 virtual ~TrkSimpTraj();
00074
00075 virtual TrkSimpTraj* clone() const = 0;
00076
00077
00078
00079
00080 TrkParams* parameters() {return &_dtparams;}
00081 const TrkParams* parameters() const {return &_dtparams;}
00082 virtual const TrkSimpTraj* localTrajectory(double fltLen, double& localFlt)
00083 const;
00084 const HepPoint3D& referencePoint() const {return _refpoint;}
00085 virtual void print(std::ostream& os) const;
00086 virtual void printAll(std::ostream& os) const;
00087
00088 virtual int nPar() const {return parameters()->nPar();}
00089
00090
00091
00092
00093
00094 void changePoint(const HepPoint3D& newpoint,double& fltlen);
00095
00096 void setPoint(const HepPoint3D& newpoint) {_refpoint = newpoint;}
00097
00098
00099 TrkSimpTraj& invert();
00100
00101
00102
00103 virtual void invertParams(TrkParams* newparams, std::vector<bool>& flags) const = 0;
00104
00105 virtual TranslateParams paramFunction() const = 0;
00106
00107
00108
00109
00110
00111 virtual void visitAccept(TrkVisitor* vis) const = 0;
00112
00113 bool operator==(const TrkSimpTraj&) const;
00114
00115
00116 protected:
00117 TrkParams _dtparams;
00118 HepPoint3D _refpoint;
00119 private:
00120
00121 TrkSimpTraj(const TrkSimpTraj &);
00122 TrkSimpTraj& operator= (const TrkSimpTraj&);
00123 };
00124 #endif