CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/RecoVertex/KinematicFitPrimitives/src/KinematicParticle.cc

Go to the documentation of this file.
00001 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicParticle.h"
00002 #include "TrackingTools/TransientTrack/interface/TransientTrackFromFTSFactory.h"
00003 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicConstraint.h"
00004 
00005 KinematicParticle::~KinematicParticle() { delete lConstraint;} 
00006 
00007 bool KinematicParticle::operator<(const KinematicParticle& other)const
00008 {
00009  bool res = false;
00010  if(this < &other) res=true;
00011  return res;
00012 }
00013 
00014 KinematicState KinematicParticle::initialState()const
00015 {return initState;}
00016 
00017 KinematicState KinematicParticle::currentState()const
00018 {return cState;}
00019 
00020 KinematicConstraint * KinematicParticle::lastConstraint()const
00021 {return lConstraint;}
00022 
00023 ReferenceCountingPointer<KinematicParticle> KinematicParticle::previousParticle()const
00024 {return pState;} 
00025 
00026 KinematicTree * KinematicParticle::correspondingTree()const
00027 {return tree;}
00028 
00029 float KinematicParticle::chiSquared()const
00030 {return chi2;}
00031 
00032 float KinematicParticle::degreesOfFreedom()const
00033 {return ndf;}
00034 
00035 void KinematicParticle::setTreePointer(KinematicTree * tr)const
00036 {tree = tr;}
00037 
00038 reco::TransientTrack KinematicParticle::refittedTransientTrack() const
00039 {
00040   TransientTrackFromFTSFactory factory;
00041   return factory.build(currentState().freeTrajectoryState());
00042 }