/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenModels/EvtCBTo3piP00.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: EvtCBTo3piP00.cc
00012 //
00013 // Description: Routine to decay B+/-->pi0 pi0 pi+/-
00014 //              and has CP violation.
00015 //
00016 // Modification history:
00017 //
00018 //    RYD,Versille     May 6, 1997         Module created
00019 //
00020 //------------------------------------------------------------------------
00021 //
00022 #include "EvtGenBase/EvtPatches.hh"
00023 #include <stdlib.h>
00024 #include "EvtGenBase/EvtParticle.hh"
00025 #include "EvtGenBase/EvtGenKine.hh"
00026 #include "EvtGenBase/EvtPDL.hh"
00027 #include "EvtGenBase/EvtReport.hh"
00028 #include "EvtGenModels/EvtCBTo3piP00.hh"
00029 #include <string>
00030 
00031 //Below you will have do modify the declaration to be appropriate
00032 //for your new routine for the calculation of the amplitude
00033 
00034 extern "C" {
00035   extern void evt3pionsp00_(double *,int *,
00036                              double *,
00037                              double *,double *,
00038                              double *,double *,
00039                              double *,double *,double *,double *);
00040 }
00041 
00042 EvtCBTo3piP00::~EvtCBTo3piP00() {}
00043 
00044 void EvtCBTo3piP00::getName(std::string& model_name){
00045 
00046   model_name="CB3PI-P00";     
00047 
00048 }
00049 
00050 
00051 EvtDecayBase* EvtCBTo3piP00::clone(){
00052 
00053   return new EvtCBTo3piP00;
00054 
00055 }
00056 
00057 void EvtCBTo3piP00::init(){
00058 
00059   // check that there are 1 argument
00060   checkNArg(1);
00061   checkNDaug(3);
00062 
00063   checkSpinParent(EvtSpinType::SCALAR);
00064   
00065   checkSpinDaughter(0,EvtSpinType::SCALAR);
00066   checkSpinDaughter(1,EvtSpinType::SCALAR);
00067   checkSpinDaughter(2,EvtSpinType::SCALAR);
00068 
00069 }
00070 
00071 
00072 
00073 void EvtCBTo3piP00::initProbMax(){
00074 
00075   setProbMax(1.5);
00076 
00077 }
00078 
00079 
00080 void EvtCBTo3piP00::decay( EvtParticle *p ){
00081 
00082   //added by Lange Jan4,2000
00083   static EvtId BM=EvtPDL::getId("B-");
00084   static EvtId BP=EvtPDL::getId("B+");
00085 
00086   EvtParticle *pi1,*pi2,*pi3;
00087 
00088   p->makeDaughters(getNDaug(),getDaugs());
00089   pi1=p->getDaug(0);
00090   pi2=p->getDaug(1);
00091   pi3=p->getDaug(2);
00092 
00093   EvtVector4R p4[3];
00094   double alpha = getArg(0);
00095   int iset;
00096   static int first=1;
00097 
00098   if (first==1) {
00099     iset=10000;
00100     first=0;
00101   }
00102   else{
00103     iset=0;
00104   }
00105 
00106   double p4pi1[4],p4Gamma11[4],p4Gamma12[4];
00107   double p4Gamma21[4],p4Gamma22[4];
00108 
00109   double realA,imgA,realbarA,imgbarA;
00110 
00111   evt3pionsp00_(&alpha,&iset,
00112                  p4pi1,
00113                  p4Gamma11,p4Gamma12,
00114                  p4Gamma21,p4Gamma22,
00115                  &realA,&imgA,&realbarA,&imgbarA);
00116 
00117   p4[0].set(p4pi1[3],p4pi1[0],p4pi1[1],p4pi1[2]);
00118   p4[1].set(p4Gamma11[3]+p4Gamma12[3],
00119             p4Gamma11[0]+p4Gamma12[0],
00120             p4Gamma11[1]+p4Gamma12[1],
00121             p4Gamma11[2]+p4Gamma12[2]);
00122   p4[2].set(p4Gamma21[3]+p4Gamma22[3],
00123             p4Gamma21[0]+p4Gamma22[0],
00124             p4Gamma21[1]+p4Gamma22[1],
00125             p4Gamma21[2]+p4Gamma22[2]);
00126 
00127   pi1->init( getDaug(0), p4[0] );
00128   pi2->init( getDaug(1), p4[1] );
00129   pi3->init( getDaug(2), p4[2] );
00130 
00131   EvtComplex A(realA,imgA);
00132   EvtComplex Abar(realbarA, imgbarA);
00133    
00134   EvtComplex  amp;
00135   if(p->getId()==BP)
00136     {
00137       amp = A;
00138     }
00139   if(p->getId()==BM)
00140     {
00141       amp = Abar;
00142     }
00143 
00144   vertex(amp);
00145 
00146   return ;
00147 }
00148 

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