Belle II Software development
EvtBCL.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 "EvtGenBase/EvtSemiLeptonicVectorAmp.hh"
12#include "EvtGenBase/EvtSemiLeptonicScalarAmp.hh"
13#include <string>
14
15#include "generators/evtgen/EvtGenModelRegister.h"
16#include "generators/evtgen/models/EvtBCL.h"
17#include "generators/evtgen/models/EvtBCLFF.h"
18
19
20namespace Belle2 {
28
29 EvtBCL::EvtBCL() : bclmodel(nullptr), calcamp(nullptr) {}
30
32 {
33 delete bclmodel;
34 bclmodel = nullptr;
35 delete calcamp;
36 calcamp = nullptr;
37 }
38
39 std::string EvtBCL::getName()
40 {
41 return "BCL";
42 }
43
44 EvtDecayBase* EvtBCL::clone()
45 {
46 return new EvtBCL;
47 }
48
49 void EvtBCL::decay(EvtParticle* p)
50 {
51 p->initializePhaseSpace(getNDaug(), getDaugs());
52 calcamp->CalcAmp(p, _amp2, bclmodel);
53 }
54
55
57 {
58
59 EvtId parnum, mesnum, lnum, nunum;
60
61 parnum = getParentId();
62 mesnum = getDaug(0);
63 lnum = getDaug(1);
64 nunum = getDaug(2);
65
66 double mymaxprob = calcamp->CalcMaxProb(parnum, mesnum, lnum, nunum, bclmodel);
67
68 setProbMax(mymaxprob);
69 }
70
71
73 {
74
75 checkNDaug(3);
76
77 //We expect the parent to be a scalar
78 //and the daughters to be X lepton neutrino
79
80 checkSpinParent(EvtSpinType::SCALAR);
81 checkSpinDaughter(1, EvtSpinType::DIRAC);
82 checkSpinDaughter(2, EvtSpinType::NEUTRINO);
83
84 EvtSpinType::spintype mesontype = EvtPDL::getSpinType(getDaug(0));
85
86 bclmodel = new EvtBCLFF(getNArg(), getArgs());
87
88 if (mesontype == EvtSpinType::SCALAR) {
89 calcamp = new EvtSemiLeptonicScalarAmp;
90 }
91 if (mesontype == EvtSpinType::VECTOR) {
92 calcamp = new EvtSemiLeptonicVectorAmp;
93 }
94 // Tensor Meson implementation is possible here.
95
96 }
97
99}
100
BCL Form Factors.
Definition: EvtBCLFF.h:21
The class provides the form factors for orbitally excited semileptonic decays.
Definition: EvtBCL.h:24
EvtSemiLeptonicAmp * calcamp
Pointers needed to calculate amplitude.
Definition: EvtBCL.h:55
EvtSemiLeptonicFF * bclmodel
Pointers needed for FFs.
Definition: EvtBCL.h:52
void init()
Initializes module.
Definition: EvtBCL.cc:72
EvtBCL()
Default constructor.
Definition: EvtBCL.cc:29
EvtDecayBase * clone()
Clones module.
Definition: EvtBCL.cc:44
virtual ~EvtBCL()
virtual destructor
Definition: EvtBCL.cc:31
void initProbMax()
Sets maximal probab.
Definition: EvtBCL.cc:56
std::string getName()
Returns name of module.
Definition: EvtBCL.cc:39
#define B2_EVTGEN_REGISTER_MODEL(classname)
Class to register B2_EVTGEN_REGISTER_MODEL.
void decay(EvtParticle *p)
Creates a decay.
Definition: EvtBCL.cc:49
Abstract base class for different kinds of events.