CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
KinematicParticleFitter.cc
Go to the documentation of this file.
4 
8 }
9 
11  parentFitter = fitter.clone();
12  cUpdator = updator.clone();
13 }
14 
16  delete parentFitter;
17  delete cUpdator;
18 }
19 
20 std::vector<RefCountedKinematicTree> KinematicParticleFitter::fit(
21  KinematicConstraint* cs, const std::vector<RefCountedKinematicTree>& trees) const {
22  std::vector<RefCountedKinematicTree> tr = parentFitter->fit(trees, cs);
23  // In case of problem in fit:
24  if (tr.empty())
25  return tr;
26  tr = cUpdator->update(tr);
27  return tr;
28 }
29 
31  std::vector<RefCountedKinematicTree> trees;
32  trees.push_back(tree);
33  std::vector<RefCountedKinematicTree> tr = parentFitter->fit(trees, cs);
34  // In case of problem in fit:
35  if (tr.empty())
37  tr = cUpdator->update(tr);
38  return tr.front();
39 }
virtual RefCountedKinematicTree update(RefCountedKinematicTree tree) const =0
virtual ChildUpdator * clone() const =0
list trees
Definition: dqmdumpme.py:37
unique_ptr< ClusterSequence > cs
ParentParticleFitter * parentFitter
std::vector< RefCountedKinematicTree > fit(KinematicConstraint *cs, const std::vector< RefCountedKinematicTree > &trees) const
virtual std::vector< RefCountedKinematicTree > fit(const std::vector< RefCountedKinematicTree > &trees, KinematicConstraint *cs) const =0
virtual ParentParticleFitter * clone() const =0