/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/TrkExtAlg/TrkExtAlg-00-00-64/TrkExtAlg/Ext_errmx.h

Go to the documentation of this file.
00001 //
00002 // File: Ext_errmx.h
00003 //
00004 // Description: Extrapolation error matrix( x, y, z, px, py, pz ).
00005 //              The used coordinate system is the cartesian BESIII 
00006 //              coordinate system.
00007 //
00008 //              Modified from BELLE by  Wang Liangliang.
00009 //  
00010 // Date: 2005.3.30
00011 //
00012 // 
00013 
00014 
00015 #ifndef _Ext_Errmx_Flag_
00016 #define _Ext_Errmx_Flag_
00017 
00018 #include        <iosfwd>
00019 
00020 #ifndef   CLHEP_THREEVECTOR_H
00021 #include "CLHEP/Vector/ThreeVector.h"
00022 #endif
00023 
00024 #include        "CLHEP/Matrix/Vector.h"
00025 #include        "CLHEP/Matrix/Matrix.h"
00026 #include        "CLHEP/Matrix/SymMatrix.h"
00027 
00028 using namespace CLHEP;
00029 
00030 
00031 static const int Ndim_err(6);           // Error matrix dimension.
00032  
00033 //  Track error matrix handler.
00034 
00035 
00036 class Ext_errmx {
00037 
00038 public:
00039   // Constructor
00040   Ext_errmx();
00041 
00042   // Copy constructor
00043   Ext_errmx( const Ext_errmx &errmx );
00044 
00045   // Constructor, initializing by HepSymMatrix error matrix.
00046   Ext_errmx( const HepSymMatrix &err );
00047 
00048   // Destructor
00049   virtual ~Ext_errmx(){};
00050 
00051   // Put the error matrix with a double array format.
00052   void put_err( const double error[] );
00053 
00054   // Put the error matrix with a HepSymMatrix format.
00055   inline void put_err( const HepSymMatrix &err );
00056 
00057   // Get the error matrix from the object.
00058   inline const HepSymMatrix & get_err() const;
00059 
00060   // Get the error along the readout direction.
00061   double get_plane_err( const Hep3Vector &np, const Hep3Vector &nr ) const;
00062 
00072   const HepVector & get_plane_errs( const Hep3Vector &np, 
00073                 const Hep3Vector &nr, const Hep3Vector &nt ) const;
00074 
00102   const Hep3Vector * get_tvs( const int view, const Hep3Vector &pv ) const; 
00103 
00114   const Hep3Vector* get_tvs( const Hep3Vector &pv ) const; 
00115 
00116         // Check the validity of the error matrix.
00117   bool valid( bool msg ) const; 
00118 
00119         // = Operator.
00120   Ext_errmx &operator=( const Ext_errmx &errmx );
00121 
00122         // << Operator.
00123   friend std::ostream &operator<<( std::ostream &s, const Ext_errmx &errmx );
00124 
00125 
00126 protected:
00127 
00128         // Setup m\_err3 and m\_R for get\_plane\_err(s).
00129   void set_plane_errs( const Hep3Vector &nx, const Hep3Vector &ny, 
00130                       const Hep3Vector &nz ) const;
00131 
00132         // 6x6 symmetry error matrix(x,y,z,px,py,pz).
00133   HepSymMatrix  m_err;
00134 
00135 private:
00136 
00137   mutable bool          m_valid;        // Valid flag.
00138   mutable HepSymMatrix  m_err3;         // 3x3 sub error matrix(x,y,z).
00139   mutable HepVector     m_err2;         // 2D projected error.
00140   mutable Hep3Vector    m_nv[2];        // 2D projected error direction.
00141   mutable HepMatrix     m_R;            // 3x3 rotation matrix: BCS -> TCS
00142 
00143 };
00144 
00145 /*
00146   Put the error matrix.
00147 */
00148 inline void Ext_errmx::put_err( const HepSymMatrix &err )
00149 {
00150   m_err = err;
00151   m_valid = 1;
00152 }
00153 
00154 /*
00155   Get the error matrix.
00156 */
00157 inline const HepSymMatrix & Ext_errmx::get_err() const {
00158   return m_err;
00159 }
00160 
00161 #endif /* _Ext_Errmx_Flag_ */

Generated on Tue Nov 29 23:14:12 2016 for BOSS_7.0.2 by  doxygen 1.4.7