00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
00032
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
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
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