CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/Alignment/TwoBodyDecay/interface/TwoBodyDecayParameters.h

Go to the documentation of this file.
00001 #ifndef Alignment_TwoBodyDecay_TwoBodyDecayParameters_h
00002 #define Alignment_TwoBodyDecay_TwoBodyDecayParameters_h
00003 
00012 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
00013 
00014 
00015 class TwoBodyDecayParameters
00016 {
00017 
00018 public:
00019 
00021   enum ParameterName { x = 0, y = 1, z = 2, px = 3, py = 4, pz = 5, theta = 6, phi = 7, mass = 8 };
00022 
00023   enum { dimension = 9 };
00024 
00025   TwoBodyDecayParameters( void ) :
00026     theParameters( AlgebraicVector() ), theCovariance( AlgebraicSymMatrix() ) {}
00027 
00028   TwoBodyDecayParameters( const AlgebraicVector & param, const AlgebraicSymMatrix & cov ) :
00029     theParameters( param ), theCovariance( cov ) {}
00030 
00031   TwoBodyDecayParameters( AlgebraicVector param ) :
00032     theParameters( param ), theCovariance( AlgebraicSymMatrix() ) {}
00033 
00034   TwoBodyDecayParameters( const TwoBodyDecayParameters & other ) :
00035     theParameters( other.parameters() ), theCovariance( other.covariance() ) {}
00036 
00037   ~TwoBodyDecayParameters( void ) {}
00038 
00040   inline const AlgebraicVector & parameters( void ) const { return theParameters; }
00041 
00043   inline const AlgebraicSymMatrix & covariance( void ) const { return theCovariance; }
00044 
00046   inline double operator[]( ParameterName name ) const { return theParameters[name]; }
00047 
00049   inline double operator()( ParameterName name ) const { return theParameters[name]; }
00050 
00052   inline const AlgebraicVector sub( ParameterName first, ParameterName last ) const { return theParameters.sub( first+1, last+1 ); }
00053 
00054   inline bool hasError( void ) const { return ( theCovariance.num_row() != 0 ); }
00055 
00056 private:
00057 
00058   AlgebraicVector theParameters;
00059   AlgebraicSymMatrix theCovariance;
00060 
00061 };
00062 
00063 #endif