Belle II Software development
EvtHNLSemiLeptonicScalarAmp.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include <generators/evtgen/models/EvtHNLSemiLeptonicScalarAmp.h>
10
11#include <framework/logging/Logger.h>
12#include <EvtGenBase/EvtAmp.hh>
13#include <EvtGenBase/EvtDiracSpinor.hh>
14#include <EvtGenBase/EvtId.hh>
15#include <EvtGenBase/EvtPDL.hh>
16#include <EvtGenBase/EvtParticle.hh>
17#include <EvtGenBase/EvtSemiLeptonicFF.hh>
18#include <EvtGenBase/EvtVector4C.hh>
19
20void EvtHNLSemiLeptonicScalarAmp::CalcAmp(EvtParticle* parent, EvtAmp& amp,
21 EvtSemiLeptonicFF* FormFactors)
22{
23 static EvtId EM = EvtPDL::getId("e-");
24 static EvtId MUM = EvtPDL::getId("mu-");
25 static EvtId TAUM = EvtPDL::getId("tau-");
26 static EvtId EP = EvtPDL::getId("e+");
27 static EvtId MUP = EvtPDL::getId("mu+");
28 static EvtId TAUP = EvtPDL::getId("tau+");
29
30 //Add the lepton and neutrino 4 momenta to find q2
31
32 EvtVector4R q = parent->getDaug(1)->getP4() + parent->getDaug(2)->getP4();
33 double q2 = (q.mass2());
34
35 double fpf, f0f;
36 double mesonmass = parent->getDaug(0)->mass();
37 double parentmass = parent->mass();
38
39 FormFactors->getscalarff(parent->getId(), parent->getDaug(0)->getId(),
40 q2, mesonmass, &fpf, &f0f);
41
42 EvtVector4R p4b;
43 p4b.set(parent->mass(), 0.0, 0.0, 0.0);
44 EvtVector4R p4meson = parent->getDaug(0)->getP4();
45 double mdiffoverq2;
46 mdiffoverq2 = parentmass * parentmass - mesonmass * mesonmass;
47 mdiffoverq2 = mdiffoverq2 / q2;
48
49 EvtId l_num = parent->getDaug(1)->getId();
50 EvtVector4C tds;
51 tds = EvtVector4C(
52 fpf * (p4b + p4meson - (mdiffoverq2 * (p4b - p4meson))) +
53 +f0f * mdiffoverq2 * (p4b - p4meson));
54
55 for (int i{0}; i < 2; ++i) {
56 for (int j{0}; j < 2; ++j) {
57 const EvtVector4C current{
58 EvtLeptonVACurrent(parent->getDaug(2)->spParent(j),
59 parent->getDaug(1)->spParent(i))};
60
61 if (l_num == EM || l_num == MUM || l_num == TAUM) {
62
63 amp.vertex(i, j, current.conj() * tds);
64
65 } else if (l_num == EP || l_num == MUP || l_num == TAUP) {
66
67 amp.vertex(i, j, current * tds);
68
69 } else {
70 B2ERROR("HNLSemileptonicScalarAmp: Wrong lepton number");
71 }
72 }
73 }
74}
void CalcAmp(EvtParticle *parent, EvtAmp &amp, EvtSemiLeptonicFF *FormFactors) override
Daughters are initialized and have been added to the parent.