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.
EvtbTosllMSExt.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/EvtGenKine.hh"
24 #include "EvtGenBase/EvtPDL.hh"
26 #include "EvtGenBase/EvtReport.hh"
27 
33 
34 #include <stdlib.h>
35 #include <string.h>
36 
38 {
39  delete _msffmodel;
40  if ( _calcamp )
41  delete _calcamp;
42 }
43 
44 // The module name specification
46 {
47  return "BTOSLLMSEXT";
48 }
49 
50 // The implementation of the clone() method
52 {
53  return new EvtbTosllMSExt;
54 }
55 
56 // The inicialization of the decay model
57 //
58 // Tn the our model we have are following 4 arguments:
59 //
60 // mu - the scale parameter, GeV;
61 // Nf - number of "effective" flavors (for b-quark Nf=5);
62 // res_swch - resonant switching parametr:
63 // = 0 the resonant contribution switched OFF,
64 // = 1 the resonant contribution switched ON;
65 // ias - switching parametr for \alpha_s(M_Z) value:
66 // = 0 PDG 1sigma minimal alpha_s(M_Z),
67 // = 1 PDG average value alpha_s(M_Z),
68 // = 2 PDG 1sigma maximal alpha_s(M_Z).
69 // Wolfenstein parameterization for CKM matrix
70 // CKM_A, CKM_lambda, CKM_barrho, CKM_bareta
71 // Complex multiplication coefficients
72 // A7 = ReA7 + i*ImA7
73 // A10 = ReA10 + i*ImA10
74 //
76 {
77  // check that there are 12 arguments
78  checkNArg( 12 );
79  // check that there are 3 daughteres
80  checkNDaug( 3 );
81 
82  // We expect that the parent to be a scalar (B-meson)
83  // and the daughters to be K^*, l^+ and l^-
85 
86  // We expect that the first daughter is the K* == VECTOR
88 
89  if ( !( mesontype == EvtSpinType::VECTOR ||
90  mesontype == EvtSpinType::SCALAR ) ) {
91  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
92  << "EvtbTosllMSExt generator expected "
93  << " a SCALAR or VECTOR 1st daughter, found:"
94  << EvtPDL::name( getDaug( 0 ) ).c_str() << std::endl;
95  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
96  << "Will terminate execution!" << std::endl;
97  ::abort();
98  }
99 
100  // We expect that the second and third daughters
101  // are the ell+ and ell- == DIRAC
104 
105  _msffmodel = new EvtbTosllMSFF();
107  if ( mesontype == EvtSpinType::VECTOR ) {
109  }
110  if ( mesontype == EvtSpinType::SCALAR ) {
112  }
113 }
114 
115 // Set the maximum probability of the decay
116 // differencial distribution d^2\Gamma/d\hat s d\cos\theta
118 {
119  double mymaxprob = -10.0; // maximum of the probability
120 
121  EvtId parnum, mesnum, l1num, l2num;
122 
123  parnum = getParentId();
124  mesnum = getDaug( 0 );
125  l1num = getDaug( 1 );
126  l2num = getDaug( 2 );
127 
128  // EvtSpinType::spintype mesontype=EvtPDL::getSpinType(getDaug(0));
129 
130  double mu = getArg( 0 ); // the scale parameter
131  int Nf = (int)getArg( 1 ); // number of "effective" flavors
132  int res_swch = (int)getArg( 2 ); // resonant switching parametr
133  int ias = (int)getArg( 3 ); // switching parametr for \alpha_s(M_Z)
134  double CKM_A = getArg( 4 );
135  double CKM_lambda = getArg( 5 );
136  double CKM_barrho = getArg( 6 );
137  double CKM_bareta = getArg( 7 );
138  double ReA7 = getArg( 8 );
139  double ImA7 = getArg( 9 );
140  double ReA10 = getArg( 10 );
141  double ImA10 = getArg( 11 );
142 
143  mymaxprob = _calcamp->CalcMaxProb( parnum, mesnum, l1num, l2num, _msffmodel,
144  _wilscoeff, mu, Nf, res_swch, ias, CKM_A,
145  CKM_lambda, CKM_barrho, CKM_bareta, ReA7,
146  ImA7, ReA10, ImA10 );
147 
148  if ( mymaxprob <= 0.0 ) {
149  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
150  << "The function void EvtbTosllMSExt::initProbMax()"
151  << "\n Unexpected value of the probability maximum!"
152  << "\n mymaxprob = " << mymaxprob << std::endl;
153  ::abort();
154  }
155 
156  setProbMax( mymaxprob );
157 }
158 
160 {
161  double mu = getArg( 0 ); // the scale parameter
162  int Nf = (int)getArg( 1 ); // number of "effective" flavors
163  int res_swch = (int)getArg( 2 ); // resonant switching parametr
164  int ias = (int)getArg( 3 ); // switching parametr for \alpha_s(M_Z)
165  double CKM_A = getArg( 4 );
166  double CKM_lambda = getArg( 5 );
167  double CKM_barrho = getArg( 6 );
168  double CKM_bareta = getArg( 7 );
169  double ReA7 = getArg( 8 );
170  double ImA7 = getArg( 9 );
171  double ReA10 = getArg( 10 );
172  double ImA10 = getArg( 11 );
173 
175 
176  // The class "EvtbTosllVectorAmpNewExt" is the derived class of the
177  // class "EvtbTosllAmpNewExt" (see the file "EvtbTosllVectorAmpNewExt.hh")
178  // and
179  // the class "EvtbTosllMSFF" is the derived class of the
180  // class "EvtbTosllFFNew" (see the file "EvtbTosllMSFF.hh")
181  _calcamp->CalcAmp( p, _amp2, _msffmodel, _wilscoeff, mu, Nf, res_swch, ias,
182  CKM_A, CKM_lambda, CKM_barrho, CKM_bareta, ReA7, ImA7,
183  ReA10, ImA10 );
184 
185  // EvtGenReport(EVTGEN_NOTICE,"EvtGen") << "\n The function EvtbTosllMSExt::decay(...) passed with arguments:"
186  // << "\n mu = " << mu << " Nf =" << Nf
187  // << " res_swch = " << res_swch
188  // << " ias = " << ias
189  // << " CKM_A = " << CKM_A
190  // << " CKM_lambda = " << CKM_lambda
191  // << " CKM_barrho = " << CKM_barrho
192  // << " CKM_bareta = " << CKM_bareta
193  // << " ReA7 = " << ReA7
194  // << " ImA7 = " << ImA7
195  // << " ReA10 = " << ReA10
196  // << " ImA10 = " << ImA10 << std::endl;
197 }
EvtbTosllWilsCoeffNLO * _wilscoeff
static std::string name(EvtId i)
Definition: EvtPDL.cpp:382
void initProbMax() override
double getArg(unsigned int j)
static EvtSpinType::spintype getSpinType(EvtId i)
Definition: EvtPDL.cpp:377
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
void init() override
EvtDecayBase * clone() override
virtual double CalcMaxProb(EvtId, EvtId, EvtId, EvtId, EvtbTosllFFNew *, EvtbTosllWilsCoeffNLO *, double, int, int, int, double, double, double, double, double, double, double, double)
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void setProbMax(double prbmx)
Definition: EvtId.hh:27
virtual void CalcAmp(EvtParticle *parent, EvtAmp &amp, EvtbTosllFFNew *formFactors, EvtbTosllWilsCoeffNLO *WilsCoeff, double, int, int, int, double, double, double, double, double, double, double, double)=0
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 checkNDaug(int d1, int d2=-1)
std::string getName() override
void checkSpinParent(EvtSpinType::spintype sp)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
int getNDaug() const
Definition: EvtDecayBase.hh:65
EvtbTosllAmpNewExt * _calcamp
virtual ~EvtbTosllMSExt()
EvtbTosllFFNew * _msffmodel
EvtAmp _amp2
Definition: EvtDecayAmp.hh:73
void decay(EvtParticle *p) override
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67