BOSS
7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtSpinType.hh
Go to the documentation of this file.
1
//--------------------------------------------------------------------------
2
//
3
// Environment:
4
// This software is part of the EvtGen package developed jointly
5
// for the BaBar and CLEO collaborations. If you use all or part
6
// of it, please give an appropriate acknowledgement.
7
//
8
// Copyright Information: See EvtGen/COPYRIGHT
9
// Copyright (C) 1998 Caltech, UCSB
10
//
11
// Module: EvtGen/EvtSpinType.hh
12
//
13
// Description: Class for enumarating the different types of
14
// particles and the number of states they have.
15
//
16
// Modification history:
17
//
18
// RYD August 12, 1998 Module created
19
//
20
//------------------------------------------------------------------------
21
22
#ifndef EVTSPINTYPE_HH
23
#define EVTSPINTYPE_HH
24
25
#include "
EvtGenBase/EvtReport.hh
"
26
27
class
EvtSpinType
{
28
29
public
:
30
31
enum
spintype
{
SCALAR
,
VECTOR
,
TENSOR
,
DIRAC
,
PHOTON
,
NEUTRINO
,
STRING
,
32
RARITASCHWINGER
,
SPIN3
,
SPIN4
,
SPIN5HALF
,
SPIN7HALF
};
33
34
static
int
getSpin2
(
spintype
stype){
35
36
switch
(stype){
37
case
SCALAR
:
case
STRING
:
38
return
0;
39
case
DIRAC
:
case
NEUTRINO
:
40
return
1;
41
case
VECTOR
:
case
PHOTON
:
42
return
2;
43
case
RARITASCHWINGER
:
44
return
3;
45
case
TENSOR
:
46
return
4;
47
case
SPIN5HALF
:
48
return
5;
49
case
SPIN3
:
50
return
6;
51
case
SPIN7HALF
:
52
return
7;
53
case
SPIN4
:
54
return
8;
55
default
:
56
report
(
ERROR
,
"EvtGen"
)<<
"Unknown spintype in EvtSpinType!"
<<std::endl;
57
return
0;
58
}
59
60
}
61
62
63
64
static
int
getSpinStates
(
spintype
stype){
65
66
switch
(stype){
67
case
SCALAR
:
case
STRING
:
case
NEUTRINO
:
68
return
1;
69
case
DIRAC
:
case
PHOTON
:
70
return
2;
71
case
VECTOR
:
72
return
3;
73
case
RARITASCHWINGER
:
74
return
4;
75
case
TENSOR
:
76
return
5;
77
case
SPIN5HALF
:
78
return
6;
79
case
SPIN3
:
80
return
7;
81
case
SPIN7HALF
:
82
return
8;
83
case
SPIN4
:
84
return
9;
85
default
:
86
report
(
ERROR
,
"EvtGen"
)<<
"Unknown spintype in EvtSpinType!"
<<std::endl;
87
return
0;
88
}
89
90
}
91
92
private
:
93
94
};
95
96
#endif
97
98
99
100
101
102
103
104
105
report
ostream & report(Severity severity, const char *facility)
Definition:
EvtReport.cc:36
EvtReport.hh
ERROR
@ ERROR
Definition:
EvtReport.hh:49
EvtSpinType
Definition:
EvtSpinType.hh:27
EvtSpinType::getSpin2
static int getSpin2(spintype stype)
Definition:
EvtSpinType.hh:34
EvtSpinType::spintype
spintype
Definition:
EvtSpinType.hh:31
EvtSpinType::SPIN4
@ SPIN4
Definition:
EvtSpinType.hh:32
EvtSpinType::SPIN7HALF
@ SPIN7HALF
Definition:
EvtSpinType.hh:32
EvtSpinType::NEUTRINO
@ NEUTRINO
Definition:
EvtSpinType.hh:31
EvtSpinType::SPIN5HALF
@ SPIN5HALF
Definition:
EvtSpinType.hh:32
EvtSpinType::SCALAR
@ SCALAR
Definition:
EvtSpinType.hh:31
EvtSpinType::RARITASCHWINGER
@ RARITASCHWINGER
Definition:
EvtSpinType.hh:32
EvtSpinType::DIRAC
@ DIRAC
Definition:
EvtSpinType.hh:31
EvtSpinType::TENSOR
@ TENSOR
Definition:
EvtSpinType.hh:31
EvtSpinType::SPIN3
@ SPIN3
Definition:
EvtSpinType.hh:32
EvtSpinType::PHOTON
@ PHOTON
Definition:
EvtSpinType.hh:31
EvtSpinType::VECTOR
@ VECTOR
Definition:
EvtSpinType.hh:31
EvtSpinType::STRING
@ STRING
Definition:
EvtSpinType.hh:31
EvtSpinType::getSpinStates
static int getSpinStates(spintype stype)
Definition:
EvtSpinType.hh:64
source
Generator
BesEvtGen
BesEvtGen-00-04-08
src
EvtGen
EvtGenBase
EvtSpinType.hh
Generated by
1.9.6