#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 |
math::Graph < RefCountedKinematicVertex, RefCountedKinematicParticle > | treeGraph |
math::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.
|
override |
Definition at line 8 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 20 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 391 of file KinematicTree.cc.
References addParticle(), currentDecayVertex(), currentParticle(), currentProductionVertex(), findDecayVertex(), leftBranchAdd(), movePointerToTheMother(), movePointerToTheNextChild(), movePointerToTheTop(), and up.
RefCountedKinematicVertex KinematicTree::currentDecayVertex | ( | ) | const |
Returns a current decay vertex pointer is NOT moved
Definition at line 91 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 212 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 162 of file KinematicTree.cc.
References currentParticle(), down, isEmpty(), eostools::move(), movePointerToTheMother(), GetRecoTauVFromDQM_MC_cff::next, treeGraph, treeWalker, and up.
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 126 of file KinematicTree.cc.
References currentParticle(), down, 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 31 of file KinematicTree.cc.
References gather_cfg::cout, currentParticle(), findParticle(), isConsistent(), isEmpty(), leftFinalParticle(), movePointerToTheMother(), movePointerToTheNextChild(), movePointerToTheTop(), and up.
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 286 of file KinematicTree.cc.
References currentDecayVertex(), isConsistent(), isEmpty(), leftBranchVertexSearch(), movePointerToTheMother(), movePointerToTheNextChild(), movePointerToTheTop(), and up.
Referenced by addTree().
bool KinematicTree::findDecayVertex | ( | KinematicVertex * | vert | ) | const |
Definition at line 314 of file KinematicTree.cc.
References currentDecayVertex(), isConsistent(), isEmpty(), leftBranchVertexSearch(), movePointerToTheMother(), movePointerToTheNextChild(), movePointerToTheTop(), and up.
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 239 of file KinematicTree.cc.
References currentParticle(), newFWLiteAna::found, isConsistent(), isEmpty(), leftBranchSearch(), movePointerToTheMother(), movePointerToTheNextChild(), movePointerToTheTop(), and up.
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 12 of file KinematicTree.cc.
References movePointerToTheTop(), and treeWalker.
Referenced by finalStateParticles(), findDecayVertex(), and findParticle().
bool KinematicTree::isEmpty | ( | void | ) | const |
Access methods
Definition at line 10 of file KinematicTree.cc.
References empt.
Referenced by plotting.Plot::clone(), currentDecayVertex(), currentParticle(), currentProductionVertex(), daughterParticles(), finalStateParticles(), findDecayVertex(), findParticle(), motherParticle(), movePointerToTheFirstChild(), movePointerToTheMother(), movePointerToTheNextChild(), movePointerToTheTop(), and topParticle().
|
inline |
Definition at line 50 of file KinematicTree.h.
References empt.
Referenced by ntupleDataFormat._Object::_checkIsValid(), and core.AutoHandle.AutoHandle::ReallyLoad().
|
private |
Definition at line 359 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 270 of file KinematicTree.cc.
References currentParticle(), newFWLiteAna::found, movePointerToTheFirstChild(), and GetRecoTauVFromDQM_MC_cff::next.
Referenced by findParticle().
|
private |
Definition at line 342 of file KinematicTree.cc.
References currentDecayVertex(), newFWLiteAna::found, movePointerToTheFirstChild(), and GetRecoTauVFromDQM_MC_cff::next.
Referenced by findDecayVertex().
|
private |
Definition at line 69 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 97 of file KinematicTree.cc.
References currentProductionVertex(), isEmpty(), treeWalker, and up.
bool KinematicTree::movePointerToTheFirstChild | ( | ) | const |
Pointer goes to the first child(if any) in the list
Definition at line 226 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 218 of file KinematicTree.cc.
References isEmpty(), treeWalker, and up.
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 232 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 149 of file KinematicTree.cc.
References isEmpty(), eostools::move(), 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 377 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 384 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 83 of file KinematicTree.cc.
References isEmpty(), movePointerToTheTop(), and treeWalker.
|
mutableprivate |
Definition at line 208 of file KinematicTree.h.
Referenced by addParticle(), isEmpty(), isValid(), and KinematicTree().
|
mutableprivate |
Definition at line 210 of file KinematicTree.h.
Referenced by addParticle(), currentProductionVertex(), movePointerToTheTop(), replaceCurrentParticle(), and replaceCurrentVertex().
|
mutableprivate |
Definition at line 211 of file KinematicTree.h.
Referenced by currentDecayVertex(), currentParticle(), currentProductionVertex(), daughterParticles(), isConsistent(), KinematicTree(), motherParticle(), movePointerToTheFirstChild(), movePointerToTheMother(), movePointerToTheNextChild(), movePointerToTheTop(), topParticle(), and ~KinematicTree().