00001 // 00002 // File: Ext_xp_err.h 00003 // 00004 // Descrition: Handle extrapolation error matrix( x, y, z, px, py, pz ). 00005 // The used coordinate system is the cartesian BESIII coordinate system. 00006 // 00007 // Modified from BELLE: " File: Ext_xp_err.h 00008 // Creation: 29-Dec-1997 00009 // Version: 01-Mar-1999 00010 // $Id: Ext_xp_err.h,v 1.5 2015/07/29 00:28:14 sunss Exp $" 00011 // 00012 // Data: 2005.3.30 by Wang Liangliang 00013 // 00014 00015 00016 #ifndef _Ext_XP_Err_Flag_ 00017 #define _Ext_XP_Err_Flag_ 00018 #include <iosfwd> 00019 00021 //#include "TrkExtAlg/Helix.h" 00022 #include "TrackUtil/Helix.h" 00024 #include "TrkExtAlg/Ext_errmx.h" 00025 00026 #include <vector> 00027 00028 00029 class Ext_xp_err : public Ext_errmx { 00030 00031 public: 00032 Ext_xp_err();// Constructor 00033 Ext_xp_err( const Ext_xp_err &xp_err );// Copy constructor 00034 ~Ext_xp_err(){};// Destructor 00035 00036 // Set symmetry matrix parameters. 00037 void set_err(const HepSymMatrix &err,const Hep3Vector &xv,const Hep3Vector &pv, const double &q, 00038 const double &mass ); 00039 00040 inline const Hep3Vector & get_x() const;// Get coordinate at the current point. 00041 inline const Hep3Vector & get_p() const;// Get momentum at the current point. 00042 inline const double & get_q() const; // Get the charge of the particle. 00043 inline double get_mass() const;// Get the mass of the particle. 00044 bool move( const Hep3Vector &xv1, const Hep3Vector &pv1, const Hep3Vector &B, 00045 const int ms_on, const double chi_cc ); // Move x -> x'. 00046 Ext_xp_err &operator=( const Ext_xp_err &xp_err ); 00047 friend std::ostream &operator<<( std::ostream &s, const Ext_xp_err &xp_err ); 00048 inline void set_pos(const Hep3Vector &pos); 00049 inline void set_mom(const Hep3Vector &mom); 00050 00051 private: 00052 Hep3Vector m_xv; // Position(x,y,z) in cm unit. 00053 Hep3Vector m_pv; // Momentum(px,py,pz) in GeV/c. 00054 HepMatrix m_xp_jcb; // Jacobian for x -> x'. 00055 HepMatrix m_h2xp_jcb; // Jacobian for helix -> xp. 00056 double m_q; // Charge of the particle. 00057 double m_mass2; // Mass**2 of the particle. 00058 00059 }; 00060 00061 00062 // Get the current coordinate. 00063 inline const Hep3Vector & Ext_xp_err::get_x() const { 00064 return m_xv; 00065 } 00066 00067 00068 // Get the momentum at the current position. 00069 inline const Hep3Vector & Ext_xp_err::get_p() const { 00070 return m_pv; 00071 } 00072 00073 00074 // Get the charge of the particle. 00075 inline const double & Ext_xp_err::get_q() const { 00076 return m_q; 00077 } 00078 00079 00080 // Get the mass of the particle. 00081 inline double Ext_xp_err::get_mass() const { 00082 return sqrt(m_mass2); 00083 } 00084 00085 inline void Ext_xp_err::set_pos(const Hep3Vector &pos) 00086 { 00087 m_xv = pos; 00088 } 00089 00090 inline void Ext_xp_err::set_mom(const Hep3Vector &mom) 00091 { 00092 m_pv = mom; 00093 } 00094 00095 00096 #endif /* _Ext_XP_Err_Flag_ */