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