#include <KinematicTree.h>
Private Member Functions | |
void | leftBranchAdd (KinematicTree *otherTree, RefCountedKinematicVertex vtx) |
bool | leftBranchSearch (RefCountedKinematicParticle part) const |
bool | leftBranchVertexSearch (RefCountedKinematicVertex vtx) const |
bool | leftFinalParticle () const |
Private Attributes | |
bool | empt |
graph < RefCountedKinematicVertex, RefCountedKinematicParticle > | treeGraph |
graphwalker < RefCountedKinematicVertex, RefCountedKinematicParticle > * | treeWalker |
Class describing the decay chain inside the kinematic fit. Uses the boost graph based DDD library. KinematicVertices are vertices, kinemtaic particles become nodes.
Kirill Prokofiev, April 2003 WARNING: before using any of these methods please make sure you understand correctly what part of tree are you looking at now and where the pointer will be after the desiring operation.
"Left" and "Right" notation reflects the order of creating a three: from bottom to top, from left to right EXAMPLE: Bs->J/Psi Phi -> mumu KK First creating a mumu branch, fit it to J/Psi, Then adding Phi->KK and reconstructing a Bs will look like: left bottom particle: muon, top of the tree is Bs, right bottom is K.
Definition at line 36 of file KinematicTree.h.
KinematicTree::KinematicTree | ( | ) |
Constructor initializing everything and setting all values to 0
Definition at line 3 of file KinematicTree.cc.
References empt, and treeWalker.
|
virtual |
Definition at line 9 of file KinematicTree.cc.
References treeWalker.
void KinematicTree::addParticle | ( | RefCountedKinematicVertex | prodVtx, |
RefCountedKinematicVertex | decVtx, | ||
RefCountedKinematicParticle | part | ||
) |
Methods adding nodes and edges to the graph representation of the Kinematic Tree
Definition at line 26 of file KinematicTree.cc.
References empt, movePointerToTheTop(), and treeGraph.
Referenced by addTree(), and leftBranchAdd().
void KinematicTree::addTree | ( | RefCountedKinematicVertex | vtx, |
KinematicTree * | tr | ||
) |
Method adding a tree tr to the vertex vtx of current tree in such a way, that vtx become a production vertex for the top particle of the tr. The whole contetnts of tr is the rewritten to current tree. This method is purely technical and contains no mathematics. To be used by KinematicParticleVertexFitter after the corresponding fit.
Definition at line 432 of file KinematicTree.cc.
References addParticle(), currentDecayVertex(), currentParticle(), currentProductionVertex(), findDecayVertex(), leftBranchAdd(), movePointerToTheMother(), movePointerToTheNextChild(), and movePointerToTheTop().
RefCountedKinematicVertex KinematicTree::currentDecayVertex | ( | ) | const |
Returns a current decay vertex pointer is NOT moved
Definition at line 107 of file KinematicTree.cc.
References isEmpty(), and treeWalker.
Referenced by addTree(), findDecayVertex(), leftBranchAdd(), leftBranchVertexSearch(), and replaceCurrentVertex().
RefCountedKinematicParticle KinematicTree::currentParticle | ( | ) | const |
Returns a current particle pointer is NOT moved
Definition at line 229 of file KinematicTree.cc.
References isEmpty(), and treeWalker.
Referenced by addTree(), currentProductionVertex(), daughterParticles(), finalStateParticles(), findParticle(), leftBranchAdd(), leftBranchSearch(), and replaceCurrentParticle().
RefCountedKinematicVertex KinematicTree::currentProductionVertex | ( | ) | const |
Returns a current production vertex pointer is NOT moved
Definition at line 177 of file KinematicTree.cc.
References currentParticle(), isEmpty(), movePointerToTheMother(), GetRecoTauVFromDQM_MC_cff::next, treeGraph, and treeWalker.
Referenced by addTree(), and motherParticle().
std::vector< RefCountedKinematicParticle > KinematicTree::daughterParticles | ( | ) | const |
Returns a non-zero vector in case of success and 0 vector in case of failure Pointer is NOT moved
Definition at line 141 of file KinematicTree.cc.
References prof2calltree::back, currentParticle(), findParticle(), isEmpty(), and treeWalker.
std::vector< RefCountedKinematicParticle > KinematicTree::finalStateParticles | ( | ) | const |
Kinematic Tree navigation methods Returns the complete vector of final state particles for the whole decay tree. Pointer is NOT moved after this operation
Definition at line 38 of file KinematicTree.cc.
References prof2calltree::back, gather_cfg::cout, currentParticle(), findParticle(), isConsistent(), isEmpty(), leftFinalParticle(), movePointerToTheMother(), movePointerToTheNextChild(), and movePointerToTheTop().
bool KinematicTree::findDecayVertex | ( | const RefCountedKinematicVertex | vert | ) | const |
Pointer goes to the particle for which the neede vertex will be the decay one (true case) Or pointer stays at the top of teh tree if search is unsuccessfull (false case).
Definition at line 312 of file KinematicTree.cc.
References currentDecayVertex(), isConsistent(), isEmpty(), leftBranchVertexSearch(), movePointerToTheMother(), movePointerToTheNextChild(), and movePointerToTheTop().
Referenced by addTree().
bool KinematicTree::findDecayVertex | ( | KinematicVertex * | vert | ) | const |
Definition at line 344 of file KinematicTree.cc.
References currentDecayVertex(), isConsistent(), isEmpty(), leftBranchVertexSearch(), movePointerToTheMother(), movePointerToTheNextChild(), and movePointerToTheTop().
bool KinematicTree::findParticle | ( | const RefCountedKinematicParticle | part | ) | const |
Pointer goes to the needed particle inside the tree if found (true). Pointer goes to the top of the tree if not found (false)
Definition at line 256 of file KinematicTree.cc.
References currentParticle(), newFWLiteAna::found, isConsistent(), isEmpty(), leftBranchSearch(), movePointerToTheMother(), movePointerToTheNextChild(), and movePointerToTheTop().
Referenced by daughterParticles(), and finalStateParticles().
bool KinematicTree::isConsistent | ( | ) | const |
This method checks if the tree is consistent, i.e. the top vertex is only one.
Definition at line 18 of file KinematicTree.cc.
References movePointerToTheTop(), and treeWalker.
Referenced by finalStateParticles(), findDecayVertex(), and findParticle().
bool KinematicTree::isEmpty | ( | void | ) | const |
Access methods
Definition at line 15 of file KinematicTree.cc.
References empt.
Referenced by currentDecayVertex(), currentParticle(), currentProductionVertex(), daughterParticles(), finalStateParticles(), findDecayVertex(), findParticle(), motherParticle(), movePointerToTheFirstChild(), movePointerToTheMother(), movePointerToTheNextChild(), movePointerToTheTop(), and topParticle().
|
inline |
|
private |
Definition at line 396 of file KinematicTree.cc.
References addParticle(), currentDecayVertex(), currentParticle(), movePointerToTheFirstChild(), and GetRecoTauVFromDQM_MC_cff::next.
Referenced by addTree().
|
private |
Private methods to walk around the tree: Needed to collect final state or particle search.
Definition at line 292 of file KinematicTree.cc.
References currentParticle(), newFWLiteAna::found, movePointerToTheFirstChild(), and GetRecoTauVFromDQM_MC_cff::next.
Referenced by findParticle().
|
private |
Definition at line 377 of file KinematicTree.cc.
References currentDecayVertex(), newFWLiteAna::found, movePointerToTheFirstChild(), and GetRecoTauVFromDQM_MC_cff::next.
Referenced by findDecayVertex().
|
private |
Definition at line 80 of file KinematicTree.cc.
References movePointerToTheFirstChild(), and GetRecoTauVFromDQM_MC_cff::next.
Referenced by finalStateParticles().
std::pair< bool, RefCountedKinematicParticle > KinematicTree::motherParticle | ( | ) | const |
Returns true and state of mother particle if successfull, false and state of current particle in case of failure Pointer is NOT moved.
Definition at line 113 of file KinematicTree.cc.
References currentProductionVertex(), benchmark_cfg::fc, isEmpty(), and treeWalker.
bool KinematicTree::movePointerToTheFirstChild | ( | ) | const |
Pointer goes to the first child(if any) in the list
Definition at line 243 of file KinematicTree.cc.
References isEmpty(), and treeWalker.
Referenced by leftBranchAdd(), leftBranchSearch(), leftBranchVertexSearch(), and leftFinalParticle().
bool KinematicTree::movePointerToTheMother | ( | ) | const |
Pointer goes to the mother particle (if any) with respest to the current one
Definition at line 235 of file KinematicTree.cc.
References isEmpty(), and treeWalker.
Referenced by addTree(), currentProductionVertex(), finalStateParticles(), findDecayVertex(), and findParticle().
bool KinematicTree::movePointerToTheNextChild | ( | ) | const |
Pointer goes to the next child in the list (if any)
Definition at line 249 of file KinematicTree.cc.
References isEmpty(), and treeWalker.
Referenced by addTree(), finalStateParticles(), findDecayVertex(), and findParticle().
void KinematicTree::movePointerToTheTop | ( | ) | const |
Puts the pointer to the top (root) of the tree. The Graph walker object gets recreated inside the tree.
Definition at line 164 of file KinematicTree.cc.
References isEmpty(), treeGraph, and treeWalker.
Referenced by addParticle(), addTree(), ConstrainedTreeBuilderT::buildRealTree(), FinalTreeBuilder::buildTree(), ConstrainedTreeBuilder::buildTree(), finalStateParticles(), findDecayVertex(), findParticle(), isConsistent(), and topParticle().
void KinematicTree::replaceCurrentParticle | ( | RefCountedKinematicParticle | newPart | ) | const |
Methods replacing Particles and Vertices inside the tree during the refit. Methods should used by corresponding KinematicFitter classe only. Replace the current track or current (decay) vertex WARNING: replace methods are not available at this version of KinematicFitPrimitives.
Definition at line 417 of file KinematicTree.cc.
References currentParticle(), python.rootplot.root2matplotlib::replace(), and treeGraph.
Referenced by ConstrainedTreeBuilderT::buildRealTree(), FinalTreeBuilder::buildTree(), and ConstrainedTreeBuilder::buildTree().
void KinematicTree::replaceCurrentVertex | ( | RefCountedKinematicVertex | newVert | ) | const |
Replaces decay vertex of the current particle with the given value
Definition at line 424 of file KinematicTree.cc.
References currentDecayVertex(), python.rootplot.root2matplotlib::replace(), and treeGraph.
RefCountedKinematicParticle KinematicTree::topParticle | ( | ) | const |
Returns the top particle of decay. Pointer is moved to the TOP of the decay tree.
Definition at line 98 of file KinematicTree.cc.
References isEmpty(), movePointerToTheTop(), and treeWalker.
|
mutableprivate |
Definition at line 213 of file KinematicTree.h.
Referenced by addParticle(), isEmpty(), isValid(), and KinematicTree().
|
mutableprivate |
Definition at line 215 of file KinematicTree.h.
Referenced by addParticle(), currentProductionVertex(), movePointerToTheTop(), replaceCurrentParticle(), and replaceCurrentVertex().
|
mutableprivate |
Definition at line 216 of file KinematicTree.h.
Referenced by currentDecayVertex(), currentParticle(), currentProductionVertex(), daughterParticles(), isConsistent(), KinematicTree(), motherParticle(), movePointerToTheFirstChild(), movePointerToTheMother(), movePointerToTheNextChild(), movePointerToTheTop(), topParticle(), and ~KinematicTree().