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: EvtBTo3piCP.cc
13 // Description: Routine to decay B->pi+ pi- pi0
14 // and has CP violation.
16 // Modification history:
18 // RYD/VERSILLE March 2, 1997 Module created
20 //------------------------------------------------------------------------
22 #include "EvtGenBase/EvtPatches.hh"
24 #include "EvtGenBase/EvtParticle.hh"
25 #include "EvtGenBase/EvtCPUtil.hh"
26 #include "EvtGenBase/EvtPDL.hh"
27 #include "EvtGenBase/EvtReport.hh"
28 #include "EvtGenModels/EvtBTo3piCP.hh"
29 #include "EvtGenBase/EvtId.hh"
31 #include "EvtGenBase/EvtConst.hh"
35 extern void __stdcall EVT3PIONS(double *,int *,double *,
36 double *,double *,double *,double *,
37 double *,double *,double *);
41 extern void evt3pions_(double *,int *,double *,
42 double *,double *,double *,double *,
43 double *,double *,double *);
47 EvtBTo3piCP::~EvtBTo3piCP() {}
50 std::string EvtBTo3piCP::getName(){
57 EvtDecayBase* EvtBTo3piCP::clone(){
59 return new EvtBTo3piCP;
63 void EvtBTo3piCP::init(){
65 // check that there are 2 arguments
69 checkSpinParent(EvtSpinType::SCALAR);
71 checkSpinDaughter(0,EvtSpinType::SCALAR);
72 checkSpinDaughter(1,EvtSpinType::SCALAR);
73 checkSpinDaughter(2,EvtSpinType::SCALAR);
78 void EvtBTo3piCP::initProbMax(){
84 void EvtBTo3piCP::decay( EvtParticle *p){
86 //added by Lange Jan4,2000
87 static EvtId B0=EvtPDL::getId("B0");
88 static EvtId B0B=EvtPDL::getId("anti-B0");
93 EvtCPUtil::OtherB(p,t,other_b);
95 EvtParticle *pip,*pim,*pi0;
97 p->makeDaughters(getNDaug(),getDaugs());
99 // p->init_daug(SCALAR,&pip,SCALAR,&pim,SCALAR,&pi0);
107 double alpha=getArg(1);
120 double p4piplus[4],p4piminus[4],p4gamm1[4],p4gamm2[4];
122 double realA,imgA,realbarA,imgbarA;
125 EVT3PIONS(&alpha,&iset,p4piplus,p4piminus,p4gamm1,p4gamm2,
126 &realA,&imgA,&realbarA,&imgbarA);
128 evt3pions_(&alpha,&iset,p4piplus,p4piminus,p4gamm1,p4gamm2,
129 &realA,&imgA,&realbarA,&imgbarA);
132 p4[0].set(p4piplus[3],p4piplus[0],p4piplus[1],p4piplus[2]);
133 p4[1].set(p4piminus[3],p4piminus[0],p4piminus[1],p4piminus[2]);
134 p4[2].set(p4gamm1[3]+p4gamm2[3],p4gamm1[0]+p4gamm2[0],
135 p4gamm1[1]+p4gamm2[1],p4gamm1[2]+p4gamm2[2]);
137 if (pip->getId()==EvtPDL::getId("pi+")) {
138 pip->init( getDaug(0), p4[0] );
139 pim->init( getDaug(1), p4[1] );
142 pip->init( getDaug(0), p4[1] );
143 pim->init( getDaug(1), p4[0] );
146 pi0->init( getDaug(2), p4[2] );
150 EvtComplex A(realA,imgA);
151 EvtComplex Abar(realbarA,imgbarA);
154 amp=A*cos(dm*t/(2*EvtConst::c))+
155 EvtComplex(0.,1.)*Abar*sin(dm*t/(2*EvtConst::c));
158 amp=Abar*cos(dm*t/(2*EvtConst::c))+
159 EvtComplex(0.,1.)*A*sin(dm*t/(2*EvtConst::c));