00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef EVTSPINTYPE_HH
00023 #define EVTSPINTYPE_HH
00024
00025 #include "EvtGenBase/EvtReport.hh"
00026
00027 class EvtSpinType{
00028
00029 public:
00030
00031 enum spintype { SCALAR,VECTOR,TENSOR,DIRAC,PHOTON,NEUTRINO,STRING,
00032 RARITASCHWINGER,SPIN3,SPIN4,SPIN5HALF,SPIN7HALF};
00033
00034 static int getSpin2(spintype stype){
00035
00036 switch (stype){
00037 case SCALAR: case STRING:
00038 return 0;
00039 case DIRAC: case NEUTRINO:
00040 return 1;
00041 case VECTOR: case PHOTON:
00042 return 2;
00043 case RARITASCHWINGER:
00044 return 3;
00045 case TENSOR:
00046 return 4;
00047 case SPIN5HALF:
00048 return 5;
00049 case SPIN3:
00050 return 6;
00051 case SPIN7HALF:
00052 return 7;
00053 case SPIN4:
00054 return 8;
00055 default:
00056 report(ERROR,"EvtGen")<<"Unknown spintype in EvtSpinType!"<<std::endl;
00057 return 0;
00058 }
00059
00060 }
00061
00062
00063
00064 static int getSpinStates(spintype stype){
00065
00066 switch (stype){
00067 case SCALAR: case STRING: case NEUTRINO:
00068 return 1;
00069 case DIRAC: case PHOTON:
00070 return 2;
00071 case VECTOR:
00072 return 3;
00073 case RARITASCHWINGER:
00074 return 4;
00075 case TENSOR:
00076 return 5;
00077 case SPIN5HALF:
00078 return 6;
00079 case SPIN3:
00080 return 7;
00081 case SPIN7HALF:
00082 return 8;
00083 case SPIN4:
00084 return 9;
00085 default:
00086 report(ERROR,"EvtGen")<<"Unknown spintype in EvtSpinType!"<<std::endl;
00087 return 0;
00088 }
00089
00090 }
00091
00092 private:
00093
00094 };
00095
00096 #endif
00097
00098
00099
00100
00101
00102
00103
00104
00105