00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef ThePEG_PDT_H
00010 #define ThePEG_PDT_H
00011
00012
00013 #include "ThePEG/Config/ThePEG.h"
00014
00015 namespace ThePEG {
00016
00024 class PDT {
00025
00026 public:
00027
00032 enum Spin {
00033 SpinNA = -1,
00034 SpinUnknown = 0,
00035 SpinUndefined = 0,
00036 Spin0 = 1,
00037 Spin1Half = 2,
00038 Spin1 = 3,
00039 Spin3Half = 4,
00040 Spin2 = 5,
00041 Spin5Half = 6,
00042 Spin3 = 7,
00043 Spin7Half = 8,
00044 Spin4 = 9
00045 };
00046
00051 enum Charge {
00052 ChargeUnknown = -999999,
00053 ChargeUndefined = -999999,
00054 Charged = 999990,
00055 Positive = 900000,
00056 Negative = -900000,
00057 ChargeNeutral = 0,
00058 Charge0 = 0,
00059 Plus1Third = 1,
00060 Plus2Third = 2,
00061 Plus1 = 3,
00062 Minus1Third = -1,
00063 Minus2Third = -2,
00064 Minus1 = -3,
00065 Plus4Third = 4,
00066 Plus5Third = 5,
00067 Plus2 = 6,
00068 Minus4Third = -4,
00069 Minus5Third = -5,
00070 Minus2 = -6,
00071 Plus7Third = 7,
00072 Plus8Third = 8,
00073 Plus3 = 9,
00074 Minus7Third = -7,
00075 Minus8Third = -8,
00076 Minus3 = -9,
00077 Plus4 = 12,
00078 Plus5 = 15,
00079 Plus6 = 18,
00080 Plus7 = 21,
00081 Plus8 = 24,
00082 Minus4 = -12,
00083 Minus5 = -15,
00084 Minus6 = -18,
00085 Minus7 = -21,
00086 Minus8 = -24
00087 };
00088
00092 enum Colour {
00093 ColourUnknown = -1,
00094 ColourUndefined = -1,
00095 ColourNeutral = 0,
00096 Colour0 = 0,
00097 Coloured = 1,
00098 Colour3 = 3,
00099 Colour3bar = -3,
00100 Colour8 = 8
00101 };
00102
00106 static bool charged(Charge c) {
00107 return c != ChargeNeutral && c != ChargeUndefined;
00108 }
00109
00113 static bool positive(Charge c) {
00114 return c > ChargeNeutral && c != Charged;
00115 }
00116
00120 static bool negative(Charge c) {
00121 return c < ChargeNeutral && c != ChargeUndefined;
00122 }
00123
00127 static bool coloured(Colour c) {
00128 return c != ColourNeutral && c != ColourUnknown;
00129 }
00130
00134 static Colour antiColour(Colour c) {
00135 if ( c == Colour3 || c == Colour3bar ) return Colour(-c);
00136 return c;
00137 }
00138
00144 static vector<long> flavourContent(long id);
00145
00151 static vector<long> flavourContent(tcPDPtr);
00152
00158 static vector<long> flavourContent(tcPPtr);
00159
00165 static vector<long> flavourContent(const ParticleData &);
00166
00172 static vector<long> flavourContent(const Particle &);
00173
00174 };
00175
00177 template <typename IStream>
00178 IStream & operator>>(IStream & is, PDT::Colour & c) {
00179 int ci;
00180 is >> ci;
00181 c = PDT::Colour(ci);
00182 return is;
00183 }
00184
00186 template <typename IStream>
00187 IStream & operator>>(IStream & is, PDT::Charge & c) {
00188 int ci;
00189 is >> ci;
00190 c = PDT::Charge(ci);
00191 return is;
00192 }
00193
00195 template <typename IStream>
00196 IStream & operator>>(IStream & is, PDT::Spin & s) {
00197 int si;
00198 is >> si;
00199 s = PDT::Spin(si);
00200 return is;
00201 }
00202
00203 }
00204
00205 #endif