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
28
29public:
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
89private:
90};
91
92#endif
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:34
@ ERROR
Definition EvtReport.hh:49
static int getSpin2(spintype stype)
static int getSpinStates(spintype stype)