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/EvtSpinDensity.hh 00012 // 00013 // Description: This class holds a spin density matrix, it is 00014 // a complex nxn matrix. 00015 // 00016 // Modification history: 00017 // 00018 // RYD May 29, 1997 Module created 00019 // 00020 //------------------------------------------------------------------------ 00021 00022 #ifndef EVTSPINDENSITY_HH 00023 #define EVTSPINDENSITY_HH 00024 #include "EvtGenBase/EvtComplex.hh" 00025 00026 00027 class EvtSpinDensity { 00028 00029 public: 00030 00031 EvtSpinDensity(const EvtSpinDensity& density); 00032 EvtSpinDensity& operator=(const EvtSpinDensity& density); 00033 virtual ~EvtSpinDensity(); 00034 00035 EvtSpinDensity(); 00036 void SetDim(int n); 00037 int GetDim() const; 00038 void Set(int i,int j,const EvtComplex& rhoij); 00039 const EvtComplex& Get(int i,int j) const; 00040 double NormalizedProb(const EvtSpinDensity& d); 00041 friend std::ostream& operator<<(std::ostream& s,const EvtSpinDensity& d); 00042 void SetDiag(int n); 00043 00044 int Check(); 00045 00046 private: 00047 00048 EvtComplexPtrPtr rho; 00049 int dim; 00050 }; 00051 00052 #endif 00053