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.
Evtbs2llGammaISRFSR.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 
31 
32 #include <stdlib.h>
33 #include <string.h>
34 
36 {
37  delete _mntffmodel;
38  if ( _calcamp )
39  delete _calcamp;
40 }
41 
42 // The module name specification
44 {
45  return "BSTOGLLISRFSR";
46 }
47 
48 // The implementation of the clone() method
50 {
51  return new Evtbs2llGammaISRFSR;
52 }
53 
54 // The inicialization of the decay model
55 //
56 // Tn the our model we have are following 4 arguments:
57 //
58 // mu - the scale parameter, GeV;
59 // Nf - number of "effective" flavors (for b-quark Nf=5);
60 // sr - state radiation type:
61 // = 0 ISR only,
62 // = 1 FSR only,
63 // = 2 ISR + FSR (== BSTOGLLMNT model);
64 // res_swch - resonant switching parametr:
65 // = 0 the resonant contribution switched OFF,
66 // = 1 the resonant contribution switched ON;
67 // ias - switching parametr for \alpha_s(M_Z) value:
68 // = 0 PDG 1sigma minimal alpha_s(M_Z),
69 // = 1 PDG average value alpha_s(M_Z),
70 // = 2 PDG 1sigma maximal alpha_s(M_Z).
71 // Egamma_min - photon energy cut, GeV;
72 // Wolfenstein parameterization for CKM matrix
73 // CKM_A, CKM_lambda, CKM_barrho, CKM_bareta
74 //
76 {
77  // check that there are 10 arguments
78  checkNArg( 10, 11 );
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 Gamma, l^+ and l^-
85 
86  // We expect that the first daughter is the photon
88 
89  if ( !( photontype == EvtSpinType::PHOTON ) ) {
90  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
91  << "Evtbs2llGammaISRFSR generator expected "
92  << " a PHOTON 1st daughter, found:"
93  << EvtPDL::name( getDaug( 0 ) ).c_str() << std::endl;
94  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
95  << "Will terminate execution!" << std::endl;
96  ::abort();
97  }
98 
99  // We expect that the second and third daughters
100  // are the ell+ and ell- == DIRAC
103 
106  if ( photontype == EvtSpinType::PHOTON ) {
108  } else {
109  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
110  << "The init()-function in the Evtbs2llGammaISRFSR generator:"
111  << "The absence in the radiative decay!" << std::endl;
112  ::abort();
113  }
114 }
115 
116 // Set the maximum probability of the decay
117 // differencial distribution d^2\Gamma/d\hat s d\cos\theta
119 {
120  double mymaxprob = -10.0; // maximum of the probability
121 
122  EvtId parnum, photnum, l1num, l2num;
123 
124  parnum = getParentId();
125  photnum = getDaug( 0 );
126  l1num = getDaug( 1 );
127  l2num = getDaug( 2 );
128 
129  double mu = getArg( 0 ); // the scale parameter
130  int Nf = (int)getArg( 1 ); // number of "effective" flavors
131  int sr = (int)getArg( 2 ); // state radiation type
132  int res_swch = (int)getArg( 3 ); // resonant switching parametr
133  int ias = (int)getArg( 4 ); // switching parametr for \alpha_s(M_Z)
134  double Egamma_min = getArg( 5 ); // photon energy cut
135  double CKM_A = getArg( 6 );
136  double CKM_lambda = getArg( 7 );
137  double CKM_barrho = getArg( 8 );
138  double CKM_bareta = getArg( 9 );
139  double mumumass_min = 0.;
140  if ( getNArg() == 11 )
141  mumumass_min = getArg( 10 );
142 
143  mymaxprob = _calcamp->CalcMaxProb( parnum, photnum, l1num, l2num, _mntffmodel,
144  _wilscoeff, mu, Nf, sr, res_swch, ias,
145  Egamma_min, CKM_A, CKM_lambda,
146  CKM_barrho, CKM_bareta, mumumass_min );
147 
148  if ( mymaxprob <= 0.0 ) {
149  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
150  << "The function void Evtbs2llGammaISRFSR::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 sr = (int)getArg( 2 ); // state radiation type
164  int res_swch = (int)getArg( 3 ); // resonant switching parametr
165  int ias = (int)getArg( 4 ); // switching parametr for \alpha_s(M_Z)
166  double Egamma_min = getArg( 5 ); // photon energy cut
167  double CKM_A = getArg( 6 );
168  double CKM_lambda = getArg( 7 );
169  double CKM_barrho = getArg( 8 );
170  double CKM_bareta = getArg( 9 );
171  double mumumass_min = 0.;
172  if ( getNArg() == 11 )
173  mumumass_min = getArg( 10 );
174 
176 
177  // The class "Evtbs2llGammaFFMNT" is the derived class of the
178  // class "Evtbs2llGammaFF" (see the file "Evtbs2llGammaFF.hh")
179  _calcamp->CalcAmp( p, _amp2, _mntffmodel, _wilscoeff, mu, Nf, sr, res_swch,
180  ias, Egamma_min, CKM_A, CKM_lambda, CKM_barrho,
181  CKM_bareta, mumumass_min );
182 
183  // EvtGenReport(EVTGEN_NOTICE,"EvtGen") << "\n "
184  //<< "\n The function Evtbs2llGammaISRFSR::decay(...) passed with arguments:"
185  // << "\n mu = " << mu << " Nf =" << Nf
186  // << "\n res_swch = " << res_swch
187  // << "\n sr = " << sr << "\n ias = " << ias
188  // << "\n Egamma_min =" << Egamma_min
189  // << "\n CKM_A = " << CKM_A
190  // << "\n CKM_lambda = " << CKM_lambda
191  // << "\n CKM_barrho = " << CKM_barrho
192  // << "\n CKM_bareta = " << CKM_bareta
193  // << "\n "
194  // << std::endl;
195 }
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
Evtbs2llGammaFF * _mntffmodel
Evtbs2llGammaISRFSRAmp * _calcamp
std::string getName() override
void decay(EvtParticle *p) override
EvtDecayBase * clone() override
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void setProbMax(double prbmx)
Definition: EvtId.hh:27
double CalcMaxProb(EvtId parnum, EvtId photnum, EvtId l1num, EvtId l2num, Evtbs2llGammaFF *formFactors, EvtbTosllWilsCoeffNLO *WilsCoeff, double mu, int Nf, int sr, int res_swch, int ias, double Egamma_min, double CKM_A, double CKM_lambda, double CKM_barrho, double CKM_bareta, double mumumass_min)
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)
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
EvtbTosllWilsCoeffNLO * _wilscoeff
EvtAmp _amp2
Definition: EvtDecayAmp.hh:73
int getNArg() const
Definition: EvtDecayBase.hh:68
void CalcAmp(EvtParticle *parent, EvtAmp &amp, Evtbs2llGammaFF *formFactors, EvtbTosllWilsCoeffNLO *WilsCoeff, double mu, int Nf, int sr, int res_swch, int ias, double Egamma_min, double CKM_A, double CKM_lambda, double CKM_barrho, double CKM_bareta, double mumumass_min)
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67