1 //--------------------------------------------------------------------------
4 // This software is part of the EvtGen package developed jointly
5 // for the BaBar and CLEO collaborations. If you use all or part
6 // of it, please give an appropriate acknowledgement.
8 // Copyright Information: See EvtGen/COPYRIGHT
9 // Copyright (C) 1998 Caltech, UCSB
11 // Module: EvtBToKpipiCP.cc
13 // Description: Routine to decay B->K pi pi
14 // and has CP violation.
15 // --- This is the routine to be called by the Main generator
16 // to get the decay of B0 -->-- K+ pi- pi0
17 // The decay proceeeds through three channels:
18 // a) B0 -->-- K*+ pi- ; K*+ -->-- K+ pi0
19 // b) K*0 pi0 ; K*0bar -->-- K+ pi-
20 // c) K- rho+ ; rho+ -->-- pi+ pi0
21 // It provides at the same time the CP conjugate decay
22 // B0bar -->-- K- pi+ pi0
24 // Modification history:
26 // Versille September, 1997 Module created
28 //------------------------------------------------------------------------
30 #include "EvtGenBase/EvtPatches.hh"
32 #include "EvtGenBase/EvtParticle.hh"
33 #include "EvtGenBase/EvtGenKine.hh"
34 #include "EvtGenBase/EvtCPUtil.hh"
35 #include "EvtGenBase/EvtPDL.hh"
36 #include "EvtGenBase/EvtReport.hh"
37 #include "EvtGenModels/EvtBToKpipiCP.hh"
38 #include "EvtGenBase/EvtId.hh"
43 extern void __stdcall EVTKPIPI(double *, double *, int *,double *,
44 double *,double *,double *,double *,
45 double *,double *,double *);
49 extern void evtkpipi_(double *, double *, int *,double *,
50 double *,double *,double *,double *,
51 double *,double *,double *);
55 EvtBToKpipiCP::~EvtBToKpipiCP() {}
58 std::string EvtBToKpipiCP::getName(){
65 EvtDecayBase* EvtBToKpipiCP::clone(){
67 return new EvtBToKpipiCP;
71 void EvtBToKpipiCP::init(){
73 // check that there are 3 arguments
77 checkSpinParent(EvtSpinType::SCALAR);
79 checkSpinDaughter(0,EvtSpinType::SCALAR);
80 checkSpinDaughter(1,EvtSpinType::SCALAR);
81 checkSpinDaughter(2,EvtSpinType::SCALAR);
86 void EvtBToKpipiCP::decay( EvtParticle *p){
88 //added by Lange Jan4,2000
89 static EvtId B0=EvtPDL::getId("B0");
90 static EvtId B0B=EvtPDL::getId("anti-B0");
95 EvtCPUtil::OtherB(p,t,other_b);
97 EvtParticle *Kp,*pim,*pi0;
99 p->makeDaughters(getNDaug(),getDaugs());
106 //double dm=getArg(0);
107 double alpha=getArg(1);
108 double beta=getArg(2);
121 double p4Kplus[4],p4piminus[4],p4gamm1[4],p4gamm2[4];
123 double realA,imgA,realbarA,imgbarA;
126 EVTKPIPI(&alpha,&beta,&iset,p4Kplus,p4piminus,p4gamm1,p4gamm2,
127 &realA,&imgA,&realbarA,&imgbarA);
129 evtkpipi_(&alpha,&beta,&iset,p4Kplus,p4piminus,p4gamm1,p4gamm2,
130 &realA,&imgA,&realbarA,&imgbarA);
133 p4[0].set(p4Kplus[3],p4Kplus[0],p4Kplus[1],p4Kplus[2]);
134 p4[1].set(p4piminus[3],p4piminus[0],p4piminus[1],p4piminus[2]);
135 p4[2].set(p4gamm1[3]+p4gamm2[3],p4gamm1[0]+p4gamm2[0],
136 p4gamm1[1]+p4gamm2[1],p4gamm1[2]+p4gamm2[2]);
138 Kp->init( getDaug(0), p4[0] );
139 pim->init( getDaug(1), p4[1] );
140 pi0->init( getDaug(2), p4[2] );
144 EvtComplex A(realA,imgA);
145 EvtComplex Abar(realbarA,imgbarA);