30 part->setTreePointer(
this);
34 prodVtx->setTreePointer(
this);
35 decVtx->setTreePointer(
this);
42 throw VertexException(
"KinematicTree::finalStateParticles; tree is empty or not consistent");
45 std::vector<RefCountedKinematicParticle> rs;
49 std::cout<<
"top particle has no daughters, empty vector returned"<<std::endl;
53 bool next_right =
true;
75 if(!back)
throw VertexException(
"KinematicTree::FinalStateParticles; error occured while getting back");
119 std::pair<bool,RefCountedKinematicParticle>
res;
125 if(!fc)
throw VertexException(
"KinematicTree::motherParticle; tree is incorrect!");
130 if(!nx)
throw VertexException(
"KinematicTree::motherParticle; tree is incorrect!");
131 }
while(*(
treeWalker->current().second) != *cr);
133 res = std::pair<bool,RefCountedKinematicParticle>(
true,pr);
137 return std::pair<bool,RefCountedKinematicParticle>(
false,fk);
144 std::vector<RefCountedKinematicParticle> sResult;
149 sResult.push_back(
treeWalker->current().second);
154 if(sibling) sResult.push_back(
treeWalker->current().second);
160 if(!back)
throw VertexException(
"KinematicTree::daughterParticles; error occured while getting back");
174 if(!move)
throw VertexException(
"KinematicTree::movePointerToTheTop; non consistent tree?");
206 if(
treeWalker->current().second == initial) next =
false;
210 }
else{
throw VertexException(
"KinematicTree::Navigation failed, tree invalid?");}
224 if(!move)
throw VertexException(
"KinematicTree::movePointerToTheTop; non consistent tree?");
239 bool cr =
treeWalker->current().first->vertexIsValid();
260 throw VertexException(
"KinematicTree::findParticle; tree is empty or not consistent");
272 bool next_right =
false;
284 }
while(up && !found);
307 }
while(next && !found);
316 throw VertexException(
"KinematicTree::findParticle; tree is empty or not consistent");
348 throw VertexException(
"KinematicTree::findParticle; tree is empty or not consistent");
390 }
while(next && !res);
412 previous_decay = current_decay;
421 if(!replace)
throw VertexException(
"KinematicTree::Particle To Replace not found");
428 if(! replace)
throw VertexException(
"KinematicTree::Vertex To Replace not found");
436 if(!fnd)
throw VertexException(
"KinematicTree::addTree; Current tree does not contain the vertex passed");
void replaceCurrentParticle(RefCountedKinematicParticle newPart) const
RefCountedKinematicVertex currentDecayVertex() const
bool movePointerToTheFirstChild() const
bool movePointerToTheNextChild() const
bool leftBranchVertexSearch(RefCountedKinematicVertex vtx) const
std::pair< bool, RefCountedKinematicParticle > motherParticle() const
bool leftFinalParticle() const
void leftBranchAdd(KinematicTree *otherTree, RefCountedKinematicVertex vtx)
def replace(string, replacements)
RefCountedKinematicParticle topParticle() const
math::GraphWalker< RefCountedKinematicVertex, RefCountedKinematicParticle > * treeWalker
RefCountedKinematicVertex currentProductionVertex() const
~KinematicTree() override
bool leftBranchSearch(RefCountedKinematicParticle part) const
math::Graph< RefCountedKinematicVertex, RefCountedKinematicParticle > treeGraph
bool findParticle(const RefCountedKinematicParticle part) const
bool movePointerToTheMother() const
bool findDecayVertex(const RefCountedKinematicVertex vert) const
std::vector< RefCountedKinematicParticle > finalStateParticles() const
void replaceCurrentVertex(RefCountedKinematicVertex newVert) const
void movePointerToTheTop() const
bool isConsistent() const
std::vector< RefCountedKinematicParticle > daughterParticles() const
ReferenceCountingPointer< KinematicVertex > RefCountedKinematicVertex
RefCountedKinematicParticle currentParticle() const
void addParticle(RefCountedKinematicVertex prodVtx, RefCountedKinematicVertex decVtx, RefCountedKinematicParticle part)
void addTree(RefCountedKinematicVertex vtx, KinematicTree *tr)