/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenModels/EvtCBTo3piMPP.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: EvtCBTo3piMPP.cc
00012 //
00013 // Description: Routine to decay B+/-->pi+ pi- 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 "EvtGenBase/EvtId.hh"
00029 #include "EvtGenModels/EvtCBTo3piMPP.hh"
00030 #include <string>
00031 
00032 //Below you will have do modify the declaration to be appropriate
00033 //for your new routine for the calculation of the amplitude
00034 
00035 extern "C" void evt3pionsmpp_(double *,int *,double *,
00036                          double *,double *,double *,
00037                          double *,double *,double *);
00038 
00039 
00040 EvtCBTo3piMPP::~EvtCBTo3piMPP() {}
00041 
00042 void EvtCBTo3piMPP::getName(std::string& model_name){
00043 
00044   model_name="CB3PI-MPP";     
00045 
00046 }
00047 
00048 
00049 EvtDecayBase* EvtCBTo3piMPP::clone(){
00050 
00051   return new EvtCBTo3piMPP;
00052 
00053 }
00054 
00055 void EvtCBTo3piMPP::init(){
00056 
00057   // check that there are 1 argument
00058   checkNArg(1);
00059   checkNDaug(3);
00060 
00061   checkSpinParent(EvtSpinType::SCALAR);
00062 
00063   checkSpinDaughter(0,EvtSpinType::SCALAR);
00064   checkSpinDaughter(1,EvtSpinType::SCALAR);
00065   checkSpinDaughter(2,EvtSpinType::SCALAR);
00066 
00067 }
00068 
00069 void EvtCBTo3piMPP::initProbMax(){
00070 
00071   setProbMax(1.5);
00072 
00073 }
00074 
00075 void EvtCBTo3piMPP::decay( EvtParticle *p ){
00076 
00077   //added by Lange Jan4,2000
00078   static EvtId BM=EvtPDL::getId("B-");
00079   static EvtId BP=EvtPDL::getId("B+");
00080 
00081   EvtParticle *pi1,*pi2,*pi3;
00082 
00083   p->makeDaughters(getNDaug(),getDaugs());
00084   pi1=p->getDaug(0);
00085   pi2=p->getDaug(1);
00086   pi3=p->getDaug(2);
00087 
00088   EvtVector4R p4[3];
00089   double alpha = getArg(0);
00090 
00091   int iset;
00092 
00093   static int first=1;
00094 
00095   if (first==1) {
00096     iset=10000;
00097     first=0;
00098   }
00099   else{
00100     iset=0;
00101   }
00102 
00103   double p4pi1[4],p4pi2[4],p4pi3[4]; 
00104 
00105   double realA,imgA,realbarA,imgbarA;
00106 
00107   evt3pionsmpp_(&alpha,&iset,p4pi1,p4pi2,p4pi3,
00108              &realA,&imgA,&realbarA,&imgbarA);
00109 
00110 
00111   p4[0].set(p4pi1[3],p4pi1[0],p4pi1[1],p4pi1[2]);
00112   p4[1].set(p4pi2[3],p4pi2[0],p4pi2[1],p4pi2[2]);
00113   p4[2].set(p4pi3[3],p4pi3[0],p4pi3[1],p4pi3[2]);
00114 
00115   pi1->init( getDaug(0), p4[0] );
00116   pi2->init( getDaug(1), p4[1] );
00117   pi3->init( getDaug(2), p4[2] );
00118 
00119   EvtComplex A(realA,imgA);
00120   EvtComplex Abar(realbarA, imgbarA);
00121 
00122    //amp is filled just to make sure the compiler will
00123    //do its job!! but one has to define amp differently
00124    // if one wants the B+ or the B- to decay to 3pi!
00125    // 
00126 
00127 
00128    EvtComplex  amp;
00129    if(p->getId()==BP)
00130      {
00131        amp = A;
00132      }
00133    if(p->getId()==BM)
00134      {
00135        amp = Abar;
00136      }  
00137 
00138    vertex(amp);
00139 
00140   return ;
00141 }
00142 
00143 

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