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