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
EvtLb2plnuLQCD.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 EvtLb2plnuLQCD::getName() const
52{
53 return "Lb2plnuLQCD";
54}
55
57{
58 return new EvtLb2plnuLQCD;
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
89 EvtId parnum, barnum;
90
91 parnum = getParentId();
92 barnum = getDaug( 0 );
93
94 if ( ( parnum == LAMB && barnum == PRO ) ||
95 ( parnum == LAMBB && barnum == PROB ) ) {
96 setProbMax( 22000.0 );
97 } else {
98 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
99 << "Decay does not have Lb->p setting ProbMax = 0 " << endl;
100 setProbMax( 0.0 );
101 }
102}
103
105{
106 if ( getNArg() != 4 ) {
107 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
108 << "EvtLb2plnuLQCD generator expected "
109 << " 4 arguments but found:" << getNArg() << endl;
110 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
111 << "Will terminate execution!" << endl;
112 ::abort();
113 }
114
115 if ( getNDaug() != 3 ) {
116 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
117 << "Wrong number of daughters in EvtLb2plnu.cc "
118 << " 3 daughters expected but found: " << getNDaug() << endl;
119 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
120 << "Will terminate execution!" << endl;
121 ::abort();
122 }
123
124 //We expect the parent to be a dirac particle
125 //and the daughters to be X lepton neutrino
126
131
132 if ( parenttype != EvtSpinType::DIRAC ) {
133 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
134 << "EvtLb2plnuLQCD generator expected "
135 << " a DIRAC parent, found:" << EvtPDL::name( getParentId() )
136 << endl;
137 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
138 << "Will terminate execution!" << endl;
139 ::abort();
140 }
141 if ( leptontype != EvtSpinType::DIRAC ) {
142 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
143 << "EvtLb2plnuLQCD generator expected "
144 << " a DIRAC 2nd daughter, found:" << EvtPDL::name( getDaug( 1 ) )
145 << endl;
146 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
147 << "Will terminate execution!" << endl;
148 ::abort();
149 }
150 if ( neutrinotype != EvtSpinType::NEUTRINO ) {
151 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
152 << "EvtLb2plnuLQCD generator expected "
153 << " a NEUTRINO 3rd daughter, found:" << EvtPDL::name( getDaug( 2 ) )
154 << endl;
155 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
156 << "Will terminate execution!" << endl;
157 ::abort();
158 }
159
160 //set m_ffmodel
162
163 if ( baryontype == EvtSpinType::DIRAC ) {
165 } else {
166 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
167 << "Wrong baryon spin type in EvtLb2plnuLQCD.cc "
168 << "Expected spin type " << EvtSpinType::DIRAC
169 << ", found spin type " << baryontype << endl;
170 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
171 << "Will terminate execution!" << endl;
172 ::abort();
173 }
174}
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
std::string getName() const override
void init() override
EvtSLBaryonAmp * m_calcamp
EvtDecayBase * clone() const override
void initProbMax() override
EvtSemiLeptonicFF * m_ffmodel
void decay(EvtParticle *p) override
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()