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.
EvtSemiLeptonicScalarAmp.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/EvtAmp.hh"
25 #include "EvtGenBase/EvtGenKine.hh"
26 #include "EvtGenBase/EvtId.hh"
27 #include "EvtGenBase/EvtPDL.hh"
29 #include "EvtGenBase/EvtPatches.hh"
30 #include "EvtGenBase/EvtReport.hh"
34 
36  EvtSemiLeptonicFF* FormFactors )
37 {
38  static EvtId EM = EvtPDL::getId( "e-" );
39  static EvtId MUM = EvtPDL::getId( "mu-" );
40  static EvtId TAUM = EvtPDL::getId( "tau-" );
41  static EvtId EP = EvtPDL::getId( "e+" );
42  static EvtId MUP = EvtPDL::getId( "mu+" );
43  static EvtId TAUP = EvtPDL::getId( "tau+" );
44 
45  //Add the lepton and neutrino 4 momenta to find q2
46 
47  EvtVector4R q = parent->getDaug( 1 )->getP4() + parent->getDaug( 2 )->getP4();
48  double q2 = ( q.mass2() );
49 
50  double fpf, f0f;
51  double mesonmass = parent->getDaug( 0 )->mass();
52  double parentmass = parent->mass();
53 
54  FormFactors->getscalarff( parent->getId(), parent->getDaug( 0 )->getId(),
55  q2, mesonmass, &fpf, &f0f );
56 
57  EvtVector4R p4b;
58  p4b.set( parent->mass(), 0.0, 0.0, 0.0 );
59  EvtVector4R p4meson = parent->getDaug( 0 )->getP4();
60  double mdiffoverq2;
61  mdiffoverq2 = parentmass * parentmass - mesonmass * mesonmass;
62  mdiffoverq2 = mdiffoverq2 / q2;
63 
64  EvtVector4C l1, l2;
65 
66  EvtId l_num = parent->getDaug( 1 )->getId();
67  EvtVector4C tds;
68 
69  if ( l_num == EM || l_num == MUM || l_num == TAUM ) {
70  tds = EvtVector4C(
71  fpf * ( p4b + p4meson - ( mdiffoverq2 * ( p4b - p4meson ) ) ) +
72  +f0f * mdiffoverq2 * ( p4b - p4meson ) );
73 
74  l1 = EvtLeptonVACurrent( parent->getDaug( 1 )->spParent( 0 ),
75  parent->getDaug( 2 )->spParentNeutrino() );
76  l2 = EvtLeptonVACurrent( parent->getDaug( 1 )->spParent( 1 ),
77  parent->getDaug( 2 )->spParentNeutrino() );
78  } else {
79  if ( l_num == EP || l_num == MUP || l_num == TAUP ) {
80  tds = EvtVector4C(
81  fpf * ( p4b + p4meson - ( mdiffoverq2 * ( p4b - p4meson ) ) ) +
82  +f0f * mdiffoverq2 * ( p4b - p4meson ) );
83 
84  l1 = EvtLeptonVACurrent( parent->getDaug( 2 )->spParentNeutrino(),
85  parent->getDaug( 1 )->spParent( 0 ) );
86  l2 = EvtLeptonVACurrent( parent->getDaug( 2 )->spParentNeutrino(),
87  parent->getDaug( 1 )->spParent( 1 ) );
88  } else {
89  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
90  << "dfnb89agngri wrong lepton number\n";
91  }
92  }
93 
94  amp.vertex( 0, l1 * tds );
95  amp.vertex( 1, l2 * tds );
96 }
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
EvtId getId() const
void set(int i, double d)
Definition: EvtVector4R.hh:167
virtual EvtDiracSpinor spParent(int) const
Definition: EvtId.hh:27
void vertex(const EvtComplex &amp)
Definition: EvtAmp.cpp:454
double mass2() const
Definition: EvtVector4R.hh:100
Definition: EvtAmp.hh:30
static EvtId getId(const std::string &name)
Definition: EvtPDL.cpp:287
const EvtVector4R & getP4() const
double mass() const
virtual EvtDiracSpinor spParentNeutrino() const
EvtVector4C EvtLeptonVACurrent(const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtParticle * getDaug(int i)
Definition: EvtParticle.cpp:91
virtual void getscalarff(EvtId parent, EvtId daught, double t, double mass, double *fpf, double *fmf)=0
void CalcAmp(EvtParticle *parent, EvtAmp &amp, EvtSemiLeptonicFF *FormFactors) override