ThePEG
1.8.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
PDT
PID.h
1
// -*- C++ -*-
2
//
3
// PID.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 1999-2011 Leif Lonnblad
5
//
6
// ThePEG is licenced under version 2 of the GPL, see COPYING for details.
7
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8
//
9
#ifndef ThePEG_PID_H
10
#define ThePEG_PID_H
11
12
#include "EnumParticles.h"
13
14
namespace
ThePEG {
15
23
class
PID
{
24
public
:
28
template
<
typename
T>
29
PID
(T t) {
30
t.ERROR_only_use_long_as_Particle_ID_type();
31
}
32
36
template
<
typename
T>
37
operator
T()
const
{
38
T t;
39
t.ERROR_only_use_long_as_Particle_ID_type();
40
return
t;
41
}
42
46
PID
operator-
()
const
;
47
48
private
:
52
long
id
;
53
};
54
56
template
<>
inline
PID::PID
(
long
t) : id(t) {}
57
59
template
<>
inline
PID::PID
(
int
t) : id(t) {}
60
62
template
<>
inline
PID::PID
(
ParticleID::ParticleCodes
t) : id(t) {}
63
65
template
<>
inline
PID::operator long()
const
{
return
id; }
66
70
inline
PID
PID::operator-
()
const
{
71
return
-
id
;
72
}
73
74
}
75
76
#endif
/* ThePEG_PID_H */
Generated on Sat Jun 16 2012 16:51:05 for ThePEG by
1.8.1.1