File indexing completed on 2026-08-06 09:24:17
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef HERWIG_TwoBodyDecay_H
0010 #define HERWIG_TwoBodyDecay_H
0011
0012
0013
0014
0015 namespace Herwig {
0016 using namespace ThePEG;
0017 using Helicity::tVertexBasePtr;
0018
0019
0020
0021
0022 struct TwoBodyDecay {
0023
0024 public:
0025
0026
0027
0028
0029
0030
0031
0032 TwoBodyDecay(tPDPtr pa, tPDPtr pb, tPDPtr pc,
0033 tVertexBasePtr vertex) : parent_(pa), vertex_(vertex) {
0034 ParticleOrdering order;
0035 if( order(pb, pc) ) {
0036 children_.first = pb;
0037 children_.second = pc;
0038 }
0039 else {
0040 children_.first = pc;
0041 children_.second = pb;
0042 }
0043 }
0044
0045
0046
0047
0048 tPDPtr parent_;
0049
0050
0051
0052
0053 tPDPair children_;
0054
0055
0056
0057
0058 tVertexBasePtr vertex_;
0059
0060 private:
0061
0062 TwoBodyDecay();
0063 };
0064
0065
0066
0067
0068 inline bool operator<(const TwoBodyDecay & x, const TwoBodyDecay & y) {
0069 if(x.parent_->id()!=y.parent_->id())
0070 return x.parent_->id()<y.parent_->id();
0071 if(x.children_.first->id()!=y.children_.first->id())
0072 return x.children_.first->id() < y.children_.first->id();
0073 if(x.children_.second->id()!=y.children_.second->id())
0074 return x.children_.second->id() < y.children_.second->id();
0075 return false;
0076 }
0077 inline bool operator==(const TwoBodyDecay & x, const TwoBodyDecay & y) {
0078 if(x.parent_->id()!=y.parent_->id())
0079 return false;
0080 if(x.children_.first->id()!=y.children_.first->id())
0081 return false;
0082 if(x.children_.second->id()!=y.children_.second->id())
0083 return false;
0084 return true;
0085 }
0086
0087 }
0088 #endif
0089