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);
83 double alpha=getArg(1);
84 double beta=getArg(2);
88 double p4Kplus[4],p4piminus[4],p4gamm1[4],p4gamm2[4];
90 double realA,imgA,realbarA,imgbarA;
93 EVTKPIPI(&alpha,&beta,&iset,p4Kplus,p4piminus,p4gamm1,p4gamm2,
94 &realA,&imgA,&realbarA,&imgbarA);
96 evtkpipi_(&alpha,&beta,&iset,p4Kplus,p4piminus,p4gamm1,p4gamm2,
97 &realA,&imgA,&realbarA,&imgbarA);
102 void EvtBToKpipiCP::decay( EvtParticle *p){
104 //added by Lange Jan4,2000
105 static EvtId B0=EvtPDL::getId("B0");
106 static EvtId B0B=EvtPDL::getId("anti-B0");
111 EvtCPUtil::getInstance()->OtherB(p,t,other_b,0.5);
113 EvtParticle *Kp,*pim,*pi0;
115 p->makeDaughters(getNDaug(),getDaugs());
122 //double dm=getArg(0);
123 double alpha=getArg(1);
124 double beta=getArg(2);
129 double p4Kplus[4],p4piminus[4],p4gamm1[4],p4gamm2[4];
131 double realA,imgA,realbarA,imgbarA;
134 EVTKPIPI(&alpha,&beta,&iset,p4Kplus,p4piminus,p4gamm1,p4gamm2,
135 &realA,&imgA,&realbarA,&imgbarA);
137 evtkpipi_(&alpha,&beta,&iset,p4Kplus,p4piminus,p4gamm1,p4gamm2,
138 &realA,&imgA,&realbarA,&imgbarA);
141 p4[0].set(p4Kplus[3],p4Kplus[0],p4Kplus[1],p4Kplus[2]);
142 p4[1].set(p4piminus[3],p4piminus[0],p4piminus[1],p4piminus[2]);
143 p4[2].set(p4gamm1[3]+p4gamm2[3],p4gamm1[0]+p4gamm2[0],
144 p4gamm1[1]+p4gamm2[1],p4gamm1[2]+p4gamm2[2]);
146 Kp->init( getDaug(0), p4[0] );
147 pim->init( getDaug(1), p4[1] );
148 pi0->init( getDaug(2), p4[2] );
152 EvtComplex A(realA,imgA);
153 EvtComplex Abar(realbarA,imgbarA);