Go to the documentation of this file.00001 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicState.h"
00002 #include "RecoVertex/KinematicFitPrimitives/interface/Matrices.h"
00003
00004 KinematicState::KinematicState(const KinematicParameters& parameters,
00005 const KinematicParametersError& error, const TrackCharge& charge,
00006 const MagneticField* field) :
00007 theField(field), param(parameters),err(error), ch(charge), vl(true)
00008 {}
00009
00010
00011 bool KinematicState::operator==(const KinematicState& other) const
00012 {
00013 bool res = false;
00014 if((kinematicParameters().vector() == other.kinematicParameters().vector())&&
00015 (kinematicParametersError().matrix() == other.kinematicParametersError().matrix())) res = true;
00016 return res;
00017 }
00018
00019
00020 FreeTrajectoryState KinematicState::freeTrajectoryState() const
00021 {
00022 GlobalTrajectoryParameters globalPar(globalPosition(), globalMomentum(),
00023 particleCharge(), theField);
00024 AlgebraicSymMatrix66 cError =
00025 kinematicParametersError().matrix().Sub<AlgebraicSymMatrix66>(0,0);
00026 CartesianTrajectoryError cartError(cError);
00027
00028
00029
00030
00031 return FreeTrajectoryState(globalPar,cartError);
00032 }
00033
00034
00035
00036
00037
00038
00039
00040