00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
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);
00032
00033
00034
00035
00036 class Ext_errmx {
00037
00038 public:
00039
00040 Ext_errmx();
00041
00042
00043 Ext_errmx( const Ext_errmx &errmx );
00044
00045
00046 Ext_errmx( const HepSymMatrix &err );
00047
00048
00049 virtual ~Ext_errmx(){};
00050
00051
00052 void put_err( const double error[] );
00053
00054
00055 inline void put_err( const HepSymMatrix &err );
00056
00057
00058 inline const HepSymMatrix & get_err() const;
00059
00060
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
00117 bool valid( bool msg ) const;
00118
00119
00120 Ext_errmx &operator=( const Ext_errmx &errmx );
00121
00122
00123 friend std::ostream &operator<<( std::ostream &s, const Ext_errmx &errmx );
00124
00125
00126 protected:
00127
00128
00129 void set_plane_errs( const Hep3Vector &nx, const Hep3Vector &ny,
00130 const Hep3Vector &nz ) const;
00131
00132
00133 HepSymMatrix m_err;
00134
00135 private:
00136
00137 mutable bool m_valid;
00138 mutable HepSymMatrix m_err3;
00139 mutable HepVector m_err2;
00140 mutable Hep3Vector m_nv[2];
00141 mutable HepMatrix m_R;
00142
00143 };
00144
00145
00146
00147
00148 inline void Ext_errmx::put_err( const HepSymMatrix &err )
00149 {
00150 m_err = err;
00151 m_valid = 1;
00152 }
00153
00154
00155
00156
00157 inline const HepSymMatrix & Ext_errmx::get_err() const {
00158 return m_err;
00159 }
00160
00161 #endif