#include <KinematicParticleFitter.h>
Public Member Functions | |
std::vector < RefCountedKinematicTree > | fit (KinematicConstraint *cs, std::vector< RefCountedKinematicTree > trees) const |
RefCountedKinematicTree | fit (KinematicConstraint *cs, RefCountedKinematicTree tree) const |
KinematicParticleFitter (const ParentParticleFitter &fitter, const ChildUpdator &updator) | |
KinematicParticleFitter () | |
~KinematicParticleFitter () | |
Private Attributes | |
ChildUpdator * | cUpdator |
ParentParticleFitter * | parentFitter |
Class making kinematic fit of the particle inside the KinematicTree. The daughter states of the tree get automathically refitted according to the changes done to mother state. Mechanism is split in 2 parts: ParentParticleFitter to fit the mother particle and ChildUpdator to update the states of daughter particles. Child updator is currently not implemented. Fitter is designed to use any user provided algorithm for state refit.
Definition at line 23 of file KinematicParticleFitter.h.
KinematicParticleFitter::KinematicParticleFitter | ( | ) |
Default constructor using LMS with Lagrange multipliers for particle refit.
Definition at line 5 of file KinematicParticleFitter.cc.
References cUpdator, and parentFitter.
{ parentFitter = new LagrangeParentParticleFitter(); cUpdator = new LagrangeChildUpdator(); }
KinematicParticleFitter::KinematicParticleFitter | ( | const ParentParticleFitter & | fitter, |
const ChildUpdator & | updator | ||
) |
Constructor allowing use of any fitter-updator pair implemented
Definition at line 11 of file KinematicParticleFitter.cc.
References ChildUpdator::clone(), ParentParticleFitter::clone(), cUpdator, and parentFitter.
{ parentFitter = fitter.clone(); cUpdator = updator.clone(); }
KinematicParticleFitter::~KinematicParticleFitter | ( | ) |
Definition at line 17 of file KinematicParticleFitter.cc.
References cUpdator, and parentFitter.
{ delete parentFitter; delete cUpdator; }
std::vector< RefCountedKinematicTree > KinematicParticleFitter::fit | ( | KinematicConstraint * | cs, |
std::vector< RefCountedKinematicTree > | trees | ||
) | const |
Method applying the constraint to the _TOP_ particle inside the Kinematic Tree. Tree containing the refitted state is returned. The initial state of the particle and constraint applyed are stored in particle's corresponding data memebers In case of failure, an empty vector is returned.
Definition at line 23 of file KinematicParticleFitter.cc.
References cUpdator, ParentParticleFitter::fit(), parentFitter, and ChildUpdator::update().
Referenced by KineExample::analyze().
{ std::vector<RefCountedKinematicTree> tr = parentFitter->fit(trees,cs); // In case of problem in fit: if (tr.empty()) return tr; tr = cUpdator->update(tr); return tr; }
RefCountedKinematicTree KinematicParticleFitter::fit | ( | KinematicConstraint * | cs, |
RefCountedKinematicTree | tree | ||
) | const |
Method refitting a top particle of the single tree. for backup compatibility and constraints not allowing multiple track refits. In case of failure, an invalid tree is returned.
Definition at line 33 of file KinematicParticleFitter.cc.
References cUpdator, ParentParticleFitter::fit(), parentFitter, and ChildUpdator::update().
{ std::vector<RefCountedKinematicTree> trees; trees.push_back(tree); std::vector<RefCountedKinematicTree> tr = parentFitter->fit(trees,cs); // In case of problem in fit: if (tr.empty()) return ReferenceCountingPointer<KinematicTree>(new KinematicTree()); tr = cUpdator->update(tr); return tr.front(); }
ChildUpdator* KinematicParticleFitter::cUpdator [private] |
Definition at line 67 of file KinematicParticleFitter.h.
Referenced by fit(), KinematicParticleFitter(), and ~KinematicParticleFitter().
Definition at line 66 of file KinematicParticleFitter.h.
Referenced by fit(), KinematicParticleFitter(), and ~KinematicParticleFitter().