thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
PDT
PDT.h
1
// -*- C++ -*-
2
//
3
// PDT.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 1999-2019 Leif Lonnblad
5
//
6
// ThePEG 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 ThePEG_PDT_H
10
#define ThePEG_PDT_H
11
// This is the declaration of the PDT class.
12
13
#include "
ThePEG/Config/ThePEG.h
"
14
15
namespace
ThePEG
{
16
24
class
PDT
{
25
26
public
:
27
32
enum
Spin
{
33
SpinNA
= -1,
34
SpinUnknown
= 0,
35
SpinUndefined
= 0,
36
Spin0
= 1,
37
Spin1Half
= 2,
38
Spin1
= 3,
39
Spin3Half
= 4,
40
Spin2
= 5,
41
Spin5Half
= 6,
42
Spin3
= 7,
43
Spin7Half
= 8,
44
Spin4
= 9
45
};
46
51
enum
Charge
{
52
ChargeUnknown
= -999999,
53
ChargeUndefined
= -999999,
54
Charged
= 999990,
55
Positive
= 900000,
56
Negative
= -900000,
57
ChargeNeutral
= 0,
58
Charge0
= 0,
59
Plus1Third
= 1,
60
Plus2Third
= 2,
61
Plus1
= 3,
62
Minus1Third
= -1,
63
Minus2Third
= -2,
64
Minus1
= -3,
65
Plus4Third
= 4,
66
Plus5Third
= 5,
67
Plus2
= 6,
68
Minus4Third
= -4,
69
Minus5Third
= -5,
70
Minus2
= -6,
71
Plus7Third
= 7,
72
Plus8Third
= 8,
73
Plus3
= 9,
74
Minus7Third
= -7,
75
Minus8Third
= -8,
76
Minus3
= -9,
77
Plus4
= 12,
78
Plus5
= 15,
79
Plus6
= 18,
80
Plus7
= 21,
81
Plus8
= 24,
82
Minus4
= -12,
83
Minus5
= -15,
84
Minus6
= -18,
85
Minus7
= -21,
86
Minus8
= -24
87
};
88
92
enum
Colour
{
93
ColourUnknown
= -1,
94
ColourUndefined
= -1,
95
ColourNeutral
= 0,
96
Colour0
= 0,
97
Coloured
= 1,
98
Colour3
= 3,
99
Colour3bar
= -3,
100
Colour6
= 6,
101
Colour6bar
= -6,
102
Colour8
= 8
103
};
104
108
enum
ColouredInteraction
{
109
ColouredUnknown = -2,
110
ColouredUndefined = -2,
111
NotColoured = -1,
112
ColouredQCD = 0
113
};
114
118
static
bool
charged
(
Charge
c) {
119
return
c !=
ChargeNeutral
&& c !=
ChargeUndefined
;
120
}
121
125
static
bool
positive
(
Charge
c) {
126
return
c >
ChargeNeutral
&& c !=
Charged
;
127
}
128
132
static
bool
negative
(
Charge
c) {
133
return
c <
ChargeNeutral
&& c !=
ChargeUndefined
;
134
}
135
139
static
bool
coloured
(
Colour
c) {
140
return
c !=
ColourNeutral
&& c !=
ColourUnknown
;
141
}
142
146
static
Colour
antiColour
(
Colour
c) {
147
if
( c ==
Colour3
|| c ==
Colour3bar
)
return
Colour
(-c);
148
if
( c ==
Colour6
|| c ==
Colour6bar
)
return
Colour
(-c);
149
return
c;
150
}
151
157
static
vector<long>
flavourContent
(
long
id
);
158
164
static
vector<long>
flavourContent
(
tcPDPtr
);
165
171
static
vector<long>
flavourContent
(
tcPPtr
);
172
178
static
vector<long>
flavourContent
(
const
ParticleData
&);
179
185
static
vector<long>
flavourContent
(
const
Particle
&);
186
187
};
188
190
template
<
typename
IStream>
191
IStream &
operator>>
(IStream & is,
PDT::Colour
& c) {
192
int
ci;
193
is >> ci;
194
c =
PDT::Colour
(ci);
195
return
is;
196
}
197
199
template
<
typename
IStream>
200
IStream &
operator>>
(IStream & is,
PDT::Charge
& c) {
201
int
ci;
202
is >> ci;
203
c =
PDT::Charge
(ci);
204
return
is;
205
}
206
208
template
<
typename
IStream>
209
IStream &
operator>>
(IStream & is,
PDT::Spin
& s) {
210
int
si;
211
is >> si;
212
s =
PDT::Spin
(si);
213
return
is;
214
}
215
217
template
<>
218
struct
TypeTraits
<
PDT
::Spin>
219
{
221
enum
{ hasDimension =
false
};
223
typedef
EnumT
DimType
;
225
static
constexpr
PDT::Spin
baseunit
() {
return
PDT::Spin
(1); }
226
};
227
229
template
<>
230
struct
TypeTraits
<
PDT
::
Charge
>
231
{
233
enum
{ hasDimension =
false
};
235
typedef
EnumT
DimType
;
237
static
constexpr
PDT::Charge
baseunit
() {
return
PDT::Charge
(1); }
238
};
239
241
template
<>
242
struct
TypeTraits
<
PDT
::Colour>
243
{
245
enum
{ hasDimension =
false
};
247
typedef
EnumT
DimType
;
249
static
constexpr
PDT::Colour
baseunit
() {
return
PDT::Colour
(3); }
250
};
251
252
}
253
254
#endif
/* ThePEG_PDT_H */
ThePEG.h
This is the main config header file for ThePEG.
ThePEG::PDT
PDT is a helper class implementing enumerations for charge, colour and spin to be used by the Particl...
Definition:
PDT.h:24
ThePEG::PDT::positive
static bool positive(Charge c)
True if the argument corresponds to a positive charge.
Definition:
PDT.h:125
ThePEG::PDT::Charge
Charge
Definition of enumerated values used for charge information.
Definition:
PDT.h:51
ThePEG::PDT::Plus1
@ Plus1
e.
Definition:
PDT.h:61
ThePEG::PDT::Minus2Third
@ Minus2Third
-2e/3.
Definition:
PDT.h:63
ThePEG::PDT::Minus6
@ Minus6
-6e.
Definition:
PDT.h:84
ThePEG::PDT::Plus2
@ Plus2
2e.
Definition:
PDT.h:67
ThePEG::PDT::Plus6
@ Plus6
6e.
Definition:
PDT.h:79
ThePEG::PDT::Minus8Third
@ Minus8Third
-8e/3.
Definition:
PDT.h:75
ThePEG::PDT::Minus2
@ Minus2
-3e.
Definition:
PDT.h:70
ThePEG::PDT::Plus5Third
@ Plus5Third
5e/3.
Definition:
PDT.h:66
ThePEG::PDT::Charged
@ Charged
Is charged.
Definition:
PDT.h:54
ThePEG::PDT::Plus2Third
@ Plus2Third
2e/3.
Definition:
PDT.h:60
ThePEG::PDT::Minus7
@ Minus7
-7e.
Definition:
PDT.h:85
ThePEG::PDT::Minus4Third
@ Minus4Third
-4e/3.
Definition:
PDT.h:68
ThePEG::PDT::Plus8
@ Plus8
8e.
Definition:
PDT.h:81
ThePEG::PDT::Minus5
@ Minus5
-5e.
Definition:
PDT.h:83
ThePEG::PDT::Minus5Third
@ Minus5Third
-5e/3.
Definition:
PDT.h:69
ThePEG::PDT::Minus4
@ Minus4
-4e.
Definition:
PDT.h:82
ThePEG::PDT::Minus1
@ Minus1
-e.
Definition:
PDT.h:64
ThePEG::PDT::Minus1Third
@ Minus1Third
-e/3.
Definition:
PDT.h:62
ThePEG::PDT::Plus7Third
@ Plus7Third
7e/3.
Definition:
PDT.h:71
ThePEG::PDT::Plus4Third
@ Plus4Third
4e/3.
Definition:
PDT.h:65
ThePEG::PDT::Positive
@ Positive
Is positively charged.
Definition:
PDT.h:55
ThePEG::PDT::Plus1Third
@ Plus1Third
e/3.
Definition:
PDT.h:59
ThePEG::PDT::Minus3
@ Minus3
-3e.
Definition:
PDT.h:76
ThePEG::PDT::ChargeNeutral
@ ChargeNeutral
Uncharged.
Definition:
PDT.h:57
ThePEG::PDT::ChargeUnknown
@ ChargeUnknown
Unknown charge.
Definition:
PDT.h:52
ThePEG::PDT::Plus5
@ Plus5
5e.
Definition:
PDT.h:78
ThePEG::PDT::Minus8
@ Minus8
-8e.
Definition:
PDT.h:86
ThePEG::PDT::Plus8Third
@ Plus8Third
8e/3.
Definition:
PDT.h:72
ThePEG::PDT::ChargeUndefined
@ ChargeUndefined
Undefined charge.
Definition:
PDT.h:53
ThePEG::PDT::Plus4
@ Plus4
4e.
Definition:
PDT.h:77
ThePEG::PDT::Minus7Third
@ Minus7Third
-7e/3.
Definition:
PDT.h:74
ThePEG::PDT::Plus3
@ Plus3
3e.
Definition:
PDT.h:73
ThePEG::PDT::Charge0
@ Charge0
Uncharged.
Definition:
PDT.h:58
ThePEG::PDT::Plus7
@ Plus7
7e.
Definition:
PDT.h:80
ThePEG::PDT::Negative
@ Negative
Is negatively charged.
Definition:
PDT.h:56
ThePEG::PDT::Spin
Spin
Definition of enumerated values used for spin information.
Definition:
PDT.h:32
ThePEG::PDT::Spin4
@ Spin4
Spin 5.
Definition:
PDT.h:44
ThePEG::PDT::Spin1Half
@ Spin1Half
Spin 1/2.
Definition:
PDT.h:37
ThePEG::PDT::Spin3
@ Spin3
Spin 4.
Definition:
PDT.h:42
ThePEG::PDT::Spin7Half
@ Spin7Half
Spin 7/2.
Definition:
PDT.h:43
ThePEG::PDT::Spin0
@ Spin0
Spin zero.
Definition:
PDT.h:36
ThePEG::PDT::SpinNA
@ SpinNA
Spin is not applicable.
Definition:
PDT.h:33
ThePEG::PDT::Spin5Half
@ Spin5Half
Spin 5/2.
Definition:
PDT.h:41
ThePEG::PDT::Spin3Half
@ Spin3Half
Spin 3/2.
Definition:
PDT.h:39
ThePEG::PDT::SpinUndefined
@ SpinUndefined
Undefined spin.
Definition:
PDT.h:35
ThePEG::PDT::Spin2
@ Spin2
Spin 2.
Definition:
PDT.h:40
ThePEG::PDT::SpinUnknown
@ SpinUnknown
Unknown spin.
Definition:
PDT.h:34
ThePEG::PDT::Spin1
@ Spin1
Spin 1.
Definition:
PDT.h:38
ThePEG::PDT::negative
static bool negative(Charge c)
True if the argument corresponds to a negative charge.
Definition:
PDT.h:132
ThePEG::PDT::flavourContent
static vector< long > flavourContent(const ParticleData &)
Return the flavour content of the given particle.
ThePEG::PDT::Colour
Colour
Definition of enumerated values used for colour information.
Definition:
PDT.h:92
ThePEG::PDT::ColourNeutral
@ ColourNeutral
Colour-singlet.
Definition:
PDT.h:95
ThePEG::PDT::Colour3
@ Colour3
Colour-triplet.
Definition:
PDT.h:98
ThePEG::PDT::Colour8
@ Colour8
Colour-octet.
Definition:
PDT.h:102
ThePEG::PDT::Colour0
@ Colour0
Colour-singlet.
Definition:
PDT.h:96
ThePEG::PDT::Colour6bar
@ Colour6bar
Colour-anti-sextet.
Definition:
PDT.h:101
ThePEG::PDT::ColourUnknown
@ ColourUnknown
Unknown colour.
Definition:
PDT.h:93
ThePEG::PDT::Colour6
@ Colour6
Colour-sextet.
Definition:
PDT.h:100
ThePEG::PDT::ColourUndefined
@ ColourUndefined
Undefined colour.
Definition:
PDT.h:94
ThePEG::PDT::Colour3bar
@ Colour3bar
Colour-anti-triplet.
Definition:
PDT.h:99
ThePEG::PDT::Coloured
@ Coloured
Coloured.
Definition:
PDT.h:97
ThePEG::PDT::ColouredInteraction
ColouredInteraction
Define type of nonabelian interactions.
Definition:
PDT.h:108
ThePEG::PDT::charged
static bool charged(Charge c)
True if the argument corresponds to a non-zero charge.
Definition:
PDT.h:118
ThePEG::PDT::antiColour
static Colour antiColour(Colour c)
Return the anti-colour of the specified colour.
Definition:
PDT.h:146
ThePEG::PDT::flavourContent
static vector< long > flavourContent(long id)
Return the flavour content of the given particle.
ThePEG::PDT::flavourContent
static vector< long > flavourContent(const Particle &)
Return the flavour content of the given particle.
ThePEG::PDT::coloured
static bool coloured(Colour c)
True if the argument corresponds to a non-zero colour charge.
Definition:
PDT.h:139
ThePEG::PDT::flavourContent
static vector< long > flavourContent(tcPPtr)
Return the flavour content of the given particle.
ThePEG::PDT::flavourContent
static vector< long > flavourContent(tcPDPtr)
Return the flavour content of the given particle.
ThePEG::ParticleData
ParticleData inherits from InterfacedBase and represents the properties of a particle type.
Definition:
ParticleData.h:36
ThePEG::Particle
The Particle class is used to describe an instance of a particle.
Definition:
Particle.h:83
ThePEG::Pointer::TransientConstRCPtr
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition:
RCPtr.h:696
ThePEG::Qty< std::ratio< L, DL >, std::ratio< E, DE >, std::ratio< Q, DQ > >
Definition:
PhysicalQty.h:77
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::operator>>
vector< T > & operator>>(vector< T > &tv, U &u)
Overload the right shift operator for vector to pop objects from a vector.
Definition:
Containers.h:192
ThePEG::Int2Type
Conversion between integers and types.
Definition:
TemplateTools.h:24
ThePEG::TypeTraits< PDT::Charge >::DimType
EnumT DimType
Type switch set to standard type.
Definition:
PDT.h:235
ThePEG::TypeTraits< PDT::Charge >::baseunit
static constexpr PDT::Charge baseunit()
Base unit.
Definition:
PDT.h:237
ThePEG::TypeTraits< PDT::Colour >::baseunit
static constexpr PDT::Colour baseunit()
Base unit.
Definition:
PDT.h:249
ThePEG::TypeTraits< PDT::Colour >::DimType
EnumT DimType
Type switch set to standard type.
Definition:
PDT.h:247
ThePEG::TypeTraits< PDT::Spin >::baseunit
static constexpr PDT::Spin baseunit()
Base unit.
Definition:
PDT.h:225
ThePEG::TypeTraits< PDT::Spin >::DimType
EnumT DimType
Type switch set to standard type.
Definition:
PDT.h:223
ThePEG::TypeTraits
Type traits for built-in types.
Definition:
TemplateTools.h:49
Generated on Thu Jun 20 2024 14:47:00 for ThePEG by
1.9.6