]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TEvtGen/EvtGenModels/EvtBtoKpiCPiso.cxx
Removing the flat makefiles
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenModels / EvtBtoKpiCPiso.cxx
CommitLineData
da0e9ce3 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: EvtBtoKpiCPiso.cc
12//
13// Description: Routine to decay B -> K pi with isospin amplitudes
14//
15// Modification history:
16//
17// RYD/NK Febuary 7, 1998 Module created
18//
19//------------------------------------------------------------------------
20//
21#include "EvtGenBase/EvtPatches.hh"
22#include <stdlib.h>
23#include "EvtGenBase/EvtParticle.hh"
24#include "EvtGenBase/EvtGenKine.hh"
25#include "EvtGenBase/EvtPDL.hh"
26#include "EvtGenBase/EvtReport.hh"
27#include "EvtGenModels/EvtBtoKpiCPiso.hh"
28#include <string>
29
30EvtBtoKpiCPiso::~EvtBtoKpiCPiso() {}
31
32std::string EvtBtoKpiCPiso::getName(){
33
34 return "BTOKPI_CP_ISO";
35
36}
37
38
39EvtDecayBase* EvtBtoKpiCPiso::clone(){
40
41 return new EvtBtoKpiCPiso;
42
43}
44
45
46void EvtBtoKpiCPiso::init(){
47
48 // check that there are 15 arguments
49 checkNArg(15);
50 checkNDaug(2);
51
52 checkSpinParent(EvtSpinType::SCALAR);
53
54 checkSpinDaughter(0,EvtSpinType::SCALAR);
55 checkSpinDaughter(1,EvtSpinType::SCALAR);
56}
57
58
59void EvtBtoKpiCPiso::initProbMax() {
60
61//this might need to be revised
62
63 //added by Lange Jan4,2000
64 static EvtId PI0=EvtPDL::getId("pi0");
65 static EvtId PIP=EvtPDL::getId("pi+");
66 static EvtId PIM=EvtPDL::getId("pi+");
67 static EvtId K0=EvtPDL::getId("K0");
68 static EvtId KB=EvtPDL::getId("anti-K0");
69 static EvtId KP=EvtPDL::getId("K+");
70 static EvtId KM=EvtPDL::getId("K-");
71
72if (((getDaug(0)==PI0) && (getDaug(1)==KP)) || ((getDaug(0)==KP) && (getDaug(1)==PI0))) {
73 setProbMax(2.0*(getArg(2)*getArg(2) + getArg(10)*getArg(10)));
74 }
75
76if (((getDaug(0)==PI0) && (getDaug(1)==KM)) || ((getDaug(0)==KM) && (getDaug(1)==PI0))) {
77 setProbMax( 2.0*(getArg(4)*getArg(4) + getArg(12)*getArg(12)));
78 }
79
80if (((getDaug(0)==PIP) && (getDaug(1)==K0)) || ((getDaug(0)==K0) && (getDaug(1)==PIP))) {
81 setProbMax( 4.0*(getArg(6)*getArg(6) + getArg(10)*getArg(10)));
82 }
83
84if (((getDaug(0)==PIM) && (getDaug(1)==KB)) || ((getDaug(0)==KB) && (getDaug(1)==PIM))) {
85 setProbMax( 4.0*(getArg(8)*getArg(8) + getArg(12)*getArg(12)));
86}
87
88if (((getDaug(0)==PI0) && (getDaug(1)==K0)) || ((getDaug(0)==K0) && (getDaug(1)==PI0))) {
89 setProbMax( 2.0*(getArg(2)*getArg(2) + getArg(10)*getArg(10)));
90}
91
92if (((getDaug(0)==PI0) && (getDaug(1)==KB)) || ((getDaug(0)==KB) && (getDaug(1)==PI0))) {
93 setProbMax( 2.0*(getArg(4)*getArg(4) + getArg(12)*getArg(12)));
94}
95
96if (((getDaug(0)==PIM) && (getDaug(1)==KP)) || ((getDaug(0)==KP) && (getDaug(1)==PIM))) {
97 setProbMax( 4.0*(getArg(6)*getArg(6) + getArg(10)*getArg(10)));
98}
99
100if (((getDaug(0)==PIP) && (getDaug(1)==KM)) || ((getDaug(0)==KM) && (getDaug(1)==PIP))) {
101 setProbMax( 4.0*(getArg(8)*getArg(8) + getArg(12)*getArg(12)));
102}
103}
104
105void EvtBtoKpiCPiso::decay( EvtParticle *p ){
106
107
108 p->initializePhaseSpace(getNDaug(),getDaugs());
109 //added by Lange Jan4,2000
110 static EvtId PI0=EvtPDL::getId("pi0");
111 static EvtId PIP=EvtPDL::getId("pi+");
112 static EvtId PIM=EvtPDL::getId("pi+");
113 static EvtId K0=EvtPDL::getId("K0");
114 static EvtId KB=EvtPDL::getId("anti-K0");
115 static EvtId KP=EvtPDL::getId("K+");
116 static EvtId KM=EvtPDL::getId("K-");
117
118
119 EvtComplex A;
120 EvtComplex U, Ubar, V, Vbar, W, Wbar;
121
122 U = EvtComplex(getArg(2)*cos(getArg(3)),getArg(2)*sin(getArg(3)));
123 Ubar = EvtComplex(getArg(4)*cos(getArg(5)),getArg(4)*sin(getArg(5)));
124 V = EvtComplex(getArg(6)*cos(getArg(7)),getArg(6)*sin(getArg(7)));
125 Vbar = EvtComplex(getArg(8)*cos(getArg(9)),getArg(8)*sin(getArg(9)));
126 W = EvtComplex(getArg(10)*cos(getArg(11)),getArg(10)*sin(getArg(11)));
127 Wbar = EvtComplex(getArg(12)*cos(getArg(13)),getArg(12)*sin(getArg(13)));
128
129//depending on what combination of K pi we have, there will be different
130//A and Abar (only A given in comments!)
131
132if (((getDaug(0)==PI0) && (getDaug(1)==KP)) || ((getDaug(0)==KP) && (getDaug(1)==PI0))) {
133
134//pi0 K+, so U - W
135
136 A = U - W;
137 }
138
139if (((getDaug(0)==PI0) && (getDaug(1)==KM)) || ((getDaug(0)==KM) && (getDaug(1)==PI0))) {
140
141//pi0 K-, so Ubar - Wbar
142
143 A = Ubar - Wbar;
144 }
145
146 if (((getDaug(0)==PIP) && (getDaug(1)==K0)) || ((getDaug(0)==K0) && (getDaug(1)==PIP))) {
147
148//pi+ K0, so V + W
149
150 A = sqrt(2.0)*(V + W);
151 }
152
153 if (((getDaug(0)==PIM) && (getDaug(1)==KB)) || ((getDaug(0)==KB) && (getDaug(1)==PIM))) {
154
155//pi- K0bar, so Vbar + Wbar
156 A = sqrt(2.0)*(Vbar + Wbar);
157 }
158
159 if (((getDaug(0)==PI0) && (getDaug(1)==K0)) || ((getDaug(0)==K0) && (getDaug(1)==PI0))) {
160
161//pi0 K0, so U + W
162
163 A= U + W;
164 }
165
166 if (((getDaug(0)==PI0) && (getDaug(1)==KB)) || ((getDaug(0)==KB) && (getDaug(1)==PI0))) {
167
168 A = Ubar + Wbar;
169 }
170
171 if (((getDaug(0)==PIM) && (getDaug(1)==KP)) || ((getDaug(0)==KP) && (getDaug(1)==PIM))) {
172
173//pi- K+, so V - W
174
175 A = sqrt(2.0)*(V - W);
176 }
177
178 if (((getDaug(0)==PIP) && (getDaug(1)==KM)) || ((getDaug(0)==KM) && (getDaug(1)==PIP))) {
179
180 A = sqrt(2.0)*(Vbar - Wbar);
181 }
182
183 vertex(A);
184
185 return ;
186}
187