CMS 3D CMS Logo

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 }
LagrangeParentParticleFitter
Definition: LagrangeParentParticleFitter.h:18
fwrapper::cs
unique_ptr< ClusterSequence > cs
Definition: fastjetfortran_madfks.cc:47
KinematicParticleFitter::parentFitter
ParentParticleFitter * parentFitter
Definition: KinematicParticleFitter.h:62
KinematicParticleFitter::cUpdator
ChildUpdator * cUpdator
Definition: KinematicParticleFitter.h:63
tree
Definition: tree.py:1
KinematicTree
Definition: KinematicTree.h:36
LagrangeChildUpdator
Definition: LagrangeChildUpdator.h:13
ReferenceCountingPointer< KinematicTree >
ChildUpdator
Definition: ChildUpdator.h:16
ParentParticleFitter
Definition: ParentParticleFitter.h:15
KinematicParticleFitter::~KinematicParticleFitter
~KinematicParticleFitter()
Definition: KinematicParticleFitter.cc:15
KinematicConstraint
Definition: KinematicConstraint.h:21
dqmdumpme.trees
trees
Definition: dqmdumpme.py:37
HLT_FULL_cff.updator
updator
Definition: HLT_FULL_cff.py:123
ChildUpdator::update
virtual RefCountedKinematicTree update(RefCountedKinematicTree tree) const =0
LagrangeChildUpdator.h
ParentParticleFitter::clone
virtual ParentParticleFitter * clone() const =0
KinematicParticleFitter::fit
std::vector< RefCountedKinematicTree > fit(KinematicConstraint *cs, const std::vector< RefCountedKinematicTree > &trees) const
Definition: KinematicParticleFitter.cc:20
LagrangeParentParticleFitter.h
KinematicParticleFitter::KinematicParticleFitter
KinematicParticleFitter()
Definition: KinematicParticleFitter.cc:5
KinematicParticleFitter.h
ParentParticleFitter::fit
virtual std::vector< RefCountedKinematicTree > fit(const std::vector< RefCountedKinematicTree > &trees, KinematicConstraint *cs) const =0