thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.2.1
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
static
bool
charged
(
Charge
c) {
109
return
c !=
ChargeNeutral
&& c !=
ChargeUndefined
;
110
}
111
115
static
bool
positive
(
Charge
c) {
116
return
c >
ChargeNeutral
&& c !=
Charged
;
117
}
118
122
static
bool
negative
(
Charge
c) {
123
return
c <
ChargeNeutral
&& c !=
ChargeUndefined
;
124
}
125
129
static
bool
coloured
(
Colour
c) {
130
return
c !=
ColourNeutral
&& c !=
ColourUnknown
;
131
}
132
136
static
Colour
antiColour
(
Colour
c) {
137
if
( c ==
Colour3
|| c ==
Colour3bar
)
return
Colour
(-c);
138
if
( c ==
Colour6
|| c ==
Colour6bar
)
return
Colour
(-c);
139
return
c;
140
}
141
147
static
vector<long>
flavourContent
(
long
id
);
148
154
static
vector<long>
flavourContent
(
tcPDPtr
);
155
161
static
vector<long>
flavourContent
(
tcPPtr
);
162
168
static
vector<long>
flavourContent
(
const
ParticleData
&);
169
175
static
vector<long>
flavourContent
(
const
Particle
&);
176
177
};
178
180
template
<
typename
IStream>
181
IStream &
operator>>
(IStream & is,
PDT::Colour
& c) {
182
int
ci;
183
is >> ci;
184
c =
PDT::Colour
(ci);
185
return
is;
186
}
187
189
template
<
typename
IStream>
190
IStream &
operator>>
(IStream & is,
PDT::Charge
& c) {
191
int
ci;
192
is >> ci;
193
c =
PDT::Charge
(ci);
194
return
is;
195
}
196
198
template
<
typename
IStream>
199
IStream &
operator>>
(IStream & is,
PDT::Spin
& s) {
200
int
si;
201
is >> si;
202
s =
PDT::Spin
(si);
203
return
is;
204
}
205
207
template
<>
208
struct
TypeTraits
<
PDT
::
Spin
>
209
{
211
enum
{ hasDimension =
false
};
213
typedef
EnumT
DimType
;
215
static
constexpr
PDT::Spin
baseunit
() {
return
PDT::Spin
(1); }
216
};
217
219
template
<>
220
struct
TypeTraits
<
PDT
::
Charge
>
221
{
223
enum
{ hasDimension =
false
};
225
typedef
EnumT
DimType
;
227
static
constexpr
PDT::Charge
baseunit
() {
return
PDT::Charge
(1); }
228
};
229
231
template
<>
232
struct
TypeTraits
<
PDT
::
Colour
>
233
{
235
enum
{ hasDimension =
false
};
237
typedef
EnumT
DimType
;
239
static
constexpr
PDT::Colour
baseunit
() {
return
PDT::Colour
(3); }
240
};
241
242
}
243
244
#endif
/* ThePEG_PDT_H */
ThePEG::PDT::Plus7
7e.
Definition:
PDT.h:80
ThePEG::PDT::Plus2
2e.
Definition:
PDT.h:67
ThePEG::PDT::Charge
Charge
Definition of enumerated values used for charge information.
Definition:
PDT.h:51
ThePEG::PDT::Positive
Is positively charged.
Definition:
PDT.h:55
ThePEG::Particle
The Particle class is used to describe an instance of a particle.
Definition:
Particle.h:83
ThePEG::PDT::Minus8
-8e.
Definition:
PDT.h:86
ThePEG::PDT::Colour0
Colour-singlet.
Definition:
PDT.h:96
ThePEG::PDT::Colour6
Colour-sextet.
Definition:
PDT.h:100
ThePEG::PDT::coloured
static bool coloured(Colour c)
True if the argument corresponds to a non-zero colour charge.
Definition:
PDT.h:129
ThePEG::PDT::charged
static bool charged(Charge c)
True if the argument corresponds to a non-zero charge.
Definition:
PDT.h:108
ThePEG::PDT::Spin7Half
Spin 7/2.
Definition:
PDT.h:43
ThePEG::PDT::Colour
Colour
Definition of enumerated values used for colour information.
Definition:
PDT.h:92
ThePEG::PDT::Minus7Third
-7e/3.
Definition:
PDT.h:74
ThePEG::Int2Type
Conversion between integers and types.
Definition:
TemplateTools.h:23
ThePEG::PDT::Spin5Half
Spin 5/2.
Definition:
PDT.h:41
ThePEG::PDT::Colour6bar
Colour-anti-sextet.
Definition:
PDT.h:101
ThePEG::PDT::Plus6
6e.
Definition:
PDT.h:79
ThePEG::PDT::Plus4Third
4e/3.
Definition:
PDT.h:65
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::Spin0
Spin zero.
Definition:
PDT.h:36
ThePEG::PDT::Minus1Third
-e/3.
Definition:
PDT.h:62
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::TypeTraits< PDT::Spin >::baseunit
static constexpr PDT::Spin baseunit()
Base unit.
Definition:
PDT.h:215
ThePEG::PDT::Charged
Is charged.
Definition:
PDT.h:54
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::PDT::SpinNA
Spin is not applicable.
Definition:
PDT.h:33
ThePEG::PDT::Colour3
Colour-triplet.
Definition:
PDT.h:98
ThePEG.h
This is the main config header file for ThePEG.
ThePEG::PDT::Minus1
-e.
Definition:
PDT.h:64
ThePEG::PDT::ColourNeutral
Colour-singlet.
Definition:
PDT.h:95
ThePEG::PDT::Charge0
Uncharged.
Definition:
PDT.h:58
ThePEG::PDT::Colour8
Colour-octet.
Definition:
PDT.h:102
ThePEG::ParticleData
ParticleData inherits from InterfacedBase and represents the properties of a particle type...
Definition:
ParticleData.h:36
ThePEG::PDT::SpinUnknown
Unknown spin.
Definition:
PDT.h:34
ThePEG::PDT::Minus3
-3e.
Definition:
PDT.h:76
ThePEG::PDT::Minus5Third
-5e/3.
Definition:
PDT.h:69
ThePEG::PDT::ChargeUndefined
Undefined charge.
Definition:
PDT.h:53
ThePEG::PDT::Spin3Half
Spin 3/2.
Definition:
PDT.h:39
ThePEG::PDT::Plus8Third
8e/3.
Definition:
PDT.h:72
ThePEG::TypeTraits< PDT::Colour >::DimType
EnumT DimType
Type switch set to standard type.
Definition:
PDT.h:237
ThePEG::PDT::Minus6
-6e.
Definition:
PDT.h:84
ThePEG::PDT::Plus1
e.
Definition:
PDT.h:61
ThePEG::PDT::Spin
Spin
Definition of enumerated values used for spin information.
Definition:
PDT.h:32
ThePEG::TypeTraits< PDT::Spin >::DimType
EnumT DimType
Type switch set to standard type.
Definition:
PDT.h:213
ThePEG::PDT::Plus1Third
e/3.
Definition:
PDT.h:59
ThePEG::PDT::Spin1
Spin 1.
Definition:
PDT.h:38
ThePEG::PDT::ChargeNeutral
Uncharged.
Definition:
PDT.h:57
ThePEG::PDT::flavourContent
static vector< long > flavourContent(long id)
Return the flavour content of the given particle.
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::PDT::Plus2Third
2e/3.
Definition:
PDT.h:60
ThePEG::PDT::negative
static bool negative(Charge c)
True if the argument corresponds to a negative charge.
Definition:
PDT.h:122
ThePEG::PDT::Minus4Third
-4e/3.
Definition:
PDT.h:68
ThePEG::PDT::ColourUnknown
Unknown colour.
Definition:
PDT.h:93
ThePEG::PDT::Colour3bar
Colour-anti-triplet.
Definition:
PDT.h:99
ThePEG::TypeTraits< PDT::Colour >::baseunit
static constexpr PDT::Colour baseunit()
Base unit.
Definition:
PDT.h:239
ThePEG::TypeTraits< PDT::Charge >::baseunit
static constexpr PDT::Charge baseunit()
Base unit.
Definition:
PDT.h:227
ThePEG::Qty< std::ratio< L, DL >, std::ratio< E, DE >, std::ratio< Q, DQ > >
Definition:
PhysicalQty.h:76
ThePEG::PDT::Negative
Is negatively charged.
Definition:
PDT.h:56
ThePEG::PDT::Minus4
-4e.
Definition:
PDT.h:82
ThePEG::PDT::positive
static bool positive(Charge c)
True if the argument corresponds to a positive charge.
Definition:
PDT.h:115
ThePEG::PDT::Spin1Half
Spin 1/2.
Definition:
PDT.h:37
ThePEG::PDT::Coloured
Coloured.
Definition:
PDT.h:97
ThePEG::PDT::SpinUndefined
Undefined spin.
Definition:
PDT.h:35
ThePEG::PDT::Plus7Third
7e/3.
Definition:
PDT.h:71
ThePEG::PDT::Minus7
-7e.
Definition:
PDT.h:85
ThePEG::TypeTraits
Type traits for built-in types.
Definition:
TemplateTools.h:48
ThePEG::PDT::Plus4
4e.
Definition:
PDT.h:77
ThePEG::PDT::Minus2
-3e.
Definition:
PDT.h:70
ThePEG::PDT::Plus5
5e.
Definition:
PDT.h:78
ThePEG::PDT::Spin3
Spin 4.
Definition:
PDT.h:42
ThePEG::PDT::antiColour
static Colour antiColour(Colour c)
Return the anti-colour of the specified colour.
Definition:
PDT.h:136
ThePEG::PDT::Minus8Third
-8e/3.
Definition:
PDT.h:75
ThePEG::PDT::Minus5
-5e.
Definition:
PDT.h:83
ThePEG::PDT::Plus5Third
5e/3.
Definition:
PDT.h:66
ThePEG::PDT::Spin2
Spin 2.
Definition:
PDT.h:40
ThePEG::PDT::Spin4
Spin 5.
Definition:
PDT.h:44
ThePEG::PDT::Plus8
8e.
Definition:
PDT.h:81
ThePEG::PDT::Minus2Third
-2e/3.
Definition:
PDT.h:63
ThePEG::PDT::ChargeUnknown
Unknown charge.
Definition:
PDT.h:52
ThePEG::TypeTraits< PDT::Charge >::DimType
EnumT DimType
Type switch set to standard type.
Definition:
PDT.h:225
ThePEG::PDT::Plus3
3e.
Definition:
PDT.h:73
ThePEG::PDT::ColourUndefined
Undefined colour.
Definition:
PDT.h:94
Generated on Sat Apr 11 2020 14:31:17 for ThePEG by
1.8.13