EvtGen 2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Loading...
Searching...
No Matches
EvtBtoKpiCPiso.cpp
Go to the documentation of this file.
1
2/***********************************************************************
3* Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4* *
5* This file is part of EvtGen. *
6* *
7* EvtGen is free software: you can redistribute it and/or modify *
8* it under the terms of the GNU General Public License as published by *
9* the Free Software Foundation, either version 3 of the License, or *
10* (at your option) any later version. *
11* *
12* EvtGen is distributed in the hope that it will be useful, *
13* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15* GNU General Public License for more details. *
16* *
17* You should have received a copy of the GNU General Public License *
18* along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19***********************************************************************/
20
22
24#include "EvtGenBase/EvtPDL.hh"
27
28#include <stdlib.h>
29#include <string>
30
31std::string EvtBtoKpiCPiso::getName() const
32{
33 return "BTOKPI_CP_ISO";
34}
35
37{
38 return new EvtBtoKpiCPiso;
39}
40
42{
43 // check that there are 14 arguments
44 checkNArg( 14 );
45 checkNDaug( 2 );
46
48
51}
52
54{
55 //this might need to be revised
56
57 //added by Lange Jan4,2000
58 static const EvtId PI0 = EvtPDL::getId( "pi0" );
59 static const EvtId PIP = EvtPDL::getId( "pi+" );
60 static const EvtId PIM = EvtPDL::getId( "pi-" );
61 static const EvtId K0 = EvtPDL::getId( "K0" );
62 static const EvtId KB = EvtPDL::getId( "anti-K0" );
63 static const EvtId KP = EvtPDL::getId( "K+" );
64 static const EvtId KM = EvtPDL::getId( "K-" );
65
66 if ( ( ( getDaug( 0 ) == PI0 ) && ( getDaug( 1 ) == KP ) ) ||
67 ( ( getDaug( 0 ) == KP ) && ( getDaug( 1 ) == PI0 ) ) ) {
69 2.0 * ( getArg( 2 ) * getArg( 2 ) + getArg( 10 ) * getArg( 10 ) ) );
70 }
71
72 if ( ( ( getDaug( 0 ) == PI0 ) && ( getDaug( 1 ) == KM ) ) ||
73 ( ( getDaug( 0 ) == KM ) && ( getDaug( 1 ) == PI0 ) ) ) {
75 2.0 * ( getArg( 4 ) * getArg( 4 ) + getArg( 12 ) * getArg( 12 ) ) );
76 }
77
78 if ( ( ( getDaug( 0 ) == PIP ) && ( getDaug( 1 ) == K0 ) ) ||
79 ( ( getDaug( 0 ) == K0 ) && ( getDaug( 1 ) == PIP ) ) ) {
81 4.0 * ( getArg( 6 ) * getArg( 6 ) + getArg( 10 ) * getArg( 10 ) ) );
82 }
83
84 if ( ( ( getDaug( 0 ) == PIM ) && ( getDaug( 1 ) == KB ) ) ||
85 ( ( getDaug( 0 ) == KB ) && ( getDaug( 1 ) == PIM ) ) ) {
87 4.0 * ( getArg( 8 ) * getArg( 8 ) + getArg( 12 ) * getArg( 12 ) ) );
88 }
89
90 if ( ( ( getDaug( 0 ) == PI0 ) && ( getDaug( 1 ) == K0 ) ) ||
91 ( ( getDaug( 0 ) == K0 ) && ( getDaug( 1 ) == PI0 ) ) ) {
93 2.0 * ( getArg( 2 ) * getArg( 2 ) + getArg( 10 ) * getArg( 10 ) ) );
94 }
95
96 if ( ( ( getDaug( 0 ) == PI0 ) && ( getDaug( 1 ) == KB ) ) ||
97 ( ( getDaug( 0 ) == KB ) && ( getDaug( 1 ) == PI0 ) ) ) {
99 2.0 * ( getArg( 4 ) * getArg( 4 ) + getArg( 12 ) * getArg( 12 ) ) );
100 }
101
102 if ( ( ( getDaug( 0 ) == PIM ) && ( getDaug( 1 ) == KP ) ) ||
103 ( ( getDaug( 0 ) == KP ) && ( getDaug( 1 ) == PIM ) ) ) {
105 4.0 * ( getArg( 6 ) * getArg( 6 ) + getArg( 10 ) * getArg( 10 ) ) );
106 }
107
108 if ( ( ( getDaug( 0 ) == PIP ) && ( getDaug( 1 ) == KM ) ) ||
109 ( ( getDaug( 0 ) == KM ) && ( getDaug( 1 ) == PIP ) ) ) {
111 4.0 * ( getArg( 8 ) * getArg( 8 ) + getArg( 12 ) * getArg( 12 ) ) );
112 }
113}
114
116{
118 //added by Lange Jan4,2000
119 static const EvtId PI0 = EvtPDL::getId( "pi0" );
120 static const EvtId PIP = EvtPDL::getId( "pi+" );
121 static const EvtId PIM = EvtPDL::getId( "pi-" );
122 static const EvtId K0 = EvtPDL::getId( "K0" );
123 static const EvtId KB = EvtPDL::getId( "anti-K0" );
124 static const EvtId KP = EvtPDL::getId( "K+" );
125 static const EvtId KM = EvtPDL::getId( "K-" );
126
127 EvtComplex A;
128 EvtComplex U, Ubar, V, Vbar, W, Wbar;
129
130 U = EvtComplex( getArg( 2 ) * cos( getArg( 3 ) ),
131 getArg( 2 ) * sin( getArg( 3 ) ) );
132 Ubar = EvtComplex( getArg( 4 ) * cos( getArg( 5 ) ),
133 getArg( 4 ) * sin( getArg( 5 ) ) );
134 V = EvtComplex( getArg( 6 ) * cos( getArg( 7 ) ),
135 getArg( 6 ) * sin( getArg( 7 ) ) );
136 Vbar = EvtComplex( getArg( 8 ) * cos( getArg( 9 ) ),
137 getArg( 8 ) * sin( getArg( 9 ) ) );
138 W = EvtComplex( getArg( 10 ) * cos( getArg( 11 ) ),
139 getArg( 10 ) * sin( getArg( 11 ) ) );
140 Wbar = EvtComplex( getArg( 12 ) * cos( getArg( 13 ) ),
141 getArg( 12 ) * sin( getArg( 13 ) ) );
142
143 //depending on what combination of K pi we have, there will be different
144 //A and Abar (only A given in comments!)
145
146 if ( ( ( getDaug( 0 ) == PI0 ) && ( getDaug( 1 ) == KP ) ) ||
147 ( ( getDaug( 0 ) == KP ) && ( getDaug( 1 ) == PI0 ) ) ) {
148 //pi0 K+, so U - W
149
150 A = U - W;
151 }
152
153 if ( ( ( getDaug( 0 ) == PI0 ) && ( getDaug( 1 ) == KM ) ) ||
154 ( ( getDaug( 0 ) == KM ) && ( getDaug( 1 ) == PI0 ) ) ) {
155 //pi0 K-, so Ubar - Wbar
156
157 A = Ubar - Wbar;
158 }
159
160 if ( ( ( getDaug( 0 ) == PIP ) && ( getDaug( 1 ) == K0 ) ) ||
161 ( ( getDaug( 0 ) == K0 ) && ( getDaug( 1 ) == PIP ) ) ) {
162 //pi+ K0, so V + W
163
164 A = sqrt( 2.0 ) * ( V + W );
165 }
166
167 if ( ( ( getDaug( 0 ) == PIM ) && ( getDaug( 1 ) == KB ) ) ||
168 ( ( getDaug( 0 ) == KB ) && ( getDaug( 1 ) == PIM ) ) ) {
169 //pi- K0bar, so Vbar + Wbar
170 A = sqrt( 2.0 ) * ( Vbar + Wbar );
171 }
172
173 if ( ( ( getDaug( 0 ) == PI0 ) && ( getDaug( 1 ) == K0 ) ) ||
174 ( ( getDaug( 0 ) == K0 ) && ( getDaug( 1 ) == PI0 ) ) ) {
175 //pi0 K0, so U + W
176
177 A = U + W;
178 }
179
180 if ( ( ( getDaug( 0 ) == PI0 ) && ( getDaug( 1 ) == KB ) ) ||
181 ( ( getDaug( 0 ) == KB ) && ( getDaug( 1 ) == PI0 ) ) ) {
182 A = Ubar + Wbar;
183 }
184
185 if ( ( ( getDaug( 0 ) == PIM ) && ( getDaug( 1 ) == KP ) ) ||
186 ( ( getDaug( 0 ) == KP ) && ( getDaug( 1 ) == PIM ) ) ) {
187 //pi- K+, so V - W
188
189 A = sqrt( 2.0 ) * ( V - W );
190 }
191
192 if ( ( ( getDaug( 0 ) == PIP ) && ( getDaug( 1 ) == KM ) ) ||
193 ( ( getDaug( 0 ) == KM ) && ( getDaug( 1 ) == PIP ) ) ) {
194 A = sqrt( 2.0 ) * ( Vbar - Wbar );
195 }
196
197 vertex( A );
198
199 return;
200}
void decay(EvtParticle *p) override
std::string getName() const override
EvtDecayBase * clone() const override
void initProbMax() override
void init() override
void vertex(const EvtComplex &amp)
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
EvtDecayBase()=default
int getNDaug() const
void checkSpinParent(EvtSpinType::spintype sp)
double getArg(unsigned int j)
void setProbMax(double prbmx)
EvtId getDaug(int i) const
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
const EvtId * getDaugs() const
Definition EvtId.hh:27
static EvtId getId(const std::string &name)
Definition EvtPDL.cpp:283
double initializePhaseSpace(size_t numdaughter, const EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)