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 "EvtGenBase/EvtAmp.hh"
12#include "EvtGenBase/EvtDiracSpinor.hh"
13#include "EvtGenBase/EvtGenKine.hh"
14#include "EvtGenBase/EvtId.hh"
15#include "EvtGenBase/EvtPDL.hh"
16#include "EvtGenBase/EvtParticle.hh"
17#include "EvtGenBase/EvtPatches.hh"
18#include "EvtGenBase/EvtReport.hh"
19#include "EvtGenBase/EvtSemiLeptonicFF.hh"
20#include "EvtGenBase/EvtTensor4C.hh"
21#include "EvtGenBase/EvtVector4C.hh"
22
23#include <iostream>
24#include <fstream>
25#include <random>
26#include <vector>
27#include <sstream>
28#include <cstdlib>
29using std::endl;
30
31void EvtHNLSemiLeptonicScalarAmp::CalcAmp(EvtParticle* parent, EvtAmp& amp,
32 EvtSemiLeptonicFF* FormFactors)
33{
34 static EvtId EM = EvtPDL::getId("e-");
35 static EvtId MUM = EvtPDL::getId("mu-");
36 static EvtId TAUM = EvtPDL::getId("tau-");
37 static EvtId EP = EvtPDL::getId("e+");
38 static EvtId MUP = EvtPDL::getId("mu+");
39 static EvtId TAUP = EvtPDL::getId("tau+");
40
41 //Add the lepton and neutrino 4 momenta to find q2
42
43 EvtVector4R q = parent->getDaug(1)->getP4() + parent->getDaug(2)->getP4();
44 double q2 = (q.mass2());
45
46 double fpf, f0f;
47 double mesonmass = parent->getDaug(0)->mass();
48 double parentmass = parent->mass();
49
50 FormFactors->getscalarff(parent->getId(), parent->getDaug(0)->getId(),
51 q2, mesonmass, &fpf, &f0f);
52
53 EvtVector4R p4b;
54 p4b.set(parent->mass(), 0.0, 0.0, 0.0);
55 EvtVector4R p4meson = parent->getDaug(0)->getP4();
56 double mdiffoverq2;
57 mdiffoverq2 = parentmass * parentmass - mesonmass * mesonmass;
58 mdiffoverq2 = mdiffoverq2 / q2;
59
60 EvtVector4C l11, l12, l21, l22;
61
62 EvtId l_num = parent->getDaug(1)->getId();
63 EvtVector4C tds;
64
65 if (l_num == EM || l_num == MUM || l_num == TAUM) {
66 tds = EvtVector4C(
67 fpf * (p4b + p4meson - (mdiffoverq2 * (p4b - p4meson))) +
68 +f0f * mdiffoverq2 * (p4b - p4meson));
69
70 l11 = EvtLeptonVACurrent(parent->getDaug(1)->spParent(0),
71 parent->getDaug(2)->spParent(0));
72 l12 = EvtLeptonVACurrent(parent->getDaug(1)->spParent(0),
73 parent->getDaug(2)->spParent(1));
74 l21 = EvtLeptonVACurrent(parent->getDaug(1)->spParent(1),
75 parent->getDaug(2)->spParent(0));
76 l22 = EvtLeptonVACurrent(parent->getDaug(1)->spParent(1),
77 parent->getDaug(2)->spParent(1));
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 l11 = EvtLeptonVACurrent(parent->getDaug(2)->spParent(0),
85 parent->getDaug(1)->spParent(0));
86 l12 = EvtLeptonVACurrent(parent->getDaug(2)->spParent(0),
87 parent->getDaug(1)->spParent(1));
88 l21 = EvtLeptonVACurrent(parent->getDaug(2)->spParent(1),
89 parent->getDaug(1)->spParent(0));
90 l22 = EvtLeptonVACurrent(parent->getDaug(2)->spParent(1),
91 parent->getDaug(1)->spParent(1));
92 } else {
93 EvtGenReport(EVTGEN_ERROR, "EvtGen")
94 << "dfnb89agngri wrong lepton number\n";
95 }
96 }
97
98 amp.vertex(0, 0, l11 * tds);
99 amp.vertex(0, 1, l12 * tds);
100 amp.vertex(1, 0, l21 * tds);
101 amp.vertex(1, 1, l22 * tds);
102
103}
void CalcAmp(EvtParticle *parent, EvtAmp &amp, EvtSemiLeptonicFF *FormFactors) override
Daughters are initialized and have been added to the parent.