00001 #ifndef DSTMDCTRACK_H 00002 #define DSTMDCTRACK_H 00003 #include "GaudiKernel/ObjectVector.h" 00004 #include "GaudiKernel/ContainedObject.h" 00005 #include "EventModel/EventModel.h" 00006 #include <vector> 00007 #include "CLHEP/Matrix/Vector.h" 00008 #include "CLHEP/Matrix/SymMatrix.h" 00009 #include "CLHEP/Vector/ThreeVector.h" 00010 #include "CLHEP/Geometry/Point3D.h" 00011 #include "CLHEP/Vector/LorentzVector.h" 00012 00013 #ifndef ENABLE_BACKWARDS_COMPATIBILITY 00014 // backwards compatibility will be enabled ONLY in CLHEP 1.9 00015 typedef HepGeom::Point3D<double> HepPoint3D; 00016 #endif 00017 using namespace CLHEP; 00018 00019 using namespace std; 00020 using namespace EventModel; 00021 extern const CLID &CLID_DstMdcTrack; 00022 00023 00024 class DstMdcTrack : virtual public ContainedObject 00025 { 00026 public: 00027 DstMdcTrack(); 00028 DstMdcTrack(const DstMdcTrack&); 00029 DstMdcTrack& operator=(const DstMdcTrack&); 00030 virtual ~DstMdcTrack() {} 00031 virtual const CLID& clID() const { return DstMdcTrack::classID();} 00032 static const CLID& classID() { return CLID_DstMdcTrack; } 00033 00035 00036 const HepVector helix() const; 00037 const HepSymMatrix err() const; 00038 const HepLorentzVector p4(const double mass) const; 00039 00040 const HepPoint3D poca() const{ 00041 return m_poca3D; 00042 } 00043 const Hep3Vector p3() const{ 00044 return Hep3Vector(m_px,m_py,m_pz); 00045 } 00046 const HepPoint3D x3() const{ 00047 return HepPoint3D(m_x,m_y,m_z); 00048 } 00049 00050 const double helix(const int i) const { return m_helix[i]; } 00051 const double err(const int i) const { return m_err[i]; } 00052 const int trackId() const { return m_trackId; } 00053 const int charge() const { return m_charge; } 00054 const double pxy() const { return m_pxy; } 00055 const double px() const { return m_px; } 00056 const double py() const { return m_py; } 00057 const double pz() const { return m_pz; } 00058 const double p() const { return m_p; } 00059 const double theta() const { return m_theta;} 00060 const double phi() const { return m_phi; } 00061 const double x() const { return m_x; } 00062 const double y() const { return m_y; } 00063 const double z() const { return m_z; } 00064 const double r() const { return m_r; } 00065 const int stat() const { return m_stat; } 00066 const double chi2() const { return m_chi2; } 00067 const int ndof() const { return m_ndof; } 00068 const int nster() const { return m_nster;} 00069 const int firstLayer() const { return m_firstLayer;} 00070 const int lastLayer() const { return m_lastLayer; } 00071 00072 00073 // set functions 00074 void setHelix(double helix[5]); 00075 void setPoca(double poca[3]); 00076 void setError( double err[15]); 00077 void setHelix(const HepVector& a); 00078 void setPoca(const HepPoint3D& poca); 00079 void setError(const HepSymMatrix& Ea); 00080 00081 void setTrackId(const int trackId ) { m_trackId = trackId; } 00082 void setCharge(const int charge ) { m_charge = charge;} 00083 void setPxy(const double pxy) { m_pxy = pxy; } 00084 void setPx (const double px) { m_px = px; } 00085 void setPy(const double py) { m_py = py; } 00086 void setPz(const double pz) { m_pz = pz; } 00087 void setP(const double p ) { m_p = p; } 00088 void setTheta(const double theta) { m_theta = theta; } 00089 void setPhi(const double phi ) { m_phi = phi; } 00090 void setX(const double x) { m_x = x; } 00091 void setY(const double y) { m_y = y; } 00092 void setZ(const double z) { m_z = z; } 00093 void setR(const double r) { m_r = r; } 00094 void setStat(const int stat) { m_stat = stat;} 00095 void setChi2(const double chi) { m_chi2 = chi;} 00096 void setNdof(const int ndof) { m_ndof = ndof;} 00097 void setNster(const int ns) { m_nster = ns;} 00098 void setFirstLayer(const int id) { m_firstLayer = id;} 00099 void setLastLayer(const int id) { m_lastLayer = id;} 00100 00101 00102 protected: 00103 int m_trackId; // Track ID wensp Add 2005-10-19 00104 int m_charge; // charge of the track 00105 double m_helix[5]; // 5 track parameters 00106 double m_err[15]; // Error Matrix 00107 double m_poca[3]; // position of closest approach to origin 00108 HepPoint3D m_poca3D; 00109 HepVector m_a; 00110 HepSymMatrix m_Ea; 00111 int m_stat; // Track Fit Quality status flag 00112 double m_chi2; // chisq of track fit 00113 int m_ndof; // degree of freedom 00114 int m_nster; // number of stereo hits contained 00115 int m_firstLayer; // layer id of first hit in PR hits collection 00116 int m_lastLayer; // layer id of last hit in PR hits collection 00117 double m_pxy; // Track Momentum(GeV) 00118 double m_px; 00119 double m_py; 00120 double m_pz; 00121 double m_p; 00122 double m_theta; // The Angles 00123 double m_phi; // Need to config 00124 double m_x; // The Coordinate of Track origin(m) 00125 double m_y; 00126 double m_z; 00127 double m_r; 00128 }; 00129 00130 typedef ObjectVector<DstMdcTrack> DstMdcTrackCol; 00131 00132 #endif //DST_MDCTRACK_H 00133