CMS 3D CMS Logo

KinematicTree Class Reference

Class describing the decay chain inside the kinematic fit. More...

#include <RecoVertex/KinematicFitPrimitives/interface/KinematicTree.h>

Inheritance diagram for KinematicTree:

ReferenceCounted

List of all members.

Public Member Functions

void addParticle (RefCountedKinematicVertex prodVtx, RefCountedKinematicVertex decVtx, RefCountedKinematicParticle part)
 Methods adding nodes and edges to the graph representation of the Kinematic Tree.
void 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_.
RefCountedKinematicVertex currentDecayVertex () const
 Returns a current decay vertex pointer is NOT moved.
RefCountedKinematicParticle currentParticle () const
 Returns a current particle pointer is NOT moved.
RefCountedKinematicVertex currentProductionVertex () const
 Returns a current production vertex pointer is NOT moved.
vector
< RefCountedKinematicParticle
daughterParticles () const
 Returns a non-zero vector in case of success and 0 vector in case of failure Pointer is NOT moved.
vector
< RefCountedKinematicParticle
finalStateParticles () const
 Kinematic Tree navigation methods.
bool findDecayVertex (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).
bool findParticle (RefCountedKinematicParticle part) const
 Pointer goes to the needed particle inside the tree if found (true).
bool isConsistent () const
 This method checks if the tree is consistent, i.e.
bool isEmpty () const
 Access methods.
 KinematicTree ()
 Constructor initializing everything and setting all values to 0.
pair< bool,
RefCountedKinematicParticle
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.
bool movePointerToTheFirstChild () const
 Pointer goes to the first child(if any) in the list.
bool movePointerToTheMother () const
 Pointer goes to the mother particle (if any) with respest to the current one.
bool movePointerToTheNextChild () const
 Pointer goes to the next child in the list (if any).
void movePointerToTheTop () const
 Puts the pointer to the top (root) of the tree.
void replaceCurrentParticle (RefCountedKinematicParticle newPart) const
 Methods replacing Particles and Vertices inside the tree during the refit.
void replaceCurrentVertex (RefCountedKinematicVertex newVert) const
 Replaces _decay_ vertex of the current particle with the given value.
RefCountedKinematicParticle topParticle () const
 Returns the top particle of decay.
virtual ~KinematicTree ()

Private Member Functions

void leftBranchAdd (KinematicTree *otherTree, RefCountedKinematicVertex vtx)
bool leftBranchSearch (RefCountedKinematicParticle part) const
 Private methods to walk around the tree: Needed to collect final state or particle search.
bool leftBranchVertexSearch (RefCountedKinematicVertex vtx) const
bool leftFinalParticle () const

Private Attributes

bool empt
graph
< RefCountedKinematicVertex,
RefCountedKinematicParticle
treeGraph
graphwalker
< RefCountedKinematicVertex,
RefCountedKinematicParticle > * 
treeWalker


Detailed Description

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.


Constructor & Destructor Documentation

KinematicTree::KinematicTree (  ) 

Constructor initializing everything and setting all values to 0.

Definition at line 3 of file KinematicTree.cc.

References empt, and treeWalker.

00004 {
00005  empt = true;
00006  treeWalker = 0;
00007 }

KinematicTree::~KinematicTree (  )  [virtual]

Definition at line 9 of file KinematicTree.cc.

References treeWalker.

00010 {
00011  delete treeWalker;
00012 }


Member Function Documentation

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().

00029 {
00030  part->setTreePointer(this);
00031  treeGraph.addEdge(prodVtx,decVtx,part);
00032  empt = false;
00033  movePointerToTheTop();
00034 }

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 398 of file KinematicTree.cc.

References addParticle(), currentDecayVertex(), currentParticle(), currentProductionVertex(), findDecayVertex(), leftBranchAdd(), movePointerToTheMother(), movePointerToTheNextChild(), and movePointerToTheTop().

