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: EvtCBTo3piMPP.cc
13 // Description: Routine to decay B+/-->pi+ pi- pi+/-
14 // and has CP violation.
16 // Modification history:
18 // RYD/Versille May 6, 1997 Module created
20 //------------------------------------------------------------------------
22 #include "EvtGenBase/EvtPatches.hh"
24 #include "EvtGenBase/EvtParticle.hh"
25 #include "EvtGenBase/EvtGenKine.hh"
26 #include "EvtGenBase/EvtPDL.hh"
27 #include "EvtGenBase/EvtReport.hh"
28 #include "EvtGenBase/EvtId.hh"
29 #include "EvtGenModels/EvtCBTo3piMPP.hh"
32 //Below you will have do modify the declaration to be appropriate
33 //for your new routine for the calculation of the amplitude
36 extern "C" void __stdcall EVT3PIONSMPP(double *,int *,double *,
37 double *,double *,double *,
38 double *,double *,double *);
40 extern "C" void evt3pionsmpp_(double *,int *,double *,
41 double *,double *,double *,
42 double *,double *,double *);
45 EvtCBTo3piMPP::~EvtCBTo3piMPP() {}
47 std::string EvtCBTo3piMPP::getName(){
54 EvtDecayBase* EvtCBTo3piMPP::clone(){
56 return new EvtCBTo3piMPP;
60 void EvtCBTo3piMPP::init(){
62 // check that there are 1 argument
66 checkSpinParent(EvtSpinType::SCALAR);
68 checkSpinDaughter(0,EvtSpinType::SCALAR);
69 checkSpinDaughter(1,EvtSpinType::SCALAR);
70 checkSpinDaughter(2,EvtSpinType::SCALAR);
74 void EvtCBTo3piMPP::initProbMax(){
80 void EvtCBTo3piMPP::decay( EvtParticle *p ){
82 //added by Lange Jan4,2000
83 static EvtId BM=EvtPDL::getId("B-");
84 static EvtId BP=EvtPDL::getId("B+");
86 EvtParticle *pi1,*pi2,*pi3;
88 p->makeDaughters(getNDaug(),getDaugs());
94 double alpha = getArg(0);
108 double p4pi1[4],p4pi2[4],p4pi3[4];
110 double realA,imgA,realbarA,imgbarA;
113 EVT3PIONSMPP(&alpha,&iset,p4pi1,p4pi2,p4pi3,
114 &realA,&imgA,&realbarA,&imgbarA);
116 evt3pionsmpp_(&alpha,&iset,p4pi1,p4pi2,p4pi3,
117 &realA,&imgA,&realbarA,&imgbarA);
120 p4[0].set(p4pi1[3],p4pi1[0],p4pi1[1],p4pi1[2]);
121 p4[1].set(p4pi2[3],p4pi2[0],p4pi2[1],p4pi2[2]);
122 p4[2].set(p4pi3[3],p4pi3[0],p4pi3[1],p4pi3[2]);
124 pi1->init( getDaug(0), p4[0] );
125 pi2->init( getDaug(1), p4[1] );
126 pi3->init( getDaug(2), p4[2] );
128 EvtComplex A(realA,imgA);
129 EvtComplex Abar(realbarA, imgbarA);
131 //amp is filled just to make sure the compiler will
132 //do its job!! but one has to define amp differently
133 // if one wants the B+ or the B- to decay to 3pi!