/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenModels/EvtBToKpipiCP.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: EvtBToKpipiCP.cc
00012 //
00013 // Description: Routine to decay B->K pi pi
00014 //              and has CP violation.
00015 //       --- This is the routine to be called by the Main generator
00016 //          to get the decay of B0    -->-- K+ pi- pi0
00017 //          The decay proceeeds through three channels:
00018 //          a) B0 -->-- K*+ pi-  ; K*+    -->-- K+ pi0
00019 //          b)          K*0 pi0  ; K*0bar -->-- K+ pi-
00020 //          c)          K-  rho+ ; rho+   -->-- pi+ pi0
00021 //         It provides at the same time the CP conjugate decay
00022 //                              B0bar -->-- K- pi+ pi0
00023 //
00024 // Modification history:
00025 //
00026 //    Versille     September, 1997         Module created
00027 //
00028 //------------------------------------------------------------------------
00029 //
00030 #include "EvtGenBase/EvtPatches.hh"
00031 #include <stdlib.h>
00032 #include "EvtGenBase/EvtParticle.hh"
00033 #include "EvtGenBase/EvtGenKine.hh"
00034 #include "EvtGenBase/EvtCPUtil.hh"
00035 #include "EvtGenBase/EvtPDL.hh"
00036 #include "EvtGenBase/EvtReport.hh"
00037 #include "EvtGenModels/EvtBToKpipiCP.hh"
00038 #include "EvtGenBase/EvtId.hh"
00039 #include <string>
00040 
00041 extern "C" {
00042   extern void evtkpipi_(double *, double *, int *,double *,
00043                          double *,double *,double *,double *,
00044                          double *,double *,double *);
00045 }
00046 
00047 EvtBToKpipiCP::~EvtBToKpipiCP() {}
00048 
00049 
00050 void EvtBToKpipiCP::getName(std::string& model_name){
00051 
00052   model_name="BTOKPIPI_CP";     
00053 
00054 }
00055 
00056 
00057 EvtDecayBase* EvtBToKpipiCP::clone(){
00058 
00059   return new EvtBToKpipiCP;
00060 
00061 }
00062 
00063 void EvtBToKpipiCP::init(){
00064 
00065   // check that there are 3 arguments
00066   checkNArg(3);
00067   checkNDaug(3);
00068 
00069   checkSpinParent(EvtSpinType::SCALAR);
00070 
00071   checkSpinDaughter(0,EvtSpinType::SCALAR);
00072   checkSpinDaughter(1,EvtSpinType::SCALAR);
00073   checkSpinDaughter(2,EvtSpinType::SCALAR);
00074 
00075 }
00076 
00077 
00078 void EvtBToKpipiCP::decay( EvtParticle *p){
00079 
00080   //added by Lange Jan4,2000
00081   static EvtId B0=EvtPDL::getId("B0");
00082   static EvtId B0B=EvtPDL::getId("anti-B0");
00083 
00084   double t;
00085   EvtId other_b;
00086 
00087   EvtCPUtil::OtherB(p,t,other_b);
00088 
00089   EvtParticle *Kp,*pim,*pi0;
00090 
00091   p->makeDaughters(getNDaug(),getDaugs());
00092   Kp=p->getDaug(0);
00093   pim=p->getDaug(1);
00094   pi0=p->getDaug(2);
00095 
00096   EvtVector4R p4[3];
00097 
00098   //double dm=getArg(0);
00099   double alpha=getArg(1);
00100   double beta=getArg(2);
00101   int iset;
00102 
00103   static int first=1;
00104 
00105   if (first==1) {
00106     iset=10000;
00107     first=0;
00108   }
00109   else{
00110     iset=0;
00111   }
00112 
00113   double p4Kplus[4],p4piminus[4],p4gamm1[4],p4gamm2[4]; 
00114 
00115   double realA,imgA,realbarA,imgbarA;
00116 
00117   evtkpipi_(&alpha,&beta,&iset,p4Kplus,p4piminus,p4gamm1,p4gamm2,
00118              &realA,&imgA,&realbarA,&imgbarA);
00119 
00120   p4[0].set(p4Kplus[3],p4Kplus[0],p4Kplus[1],p4Kplus[2]);
00121   p4[1].set(p4piminus[3],p4piminus[0],p4piminus[1],p4piminus[2]);
00122   p4[2].set(p4gamm1[3]+p4gamm2[3],p4gamm1[0]+p4gamm2[0],
00123             p4gamm1[1]+p4gamm2[1],p4gamm1[2]+p4gamm2[2]);
00124 
00125    Kp->init( getDaug(0), p4[0] );
00126    pim->init( getDaug(1), p4[1] );
00127    pi0->init( getDaug(2), p4[2] );
00128 
00129    EvtComplex amp;
00130 
00131    EvtComplex A(realA,imgA);
00132    EvtComplex Abar(realbarA,imgbarA);
00133 
00134    if (other_b==B0B){
00135      amp=Abar;
00136    }
00137    if (other_b==B0){
00138      amp=A;
00139    }
00140 
00141    vertex(amp);
00142 
00143   return ;
00144 }
00145 

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