BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtBTo3piCP.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: EvtBTo3piCP.cc
12//
13// Description: Routine to decay B->pi+ pi- pi0
14// and has CP violation.
15//
16// Modification history:
17//
18// RYD/VERSILLE March 2, 1997 Module created
19//
20//------------------------------------------------------------------------
21//
23#include <stdlib.h>
26#include "EvtGenBase/EvtPDL.hh"
29#include "EvtGenBase/EvtId.hh"
30#include <string>
32
33extern "C" {
34 extern void evt3pions_(double *,int *,double *,
35 double *,double *,double *,double *,
36 double *,double *,double *);
37}
38
39
41
42
43void EvtBTo3piCP::getName(std::string& model_name){
44
45 model_name="BTO3PI_CP";
46
47}
48
49
51
52 return new EvtBTo3piCP;
53
54}
55
57
58 // check that there are 2 arguments
59 checkNArg(2);
60 checkNDaug(3);
61
63
67}
68
69
70
72
73 setProbMax(1.5);
74
75}
76
78
79 //added by Lange Jan4,2000
80 static EvtId B0=EvtPDL::getId("B0");
81 static EvtId B0B=EvtPDL::getId("anti-B0");
82
83 double t;
84 EvtId other_b;
85
86 EvtCPUtil::OtherB(p,t,other_b);
87
88 EvtParticle *pip,*pim,*pi0;
89
91
92 // p->init_daug(SCALAR,&pip,SCALAR,&pim,SCALAR,&pi0);
93 pip=p->getDaug(0);
94 pim=p->getDaug(1);
95 pi0=p->getDaug(2);
96
97 EvtVector4R p4[3];
98
99 double dm=getArg(0);
100 double alpha=getArg(1);
101 int iset;
102
103 static int first=1;
104
105 if (first==1) {
106 iset=10000;
107 first=0;
108 }
109 else{
110 iset=0;
111 }
112
113 double p4piplus[4],p4piminus[4],p4gamm1[4],p4gamm2[4];
114
115 double realA,imgA,realbarA,imgbarA;
116
117 evt3pions_(&alpha,&iset,p4piplus,p4piminus,p4gamm1,p4gamm2,
118 &realA,&imgA,&realbarA,&imgbarA);
119
120 p4[0].set(p4piplus[3],p4piplus[0],p4piplus[1],p4piplus[2]);
121 p4[1].set(p4piminus[3],p4piminus[0],p4piminus[1],p4piminus[2]);
122 p4[2].set(p4gamm1[3]+p4gamm2[3],p4gamm1[0]+p4gamm2[0],
123 p4gamm1[1]+p4gamm2[1],p4gamm1[2]+p4gamm2[2]);
124
125 if (pip->getId()==EvtPDL::getId("pi+")) {
126 pip->init( getDaug(0), p4[0] );
127 pim->init( getDaug(1), p4[1] );
128 }
129 else {
130 pip->init( getDaug(0), p4[1] );
131 pim->init( getDaug(1), p4[0] );
132 }
133
134 pi0->init( getDaug(2), p4[2] );
135
136 EvtComplex amp;
137
138 EvtComplex A(realA,imgA);
139 EvtComplex Abar(realbarA,imgbarA);
140
141 if (other_b==B0B){
142 amp=A*cos(dm*t/(2*EvtConst::c))+
143 EvtComplex(0.,1.)*Abar*sin(dm*t/(2*EvtConst::c));
144 }
145 if (other_b==B0){
146 amp=Abar*cos(dm*t/(2*EvtConst::c))+
147 EvtComplex(0.,1.)*A*sin(dm*t/(2*EvtConst::c));
148 }
149
150 vertex(amp);
151
152 return ;
153}
154
void evt3pions_(double *, int *, double *, double *, double *, double *, double *, double *, double *, double *)
const double alpha
double sin(const BesAngle a)
double cos(const BesAngle a)
void init()
Definition: EvtBTo3piCP.cc:56
void getName(std::string &name)
Definition: EvtBTo3piCP.cc:43
virtual ~EvtBTo3piCP()
Definition: EvtBTo3piCP.cc:40
void initProbMax()
Definition: EvtBTo3piCP.cc:71
EvtDecayBase * clone()
Definition: EvtBTo3piCP.cc:50
void decay(EvtParticle *p)
Definition: EvtBTo3piCP.cc:77
static void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition: EvtCPUtil.cc:229
static const double c
Definition: EvtConst.hh:32
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:113
EvtParticle * getDaug(int i)
Definition: EvtParticle.cc:85
void set(int i, double d)
Definition: EvtVector4R.hh:183
int t()
Definition: t.c:1