00399 {
00400 //adding new tree to the existing one:
00401  bool fnd = findDecayVertex(vtx);
00402  if(!fnd) throw VertexException("KinematicTree::addTree; Current tree does not contain the vertex passed");
00403  tr->movePointerToTheTop();
00404  
00405 // adding the root of the tree: 
00406  RefCountedKinematicParticle mP = tr->currentParticle(); 
00407  RefCountedKinematicVertex   dec_vertex = tr->currentDecayVertex();
00408  addParticle(vtx,dec_vertex,mP);
00409 
00410 // adding the left branch if any 
00411  leftBranchAdd(tr,dec_vertex);
00412 
00413 //now the pointer is at the left down
00414 //edge of the otherTree.
00415 //current tree pointer is where the
00416 //add operation was stoped last time.
00417  bool right = true;
00418  bool up = true;
00419  do
00420  {
00421   right = tr->movePointerToTheNextChild();
00422   if(right)
00423   {
00424 
00425 //production vertex is already at the current tree  
00426 //adding current partilce
00427    RefCountedKinematicVertex prodVertex = tr->currentProductionVertex();
00428    RefCountedKinematicParticle cPart = tr->currentParticle();
00429    RefCountedKinematicVertex decVertex = tr->currentDecayVertex();
00430    addParticle(prodVertex, decVertex, cPart);
00431    
00432 //adding the rest of the branch   
00433    leftBranchAdd(tr,decVertex);
00434   }else{
00435    up = tr->movePointerToTheMother(); 
00436   }
00437  }while(up);
00438 }                       

RefCountedKinematicVertex KinematicTree::currentDecayVertex (  )  const

Returns a current decay vertex pointer is NOT moved.

Definition at line 106 of file KinematicTree.cc.

References isEmpty(), and treeWalker.

Referenced by addTree(), findDecayVertex(), leftBranchAdd(), leftBranchVertexSearch(), and replaceCurrentVertex().

00107  {
00108    if(isEmpty()) throw VertexException("KinematicTree::currentDecayVertex; tree is empty!");
00109    return treeWalker->current().first;
00110  }

RefCountedKinematicParticle KinematicTree::currentParticle (  )  const

Returns a current particle pointer is NOT moved.

Definition at line 228 of file KinematicTree.cc.

References isEmpty(), and treeWalker.

Referenced by addTree(), currentProductionVertex(), daughterParticles(), finalStateParticles(), findParticle(), leftBranchAdd(), leftBranchSearch(), and replaceCurrentParticle().

00229 {
00230  if(isEmpty()) throw VertexException("KinematicTree::currentParticle; tree is empty!");
00231  return treeWalker->current().second;
00232 }

RefCountedKinematicVertex KinematicTree::currentProductionVertex (  )  const

Returns a current production vertex pointer is NOT moved.

Definition at line 176 of file KinematicTree.cc.

References currentParticle(), isEmpty(), movePointerToTheMother(), res, treeGraph, and treeWalker.

Referenced by addTree(), and motherParticle().

00177 {
00178   if(isEmpty()) throw VertexException("KinematicTree::currentProductionVertex; tree is empty!");
00179 //current particle
00180   RefCountedKinematicParticle initial = currentParticle();
00181   
00182   bool up;
00183   bool down;
00184   RefCountedKinematicVertex res;
00185   up = movePointerToTheMother();
00186   
00187  if(up)
00188  { 
00189   res = treeWalker->current().first;
00190                                                
00191 //pointer moved so we going back
00192   down = treeWalker->firstChild();
00193    
00194 //_down_ variable is always TRUE here, if
00195 //the tree is valid.
00196   if(down){
00197    if(initial == treeWalker->current().second)
00198    {
00199     return res;
00200    }else{
00201     bool next = true;
00202     do
00203     {
00204      next = treeWalker->nextSibling();
00205      if(treeWalker->current().second == initial) next = false;
00206     }while(next);
00207     return res;
00208    }
00209   }else{throw VertexException("KinematicTree::Navigation failed, tree invalid?");}                      
00210  }else
00211  { 
00212 //very unprobable case. This efectively means that user is
00213 //already out of the tree. Moving back to the top
00214  delete treeWalker;
00215  treeWalker = new graphwalker<RefCountedKinematicVertex,
00216                               RefCountedKinematicParticle>
00217                                               (treeGraph);
00218  res = treeWalker->current().first;                                           
00219 //now pointer is a pair: fake vertex and 
00220 //icoming 0 pointer to the particle
00221 //moving it to decayed particle
00222  bool move = treeWalker->firstChild();
00223  if(!move) throw VertexException("KinematicTree::movePointerToTheTop; non consistent tree?");
00224  return res;
00225  } 
00226 }

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 140 of file KinematicTree.cc.

