/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenBase/EvtSpinType.hh

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 //
00003 // Environment:
00004 //      This software is part of the EvtGen package developed jointly
00005 //      for the BaBar and CLEO collaborations.  If you use all or part
00006 //      of it, please give an appropriate acknowledgement.
00007 //
00008 // Copyright Information: See EvtGen/COPYRIGHT
00009 //      Copyright (C) 1998      Caltech, UCSB
00010 //
00011 // Module: EvtGen/EvtSpinType.hh
00012 //
00013 // Description: Class for enumarating the different types of
00014 //              particles and the number of states they have.
00015 //
00016 // Modification history:
00017 //
00018 //    RYD     August 12, 1998         Module created
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 

Generated on Tue Nov 29 23:12:15 2016 for BOSS_7.0.2 by  doxygen 1.4.7