BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
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//
23#include <stdlib.h>
26#include "EvtGenBase/EvtPDL.hh"
28#include "EvtGenBase/EvtId.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 initProbMax()
EvtDecayBase * clone()
void decay(EvtParticle *p)
virtual ~EvtCBTo3piMPP()
void getName(std::string &name)
void vertex(const EvtComplex &amp)
Definition: EvtDecayAmp.hh:37
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void checkSpinParent(EvtSpinType::spintype sp)
double getArg(int j)
void setProbMax(double prbmx)
void checkNDaug(int d1, int d2=-1)
EvtId * getDaugs()
Definition: EvtDecayBase.hh:65
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
EvtId getDaug(int i)
Definition: EvtDecayBase.hh:66
Definition: EvtId.hh:27
static EvtId getId(const std::string &name)
Definition: EvtPDL.cc:287
void makeDaughters(int ndaug, EvtId *id)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtId getId() const
Definition: EvtParticle.cc:112
EvtParticle * getDaug(int i)
Definition: EvtParticle.cc:84
double double double * p4
Definition: qcdloop1.h:77