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.
EvtbTosllMS.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  // if ( _wilscoeff ) delete _wilscoeff;
40  // if ( _msffmodel ) delete _msffmodel;
41  // if ( _calcamp ) delete _calcamp ;
42  delete _wilscoeff;
43  delete _msffmodel;
44  delete _calcamp;
45 }
46 
47 // The module name specification
48 std::string EvtbTosllMS::getName()
49 {
50  return "BTOSLLMS";
51 }
52 
53 // The implementation of the clone() method
55 {
56  return new EvtbTosllMS;
57 }
58 
59 // The inicialization of the decay model
60 //
61 // Tn the our model we have are following 4 arguments:
62 //
63 // mu - the scale parameter, GeV;
64 // Nf - number of "effective" flavors (for b-quark Nf=5);
65 // res_swch - resonant switching parametr:
66 // = 0 the resonant contribution switched OFF,
67 // = 1 the resonant contribution switched ON;
68 // ias - switching parametr for \alpha_s(M_Z) value:
69 // = 0 PDG 1sigma minimal alpha_s(M_Z),
70 // = 1 PDG average value alpha_s(M_Z),
71 // = 2 PDG 1sigma maximal alpha_s(M_Z).
72 // Wolfenstein parameterization for CKM matrix
73 // CKM_A, CKM_lambda, CKM_barrho, CKM_bareta
74 //
76 {
77  // check that there are 8 arguments
78  checkNArg( 8 );
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  << "EvtbTosllMS 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 
139  mymaxprob = _calcamp->CalcMaxProb( parnum, mesnum, l1num, l2num, _msffmodel,
140  _wilscoeff, mu, Nf, res_swch, ias, CKM_A,
141  CKM_lambda, CKM_barrho, CKM_bareta );
142 
143  if ( mymaxprob <= 0.0 ) {
144  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
145  << "The function void EvtbTosllMS::initProbMax()"
146  << "\n Unexpected value of the probability maximum!"
147  << "\n mymaxprob = " << mymaxprob << std::endl;
148  ::abort();
149  }
150 
151  setProbMax( mymaxprob );
152 }
153 
155 {
156  double mu = getArg( 0 ); // the scale parameter
157  int Nf = (int)getArg( 1 ); // number of "effective" flavors
158  int res_swch = (int)getArg( 2 ); // resonant switching parametr
159  int ias = (int)getArg( 3 ); // switching parametr for \alpha_s(M_Z)
160  double CKM_A = getArg( 4 );
161  double CKM_lambda = getArg( 5 );
162  double CKM_barrho = getArg( 6 );
163  double CKM_bareta = getArg( 7 );
164 
166 
167  // The class "EvtbTosllVectorAmpNew" is the derived class of the
168  // class "EvtbTosllAmpNew" (see the file "EvtbTosllVectorAmpNew.hh")
169  // and
170  // the class "EvtbTosllMSFF" is the derived class of the
171  // class "EvtbTosllFFNew" (see the file "EvtbTosllMSFF.hh")
172  _calcamp->CalcAmp( p, _amp2, _msffmodel, _wilscoeff, mu, Nf, res_swch, ias,
173  CKM_A, CKM_lambda, CKM_barrho, CKM_bareta );
174 
175  // EvtGenReport(EVTGEN_NOTICE,"EvtGen") << "\n The function EvtbTosllMS::decay(...) passed with arguments:"
176  // << "\n mu = " << mu << " Nf =" << Nf
177  // << " res_swch = " << res_swch
178  // << " ias = " << ias
179  // << " CKM_A = " << CKM_A
180  // << " CKM_lambda = " << CKM_lambda
181  // << " CKM_barrho = " << CKM_barrho
182  // << " CKM_bareta = " << CKM_bareta << std::endl;
183 }
void decay(EvtParticle *p) override
void init() override
Definition: EvtbTosllMS.cpp:75
static std::string name(EvtId i)
Definition: EvtPDL.cpp:382
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
virtual double CalcMaxProb(EvtId, EvtId, EvtId, EvtId, EvtbTosllFFNew *, EvtbTosllWilsCoeffNLO *, double, int, int, int, double, double, double, double)
EvtbTosllAmpNew * _calcamp
Definition: EvtbTosllMS.hh:52
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void setProbMax(double prbmx)
EvtDecayBase * clone() override
Definition: EvtbTosllMS.cpp:54
Definition: EvtId.hh:27
EvtId getParentId() const
Definition: EvtDecayBase.hh:61
virtual ~EvtbTosllMS()
Definition: EvtbTosllMS.cpp:37
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)
void checkSpinParent(EvtSpinType::spintype sp)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
EvtbTosllWilsCoeffNLO * _wilscoeff
Definition: EvtbTosllMS.hh:53
EvtbTosllFFNew * _msffmodel
Definition: EvtbTosllMS.hh:51
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
virtual void CalcAmp(EvtParticle *parent, EvtAmp &amp, EvtbTosllFFNew *formFactors, EvtbTosllWilsCoeffNLO *WilsCoeff, double, int, int, int, double, double, double, double)=0
int getNDaug() const
Definition: EvtDecayBase.hh:65
std::string getName() override
Definition: EvtbTosllMS.cpp:48
void initProbMax() override
EvtAmp _amp2
Definition: EvtDecayAmp.hh:73
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67