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

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: EvtHighSpinParticle.cc
00012 //
00013 // Description: Class to describe particles with spin>2.
00014 //
00015 // Modification history:
00016 //
00017 //    RYD   August 8, 2000           Module created
00018 //
00019 //------------------------------------------------------------------------
00020 // 
00021 #include "EvtGenBase/EvtPatches.hh"
00022 #include "EvtGenBase/EvtPatches.hh"
00023 #include <iostream>
00024 #include <math.h>
00025 #include <assert.h>
00026 #include "EvtGenBase/EvtHighSpinParticle.hh"
00027 #include "EvtGenBase/EvtVector4R.hh"
00028 #include "EvtGenBase/EvtPDL.hh"
00029 #include "EvtGenBase/EvtSpinDensity.hh"
00030 #include "EvtGenBase/EvtdFunction.hh"
00031 
00032 
00033 EvtHighSpinParticle::~EvtHighSpinParticle() {}
00034 
00035 
00036 void EvtHighSpinParticle::init(EvtId id,const EvtVector4R& p4){
00037 
00038   _validP4=true;
00039   setp(p4);
00040   setpart_num(id);
00041 
00042   setLifetime();
00043 
00044 }
00045 
00046 EvtSpinDensity EvtHighSpinParticle::rotateToHelicityBasis() const{
00047 
00048   int n=EvtSpinType::getSpinStates(EvtPDL::getSpinType(getId()));
00049 
00050   EvtSpinDensity R;
00051   R.SetDiag(n);
00052 
00053   return R;
00054 
00055 }
00056 
00057 
00058 
00059 EvtSpinDensity EvtHighSpinParticle::rotateToHelicityBasis(double alpha,
00060                                                           double beta,
00061                                                           double gamma) const{
00062 
00063   int i,j;
00064   
00065   int n=EvtSpinType::getSpinStates(EvtPDL::getSpinType(getId()));
00066 
00067   EvtSpinDensity R;
00068   R.SetDim(n);
00069 
00070   int J2=EvtSpinType::getSpin2(EvtPDL::getSpinType(getId()));
00071 
00072   assert(n==J2+1);
00073 
00074   int *lambda2;
00075 
00076   lambda2=new int[J2+1];
00077 
00078   for(i=0;i<J2+1;i++){
00079     lambda2[i]=J2-i*2;
00080   }
00081 
00082 
00083   for(i=0;i<n;i++){
00084     for(j=0;j<n;j++){
00085       R.Set(i,j,EvtdFunction::d(J2,lambda2[j],lambda2[i],-beta)*
00086         exp(EvtComplex(0.0,-0.5*(alpha*lambda2[i]-gamma*lambda2[j]))));
00087     }
00088   }
00089 
00090   delete [] lambda2;
00091 
00092   return R;
00093 
00094 
00095 }
00096 
00097 

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