File indexing completed on 2026-08-06 09:38:29
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef ThePEG_PDT_H
0010 #define ThePEG_PDT_H
0011
0012
0013 #include "ThePEG/Config/ThePEG.h"
0014
0015 namespace ThePEG {
0016
0017
0018
0019
0020
0021
0022
0023
0024 class PDT {
0025
0026 public:
0027
0028
0029
0030
0031
0032 enum Spin {
0033 SpinNA = -1,
0034 SpinUnknown = 0,
0035 SpinUndefined = 0,
0036 Spin0 = 1,
0037 Spin1Half = 2,
0038 Spin1 = 3,
0039 Spin3Half = 4,
0040 Spin2 = 5,
0041 Spin5Half = 6,
0042 Spin3 = 7,
0043 Spin7Half = 8,
0044 Spin4 = 9
0045 };
0046
0047
0048
0049
0050
0051 enum Charge {
0052 ChargeUnknown = -999999,
0053 ChargeUndefined = -999999,
0054 Charged = 999990,
0055 Positive = 900000,
0056 Negative = -900000,
0057 ChargeNeutral = 0,
0058 Charge0 = 0,
0059 Plus1Third = 1,
0060 Plus2Third = 2,
0061 Plus1 = 3,
0062 Minus1Third = -1,
0063 Minus2Third = -2,
0064 Minus1 = -3,
0065 Plus4Third = 4,
0066 Plus5Third = 5,
0067 Plus2 = 6,
0068 Minus4Third = -4,
0069 Minus5Third = -5,
0070 Minus2 = -6,
0071 Plus7Third = 7,
0072 Plus8Third = 8,
0073 Plus3 = 9,
0074 Minus7Third = -7,
0075 Minus8Third = -8,
0076 Minus3 = -9,
0077 Plus4 = 12,
0078 Plus5 = 15,
0079 Plus6 = 18,
0080 Plus7 = 21,
0081 Plus8 = 24,
0082 Minus4 = -12,
0083 Minus5 = -15,
0084 Minus6 = -18,
0085 Minus7 = -21,
0086 Minus8 = -24
0087 };
0088
0089
0090
0091
0092 enum Colour {
0093 ColourUnknown = -1,
0094 ColourUndefined = -1,
0095 ColourNeutral = 0,
0096 Colour0 = 0,
0097 Coloured = 1,
0098 Colour3 = 3,
0099 Colour3bar = -3,
0100 Colour6 = 6,
0101 Colour6bar = -6,
0102 Colour8 = 8
0103 };
0104
0105
0106
0107
0108 enum ColouredInteraction {
0109 ColouredUnknown = -2,
0110 ColouredUndefined = -2,
0111 NotColoured = -1,
0112 ColouredQCD = 0
0113 };
0114
0115
0116
0117
0118 static bool charged(Charge c) {
0119 return c != ChargeNeutral && c != ChargeUndefined;
0120 }
0121
0122
0123
0124
0125 static bool positive(Charge c) {
0126 return c > ChargeNeutral && c != Charged;
0127 }
0128
0129
0130
0131
0132 static bool negative(Charge c) {
0133 return c < ChargeNeutral && c != ChargeUndefined;
0134 }
0135
0136
0137
0138
0139 static bool coloured(Colour c) {
0140 return c != ColourNeutral && c != ColourUnknown;
0141 }
0142
0143
0144
0145
0146 static Colour antiColour(Colour c) {
0147 if ( c == Colour3 || c == Colour3bar ) return Colour(-c);
0148 if ( c == Colour6 || c == Colour6bar ) return Colour(-c);
0149 return c;
0150 }
0151
0152
0153
0154
0155
0156
0157 static vector<long> flavourContent(long id);
0158
0159
0160
0161
0162
0163
0164 static vector<long> flavourContent(tcPDPtr);
0165
0166
0167
0168
0169
0170
0171 static vector<long> flavourContent(tcPPtr);
0172
0173
0174
0175
0176
0177
0178 static vector<long> flavourContent(const ParticleData &);
0179
0180
0181
0182
0183
0184
0185 static vector<long> flavourContent(const Particle &);
0186
0187 };
0188
0189
0190 template <typename IStream>
0191 IStream & operator>>(IStream & is, PDT::Colour & c) {
0192 int ci;
0193 is >> ci;
0194 c = PDT::Colour(ci);
0195 return is;
0196 }
0197
0198
0199 template <typename IStream>
0200 IStream & operator>>(IStream & is, PDT::Charge & c) {
0201 int ci;
0202 is >> ci;
0203 c = PDT::Charge(ci);
0204 return is;
0205 }
0206
0207
0208 template <typename IStream>
0209 IStream & operator>>(IStream & is, PDT::Spin & s) {
0210 int si;
0211 is >> si;
0212 s = PDT::Spin(si);
0213 return is;
0214 }
0215
0216
0217 template <>
0218 struct TypeTraits<PDT::Spin>
0219 {
0220
0221 enum { hasDimension = false };
0222
0223 typedef EnumT DimType;
0224
0225 static constexpr PDT::Spin baseunit() { return PDT::Spin(1); }
0226 };
0227
0228
0229 template <>
0230 struct TypeTraits<PDT::Charge>
0231 {
0232
0233 enum { hasDimension = false };
0234
0235 typedef EnumT DimType;
0236
0237 static constexpr PDT::Charge baseunit() { return PDT::Charge(1); }
0238 };
0239
0240
0241 template <>
0242 struct TypeTraits<PDT::Colour>
0243 {
0244
0245 enum { hasDimension = false };
0246
0247 typedef EnumT DimType;
0248
0249 static constexpr PDT::Colour baseunit() { return PDT::Colour(3); }
0250 };
0251
0252 }
0253
0254 #endif