/usr/include/ThePEG/PDT/PDT.h is in libthepeg-dev 1.8.0-3build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | // -*- C++ -*-
//
// PDT.h is a part of ThePEG - Toolkit for HEP Event Generation
// Copyright (C) 1999-2011 Leif Lonnblad
//
// ThePEG is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef ThePEG_PDT_H
#define ThePEG_PDT_H
// This is the declaration of the PDT class.
#include "ThePEG/Config/ThePEG.h"
namespace ThePEG {
/**
* PDT is a helper class implementing enumerations for charge, colour
* and spin to be used by the ParticleData class. In addition, some
* static utility functions are provided.
*
* @see ParticleData
*/
class PDT {
public:
/**
* Definition of enumerated values used for spin information. THe
* integer values are given according to 2s+1.
*/
enum Spin {
SpinNA = -1, /**< Spin is not applicable. */
SpinUnknown = 0, /**< Unknown spin */
SpinUndefined = 0, /**< Undefined spin */
Spin0 = 1, /**< Spin zero. */
Spin1Half = 2, /**< Spin 1/2. */
Spin1 = 3, /**< Spin 1. */
Spin3Half = 4, /**< Spin 3/2. */
Spin2 = 5, /**< Spin 2. */
Spin5Half = 6, /**< Spin 5/2. */
Spin3 = 7, /**< Spin 4. */
Spin7Half = 8, /**< Spin 7/2. */
Spin4 = 9 /**< Spin 5. */
};
/**
* Definition of enumerated values used for charge information. The
* integer values are given in units of e/3.
*/
enum Charge {
ChargeUnknown = -999999, /**< Unknown charge. */
ChargeUndefined = -999999, /**< Undefined charge. */
Charged = 999990, /**< Is charged. */
Positive = 900000, /**< Is positively charged. */
Negative = -900000, /**< Is negatively charged. */
ChargeNeutral = 0, /**< Uncharged. */
Charge0 = 0, /**< Uncharged. */
Plus1Third = 1, /**< e/3. */
Plus2Third = 2, /**< 2e/3. */
Plus1 = 3, /**< e. */
Minus1Third = -1, /**< -e/3. */
Minus2Third = -2, /**< -2e/3. */
Minus1 = -3, /**< -e. */
Plus4Third = 4, /**< 4e/3. */
Plus5Third = 5, /**< 5e/3. */
Plus2 = 6, /**< 2e. */
Minus4Third = -4, /**< -4e/3. */
Minus5Third = -5, /**< -5e/3. */
Minus2 = -6, /**< -3e. */
Plus7Third = 7, /**< 7e/3. */
Plus8Third = 8, /**< 8e/3. */
Plus3 = 9, /**< 3e. */
Minus7Third = -7, /**< -7e/3. */
Minus8Third = -8, /**< -8e/3. */
Minus3 = -9, /**< -3e. */
Plus4 = 12, /**< 4e. */
Plus5 = 15, /**< 5e. */
Plus6 = 18, /**< 6e. */
Plus7 = 21, /**< 7e. */
Plus8 = 24, /**< 8e. */
Minus4 = -12, /**< -4e. */
Minus5 = -15, /**< -5e. */
Minus6 = -18, /**< -6e. */
Minus7 = -21, /**< -7e. */
Minus8 = -24 /**< -8e. */
};
/**
*Definition of enumerated values used for colour information.
*/
enum Colour {
ColourUnknown = -1, /**< Unknown colour */
ColourUndefined = -1, /**< Undefined colour */
ColourNeutral = 0, /**< Colour-singlet */
Colour0 = 0, /**< Colour-singlet */
Coloured = 1, /**< Coloured */
Colour3 = 3, /**< Colour-triplet */
Colour3bar = -3, /**< Colour-anti-triplet */
Colour6 = 6, /**< Colour-sextet */
Colour6bar = -6, /**< Colour-anti-sextet */
Colour8 = 8 /**< Colour-octet */
};
/**
* True if the argument corresponds to a non-zero charge.
*/
static bool charged(Charge c) {
return c != ChargeNeutral && c != ChargeUndefined;
}
/**
* True if the argument corresponds to a positive charge.
*/
static bool positive(Charge c) {
return c > ChargeNeutral && c != Charged;
}
/**
* True if the argument corresponds to a negative charge.
*/
static bool negative(Charge c) {
return c < ChargeNeutral && c != ChargeUndefined;
}
/**
* True if the argument corresponds to a non-zero colour charge.
*/
static bool coloured(Colour c) {
return c != ColourNeutral && c != ColourUnknown;
}
/**
* Return the anti-colour of the specified colour.
*/
static Colour antiColour(Colour c) {
if ( c == Colour3 || c == Colour3bar ) return Colour(-c);
if ( c == Colour6 || c == Colour6bar ) return Colour(-c);
return c;
}
/**
* Return the flavour content of the given particle. The flavours
* will be given in decreasing mass with flavour before
* anti-flavour.
*/
static vector<long> flavourContent(long id);
/**
* Return the flavour content of the given particle. The flavours
* will be given in decreasing mass with flavour before
* anti-flavour.
*/
static vector<long> flavourContent(tcPDPtr);
/**
* Return the flavour content of the given particle. The flavours
* will be given in decreasing mass with flavour before
* anti-flavour.
*/
static vector<long> flavourContent(tcPPtr);
/**
* Return the flavour content of the given particle. The flavours
* will be given in decreasing mass with flavour before
* anti-flavour.
*/
static vector<long> flavourContent(const ParticleData &);
/**
* Return the flavour content of the given particle. The flavours
* will be given in decreasing mass with flavour before
* anti-flavour.
*/
static vector<long> flavourContent(const Particle &);
};
/** Input a colour from a stream. */
template <typename IStream>
IStream & operator>>(IStream & is, PDT::Colour & c) {
int ci;
is >> ci;
c = PDT::Colour(ci);
return is;
}
/** Input a charge from a stream. */
template <typename IStream>
IStream & operator>>(IStream & is, PDT::Charge & c) {
int ci;
is >> ci;
c = PDT::Charge(ci);
return is;
}
/** Input a spin from a stream. */
template <typename IStream>
IStream & operator>>(IStream & is, PDT::Spin & s) {
int si;
is >> si;
s = PDT::Spin(si);
return is;
}
}
#endif /* ThePEG_PDT_H */
|