References prof2calltree::back, currentParticle(), findParticle(), isEmpty(), and treeWalker.

00141  {
00142   if(isEmpty()) throw VertexException("KinematicTree::daughterParticles; tree is empty!");
00143   vector<RefCountedKinematicParticle> sResult;
00144   RefCountedKinematicParticle initial = currentParticle();
00145   bool down  = treeWalker->firstChild();
00146   if(down)
00147   {
00148     sResult.push_back(treeWalker->current().second);
00149     bool sibling = true;
00150     do
00151     {
00152      sibling = treeWalker->nextSibling();
00153      if(sibling) sResult.push_back(treeWalker->current().second); 
00154     }while(sibling);
00155   }
00156 
00157 //getting the pointer back to the mother  
00158   bool back = findParticle(initial);
00159   if(!back) throw VertexException("KinematicTree::daughterParticles; error occured while getting back");
00160   return sResult;
00161  }

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 36 of file KinematicTree.cc.

References prof2calltree::back, GenMuonPlsPt100GeV_cfg::cout, currentParticle(), lat::endl(), findParticle(), isConsistent(), isEmpty(), leftFinalParticle(), movePointerToTheMother(), movePointerToTheNextChild(), and movePointerToTheTop().

00037 {
00038  if(isEmpty() || !(isConsistent()))
00039  {
00040   throw VertexException("KinematicTree::finalStateParticles; tree is empty or not consistent");
00041  }else{
00042   RefCountedKinematicParticle initial = currentParticle();
00043   vector<RefCountedKinematicParticle> rs;
00044   movePointerToTheTop();
00045   if(!(leftFinalParticle()))
00046   {
00047    cout<<"top particle has no daughters, empty vector returned"<<endl;
00048   }else{
00049 //now pointer is at the  most left final particle
00050    rs.push_back(currentParticle()); 
00051    bool next_right = true; 
00052    bool down = true;   
00053    bool up = true;
00054    do
00055    {
00056     next_right = movePointerToTheNextChild();
00057     if(next_right)
00058     {
00059 //if there's a way to the right,
00060 //we go right and down possible    
00061      down = leftFinalParticle();
00062      rs.push_back(currentParticle()); 
00063     }else{
00064 //once there's no way to right anymore
00065 //trying to find a way upper    
00066      up = movePointerToTheMother();
00067     }
00068 //loop stops when we are at the top:
00069 //no way up, no way to the right    
00070    }while(up);   
00071   } 
00072 //getting the pointer back  
00073   bool back = findParticle(initial);
00074   if(!back) throw VertexException("KinematicTree::FinalStateParticles; error occured while getting back");
00075   return rs;
00076  }
00077 }

