MINT2
Functions
DecayTreeComparisons.cpp File Reference
#include "Mint/DecayTree.h"
#include "Mint/DecayTreeComparisons.h"
#include <algorithm>

Go to the source code of this file.

Functions

bool sortBySVPAT (DecayTree &A)
 
bool sortBySVPAT_L (DecayTree &A)
 
bool sortByMoreDgtr (DecayTree &A)
 
bool sortByMoreMass (DecayTree &A)
 
bool sortByMoreL (DecayTree &A)
 
bool sortByMoreID (DecayTree &A)
 
bool sortByMoreAbsID_stillUnique (DecayTree &A)
 
bool standardSort (DecayTree &A)
 
bool equalBySVPATRec (const DecayTree &A, const DecayTree &B)
 
bool equalBySVPAT_LRec (const DecayTree &A, const DecayTree &B)
 
bool equalBySVPAT (DecayTree A, DecayTree B)
 
bool equalBySVPAT_L (DecayTree A, DecayTree B)
 

Function Documentation

◆ equalBySVPAT()

bool equalBySVPAT ( DecayTree  A,
DecayTree  B 
)

Definition at line 190 of file DecayTreeComparisons.cpp.

190  {
191  sortBySVPAT(A);
192  sortBySVPAT(B);
193 
194  return equalBySVPATRec(A,B);
195 }
bool equalBySVPATRec(const DecayTree &A, const DecayTree &B)
bool sortBySVPAT(DecayTree &A)

◆ equalBySVPAT_L()

bool equalBySVPAT_L ( DecayTree  A,
DecayTree  B 
)

Definition at line 196 of file DecayTreeComparisons.cpp.

196  {
197  sortBySVPAT_L(A);
198  sortBySVPAT_L(B);
199 
200  return equalBySVPAT_LRec(A,B);
201 }
bool sortBySVPAT_L(DecayTree &A)
bool equalBySVPAT_LRec(const DecayTree &A, const DecayTree &B)

◆ equalBySVPAT_LRec()

bool equalBySVPAT_LRec ( const DecayTree A,
const DecayTree B 
)

Definition at line 163 of file DecayTreeComparisons.cpp.

163  {
164  // checks if the two decays have the same
165  // Scalar/Vector/Pseudoscalar/Axialvector
166  // structure. And the same orbital angular momenta
167  // in the decays. Used to identify the
168  // right spin factor for each
169  // decay amplitude.
170 
171  // A and B already sorted - important!
172 
173  if(A.nDgtr() != B.nDgtr()){
174  return false;
175  }
176  for(int i=0; i<A.nDgtr(); i++){
177  if(! equalBySVPAT_LRec(*(A.getDgtrTreePtr(i)), *(B.getDgtrTreePtr(i)))){
178  return false;
179  }
180  }
181 
182  bool equality = ( A.getVal().SVPAT() == B.getVal().SVPAT() )
183  && ( A.getVal().L() == B.getVal().L() );
184 
185 
186  return equality;
187 }
const ValueType & getVal() const
Definition: DDTree.h:102
MINT::const_counted_ptr< DDTree< ValueType > > getDgtrTreePtr(int i) const
Definition: DDTree.h:114
int nDgtr() const
Definition: DDTree.h:96
bool equalBySVPAT_LRec(const DecayTree &A, const DecayTree &B)

◆ equalBySVPATRec()

bool equalBySVPATRec ( const DecayTree A,
const DecayTree B 
)

Definition at line 142 of file DecayTreeComparisons.cpp.

142  {
143  // checks if the two decays have the same
144  // Scalar/Vector/Pseudoscalar/Axialvector
145  // structure. Superseded by equalBySVPATLRec to identify the
146  // right spin factor for each
147  // decay amplitude.
148 
149  // A and B already sorted - important!
150 
151  if(A.nDgtr() != B.nDgtr()){
152  return false;
153  }
154  for(int i=0; i<A.nDgtr(); i++){
155  if(! equalBySVPATRec(*(A.getDgtrTreePtr(i)), *(B.getDgtrTreePtr(i)))){
156  return false;
157  }
158  }
159 
160  return A.getVal().SVPAT() == B.getVal().SVPAT();
161 }
bool equalBySVPATRec(const DecayTree &A, const DecayTree &B)
const ValueType & getVal() const
Definition: DDTree.h:102
MINT::const_counted_ptr< DDTree< ValueType > > getDgtrTreePtr(int i) const
Definition: DDTree.h:114
int nDgtr() const
Definition: DDTree.h:96

◆ sortByMoreAbsID_stillUnique()

bool sortByMoreAbsID_stillUnique ( DecayTree A)

Definition at line 120 of file DecayTreeComparisons.cpp.

120  {
122  return true;
123 }
void sortAllBy()
Definition: DDTree.h:82

◆ sortByMoreDgtr()

bool sortByMoreDgtr ( DecayTree A)

Definition at line 53 of file DecayTreeComparisons.cpp.

53  {
55  return true;
56 }
void sortAllBy()
Definition: DDTree.h:82

◆ sortByMoreID()

bool sortByMoreID ( DecayTree A)

Definition at line 93 of file DecayTreeComparisons.cpp.

93  {
94  A.sortAllBy<moreByID>();
95  return true;
96 }
void sortAllBy()
Definition: DDTree.h:82

◆ sortByMoreL()

bool sortByMoreL ( DecayTree A)

Definition at line 79 of file DecayTreeComparisons.cpp.

79  {
80  A.sortAllBy<moreByL>();
81  return true;
82 }
void sortAllBy()
Definition: DDTree.h:82

◆ sortByMoreMass()

bool sortByMoreMass ( DecayTree A)

Definition at line 75 of file DecayTreeComparisons.cpp.

75  {
76  A.sortAllBy<moreByMass>();
77  return true;
78 }
void sortAllBy()
Definition: DDTree.h:82

◆ sortBySVPAT()

bool sortBySVPAT ( DecayTree A)

Definition at line 31 of file DecayTreeComparisons.cpp.

31  {
34  return true;
35 }
void sortAllBy()
Definition: DDTree.h:82

◆ sortBySVPAT_L()

bool sortBySVPAT_L ( DecayTree A)

Definition at line 37 of file DecayTreeComparisons.cpp.

37  {
40  return true;
41 }
void sortAllBy()
Definition: DDTree.h:82

◆ standardSort()

bool standardSort ( DecayTree A)

Definition at line 125 of file DecayTreeComparisons.cpp.

125  {
126 
127  bool isAnti=(A.getVal().pdg() < 0);
128  if(isAnti) anti(A);
129 
130  sortByMoreL(A);
131 
133  //this gives unique starting point.
134 
135  sortByMoreMass(A);
136  sortByMoreDgtr(A);
137 
138  if(isAnti) anti(A);
139  return true;
140 }
bool sortByMoreL(DecayTree &A)
void anti(DecayTree &dt)
Definition: DecayTree.cpp:16
bool sortByMoreDgtr(DecayTree &A)
const ValueType & getVal() const
Definition: DDTree.h:102
bool sortByMoreAbsID_stillUnique(DecayTree &A)
bool sortByMoreMass(DecayTree &A)