herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
Models
General
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
15
namespace
Herwig
{
16
using namespace
ThePEG
;
17
using
Helicity::tVertexBasePtr;
18
22
struct
TwoBodyDecay
{
23
24
public
:
25
32
TwoBodyDecay
(
tPDPtr
pa,
tPDPtr
pb,
tPDPtr
pc,
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
48
tPDPtr
parent_
;
49
53
tPDPair
children_
;
54
58
tVertexBasePtr
vertex_
;
59
60
private
:
61
62
TwoBodyDecay
();
63
};
64
68
inline
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
}
77
inline
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
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
Herwig::operator<
bool operator<(const HPDiagram &x, const HPDiagram &y)
Test whether one diagram is 'less' than another.
Definition:
HPDiagram.h:163
ThePEG
ThePEG::tPDPtr
ThePEG::Ptr< ParticleData >::transient_pointer tPDPtr
ThePEG::operator==
bool operator==(const LorentzVector< Value > &a, const LorentzVector< Value > &b)
ThePEG::tPDPair
pair< tPDPtr, tPDPtr > tPDPair
Herwig::ParticleOrdering
A struct to order the particles in the same way as in the DecayModes.
Definition:
PrototypeVertex.h:35
Herwig::TwoBodyDecay
Struct for the prototype of a two-body decay mode.
Definition:
TwoBodyDecay.h:22
Herwig::TwoBodyDecay::parent_
tPDPtr parent_
The parent.
Definition:
TwoBodyDecay.h:48
Herwig::TwoBodyDecay::vertex_
tVertexBasePtr vertex_
Vertex.
Definition:
TwoBodyDecay.h:58
Herwig::TwoBodyDecay::children_
tPDPair children_
The children.
Definition:
TwoBodyDecay.h:53
Herwig::TwoBodyDecay::TwoBodyDecay
TwoBodyDecay(tPDPtr pa, tPDPtr pb, tPDPtr pc, tVertexBasePtr vertex)
Constructor.
Definition:
TwoBodyDecay.h:32
Generated on Thu Jun 20 2024 17:50:53 for Herwig by
1.9.6