evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
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 
23 #include "EvtGenBase/EvtGenKine.hh"
24 #include "EvtGenBase/EvtPDL.hh"
26 #include "EvtGenBase/EvtPatches.hh"
27 #include "EvtGenBase/EvtReport.hh"
28 
29 #include <stdlib.h>
30 #include <string>
31 
33 {
34  return "BTOKPI_CP_ISO";
35 }
36 
38 {
39  return new EvtBtoKpiCPiso;
40 }
41 
43 {
44  // check that there are 15 arguments
45  checkNArg( 15 );
46  checkNDaug( 2 );
47 
49 
52 }
53 
55 {
56  //this might need to be revised
57 
58  //added by Lange Jan4,2000
59  static EvtId PI0 = EvtPDL::getId( "pi0" );
60  static EvtId PIP = EvtPDL::getId( "pi+" );
61  static EvtId PIM = EvtPDL::getId( "pi+" );
62  static EvtId K0 = EvtPDL::getId( "K0" );
63  static EvtId KB = EvtPDL::getId( "anti-K0" );
64  static EvtId KP = EvtPDL::getId( "K+" );
65  static EvtId KM = EvtPDL::getId( "K-" );
66 
67  if ( ( ( getDaug( 0 ) == PI0 ) && ( getDaug( 1 ) == KP ) ) ||
68  ( ( getDaug( 0 ) == KP ) && ( getDaug( 1 ) == PI0 ) ) ) {
69  setProbMax(
70  2.0 * ( getArg( 2 ) * getArg( 2 ) + getArg( 10 ) * getArg( 10 ) ) );
71  }
72 
73  if ( ( ( getDaug( 0 ) == PI0 ) && ( getDaug( 1 ) == KM ) ) ||
74  ( ( getDaug( 0 ) == KM ) && ( getDaug( 1 ) == PI0 ) ) ) {
75  setProbMax(
76  2.0 * ( getArg( 4 ) * getArg( 4 ) + getArg( 12 ) * getArg( 12 ) ) );
77  }
78 
79  if ( ( ( getDaug( 0 ) == PIP ) && ( getDaug( 1 ) == K0 ) ) ||
80  ( ( getDaug( 0 ) == K0 ) && ( getDaug( 1 ) == PIP ) ) ) {
81  setProbMax(
82  4.0 * ( getArg( 6 ) * getArg( 6 ) + getArg( 10 ) * getArg( 10 ) ) );
83  }
84 
85  if ( ( ( getDaug( 0 ) == PIM ) && ( getDaug( 1 ) == KB ) ) ||
86  ( ( getDaug( 0 ) == KB ) && ( getDaug( 1 ) == PIM ) ) ) {
87  setProbMax(
88  4.0 * ( getArg( 8 ) * getArg( 8 ) + getArg( 12 ) * getArg( 12 ) ) );
89  }
90 
91  if ( ( ( getDaug( 0 ) == PI0 ) && ( getDaug( 1 ) == K0 ) ) ||
92  ( ( getDaug( 0 ) == K0 ) && ( getDaug( 1 ) == PI0 ) ) ) {
93  setProbMax(
94  2.0 * ( getArg( 2 ) * getArg( 2 ) + getArg( 10 ) * getArg( 10 ) ) );
95  }
96 
97  if ( ( ( getDaug( 0 ) == PI0 ) && ( getDaug( 1 ) == KB ) ) ||
98  ( ( getDaug( 0 ) == KB ) && ( getDaug( 1 ) == PI0 ) ) ) {
99  setProbMax(
100  2.0 * ( getArg( 4 ) * getArg( 4 ) + getArg( 12 ) * getArg( 12 ) ) );
101  }
102 
103  if ( ( ( getDaug( 0 ) == PIM ) && ( getDaug( 1 ) == KP ) ) ||
104  ( ( getDaug( 0 ) == KP ) && ( getDaug( 1 ) == PIM ) ) ) {
105  setProbMax(
106  4.0 * ( getArg( 6 ) * getArg( 6 ) + getArg( 10 ) * getArg( 10 ) ) );
107  }
108 
109  if ( ( ( getDaug( 0 ) == PIP ) && ( getDaug( 1 ) == KM ) ) ||
110  ( ( getDaug( 0 ) == KM ) && ( getDaug( 1 ) == PIP ) ) ) {
111  setProbMax(
112  4.0 * ( getArg( 8 ) * getArg( 8 ) + getArg( 12 ) * getArg( 12 ) ) );
113  }
114 }
115 
117 {
119  //added by Lange Jan4,2000
120  static EvtId PI0 = EvtPDL::getId( "pi0" );
121  static EvtId PIP = EvtPDL::getId( "pi+" );
122  static EvtId PIM = EvtPDL::getId( "pi+" );
123  static EvtId K0 = EvtPDL::getId( "K0" );
124  static EvtId KB = EvtPDL::getId( "anti-K0" );
125  static EvtId KP = EvtPDL::getId( "K+" );
126  static EvtId KM = EvtPDL::getId( "K-" );
127 
128  EvtComplex A;
129  EvtComplex U, Ubar, V, Vbar, W, Wbar;
130 
131  U = EvtComplex( getArg( 2 ) * cos( getArg( 3 ) ),
132  getArg( 2 ) * sin( getArg( 3 ) ) );
133  Ubar = EvtComplex( getArg( 4 ) * cos( getArg( 5 ) ),
134  getArg( 4 ) * sin( getArg( 5 ) ) );
135  V = EvtComplex( getArg( 6 ) * cos( getArg( 7 ) ),
136  getArg( 6 ) * sin( getArg( 7 ) ) );
137  Vbar = EvtComplex( getArg( 8 ) * cos( getArg( 9 ) ),
138  getArg( 8 ) * sin( getArg( 9 ) ) );
139  W = EvtComplex( getArg( 10 ) * cos( getArg( 11 ) ),
140  getArg( 10 ) * sin( getArg( 11 ) ) );
141  Wbar = EvtComplex( getArg( 12 ) * cos( getArg( 13 ) ),
142  getArg( 12 ) * sin( getArg( 13 ) ) );
143 
144  //depending on what combination of K pi we have, there will be different
145  //A and Abar (only A given in comments!)
146 
147  if ( ( ( getDaug( 0 ) == PI0 ) && ( getDaug( 1 ) == KP ) ) ||
148  ( ( getDaug( 0 ) == KP ) && ( getDaug( 1 ) == PI0 ) ) ) {
149  //pi0 K+, so U - W
150 
151  A = U - W;
152  }
153 
154  if ( ( ( getDaug( 0 ) == PI0 ) && ( getDaug( 1 ) == KM ) ) ||
155  ( ( getDaug( 0 ) == KM ) && ( getDaug( 1 ) == PI0 ) ) ) {
156  //pi0 K-, so Ubar - Wbar
157 
158  A = Ubar - Wbar;
159  }
160 
161  if ( ( ( getDaug( 0 ) == PIP ) && ( getDaug( 1 ) == K0 ) ) ||
162  ( ( getDaug( 0 ) == K0 ) && ( getDaug( 1 ) == PIP ) ) ) {
163  //pi+ K0, so V + W
164 
165  A = sqrt( 2.0 ) * ( V + W );
166  }
167 
168  if ( ( ( getDaug( 0 ) == PIM ) && ( getDaug( 1 ) == KB ) ) ||
169  ( ( getDaug( 0 ) == KB ) && ( getDaug( 1 ) == PIM ) ) ) {
170  //pi- K0bar, so Vbar + Wbar
171  A = sqrt( 2.0 ) * ( Vbar + Wbar );
172  }
173 
174  if ( ( ( getDaug( 0 ) == PI0 ) && ( getDaug( 1 ) == K0 ) ) ||
175  ( ( getDaug( 0 ) == K0 ) && ( getDaug( 1 ) == PI0 ) ) ) {
176  //pi0 K0, so U + W
177 
178  A = U + W;
179  }
180 
181  if ( ( ( getDaug( 0 ) == PI0 ) && ( getDaug( 1 ) == KB ) ) ||
182  ( ( getDaug( 0 ) == KB ) && ( getDaug( 1 ) == PI0 ) ) ) {
183  A = Ubar + Wbar;
184  }
185 
186  if ( ( ( getDaug( 0 ) == PIM ) && ( getDaug( 1 ) == KP ) ) ||
187  ( ( getDaug( 0 ) == KP ) && ( getDaug( 1 ) == PIM ) ) ) {
188  //pi- K+, so V - W
189 
190  A = sqrt( 2.0 ) * ( V - W );
191  }
192 
193  if ( ( ( getDaug( 0 ) == PIP ) && ( getDaug( 1 ) == KM ) ) ||
194  ( ( getDaug( 0 ) == KM ) && ( getDaug( 1 ) == PIP ) ) ) {
195  A = sqrt( 2.0 ) * ( Vbar - Wbar );
196  }
197 
198  vertex( A );
199 
200  return;
201 }
double getArg(unsigned int j)
void decay(EvtParticle *p) override
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void setProbMax(double prbmx)
Definition: EvtId.hh:27
void vertex(const EvtComplex &amp)
Definition: EvtDecayAmp.hh:37
double initializePhaseSpace(unsigned int numdaughter, EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
EvtDecayBase * clone() override
void checkNDaug(int d1, int d2=-1)
void checkSpinParent(EvtSpinType::spintype sp)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
static EvtId getId(const std::string &name)
Definition: EvtPDL.cpp:287
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
int getNDaug() const
Definition: EvtDecayBase.hh:65
void initProbMax() override
std::string getName() override
void init() override
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67