herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
TwoBodyDecay.h
1// -*- C++ -*-
2//
3// TwoBodyDecay.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4// Copyright (C) 2002-2019 The Herwig Collaboration
5//
6// Herwig is licenced under version 3 of the GPL, see COPYING for details.
7// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8//
9#ifndef HERWIG_TwoBodyDecay_H
10#define HERWIG_TwoBodyDecay_H
11//
12// This is the declaration of the TwoBodyDecay struct.
13//
14
15namespace Herwig {
16using namespace ThePEG;
17using Helicity::tVertexBasePtr;
18
23
24public:
25
33 tVertexBasePtr vertex) : parent_(pa), vertex_(vertex) {
34 ParticleOrdering order;
35 if( order(pb, pc) ) {
36 children_.first = pb;
37 children_.second = pc;
38 }
39 else {
40 children_.first = pc;
41 children_.second = pb;
42 }
43 }
44
49
54
58 tVertexBasePtr vertex_;
59
60private:
61
63};
64
68inline bool operator<(const TwoBodyDecay & x, const TwoBodyDecay & y) {
69 if(x.parent_->id()!=y.parent_->id())
70 return x.parent_->id()<y.parent_->id();
71 if(x.children_.first->id()!=y.children_.first->id())
72 return x.children_.first->id() < y.children_.first->id();
73 if(x.children_.second->id()!=y.children_.second->id())
74 return x.children_.second->id() < y.children_.second->id();
75 return false;
76}
77inline bool operator==(const TwoBodyDecay & x, const TwoBodyDecay & y) {
78 if(x.parent_->id()!=y.parent_->id())
79 return false;
80 if(x.children_.first->id()!=y.children_.first->id())
81 return false;
82 if(x.children_.second->id()!=y.children_.second->id())
83 return false;
84 return true;
85}
86
87}
88#endif /* HERWIG_TwoBodyDecay_H */
89
-*- C++ -*-
bool operator<(const HPDiagram &x, const HPDiagram &y)
Test whether one diagram is 'less' than another.
Definition: HPDiagram.h:163
ThePEG::Ptr< ParticleData >::transient_pointer tPDPtr
bool operator==(const LorentzVector< Value > &a, const LorentzVector< Value > &b)
pair< tPDPtr, tPDPtr > tPDPair
A struct to order the particles in the same way as in the DecayModes.
Struct for the prototype of a two-body decay mode.
Definition: TwoBodyDecay.h:22
tPDPtr parent_
The parent.
Definition: TwoBodyDecay.h:48
tVertexBasePtr vertex_
Vertex.
Definition: TwoBodyDecay.h:58
tPDPair children_
The children.
Definition: TwoBodyDecay.h:53
TwoBodyDecay(tPDPtr pa, tPDPtr pb, tPDPtr pc, tVertexBasePtr vertex)
Constructor.
Definition: TwoBodyDecay.h:32