/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenBase/EvtVectorParticle.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: EvtVectorParticle.cc
00012 //
00013 // Description: Class to describe spin 1 particles
00014 //
00015 // Modification history:
00016 //
00017 //    DJL/RYD   September 25, 1996           Module created
00018 //
00019 //------------------------------------------------------------------------
00020 // 
00021 #include "EvtGenBase/EvtPatches.hh"
00022 #include <stdlib.h>
00023 #include <iostream>
00024 #include <math.h>
00025 #include "EvtGenBase/EvtComplex.hh"
00026 #include "EvtGenBase/EvtVectorParticle.hh"
00027 #include "EvtGenBase/EvtVector4C.hh"
00028 #include "EvtGenBase/EvtPDL.hh"
00029 #include "EvtGenBase/EvtReport.hh"
00030 
00031 EvtVectorParticle::~EvtVectorParticle(){}
00032 
00033 
00034 void EvtVectorParticle::init(EvtId part_n,double e,double px,double py,double pz){
00035 
00036   _validP4=true;
00037   setp(e,px,py,pz);
00038   setpart_num(part_n);
00039   
00040   _eps[0].set(0.0,1.0,0.0,0.0);
00041   _eps[1].set(0.0,0.0,1.0,0.0);
00042   _eps[2].set(0.0,0.0,0.0,1.0);
00043 
00044   setLifetime();
00045 }
00046 
00047 void EvtVectorParticle::init(EvtId part_n,const EvtVector4R& p4){
00048 
00049   _validP4=true;
00050   setp(p4);
00051   setpart_num(part_n);
00052   
00053   _eps[0].set(0.0,1.0,0.0,0.0);
00054   _eps[1].set(0.0,0.0,1.0,0.0);
00055   _eps[2].set(0.0,0.0,0.0,1.0);
00056 
00057   setLifetime();
00058 }
00059 
00060 
00061 EvtSpinDensity EvtVectorParticle::rotateToHelicityBasis() const{
00062 
00063   static EvtVector4C eplus(0.0,-1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
00064   static EvtVector4C ezero(0.0,0.0,0.0,1.0);
00065   static EvtVector4C eminus(0.0,1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
00066   
00067   static EvtVector4C eplusC(eplus.conj());
00068   static EvtVector4C ezeroC(ezero.conj());
00069   static EvtVector4C eminusC(eminus.conj());
00070 
00071   EvtSpinDensity R;
00072   R.SetDim(3);
00073 
00074   for ( int i=0; i<3; i++ ) {
00075     R.Set(0,i,(eplusC)*_eps[i]);
00076     R.Set(1,i,(ezeroC)*_eps[i]);
00077     R.Set(2,i,(eminusC)*_eps[i]);
00078   }
00079 
00080   return R;
00081 
00082 }
00083 
00084 
00085 EvtSpinDensity EvtVectorParticle::rotateToHelicityBasis(double alpha,
00086                                                         double beta,
00087                                                         double gamma) const{
00088 
00089   EvtVector4C eplus(0.0,-1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
00090   EvtVector4C ezero(0.0,0.0,0.0,1.0);
00091   EvtVector4C eminus(0.0,1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
00092   
00093   eplus.applyRotateEuler(alpha,beta,gamma);
00094   ezero.applyRotateEuler(alpha,beta,gamma);
00095   eminus.applyRotateEuler(alpha,beta,gamma);
00096 
00097   EvtSpinDensity R;
00098   R.SetDim(3);
00099 
00100 
00101   for ( int i=0; i<3; i++ ) {
00102     R.Set(0,i,(eplus.conj())*_eps[i]);
00103     R.Set(1,i,(ezero.conj())*_eps[i]);
00104     R.Set(2,i,(eminus.conj())*_eps[i]);
00105   }
00106 
00107   return R;
00108 
00109 }
00110 
00111 

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