Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:13

0001 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicState.h"
0002 #include "RecoVertex/KinematicFitPrimitives/interface/Matrices.h"
0003 
0004 KinematicState::KinematicState(const KinematicParameters& parameters,
0005                                const KinematicParametersError& error,
0006                                const TrackCharge& charge,
0007                                const MagneticField* field)
0008     : fts(GlobalTrajectoryParameters(parameters.position(), parameters.momentum(), charge, field),
0009           CartesianTrajectoryError(error.matrix().Sub<AlgebraicSymMatrix66>(0, 0))),
0010       param(parameters),
0011       err(error),
0012       vl(true) {}
0013 
0014 bool KinematicState::operator==(const KinematicState& other) const {
0015   return (kinematicParameters().vector() == other.kinematicParameters().vector()) &&
0016          (kinematicParametersError().matrix() == other.kinematicParametersError().matrix());
0017 }
0018 
0019 /*
0020 void KinematicState::setFreeTrajectoryState() const {
0021  GlobalTrajectoryParameters globalPar(globalPosition(), globalMomentum(),
0022     particleCharge(), theField);
0023  AlgebraicSymMatrix66 cError =
0024     kinematicParametersError().matrix().Sub<AlgebraicSymMatrix66>(0,0);
0025  CartesianTrajectoryError cartError(cError);
0026 // cout<<"conversion called"<<endl;
0027 // cout<<"parameters::position"<<globalPosition()<<endl;
0028 // cout<<"parameters::momentum"<<globalMomentum()<<endl;
0029 // cout<<"parameters::error"<<cError<<endl;
0030  fts = FreeTrajectoryState(globalPar,cartError);
0031 }
0032 */