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