Belle II Software prerelease-11-00-00a
EvtHNLBGL.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 <EvtGenBase/EvtParticle.hh>
10#include <EvtGenBase/EvtPDL.hh>
11#include <string>
12
13#include <generators/evtgen/EvtGenModelRegister.h>
14#include <generators/evtgen/models/EvtHNLBGL.h>
15#include <generators/evtgen/models/EvtBGLFF.h>
16#include <generators/evtgen/models/EvtHNLSemiLeptonicScalarAmp.h>
17#include <generators/evtgen/models/EvtHNLSemiLeptonicVectorAmp.h>
18
20
21using std::endl;
22
27
29{
30 delete bglffmodel;
31 bglffmodel = 0;
32 delete calcamp;
33 calcamp = 0;
34}
35
36std::string EvtHNLBGL::getName()
37{
38
39 return "HNLBGL";
40
41}
42
43
44
45EvtDecayBase* EvtHNLBGL::clone()
46{
47
48 return new EvtHNLBGL;
49
50}
51
52
53void EvtHNLBGL::decay(EvtParticle* p)
54{
55
56 p->initializePhaseSpace(getNDaug(), getDaugs());
57 calcamp->CalcAmp(p, _amp2, bglffmodel);
58
59}
60
62{
63
64 EvtId parnum, mesnum, lnum, nunum;
65
66 parnum = getParentId();
67 mesnum = getDaug(0);
68 lnum = getDaug(1);
69 nunum = getDaug(2);
70
71 double mymaxprob = calcamp->CalcMaxProb(parnum, mesnum,
72 lnum, nunum, bglffmodel);
73
74 // Leptons
75 static EvtId EM = EvtPDL::getId("e-");
76 static EvtId EP = EvtPDL::getId("e+");
77 static EvtId MUM = EvtPDL::getId("mu-");
78 static EvtId MUP = EvtPDL::getId("mu+");
79 static EvtId TAUM = EvtPDL::getId("tau-");
80 static EvtId TAUP = EvtPDL::getId("tau+");
81
82 if (lnum == EP || lnum == EM || lnum == MUP || lnum == MUM) {
83 setProbMax(mymaxprob);
84 return;
85 }
86 if (lnum == TAUP || lnum == TAUM) {
87 setProbMax(6500);
88 return;
89 }
90
91
92
93}
94
95
97{
98
99 checkNDaug(3);
100
101 //We expect the parent to be a scalar
102 //and the daughters to be X lepton neutrino
103 checkSpinParent(EvtSpinType::SCALAR);
104
105 checkSpinDaughter(1, EvtSpinType::DIRAC);
106 checkSpinDaughter(2, EvtSpinType::DIRAC);
107
108 EvtSpinType::spintype d1type = EvtPDL::getSpinType(getDaug(0));
109 if (d1type == EvtSpinType::SCALAR) {
110 if (getNArg() == 8) {
111 bglffmodel = new EvtBGLFF(getArg(0), getArg(1), getArg(2), getArg(3), getArg(4), getArg(5), getArg(6), getArg(7));
113 } else {
114 EvtGenReport(EVTGEN_ERROR, "EvtGen") << "HNLBGL (N=3) model for scalar meson daughters needs 8 arguments. Sorry." << endl;
115
116 ::abort();
117 }
118 } else if (d1type == EvtSpinType::VECTOR) {
119 if (getNArg() == 6) {
120 bglffmodel = new EvtBGLFF(getArg(0), getArg(1), getArg(2), getArg(3), getArg(4), getArg(5));
122 } else {
123 EvtGenReport(EVTGEN_ERROR, "EvtGen") << "HNLBGL model for vector meson daughters needs 6 arguments. Sorry." << endl;
124 ::abort();
125 }
126 } else {
127 EvtGenReport(EVTGEN_ERROR, "EvtGen") << "HNLBGL model handles only scalar and vector meson daughters. Sorry." << endl;
128 ::abort();
129 }
130
131
132}
133
The class provides the form factors for semileptonic D and D* decays with full mass dependence.
Definition EvtBGLFF.h:17
The class provides the form factors for orbitally excited semileptonic decays.
Definition EvtHNLBGL.h:19
EvtSemiLeptonicAmp * calcamp
Pointers needed to calculate amplitude.
Definition EvtHNLBGL.h:50
void init()
Initializes module.
Definition EvtHNLBGL.cc:96
EvtHNLBGL()
Default constructor.
Definition EvtHNLBGL.cc:23
EvtDecayBase * clone()
Clones module.
Definition EvtHNLBGL.cc:45
virtual ~EvtHNLBGL()
virtual destructor
Definition EvtHNLBGL.cc:28
void initProbMax()
Sets maximal probab.
Definition EvtHNLBGL.cc:61
std::string getName()
Returns name of module.
Definition EvtHNLBGL.cc:36
EvtSemiLeptonicFF * bglffmodel
Pointers needed for FFs.
Definition EvtHNLBGL.h:47
void decay(EvtParticle *p)
Creates a decay.
Definition EvtHNLBGL.cc:53
Amplitude calculator for semileptonic HNL scalar decays.
Amplitude calculator for semileptonic HNL Vector decays.
#define B2_EVTGEN_REGISTER_MODEL(classname)
Class to register B2_EVTGEN_REGISTER_MODEL.