BOSS
8.0.0
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 "
EvtReport.hh
"
26
27
class
EvtSpinType
{
28
29
public
:
30
enum
spintype
{
31
SCALAR
,
32
VECTOR
,
33
TENSOR
,
34
DIRAC
,
35
PHOTON
,
36
NEUTRINO
,
37
STRING
,
38
RARITASCHWINGER
,
39
SPIN3
,
40
SPIN4
,
41
SPIN5HALF
,
42
SPIN7HALF
43
};
44
45
static
int
getSpin2
(
spintype
stype ) {
46
47
switch
( stype )
48
{
49
case
SCALAR
:
50
case
STRING
:
return
0;
51
case
DIRAC
:
52
case
NEUTRINO
:
return
1;
53
case
VECTOR
:
54
case
PHOTON
:
return
2;
55
case
RARITASCHWINGER
:
return
3;
56
case
TENSOR
:
return
4;
57
case
SPIN5HALF
:
return
5;
58
case
SPIN3
:
return
6;
59
case
SPIN7HALF
:
return
7;
60
case
SPIN4
:
return
8;
61
default
:
62
report
(
ERROR
,
"EvtGen"
) <<
"Unknown spintype in EvtSpinType!"
<< std::endl;
63
return
0;
64
}
65
}
66
67
static
int
getSpinStates
(
spintype
stype ) {
68
69
switch
( stype )
70
{
71
case
SCALAR
:
72
case
STRING
:
73
case
NEUTRINO
:
return
1;
74
case
DIRAC
:
75
case
PHOTON
:
return
2;
76
case
VECTOR
:
return
3;
77
case
RARITASCHWINGER
:
return
4;
78
case
TENSOR
:
return
5;
79
case
SPIN5HALF
:
return
6;
80
case
SPIN3
:
return
7;
81
case
SPIN7HALF
:
return
8;
82
case
SPIN4
:
return
9;
83
default
:
84
report
(
ERROR
,
"EvtGen"
) <<
"Unknown spintype in EvtSpinType!"
<< std::endl;
85
return
0;
86
}
87
}
88
89
private
:
90
};
91
92
#endif
report
ostream & report(Severity severity, const char *facility)
Definition
EvtReport.cc:34
EvtReport.hh
ERROR
@ ERROR
Definition
EvtReport.hh:49
EvtSpinType
Definition
EvtSpinType.hh:27
EvtSpinType::getSpin2
static int getSpin2(spintype stype)
Definition
EvtSpinType.hh:45
EvtSpinType::spintype
spintype
Definition
EvtSpinType.hh:30
EvtSpinType::SPIN4
@ SPIN4
Definition
EvtSpinType.hh:40
EvtSpinType::SPIN7HALF
@ SPIN7HALF
Definition
EvtSpinType.hh:42
EvtSpinType::NEUTRINO
@ NEUTRINO
Definition
EvtSpinType.hh:36
EvtSpinType::SPIN5HALF
@ SPIN5HALF
Definition
EvtSpinType.hh:41
EvtSpinType::SCALAR
@ SCALAR
Definition
EvtSpinType.hh:31
EvtSpinType::RARITASCHWINGER
@ RARITASCHWINGER
Definition
EvtSpinType.hh:38
EvtSpinType::DIRAC
@ DIRAC
Definition
EvtSpinType.hh:34
EvtSpinType::TENSOR
@ TENSOR
Definition
EvtSpinType.hh:33
EvtSpinType::SPIN3
@ SPIN3
Definition
EvtSpinType.hh:39
EvtSpinType::PHOTON
@ PHOTON
Definition
EvtSpinType.hh:35
EvtSpinType::VECTOR
@ VECTOR
Definition
EvtSpinType.hh:32
EvtSpinType::STRING
@ STRING
Definition
EvtSpinType.hh:37
EvtSpinType::getSpinStates
static int getSpinStates(spintype stype)
Definition
EvtSpinType.hh:67
8.0.0
BOSS_Gen
BesEvtGen
src
EvtGen
EvtGenBase
EvtSpinType.hh
Generated by
1.16.1