evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
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 
23 #include "EvtGenBase/EvtConst.hh"
24 #include "EvtGenBase/EvtGenKine.hh"
25 #include "EvtGenBase/EvtIdSet.hh"
26 #include "EvtGenBase/EvtPDL.hh"
28 #include "EvtGenBase/EvtPatches.hh"
29 #include "EvtGenBase/EvtReport.hh"
30 
32 
33 #include <stdlib.h>
34 #include <string>
35 
36 using namespace std;
37 #ifdef D0
38 #undef D0
39 #endif
40 EvtLb2Baryonlnu::EvtLb2Baryonlnu() : ffmodel( 0 ), calcamp( 0 )
41 {
42 }
43 
45 {
46  delete ffmodel;
47  ffmodel = 0;
48  delete calcamp;
49  calcamp = 0;
50 }
51 
53 {
54  return "Lb2Baryonlnu";
55 }
56 
58 {
59  return new EvtLb2Baryonlnu;
60 }
61 
63 {
64  //This is a kludge to avoid warnings because the K_2* mass becomes to large.
65  static EvtIdSet regenerateMasses( "K_2*+", "K_2*-", "K_2*0", "anti-K_2*0",
66  "K_1+", "K_1-", "K_10", "anti-K_10",
67  "D'_1+", "D'_1-", "D'_10", "anti-D'_10" );
68 
69  if ( regenerateMasses.contains( getDaug( 0 ) ) ) {
70  p->resetFirstOrNot();
71  }
72 
74 
75  EvtComplex r00( getArg( 0 ), 0.0 );
76  EvtComplex r01( getArg( 1 ), 0.0 );
77  EvtComplex r10( getArg( 2 ), 0.0 );
78  EvtComplex r11( getArg( 3 ), 0.0 );
79 
80  calcamp->CalcAmp( p, _amp2, ffmodel, r00, r01, r10, r11 );
81 }
82 
84 {
85  static EvtId LAMB = EvtPDL::getId( "Lambda_b0" );
86  static EvtId LAMBB = EvtPDL::getId( "anti-Lambda_b0" );
87  static EvtId PRO = EvtPDL::getId( "p+" );
88  static EvtId PROB = EvtPDL::getId( "anti-p-" );
89  static EvtId N1440 = EvtPDL::getId( "N(1440)+" );
90  static EvtId N1440B = EvtPDL::getId( "anti-N(1440)-" );
91  static EvtId N1535 = EvtPDL::getId( "N(1535)+" );
92  static EvtId N1535B = EvtPDL::getId( "anti-N(1535)-" );
93  static EvtId N1520 = EvtPDL::getId( "N(1520)+" );
94  static EvtId N1520B = EvtPDL::getId( "anti-N(1520)-" );
95  static EvtId N1720 = EvtPDL::getId( "N(1720)+" );
96  static EvtId N1720B = EvtPDL::getId( "anti-N(1720)-" );
97  static EvtId N1650 = EvtPDL::getId( "N(1650)+" );
98  static EvtId N1650B = EvtPDL::getId( "anti-N(1650)-" );
99  static EvtId N1700 = EvtPDL::getId( "N(1700)+" );
100  static EvtId N1700B = EvtPDL::getId( "anti-N(1700)-" );
101  static EvtId N1710 = EvtPDL::getId( "N(1710)+" );
102  static EvtId N1710B = EvtPDL::getId( "anti-N(1710)-" );
103  static EvtId N1875 = EvtPDL::getId( "N(1875)+" );
104  static EvtId N1875B = EvtPDL::getId( "anti-N(1875)-" );
105  static EvtId N1900 = EvtPDL::getId( "N(1900)+" );
106  static EvtId N1900B = EvtPDL::getId( "anti-N(1900)-" );
107  static EvtId LAMCP = EvtPDL::getId( "Lambda_c+" );
108  static EvtId LAMCM = EvtPDL::getId( "anti-Lambda_c-" );
109  static EvtId LAMC1P = EvtPDL::getId( "Lambda_c(2593)+" );
110  static EvtId LAMC1M = EvtPDL::getId( "anti-Lambda_c(2593)-" );
111  static EvtId LAMC2P = EvtPDL::getId( "Lambda_c(2625)+" );
112  static EvtId LAMC2M = EvtPDL::getId( "anti-Lambda_c(2625)-" );
113 
114  EvtId parnum, barnum;
115 
116  parnum = getParentId();
117  barnum = getDaug( 0 );
118 
119  if ( ( parnum == LAMB && barnum == PRO ) ||
120  ( parnum == LAMBB && barnum == PROB ) ||
121  ( parnum == LAMB && barnum == N1440 ) ||
122  ( parnum == LAMBB && barnum == N1440B ) ||
123  ( parnum == LAMB && barnum == N1520 ) ||
124  ( parnum == LAMBB && barnum == N1520B ) ||
125  ( parnum == LAMB && barnum == N1535 ) ||
126  ( parnum == LAMBB && barnum == N1535B ) ||
127  ( parnum == LAMB && barnum == N1720 ) ||
128  ( parnum == LAMBB && barnum == N1720B ) ||
129  ( parnum == LAMB && barnum == N1650 ) ||
130  ( parnum == LAMBB && barnum == N1650B ) ||
131  ( parnum == LAMB && barnum == N1700 ) ||
132  ( parnum == LAMBB && barnum == N1700B ) ||
133  ( parnum == LAMB && barnum == N1710 ) ||
134  ( parnum == LAMBB && barnum == N1710B ) ||
135  ( parnum == LAMB && barnum == N1875 ) ||
136  ( parnum == LAMBB && barnum == N1875B ) ||
137  ( parnum == LAMB && barnum == N1900 ) ||
138  ( parnum == LAMBB && barnum == N1900B ) ||
139  ( parnum == LAMB && barnum == LAMCP ) ||
140  ( parnum == LAMBB && barnum == LAMCM ) ||
141  ( parnum == LAMB && barnum == LAMC1P ) ||
142  ( parnum == LAMBB && barnum == LAMC1M ) ||
143  ( parnum == LAMB && barnum == LAMC2P ) ||
144  ( parnum == LAMBB && barnum == LAMC2M ) ) {
145  setProbMax( 22000.0 );
146  } else {
147  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
148  << "Decay does not have acceptable final state baryon for this model setting ProbMax = 0 "
149  << endl;
150  setProbMax( 0.0 );
151  }
152 }
153 
155 {
156  if ( getNArg() != 4 ) {
157  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
158  << "EvtLb2Baryonlnu generator expected "
159  << " 4 arguments but found:" << getNArg() << endl;
160  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
161  << "Will terminate execution!" << endl;
162  ::abort();
163  }
164 
165  if ( getNDaug() != 3 ) {
166  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
167  << "Wrong number of daughters in EvtLb2plnu.cc "
168  << " 3 daughters expected but found: " << getNDaug() << endl;
169  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
170  << "Will terminate execution!" << endl;
171  ::abort();
172  }
173 
174  //We expect the parent to be a dirac particle
175  //and the daughters to be X lepton neutrino
176 
180  EvtSpinType::spintype neutrinotype = EvtPDL::getSpinType( getDaug( 2 ) );
181 
182  if ( parenttype != EvtSpinType::DIRAC ) {
183  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
184  << "EvtLb2Baryonlnu generator expected "
185  << " a DIRAC parent, found:" << EvtPDL::name( getParentId() )
186  << endl;
187  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
188  << "Will terminate execution!" << endl;
189  ::abort();
190  }
191  if ( leptontype != EvtSpinType::DIRAC ) {
192  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
193  << "EvtLb2Baryonlnu generator expected "
194  << " a DIRAC 2nd daughter, found:" << EvtPDL::name( getDaug( 1 ) )
195  << endl;
196  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
197  << "Will terminate execution!" << endl;
198  ::abort();
199  }
200  if ( neutrinotype != EvtSpinType::NEUTRINO ) {
201  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
202  << "EvtLb2Baryonlnu generator expected "
203  << " a NEUTRINO 3rd daughter, found:" << EvtPDL::name( getDaug( 2 ) )
204  << endl;
205  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
206  << "Will terminate execution!" << endl;
207  ::abort();
208  }
209 
210  //set ffmodel
212 
213  if ( baryontype == EvtSpinType::DIRAC ||
214  baryontype == EvtSpinType::RARITASCHWINGER ) {
215  calcamp = new EvtSLBaryonAmp;
216  } else {
217  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
218  << "Wrong baryon spin type in EvtLb2Baryonlnu.cc "
219  << "Expected spin type " << EvtSpinType::DIRAC
220  << ", found spin type " << baryontype << endl;
221  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
222  << "Will terminate execution!" << endl;
223  ::abort();
224  }
225 }
static std::string name(EvtId i)
Definition: EvtPDL.cpp:382
void resetFirstOrNot()
Definition: EvtParticle.cpp:81
double getArg(unsigned int j)
static EvtSpinType::spintype getSpinType(EvtId i)
Definition: EvtPDL.cpp:377
EvtDecayBase * clone() override
EvtSemiLeptonicFF * ffmodel
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void setProbMax(double prbmx)
Definition: EvtId.hh:27
EvtId getParentId() const
Definition: EvtDecayBase.hh:61
double initializePhaseSpace(unsigned int numdaughter, EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
void init() override
static EvtId getId(const std::string &name)
Definition: EvtPDL.cpp:287
EvtSLBaryonAmp * calcamp
int getNDaug() const
Definition: EvtDecayBase.hh:65
void CalcAmp(EvtParticle *parent, EvtAmp &amp, EvtSemiLeptonicFF *FormFactors) override
EvtAmp _amp2
Definition: EvtDecayAmp.hh:73
std::string getName() override
int contains(const EvtId id)
Definition: EvtIdSet.cpp:422
void decay(EvtParticle *p) override
int getNArg() const
Definition: EvtDecayBase.hh:68
void initProbMax() override
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67