EvtGen 2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Loading...
Searching...
No Matches
EvtLb2Baryonlnu.cpp
Go to the documentation of this file.
1
2/***********************************************************************
3* Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4* *
5* This file is part of EvtGen. *
6* *
7* EvtGen is free software: you can redistribute it and/or modify *
8* it under the terms of the GNU General Public License as published by *
9* the Free Software Foundation, either version 3 of the License, or *
10* (at your option) any later version. *
11* *
12* EvtGen is distributed in the hope that it will be useful, *
13* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15* GNU General Public License for more details. *
16* *
17* You should have received a copy of the GNU General Public License *
18* along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19***********************************************************************/
20
22
26#include "EvtGenBase/EvtPDL.hh"
29
31
32#include <stdlib.h>
33#include <string>
34
35using namespace std;
36#ifdef D0
37#undef D0
38#endif
40{
41}
42
44{
45 delete m_ffmodel;
46 m_ffmodel = nullptr;
47 delete m_calcamp;
48 m_calcamp = nullptr;
49}
50
51std::string EvtLb2Baryonlnu::getName() const
52{
53 return "Lb2Baryonlnu";
54}
55
57{
58 return new EvtLb2Baryonlnu;
59}
60
62{
63 //This is a kludge to avoid warnings because the K_2* mass becomes to large.
64 static const EvtIdSet regenerateMasses{
65 "K_2*+", "K_2*-", "K_2*0", "anti-K_2*0", "K_1+", "K_1-",
66 "K_10", "anti-K_10", "D'_1+", "D'_1-", "D'_10", "anti-D'_10" };
67
68 if ( regenerateMasses.contains( getDaug( 0 ) ) ) {
69 p->resetFirstOrNot();
70 }
71
73
74 EvtComplex r00( getArg( 0 ), 0.0 );
75 EvtComplex r01( getArg( 1 ), 0.0 );
76 EvtComplex r10( getArg( 2 ), 0.0 );
77 EvtComplex r11( getArg( 3 ), 0.0 );
78
79 m_calcamp->CalcAmp( p, m_amp2, m_ffmodel, r00, r01, r10, r11 );
80}
81
83{
84 static const EvtId LAMB = EvtPDL::getId( "Lambda_b0" );
85 static const EvtId LAMBB = EvtPDL::getId( "anti-Lambda_b0" );
86 static const EvtId PRO = EvtPDL::getId( "p+" );
87 static const EvtId PROB = EvtPDL::getId( "anti-p-" );
88 static const EvtId N1440 = EvtPDL::getId( "N(1440)+" );
89 static const EvtId N1440B = EvtPDL::getId( "anti-N(1440)-" );
90 static const EvtId N1535 = EvtPDL::getId( "N(1535)+" );
91 static const EvtId N1535B = EvtPDL::getId( "anti-N(1535)-" );
92 static const EvtId N1520 = EvtPDL::getId( "N(1520)+" );
93 static const EvtId N1520B = EvtPDL::getId( "anti-N(1520)-" );
94 static const EvtId N1720 = EvtPDL::getId( "N(1720)+" );
95 static const EvtId N1720B = EvtPDL::getId( "anti-N(1720)-" );
96 static const EvtId N1650 = EvtPDL::getId( "N(1650)+" );
97 static const EvtId N1650B = EvtPDL::getId( "anti-N(1650)-" );
98 static const EvtId N1700 = EvtPDL::getId( "N(1700)+" );
99 static const EvtId N1700B = EvtPDL::getId( "anti-N(1700)-" );
100 static const EvtId N1710 = EvtPDL::getId( "N(1710)+" );
101 static const EvtId N1710B = EvtPDL::getId( "anti-N(1710)-" );
102 static const EvtId N1875 = EvtPDL::getId( "N(1875)+" );
103 static const EvtId N1875B = EvtPDL::getId( "anti-N(1875)-" );
104 static const EvtId N1900 = EvtPDL::getId( "N(1900)+" );
105 static const EvtId N1900B = EvtPDL::getId( "anti-N(1900)-" );
106 static const EvtId LAMCP = EvtPDL::getId( "Lambda_c+" );
107 static const EvtId LAMCM = EvtPDL::getId( "anti-Lambda_c-" );
108 static const EvtId LAMC1P = EvtPDL::getId( "Lambda_c(2593)+" );
109 static const EvtId LAMC1M = EvtPDL::getId( "anti-Lambda_c(2593)-" );
110 static const EvtId LAMC2P = EvtPDL::getId( "Lambda_c(2625)+" );
111 static const EvtId LAMC2M = EvtPDL::getId( "anti-Lambda_c(2625)-" );
112
113 EvtId parnum, barnum;
114
115 parnum = getParentId();
116 barnum = getDaug( 0 );
117
118 if ( ( parnum == LAMB && barnum == PRO ) ||
119 ( parnum == LAMBB && barnum == PROB ) ||
120 ( parnum == LAMB && barnum == N1440 ) ||
121 ( parnum == LAMBB && barnum == N1440B ) ||
122 ( parnum == LAMB && barnum == N1520 ) ||
123 ( parnum == LAMBB && barnum == N1520B ) ||
124 ( parnum == LAMB && barnum == N1535 ) ||
125 ( parnum == LAMBB && barnum == N1535B ) ||
126 ( parnum == LAMB && barnum == N1720 ) ||
127 ( parnum == LAMBB && barnum == N1720B ) ||
128 ( parnum == LAMB && barnum == N1650 ) ||
129 ( parnum == LAMBB && barnum == N1650B ) ||
130 ( parnum == LAMB && barnum == N1700 ) ||
131 ( parnum == LAMBB && barnum == N1700B ) ||
132 ( parnum == LAMB && barnum == N1710 ) ||
133 ( parnum == LAMBB && barnum == N1710B ) ||
134 ( parnum == LAMB && barnum == N1875 ) ||
135 ( parnum == LAMBB && barnum == N1875B ) ||
136 ( parnum == LAMB && barnum == N1900 ) ||
137 ( parnum == LAMBB && barnum == N1900B ) ||
138 ( parnum == LAMB && barnum == LAMCP ) ||
139 ( parnum == LAMBB && barnum == LAMCM ) ||
140 ( parnum == LAMB && barnum == LAMC1P ) ||
141 ( parnum == LAMBB && barnum == LAMC1M ) ||
142 ( parnum == LAMB && barnum == LAMC2P ) ||
143 ( parnum == LAMBB && barnum == LAMC2M ) ) {
144 setProbMax( 22000.0 );
145 } else {
146 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
147 << "Decay does not have acceptable final state baryon for this model setting ProbMax = 0 "
148 << endl;
149 setProbMax( 0.0 );
150 }
151}
152
154{
155 if ( getNArg() != 4 ) {
156 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
157 << "EvtLb2Baryonlnu generator expected "
158 << " 4 arguments but found:" << getNArg() << endl;
159 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
160 << "Will terminate execution!" << endl;
161 ::abort();
162 }
163
164 if ( getNDaug() != 3 ) {
165 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
166 << "Wrong number of daughters in EvtLb2plnu.cc "
167 << " 3 daughters expected but found: " << getNDaug() << endl;
168 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
169 << "Will terminate execution!" << endl;
170 ::abort();
171 }
172
173 //We expect the parent to be a dirac particle
174 //and the daughters to be X lepton neutrino
175
180
181 if ( parenttype != EvtSpinType::DIRAC ) {
182 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
183 << "EvtLb2Baryonlnu generator expected "
184 << " a DIRAC parent, found:" << EvtPDL::name( getParentId() )
185 << endl;
186 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
187 << "Will terminate execution!" << endl;
188 ::abort();
189 }
190 if ( leptontype != EvtSpinType::DIRAC ) {
191 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
192 << "EvtLb2Baryonlnu generator expected "
193 << " a DIRAC 2nd daughter, found:" << EvtPDL::name( getDaug( 1 ) )
194 << endl;
195 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
196 << "Will terminate execution!" << endl;
197 ::abort();
198 }
199 if ( neutrinotype != EvtSpinType::NEUTRINO ) {
200 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
201 << "EvtLb2Baryonlnu generator expected "
202 << " a NEUTRINO 3rd daughter, found:" << EvtPDL::name( getDaug( 2 ) )
203 << endl;
204 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
205 << "Will terminate execution!" << endl;
206 ::abort();
207 }
208
209 //set m_ffmodel
211
212 if ( baryontype == EvtSpinType::DIRAC ||
213 baryontype == EvtSpinType::RARITASCHWINGER ) {
215 } else {
216 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
217 << "Wrong baryon spin type in EvtLb2Baryonlnu.cc "
218 << "Expected spin type " << EvtSpinType::DIRAC
219 << ", found spin type " << baryontype << endl;
220 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
221 << "Will terminate execution!" << endl;
222 ::abort();
223 }
224}
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition EvtReport.cpp:32
@ EVTGEN_ERROR
Definition EvtReport.hh:49
EvtAmp m_amp2
EvtDecayBase()=default
int getNDaug() const
int getNArg() const
double getArg(unsigned int j)
void setProbMax(double prbmx)
EvtId getParentId() const
EvtId getDaug(int i) const
const EvtId * getDaugs() const
bool contains(const EvtId &id) const
Definition EvtIdSet.cpp:46
Definition EvtId.hh:27
void initProbMax() override
EvtDecayBase * clone() const override
void init() override
std::string getName() const override
void decay(EvtParticle *p) override
EvtSLBaryonAmp * m_calcamp
EvtSemiLeptonicFF * m_ffmodel
static EvtSpinType::spintype getSpinType(EvtId i)
Definition EvtPDL.cpp:371
static std::string name(EvtId i)
Definition EvtPDL.cpp:376
static EvtId getId(const std::string &name)
Definition EvtPDL.cpp:283
double initializePhaseSpace(size_t numdaughter, const EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
void resetFirstOrNot()