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
26
28
29public:
30
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
92private:
93
94};
95
96#endif
97
98
99
100
101
102
103
104
105
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ ERROR
Definition: EvtReport.hh:49
static int getSpin2(spintype stype)
Definition: EvtSpinType.hh:34
static int getSpinStates(spintype stype)
Definition: EvtSpinType.hh:64