/home/mweber/Dokumente/CMS/Alignment/kalmanalignment/trunk/simulation/Track.h
Go to the documentation of this file.
00001 #ifndef _Track_h 00002 #define _Track_h 00003 00004 #include <vector> 00005 00006 #include <CLHEP/Matrix/Vector.h> 00007 #include <CLHEP/Matrix/Matrix.h> 00008 #include <CLHEP/Matrix/SymMatrix.h> 00009 00010 #include "Det.h" 00011 #include "Hit.h" 00012 00031 class Track { 00032 protected: 00033 // track parameters on a given surface 00035 CLHEP::HepVector fOrigin; 00037 CLHEP::HepVector fDestination; 00039 CLHEP::HepSymMatrix fCovariance; 00042 double fMomentum; 00044 double fChi2; 00046 int fNdof; 00051 std::vector<Hit *> fHits; 00052 00053 public: 00054 Track(); 00055 Track(CLHEP::HepVector origin, CLHEP::HepVector destination, double momentum); 00056 virtual ~Track(); 00058 CLHEP::HepVector GetOrigin() const; 00060 CLHEP::HepVector GetDestination() const; 00062 double GetMomentum() const { return fMomentum; } 00064 double GetMass() const { return 0.105685; } 00066 int GetCharge() const { return 1; } 00068 double GetChi2() const { return fChi2; } 00070 int GetNdof() const { return fNdof; } 00072 void SetChi2Ndof(double chi2, int ndof) { fChi2 = chi2; fNdof = ndof; } 00076 Hit * MisalignedIntersection(const Det & adet) const; 00077 Hit * NominalIntersection(const Det & adet) const; 00079 CLHEP::HepVector * IntersectionWithPlane(const ReferenceFrame & frame) const; 00080 // Parameters 00081 // format is (tx, ty, x, y) 00082 // where tx = dx/dz = tan(theta)*cos(phi) 00083 // where ty = dy/dz = tan(theta)*sin(phi) 00084 // x, y global x and y coordinates at z=0 00085 CLHEP::HepVector GetGlobalParameters() const; 00086 void SetGlobalParameters(CLHEP::HepVector p); 00087 void SetGlobalCovariance(CLHEP::HepSymMatrix covariance) { fCovariance = covariance; }; 00088 CLHEP::HepSymMatrix GetGlobalCovariance() const { return fCovariance; } 00089 CLHEP::HepVector GetLocalParameters(const ReferenceFrame & frame) const; 00090 CLHEP::HepSymMatrix GetLocalCovariance(const ReferenceFrame & frame); 00091 void SetLocalCovariance(const ReferenceFrame & frame, const CLHEP::HepSymMatrix & covariance); 00092 // derivatives from local to global parameters 00093 CLHEP::HepMatrix Jacobian(const ReferenceFrame & frame) const; 00094 void SetLocalParameters(const ReferenceFrame & frame, CLHEP::HepVector p); 00095 const std::vector<Hit *> & GetHits() const { return fHits; }; 00096 std::vector<Hit *> & GetHits() { return fHits; }; 00097 }; 00098 00099 #endif Generated on Thu Jul 14 2011 23:52:01 for Kalman Alignment by 1.7.3 |