bool KinematicTree::findDecayVertex ( 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 311 of file KinematicTree.cc.

References currentDecayVertex(), isConsistent(), isEmpty(), leftBranchVertexSearch(), movePointerToTheMother(), movePointerToTheNextChild(), movePointerToTheTop(), and res.

Referenced by addTree().

00312 {
00313  if(isEmpty() || !(isConsistent()))
00314  {
00315   throw VertexException("KinematicTree::findParticle; tree is empty or not consistent");
00316  }else{
00317  bool res = false;
00318  movePointerToTheTop();
00319  if(currentDecayVertex() == vert)
00320  {
00321   res = true;
00322  }else if(leftBranchVertexSearch(vert)){
00323   res = true;
00324  }else{
00325   bool up = true;
00326   bool fnd = false;
00327   do
00328   {
00329    if(movePointerToTheNextChild())
00330    {
00331     fnd = leftBranchVertexSearch(vert);
00332    }else{
00333     up=movePointerToTheMother();
00334     if(currentDecayVertex() == vert) fnd = true;
00335    }   
00336   }while(up && !fnd);
00337   res = fnd;
00338  }
00339  return res;
00340  }
00341 }

bool KinematicTree::findParticle ( 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 255 of file KinematicTree.cc.

References currentParticle(), isConsistent(), isEmpty(), leftBranchSearch(), movePointerToTheMother(), movePointerToTheNextChild(), movePointerToTheTop(), and res.

Referenced by daughterParticles(), and finalStateParticles().

00256 {
00257  if(isEmpty() || !(isConsistent()))
00258  {
00259   throw VertexException("KinematicTree::findParticle; tree is empty or not consistent");
00260  }else{
00261   bool res = false;
00262   movePointerToTheTop();
00263   if(currentParticle() == part)
00264   {
00265    res = true;
00266   }else if(leftBranchSearch(part)){
00267    res = true;
00268   }else{
00269    bool found = false;
00270    bool up = true;
00271    bool next_right = false;
00272    do
00273    {
00274 //    if(*(currentParticle()) == *part) found = true;
00275     next_right = movePointerToTheNextChild();
00276     if(next_right)
00277     {
00278      found = leftBranchSearch(part);
00279     }else{
00280      up = movePointerToTheMother();
00281      if(currentParticle() == part) found = true;
00282     }
00283    }while(up && !found);
00284    res = found;
00285   } 
00286   return res;
00287  }
00288 }

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().

00019 {
00020  movePointerToTheTop();
00021  bool des = false;
00022  if(!treeWalker->nextSibling()) des = true;
00023  return des;
00024 }

bool KinematicTree::isEmpty (  )  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().

00016  {return empt;}

void KinematicTree::leftBranchAdd ( KinematicTree otherTree,
RefCountedKinematicVertex  vtx 
) [private]

Definition at line 362 of file KinematicTree.cc.

References addParticle(), currentDecayVertex(), currentParticle(), and movePointerToTheFirstChild().

Referenced by addTree().

00363 {
00364   RefCountedKinematicVertex previous_decay = otherTree->currentDecayVertex(); 
00365  
00366 //children of current particle of the
00367 //other tree: in the end the whole 
00368 //left branch should be added. 
00369   bool next = true;
00370   do
00371   {
00372    next = otherTree->movePointerToTheFirstChild();
00373    if(next)
00374    {
00375     RefCountedKinematicParticle par = otherTree->currentParticle();
00376     RefCountedKinematicVertex current_decay = otherTree->currentDecayVertex();
00377     addParticle(previous_decay, current_decay, par);
00378     previous_decay = current_decay;
00379    }
00380   }while(next);
00381 }

bool KinematicTree::leftBranchSearch ( RefCountedKinematicParticle  part  )  const [private]

Private methods to walk around the tree: Needed to collect final state or particle search.

Definition at line 291 of file KinematicTree.cc.

References currentParticle(), and movePointerToTheFirstChild().

Referenced by findParticle().

00292 {
00293  bool found = false;
00294  bool next = true;
00295  if(currentParticle() == part)
00296  {
00297   found = true;
00298  }else{
00299   do
00300   {
00301    next = movePointerToTheFirstChild();
00302    if(currentParticle() == part)
00303    {
00304     found = true;
00305    }
00306   }while(next && !found);
00307   }
00308  return found;
00309 }

bool KinematicTree::leftBranchVertexSearch ( RefCountedKinematicVertex  vtx  )  const [private]

Definition at line 343 of file KinematicTree.cc.

References currentDecayVertex(), movePointerToTheFirstChild(), and res.

Referenced by findDecayVertex().

00344 {
00345  bool found = false;
00346  if(currentDecayVertex() == vtx)
00347  {
00348   found = true;
00349  }else{
00350   bool next = true;
00351   bool res = false;
00352   do
00353   {
00354    next = movePointerToTheFirstChild();
00355    if(currentDecayVertex() == vtx) res = true;
00356   }while(next && !res); 
00357   found  = res;
00358  }
00359  return found;
00360 }

bool KinematicTree::leftFinalParticle (  )  const [private]

Definition at line 79 of file KinematicTree.cc.

References movePointerToTheFirstChild(), and res.

Referenced by finalStateParticles().

00080 {
00081  bool res = false;
00082  if(movePointerToTheFirstChild())
00083  {
00084   res = true;
00085   bool next = true;
00086   do
00087   {
00088     next = movePointerToTheFirstChild(); 
00089   }while(next);
00090  }else{
00091   res =false;
00092  }
00093  return res;
00094 }

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 112 of file KinematicTree.cc.

References currentProductionVertex(), isEmpty(), res, and treeWalker.

00113  {
00114   if(isEmpty()) throw VertexException("KinematicTree::motherParticle; tree is empty!");
00115   bool top = currentProductionVertex()->vertexIsValid();
00116    RefCountedKinematicParticle cr  = treeWalker->current().second;
00117    bool up = treeWalker->parent();
00118    pair<bool,RefCountedKinematicParticle> res; 
00119    if(up && top){
00120     RefCountedKinematicParticle pr = treeWalker->current().second;
00121     
00122 //now putting the pointer back   
00123     bool fc = treeWalker->firstChild();
00124     if(!fc) throw VertexException("KinematicTree::motherParticle; tree is incorrect!");
00125     if(*(treeWalker->current().second) != *cr)
00126     {
00127      do{
00128       bool nx = treeWalker->nextSibling();
00129       if(!nx) throw VertexException("KinematicTree::motherParticle; tree is incorrect!");
00130      }while(*(treeWalker->current().second) != *cr);
00131     }
00132     res = pair<bool,RefCountedKinematicParticle>(true,pr);
00133     return res;
00134    }else{
00135     RefCountedKinematicParticle fk;
00136     return pair<bool,RefCountedKinematicParticle>(false,fk);
00137    }
00138  }

bool KinematicTree::movePointerToTheFirstChild (  )  const

Pointer goes to the first child(if any) in the list.

Definition at line 242 of file KinematicTree.cc.

References isEmpty(), and treeWalker.

Referenced by leftBranchAdd(), leftBranchSearch(), leftBranchVertexSearch(), and leftFinalParticle().

00243 {
00244  if(isEmpty()) throw VertexException("KinematicTree::movePointerToTheFirstChild; tree is empty!");
00245  return treeWalker->firstChild();
00246 }

bool KinematicTree::movePointerToTheMother (  )  const

Pointer goes to the mother particle (if any) with respest to the current one.

Definition at line 234 of file KinematicTree.cc.

References isEmpty(), and treeWalker.

Referenced by addTree(), currentProductionVertex(), finalStateParticles(), findDecayVertex(), and findParticle().

00235 {
00236  if(isEmpty()) throw VertexException("KinematicTree::movePointerToTheMother; tree is empty!");
00237  bool up = treeWalker->parent();
00238  bool cr = treeWalker->current().first->vertexIsValid();
00239  return (up && cr);
00240 }

bool KinematicTree::movePointerToTheNextChild (  )  const

Pointer goes to the next child in the list (if any).

Definition at line 248 of file KinematicTree.cc.

References isEmpty(), res, and treeWalker.

Referenced by addTree(), finalStateParticles(), findDecayVertex(), and findParticle().

00249 {
00250  if(isEmpty()) throw VertexException("KinematicTree::movePointerToTheNextChild; tree is empty!");
00251  bool res = treeWalker->nextSibling();
00252  return res;
00253 }

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 163 of file KinematicTree.cc.

References isEmpty(), treeGraph, and treeWalker.

Referenced by addParticle(), addTree(), FinalTreeBuilder::buildTree(), ConstrainedTreeBuilder::buildTree(), finalStateParticles(), findDecayVertex(), findParticle(), isConsistent(), and topParticle().

00164 {
00165  if(isEmpty()) throw VertexException("KinematicTree::movePointerToTheTop; tree is empty!");
00166  delete treeWalker;
00167  treeWalker = new graphwalker<RefCountedKinematicVertex,
00168                               RefCountedKinematicParticle>(treeGraph);
00169 //now pointer is a pair: fake vertex and 
00170 //icoming 0 pointer to the particle
00171 //moving it to decayed particle
00172  bool move = treeWalker->firstChild();
00173  if(!move) throw VertexException("KinematicTree::movePointerToTheTop; non consistent tree?");
00174 }

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 383 of file KinematicTree.cc.

References currentParticle(), replace(), and treeGraph.

Referenced by FinalTreeBuilder::buildTree(), and ConstrainedTreeBuilder::buildTree().

00384 {
00385  RefCountedKinematicParticle cDParticle = currentParticle();
00386  bool replace = treeGraph.replaceEdge(cDParticle,newPart);
00387  if(!replace) throw VertexException("KinematicTree::Particle To Replace not found");
00388 }

void KinematicTree::replaceCurrentVertex ( RefCountedKinematicVertex  newVert  )  const

Replaces _decay_ vertex of the current particle with the given value.

Definition at line 390 of file KinematicTree.cc.

References currentDecayVertex(), replace(), and treeGraph.

00391 {
00392  RefCountedKinematicVertex cDVertex = currentDecayVertex();
00393  bool replace = treeGraph.replace(cDVertex,newVert);
00394  if(! replace) throw VertexException("KinematicTree::Vertex To Replace not found");
00395 }

RefCountedKinematicParticle KinematicTree::topParticle (  )  const

Returns the top particle of decay.

Pointer is moved to the TOP of the decay tree.

Definition at line 97 of file KinematicTree.cc.

References isEmpty(), movePointerToTheTop(), and treeWalker.

00098  {
00099    if(isEmpty()) throw VertexException("KinematicTree::topParticle; tree is empty!");
00100 //putting pointer to the top of the tree 
00101    movePointerToTheTop();
00102    return treeWalker->current().second;                                     
00103  }


Member Data Documentation

bool KinematicTree::empt [mutable, private]

Definition at line 212 of file KinematicTree.h.

Referenced by addParticle(), isEmpty(), and KinematicTree().

graph<RefCountedKinematicVertex,RefCountedKinematicParticle> KinematicTree::treeGraph [mutable, private]

Definition at line 214 of file KinematicTree.h.

Referenced by addParticle(), currentProductionVertex(), movePointerToTheTop(), replaceCurrentParticle(), and replaceCurrentVertex().

graphwalker<RefCountedKinematicVertex, RefCountedKinematicParticle>* KinematicTree::treeWalker [mutable, private]

Definition at line 215 of file KinematicTree.h.

Referenced by currentDecayVertex(), currentParticle(), currentProductionVertex(), daughterParticles(), isConsistent(), KinematicTree(), motherParticle(), movePointerToTheFirstChild(), movePointerToTheMother(), movePointerToTheNextChild(), movePointerToTheTop(), topParticle(), and ~KinematicTree().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:23 2009 for CMSSW by  doxygen 1.5.4