CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/RecoVertex/KinematicFitPrimitives/interface/KinematicState.h

Go to the documentation of this file.
00001 #ifndef KinematicState_H
00002 #define KinematicState_H
00003 
00004 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicParameters.h"
00005 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicParametersError.h"
00006 #include "RecoVertex/KinematicFitPrimitives/interface/ParticleMass.h"
00007 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
00008 #include "MagneticField/Engine/interface/MagneticField.h"
00009 
00018 class KinematicState{
00019 
00020 public:
00021 
00027  KinematicState()
00028  {vl = false;}
00029  
00035  KinematicState(const KinematicParameters& parameters,
00036         const KinematicParametersError& error, const TrackCharge& charge,
00037         const MagneticField* field);
00038                                                        
00039  bool operator==(const KinematicState& other) const;
00040 
00044   ParticleMass mass() const {return param.vector()[6];}
00045 
00051 KinematicParameters const & kinematicParameters() const {return param;}
00052 
00053 KinematicParametersError const & kinematicParametersError() const {return err;}
00054 
00055 GlobalVector globalMomentum() const {return param.momentum();}
00056 
00057 GlobalPoint  globalPosition() const {return param.position();}
00058 
00059 TrackCharge particleCharge() const {return ch;}
00060 
00061 
00062 
00067  FreeTrajectoryState freeTrajectoryState() const;
00068  
00069  bool isValid() const
00070  {return vl;}
00071 
00072   const MagneticField* magneticField() const {return theField;}
00073 
00074  
00075 private:
00076 
00077   const MagneticField* theField;
00078   KinematicParameters param;
00079   KinematicParametersError err;
00080   TrackCharge ch;
00081  
00082   bool vl;
00083 };
00084 #endif