CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/RecoVertex/KinematicFitPrimitives/interface/KinematicParameters.h

Go to the documentation of this file.
00001 #ifndef KinematicParameters_H
00002 #define KinematicParameters_H
00003 
00004 #include "RecoVertex/KinematicFitPrimitives/interface/Matrices.h"
00005 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00006 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
00007 
00016 class KinematicParameters{
00017 
00018 public:
00019 
00020   typedef ROOT::Math::SVector<double,7> AlgebraicVector7;
00021 
00022   KinematicParameters() : vl(false) {}
00023 
00024   KinematicParameters(const AlgebraicVector7& pr): par(pr),vl(true)
00025   {}
00026 
00032   AlgebraicVector7 const & vector() const {return par;}
00033 
00039   double operator()(const int i) const  {return par(i);}
00040 
00044   GlobalVector momentum() const;
00045   
00049   GlobalPoint position() const;
00050   
00054   double mass() const {return par(6);}
00055 
00059   double energy() const;
00060 
00061   bool isValid() const
00062   {return vl;}
00063 
00064 private:
00065    AlgebraicVector7 par;
00066    bool vl;
00067 };
00068 
00069 
00070 #endif