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.
EvtBHadronic.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"
31 
33 
34 #include <stdlib.h>
35 #include <string>
36 using std::endl;
37 
38 std::string EvtBHadronic::getName()
39 {
40  return "BHADRONIC";
41 }
42 
44 {
45  return new EvtBHadronic;
46 }
47 
49 {
50  // check that there are 2 argument
51  checkNArg( 2 );
52 }
53 
55 {
56  //added by Lange Jan4,2000
57  static EvtId B0 = EvtPDL::getId( "B0" );
58  static EvtId D0 = EvtPDL::getId( "D0" );
59  static EvtId DST0 = EvtPDL::getId( "D*0" );
60  static EvtId D3P10 = EvtPDL::getId( "D'_10" );
61  static EvtId D3P20 = EvtPDL::getId( "D_2*0" );
62  static EvtId D3P00 = EvtPDL::getId( "D_0*0" );
63  static EvtId D1P10 = EvtPDL::getId( "D_10" );
64 
65  static EvtISGW2FF ffmodel;
66 
68 
70  p->mass();
71 
72  int i, j;
73 
74  for ( i = 0; i < getNDaug(); i++ ) {
75  p4[i] = p->getDaug( i )->getP4();
76  }
77 
78  int bcurrent, wcurrent;
79  int nbcurrent = 0;
80  int nwcurrent = 0;
81 
82  bcurrent = (int)getArg( 0 );
83  wcurrent = (int)getArg( 1 );
84 
85  EvtVector4C jb[5], jw[5];
86  EvtTensor4C g, tds;
87 
88  EvtVector4R p4b;
89  p4b.set( p->mass(), 0.0, 0.0, 0.0 );
90 
91  EvtVector4R q;
92  double q2;
93 
94  EvtComplex ep_meson_bb[5];
95  double f, gf, ap, am;
96  double fp, fm;
97  double hf, kf, bp, bm;
98  EvtVector4R pp, pm;
99  EvtVector4C ep_meson_b[5];
100 
101  switch ( bcurrent ) {
102  // D0
103  case 1:
104  q = p4b - p4[0];
105  q2 = q * q;
106  nbcurrent = 1;
107  ffmodel.getscalarff( B0, D0, EvtPDL::getMeanMass( D0 ),
108  EvtPDL::getMeanMass( getDaugs()[1] ), &fp, &fm );
109  jb[0] = EvtVector4C( fp * ( p4b + p4[0] ) - fm * q );
110  break;
111  // D*
112  case 2:
113  q = p4b - p4[0];
114  q2 = q * q;
115  nbcurrent = 3;
116  ffmodel.getvectorff( B0, DST0, EvtPDL::getMeanMass( DST0 ), q2, &f,
117  &gf, &ap, &am );
118 
119  g.setdiag( 1.0, -1.0, -1.0, -1.0 );
120  tds = -f * g -
121  ap * ( EvtGenFunctions::directProd( p4b, p4b ) +
122  EvtGenFunctions::directProd( p4b, p4[0] ) ) -
123  gf * EvtComplex( 0.0, 1.0 ) *
124  dual( EvtGenFunctions::directProd( p4[0] + p4b,
125  p4b - p4[0] ) ) -
126  am * ( ( EvtGenFunctions::directProd( p4b, p4b ) -
127  EvtGenFunctions::directProd( p4b, p4[0] ) ) );
128  jb[0] = tds.cont1( p->getDaug( 0 )->epsParent( 0 ).conj() );
129  jb[1] = tds.cont1( p->getDaug( 0 )->epsParent( 1 ).conj() );
130  jb[2] = tds.cont1( p->getDaug( 0 )->epsParent( 2 ).conj() );
131  break;
132  // D1
133  case 3:
134  q = p4b - p4[0];
135  q2 = q * q;
136  nbcurrent = 3;
137  ffmodel.getvectorff( B0, D3P10, EvtPDL::getMeanMass( D3P10 ), q2,
138  &f, &gf, &ap, &am );
139 
140  g.setdiag( 1.0, -1.0, -1.0, -1.0 );
141  tds = -f * g -
142  ap * ( EvtGenFunctions::directProd( p4b, p4b ) +
143  EvtGenFunctions::directProd( p4b, p4[0] ) ) -
144  gf * EvtComplex( 0.0, 1.0 ) *
145  dual( EvtGenFunctions::directProd( p4[0] + p4b,
146  p4b - p4[0] ) ) -
147  am * ( ( EvtGenFunctions::directProd( p4b, p4b ) -
148  EvtGenFunctions::directProd( p4b, p4[0] ) ) );
149  jb[0] = tds.cont1( p->getDaug( 0 )->epsParent( 0 ).conj() );
150  jb[1] = tds.cont1( p->getDaug( 0 )->epsParent( 1 ).conj() );
151  jb[2] = tds.cont1( p->getDaug( 0 )->epsParent( 2 ).conj() );
152 
153  break;
154  // D2*
155  case 4:
156  q = p4b - p4[0];
157  q2 = q * q;
158  nbcurrent = 5;
159  ffmodel.gettensorff( B0, D3P20, EvtPDL::getMeanMass( D3P20 ), q2,
160  &hf, &kf, &bp, &bm );
161  g.setdiag( 1.0, -1.0, -1.0, -1.0 );
162 
163  ep_meson_b[0] =
164  ( ( p->getDaug( 0 )->epsTensorParent( 0 ) ).cont2( p4b ) ).conj();
165  ep_meson_b[1] =
166  ( ( p->getDaug( 0 )->epsTensorParent( 1 ) ).cont2( p4b ) ).conj();
167  ep_meson_b[2] =
168  ( ( p->getDaug( 0 )->epsTensorParent( 2 ) ).cont2( p4b ) ).conj();
169  ep_meson_b[3] =
170  ( ( p->getDaug( 0 )->epsTensorParent( 3 ) ).cont2( p4b ) ).conj();
171  ep_meson_b[4] =
172  ( ( p->getDaug( 0 )->epsTensorParent( 4 ) ).cont2( p4b ) ).conj();
173 
174  pp = p4b + p4[0];
175  pm = p4b - p4[0];
176 
177  ep_meson_bb[0] = ep_meson_b[0] * ( p4b );
178  ep_meson_bb[1] = ep_meson_b[1] * ( p4b );
179  ep_meson_bb[2] = ep_meson_b[2] * ( p4b );
180  ep_meson_bb[3] = ep_meson_b[3] * ( p4b );
181  ep_meson_bb[4] = ep_meson_b[4] * ( p4b );
182 
183  jb[0] = EvtComplex( 0.0, ( 1.0 ) * hf ) *
184  dual( EvtGenFunctions::directProd( pp, pm ) )
185  .cont2( ep_meson_b[0] ) -
186  kf * ep_meson_b[0] - bp * ep_meson_bb[0] * pp -
187  bm * ep_meson_bb[0] * pm;
188 
189  jb[1] = EvtComplex( 0.0, ( 1.0 ) * hf ) *
190  dual( EvtGenFunctions::directProd( pp, pm ) )
191  .cont2( ep_meson_b[1] ) -
192  kf * ep_meson_b[1] - bp * ep_meson_bb[1] * pp -
193  bm * ep_meson_bb[1] * pm;
194 
195  jb[2] = EvtComplex( 0.0, ( 1.0 ) * hf ) *
196  dual( EvtGenFunctions::directProd( pp, pm ) )
197  .cont2( ep_meson_b[2] ) -
198  kf * ep_meson_b[2] - bp * ep_meson_bb[2] * pp -
199  bm * ep_meson_bb[2] * pm;
200 
201  jb[3] = EvtComplex( 0.0, ( 1.0 ) * hf ) *
202  dual( EvtGenFunctions::directProd( pp, pm ) )
203  .cont2( ep_meson_b[3] ) -
204  kf * ep_meson_b[3] - bp * ep_meson_bb[3] * pp -
205  bm * ep_meson_bb[3] * pm;
206 
207  jb[4] = EvtComplex( 0.0, ( 1.0 ) * hf ) *
208  dual( EvtGenFunctions::directProd( pp, pm ) )
209  .cont2( ep_meson_b[4] ) -
210  kf * ep_meson_b[4] - bp * ep_meson_bb[4] * pp -
211  bm * ep_meson_bb[4] * pm;
212  break;
213  // D_0*
214  case 5:
215  q = p4b - p4[0];
216  q2 = q * q;
217  double f, gf, ap, am;
218  nbcurrent = 3;
219  ffmodel.getvectorff( B0, D1P10, EvtPDL::getMeanMass( D1P10 ), q2,
220  &f, &gf, &ap, &am );
221  g.setdiag( 1.0, -1.0, -1.0, -1.0 );
222  tds = -f * g -
223  ap * ( EvtGenFunctions::directProd( p4b, p4b ) +
224  EvtGenFunctions::directProd( p4b, p4[0] ) ) +
225  gf * EvtComplex( 0.0, 1.0 ) *
226  dual( EvtGenFunctions::directProd( p4[0] + p4b,
227  p4b - p4[0] ) ) -
228  am * ( ( EvtGenFunctions::directProd( p4b, p4b ) -
229  EvtGenFunctions::directProd( p4b, p4[0] ) ) );
230  jb[0] = tds.cont1( p->getDaug( 0 )->epsParent( 0 ).conj() );
231  jb[1] = tds.cont1( p->getDaug( 0 )->epsParent( 1 ).conj() );
232  jb[2] = tds.cont1( p->getDaug( 0 )->epsParent( 2 ).conj() );
233  break;
234  // D_1
235  case 6:
236  q = p4b - p4[0];
237  q2 = q * q;
238  nbcurrent = 1;
239  ffmodel.getscalarff( B0, D3P00, EvtPDL::getMeanMass( D3P00 ), q2,
240  &fp, &fm );
241  jb[0] = fp * ( p4b + p4[0] ) + fm * q;
242  break;
243  default:
244  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
245  << "In EvtBHadronic, unknown hadronic current." << endl;
246  }
247 
248  double norm;
249 
250  switch ( wcurrent ) {
251  case 1:
252  case 3:
253  case 4:
254  nwcurrent = 1;
255  jw[0] = p4[getNDaug() - 1];
256  break;
257 
258  case 2:
259  case 5:
260  case 6:
261  nwcurrent = 3;
262  norm = 1.0 /
263  sqrt( p4[1].get( 0 ) * p4[1].get( 0 ) / p4[1].mass2() - 1.0 );
264  jw[0] = norm * p->getDaug( getNDaug() - 1 )->epsParent( 0 );
265  jw[1] = norm * p->getDaug( getNDaug() - 1 )->epsParent( 1 );
266  jw[2] = norm * p->getDaug( getNDaug() - 1 )->epsParent( 2 );
267  break;
268 
269  default:
270  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
271  << "In EvtBHadronic, unknown W current." << endl;
272  }
273 
274  if ( nbcurrent == 1 && nwcurrent == 1 ) {
275  vertex( jb[0] * jw[0] );
276  return;
277  }
278 
279  if ( nbcurrent == 1 ) {
280  for ( j = 0; j < nwcurrent; j++ ) {
281  vertex( j, jb[0] * jw[j] );
282  }
283  return;
284  }
285 
286  if ( nwcurrent == 1 ) {
287  for ( j = 0; j < nbcurrent; j++ ) {
288  vertex( j, jb[j] * jw[0] );
289  }
290  return;
291  }
292 
293  for ( j = 0; j < nbcurrent; j++ ) {
294  for ( i = 0; i < nwcurrent; i++ ) {
295  vertex( j, i, jb[j] * jw[i] );
296  }
297  }
298  return;
299 }
virtual EvtTensor4C epsTensorParent(int i) const
EvtTensor3C directProd(const EvtVector3C &c1, const EvtVector3C &c2)
void setdiag(double t00, double t11, double t22, double t33)
void gettensorff(EvtId parent, EvtId daught, double t, double mass, double *hf, double *kf, double *bpf, double *bmf) override
Definition: EvtISGW2FF.cpp:122
std::string getName() override
void init() override
double getArg(unsigned int j)
EvtTensor4C dual(const EvtTensor4C &t2)
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
Evt3Rank3C conj(const Evt3Rank3C &t2)
Definition: Evt3Rank3C.cpp:172
EvtVector4C cont2(const EvtVector4C &v4) const
static double getMeanMass(EvtId i)
Definition: EvtPDL.cpp:314
EvtVector4C cont1(const EvtVector4C &v4) const
void set(int i, double d)
Definition: EvtVector4R.hh:167
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void getvectorff(EvtId parent, EvtId daught, double t, double mass, double *a1f, double *a2f, double *vf, double *a0f) override
Definition: EvtISGW2FF.cpp:131
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)
virtual EvtVector4C epsParent(int i) const
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
static EvtId getId(const std::string &name)
Definition: EvtPDL.cpp:287
const EvtVector4R & getP4() const
double mass() const
int getNDaug() const
Definition: EvtDecayBase.hh:65
const int MAX_DAUG
Definition: EvtParticle.hh:42
EvtParticle * getDaug(int i)
Definition: EvtParticle.cpp:91
EvtBHadronic * clone() override
EvtVector4C conj() const
Definition: EvtVector4C.hh:202
void decay(EvtParticle *p) override
void getscalarff(EvtId parent, EvtId daught, double t, double mass, double *fpf, double *f0f) override
Definition: EvtISGW2FF.cpp:35