Belle II Software development
EvtLLSW.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#include "EvtGenBase/EvtSemiLeptonicScalarAmp.hh"
13#include "EvtGenBase/EvtSemiLeptonicVectorAmp.hh"
14#include "EvtGenBase/EvtSemiLeptonicTensorAmp.hh"
15
16#include "generators/evtgen/EvtGenModelRegister.h"
17#include "generators/evtgen/models/EvtLLSW.h"
18#include "generators/evtgen/models/EvtLLSWFF.h"
19
21
23 llswffmodel(0)
24 , calcamp(0)
25{}
26
27
29{
30 delete llswffmodel;
31 llswffmodel = 0;
32 delete calcamp;
33 calcamp = 0;
34}
35
36std::string EvtLLSW::getName()
37{
38
39 return "LLSW";
40
41}
42
43
44
45EvtDecayBase* EvtLLSW::clone()
46{
47
48 return new EvtLLSW;
49
50}
51
52void EvtLLSW::decay(EvtParticle* p)
53{
54
55 p->initializePhaseSpace(getNDaug(), getDaugs());
56
57 calcamp->CalcAmp(p, _amp2, llswffmodel);
58
59}
60
62{
63
64 EvtId lnum; //parnum, mesnum;
65
66 //parnum = getParentId();
67 //mesnum = getDaug(0);
68 lnum = getDaug(1);
69
70 // Leptons
71 static EvtId EM = EvtPDL::getId("e-");
72 static EvtId EP = EvtPDL::getId("e+");
73 static EvtId MUM = EvtPDL::getId("mu-");
74 static EvtId MUP = EvtPDL::getId("mu+");
75 static EvtId TAUM = EvtPDL::getId("tau-");
76 static EvtId TAUP = EvtPDL::getId("tau+");
77
78
79 if (lnum == EP || lnum == EM || lnum == MUP || lnum == MUM) {
80 setProbMax(5000.0);
81 return;
82 }
83 if (lnum == TAUP || lnum == TAUM) {
84 setProbMax(4000.0);
85 return;
86 }
87
88
89}
90
92{
93
94 if (getNArg() < 2) checkNArg(2);
95 checkNDaug(3);
96
97 static EvtId D1P1P = EvtPDL::getId("D_1+");
98 static EvtId D1P1N = EvtPDL::getId("D_1-");
99 static EvtId D1P10 = EvtPDL::getId("D_10");
100 static EvtId D1P1B = EvtPDL::getId("anti-D_10");
101 static EvtId D3P2P = EvtPDL::getId("D_2*+");
102 static EvtId D3P2N = EvtPDL::getId("D_2*-");
103 static EvtId D3P20 = EvtPDL::getId("D_2*0");
104 static EvtId D3P2B = EvtPDL::getId("anti-D_2*0");
105
106 static EvtId DS1P = EvtPDL::getId("D_s1+");
107 static EvtId DS1M = EvtPDL::getId("D_s1-");
108 static EvtId DS2STP = EvtPDL::getId("D_s2*+");
109 static EvtId DS2STM = EvtPDL::getId("D_s2*-");
110
111 EvtId daughter = getDaug(0);
112
113 bool isNarrow = false;
114
115 if (daughter == D1P1P || daughter == D1P1N || daughter == D1P10 || daughter == D1P1B ||
116 daughter == D3P2P || daughter == D3P2N || daughter == D3P20 || daughter == D3P2B ||
117 daughter == DS1P || daughter == DS1M || daughter == DS2STP || daughter == DS2STM)
118 isNarrow = true;
119
120 //We expect the parent to be a scalar
121 //and the daughters to be X lepton neutrino
122
123 checkSpinParent(EvtSpinType::SCALAR);
124 checkSpinDaughter(1, EvtSpinType::DIRAC);
125 checkSpinDaughter(2, EvtSpinType::NEUTRINO);
126
127 EvtSpinType::spintype mesontype = EvtPDL::getSpinType(getDaug(0));
128
129 if (isNarrow)
130 llswffmodel = new EvtLLSWFF(getArg(0), getArg(1), getNArg() > 2 ? getArg(2) : 0., getNArg() > 3 ? getArg(3) : 0.);
131 else
132 llswffmodel = new EvtLLSWFF(getArg(0), getArg(1), getNArg() > 2 ? getArg(2) : 0.);
133
134 if (mesontype == EvtSpinType::SCALAR) {
135 calcamp = new EvtSemiLeptonicScalarAmp;
136 }
137 if (mesontype == EvtSpinType::VECTOR) {
138 calcamp = new EvtSemiLeptonicVectorAmp;
139 }
140 if (mesontype == EvtSpinType::TENSOR) {
141 calcamp = new EvtSemiLeptonicTensorAmp;
142 }
143
144}
145
146
147
148
149
150
151
The class provides the form factors for orbitally excited semileptonic decays.
Definition: EvtLLSWFF.h:17
The class provides the decay amplitude for orbitally excited semileptonic decays.
Definition: EvtLLSW.h:19
EvtSemiLeptonicAmp * calcamp
Pointers needed to calculate amplitude.
Definition: EvtLLSW.h:50
void init()
Initializes module.
Definition: EvtLLSW.cc:91
virtual ~EvtLLSW()
virtual destructor
Definition: EvtLLSW.cc:28
EvtLLSW()
Default constructor.
Definition: EvtLLSW.cc:22
EvtDecayBase * clone()
Clones module.
Definition: EvtLLSW.cc:45
EvtSemiLeptonicFF * llswffmodel
Pointers needed for FFs.
Definition: EvtLLSW.h:47
void initProbMax()
Sets maximal probab.
Definition: EvtLLSW.cc:61
std::string getName()
Returns name of module.
Definition: EvtLLSW.cc:36
void decay(EvtParticle *p)
Creates a decay.
Definition: EvtLLSW.cc:52
#define B2_EVTGEN_REGISTER_MODEL(classname)
Class to register B2_EVTGEN_REGISTER_MODEL.