BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtBToKpipiCP.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: EvtBToKpipiCP.cc
12//
13// Description: Routine to decay B->K pi pi
14// and has CP violation.
15// --- This is the routine to be called by the Main generator
16// to get the decay of B0 -->-- K+ pi- pi0
17// The decay proceeeds through three channels:
18// a) B0 -->-- K*+ pi- ; K*+ -->-- K+ pi0
19// b) K*0 pi0 ; K*0bar -->-- K+ pi-
20// c) K- rho+ ; rho+ -->-- pi+ pi0
21// It provides at the same time the CP conjugate decay
22// B0bar -->-- K- pi+ pi0
23//
24// Modification history:
25//
26// Versille September, 1997 Module created
27//
28//------------------------------------------------------------------------
29//
30#include "EvtBToKpipiCP.hh"
38#include <stdlib.h>
39#include <string>
40
41extern "C" {
42extern void evtkpipi_( double*, double*, int*, double*, double*, double*, double*, double*,
43 double*, double*, double* );
44}
45
47
48void EvtBToKpipiCP::getName( std::string& model_name ) { model_name = "BTOKPIPI_CP"; }
49
51
53
54 // check that there are 3 arguments
55 checkNArg( 3 );
56 checkNDaug( 3 );
57
59
63}
64
66
67 // added by Lange Jan4,2000
68 static EvtId B0 = EvtPDL::getId( "B0" );
69 static EvtId B0B = EvtPDL::getId( "anti-B0" );
70
71 double t;
72 EvtId other_b;
73
74 EvtCPUtil::OtherB( p, t, other_b );
75
76 EvtParticle *Kp, *pim, *pi0;
77
79 Kp = p->getDaug( 0 );
80 pim = p->getDaug( 1 );
81 pi0 = p->getDaug( 2 );
82
83 EvtVector4R p4[3];
84
85 // double dm=getArg(0);
86 double alpha = getArg( 1 );
87 double beta = getArg( 2 );
88 int iset;
89
90 static int first = 1;
91
92 if ( first == 1 )
93 {
94 iset = 10000;
95 first = 0;
96 }
97 else { iset = 0; }
98
99 double p4Kplus[4], p4piminus[4], p4gamm1[4], p4gamm2[4];
100
101 double realA, imgA, realbarA, imgbarA;
102
103 evtkpipi_( &alpha, &beta, &iset, p4Kplus, p4piminus, p4gamm1, p4gamm2, &realA, &imgA,
104 &realbarA, &imgbarA );
105
106 p4[0].set( p4Kplus[3], p4Kplus[0], p4Kplus[1], p4Kplus[2] );
107 p4[1].set( p4piminus[3], p4piminus[0], p4piminus[1], p4piminus[2] );
108 p4[2].set( p4gamm1[3] + p4gamm2[3], p4gamm1[0] + p4gamm2[0], p4gamm1[1] + p4gamm2[1],
109 p4gamm1[2] + p4gamm2[2] );
110
111 Kp->init( getDaug( 0 ), p4[0] );
112 pim->init( getDaug( 1 ), p4[1] );
113 pi0->init( getDaug( 2 ), p4[2] );
114
115 EvtComplex amp;
116
117 EvtComplex A( realA, imgA );
118 EvtComplex Abar( realbarA, imgbarA );
119
120 if ( other_b == B0B ) { amp = Abar; }
121 if ( other_b == B0 ) { amp = A; }
122
123 vertex( amp );
124
125 return;
126}
void evtkpipi_(double *, double *, int *, double *, double *, double *, double *, double *, double *, double *, double *)
double alpha
void decay(EvtParticle *p)
virtual ~EvtBToKpipiCP()
EvtDecayBase * clone()
void getName(std::string &name)
static void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition EvtCPUtil.cc:225
void vertex(const EvtComplex &amp)
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void checkSpinParent(EvtSpinType::spintype sp)
double getArg(int j)
void checkNDaug(int d1, int d2=-1)
EvtId * getDaugs()
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
EvtId getDaug(int i)
Definition EvtId.hh:27
static EvtId getId(const std::string &name)
Definition EvtPDL.cc:272
void makeDaughters(int ndaug, EvtId *id)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtParticle * getDaug(int i)
void set(int i, double d)
int t()
Definition t.c:1