MINT2
DecayTree.cpp
Go to the documentation of this file.
1 // author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
2 // status: Mon 9 Feb 2009 19:18:03 GMT
3 #include "Mint/DecayTree.h"
6 
7 #include <sstream>
8 #include <iostream>
9 
10 using namespace std;
11 
12 /* DecayTree itself is just a typedef
13  Here we add a few functions.
14 */
15 
16 void anti(DecayTree& dt){
17  // if(! dt.getVal().antiThis()) return;
18  // no point continuing if this has no antiparticle.
19  // .. there is a point!
20  dt.getVal().antiThis();
21 
22  for(int i=0; i<dt.nDgtr(); i++){
23  anti(*(dt.getDgtrTreePtr(i)));
24  }
25 }
26 
27 std::string uniqueName(const DecayTree& dt_in){
28  DecayTree dt(dt_in);
29  standardSort(dt);
30  return dt.oneLiner();
31 }
32 
34  if(dt_in.getVal().isNonResonant()){
35  MultiQuarkContent quarks;
36  for(int i=0; i < dt_in.nDgtr(); i++){
37  quarks += netQuarkContent(*dt_in.getDgtrTreePtr(i));
38  }
39  return quarks;
40  }else{
41  return dt_in.getVal().props()->netQuarkContent();
42  }
43 }
const ValueType & getVal() const
Definition: DDTree.h:102
MultiQuarkContent netQuarkContent(const DecayTree &dt_in)
Definition: DecayTree.cpp:33
bool standardSort(DecayTree &A)
MINT::const_counted_ptr< DDTree< ValueType > > getDgtrTreePtr(int i) const
Definition: DDTree.h:114
std::string uniqueName(const DecayTree &dt_in)
Definition: DecayTree.cpp:27
Definition: DDTree.h:37
void anti(DecayTree &dt)
Definition: DecayTree.cpp:16
int nDgtr() const
Definition: DDTree.h:96
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375