BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtCBTo3piMPP.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
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.
7//
8// Copyright Information: See EvtGen/COPYRIGHT
9// Copyright (C) 1998 Caltech, UCSB
10//
11// Module: EvtCBTo3piMPP.cc
12//
13// Description: Routine to decay B+/-->pi+ pi- pi+/-
14// and has CP violation.
15//
16// Modification history:
17//
18// RYD/Versille May 6, 1997 Module created
19//
20//------------------------------------------------------------------------
21//
22#include "EvtGenBase/EvtPatches.hh"
23#include <stdlib.h>
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"
30#include <string>
31
32//Below you will have do modify the declaration to be appropriate
33//for your new routine for the calculation of the amplitude
34
35extern "C" void evt3pionsmpp_(double *,int *,double *,
36 double *,double *,double *,
37 double *,double *,double *);
38
39
41
42void EvtCBTo3piMPP::getName(std::string& model_name){
43
44 model_name="CB3PI-MPP";
45
46}
47
48
50
51 return new EvtCBTo3piMPP;
52
53}
54
56
57 // check that there are 1 argument
58 checkNArg(1);
59 checkNDaug(3);
60
62
66
67}
68
70
71 setProbMax(1.5);
72
73}
74
76
77 //added by Lange Jan4,2000
78 static EvtId BM=EvtPDL::getId("B-");
79 static EvtId BP=EvtPDL::getId("B+");
80
81 EvtParticle *pi1,*pi2,*pi3;
82
84 pi1=p->getDaug(0);
85 pi2=p->getDaug(1);
86 pi3=p->getDaug(2);
87
88 EvtVector4R p4[3];
89 double alpha = getArg(0);
90
91 int iset;
92
93 static int first=1;
94
95 if (first==1) {
96 iset=10000;
97 first=0;
98 }
99 else{
100 iset=0;
101 }
102
103 double p4pi1[4],p4pi2[4],p4pi3[4];
104
105 double realA,imgA,realbarA,imgbarA;
106
107 evt3pionsmpp_(&alpha,&iset,p4pi1,p4pi2,p4pi3,
108 &realA,&imgA,&realbarA,&imgbarA);
109
110
111 p4[0].set(p4pi1[3],p4pi1[0],p4pi1[1],p4pi1[2]);
112 p4[1].set(p4pi2[3],p4pi2[0],p4pi2[1],p4pi2[2]);
113 p4[2].set(p4pi3[3],p4pi3[0],p4pi3[1],p4pi3[2]);
114
115 pi1->init( getDaug(0), p4[0] );
116 pi2->init( getDaug(1), p4[1] );
117 pi3->init( getDaug(2), p4[2] );
118
119 EvtComplex A(realA,imgA);
120 EvtComplex Abar(realbarA, imgbarA);
121
122 //amp is filled just to make sure the compiler will
123 //do its job!! but one has to define amp differently
124 // if one wants the B+ or the B- to decay to 3pi!
125 //
126
127
128 EvtComplex amp;
129 if(p->getId()==BP)
130 {
131 amp = A;
132 }
133 if(p->getId()==BM)
134 {
135 amp = Abar;
136 }
137
138 vertex(amp);
139
140 return ;
141}
142
143
void evt3pionsmpp_(double *, int *, double *, double *, double *, double *, double *, double *, double *)
const double alpha
void evt3pionsmpp_(double *, int *, double *, double *, double *, double *, double *, double *, double *)
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
static EvtId getId(const std::string &name)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0