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.
Evtbs2llGammaMNT.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 "BSTOGLLMNT";
46 }
47 
48 // The implementation of the clone() method
50 {
51  return new Evtbs2llGammaMNT;
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 // res_swch - resonant switching parametr:
61 // = 0 the resonant contribution switched OFF,
62 // = 1 the resonant contribution switched ON;
63 // ias - switching parametr for \alpha_s(M_Z) value:
64 // = 0 PDG 1sigma minimal alpha_s(M_Z),
65 // = 1 PDG average value alpha_s(M_Z),
66 // = 2 PDG 1sigma maximal alpha_s(M_Z).
67 // Egamma_max - photon energy cut, GeV;
68 // Wolfenstein parameterization for CKM matrix
69 // CKM_A, CKM_lambda, CKM_barrho, CKM_bareta
70 //
72 {
73  // check that there are 9 arguments
74  checkNArg( 9 );
75  // check that there are 3 daughteres
76  checkNDaug( 3 );
77 
78  // We expect that the parent to be a scalar (B-meson)
79  // and the daughters to be Gamma, l^+ and l^-
81 
82  // We expect that the first daughter is the photon
84 
85  if ( !( photontype == EvtSpinType::PHOTON ) ) {
86  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
87  << "Evtbs2llGammaMNT generator expected "
88  << " a PHOTON 1st daughter, found:"
89  << EvtPDL::name( getDaug( 0 ) ).c_str() << std::endl;
90  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
91  << "Will terminate execution!" << std::endl;
92  ::abort();
93  }
94 
95  // We expect that the second and third daughters
96  // are the ell+ and ell- == DIRAC
99 
102  if ( photontype == EvtSpinType::PHOTON ) {
103  _calcamp = new Evtbs2llGammaAmp();
104  } else {
105  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
106  << "The init()-function in the Evtbs2llGammaMNT generator:"
107  << "The absence in the radiative decay!" << std::endl;
108  ::abort();
109  }
110 }
111 
112 // Set the maximum probability of the decay
113 // differencial distribution d^2\Gamma/d\hat s d\cos\theta
115 {
116  double mymaxprob = -10.0; // maximum of the probability
117 
118  EvtId parnum, photnum, l1num, l2num;
119 
120  parnum = getParentId();
121  photnum = getDaug( 0 );
122  l1num = getDaug( 1 );
123  l2num = getDaug( 2 );
124 
125  double mu = getArg( 0 ); // the scale parameter
126  int Nf = (int)getArg( 1 ); // number of "effective" flavors
127  int res_swch = (int)getArg( 2 ); // resonant switching parametr
128  int ias = (int)getArg( 3 ); // switching parametr for \alpha_s(M_Z)
129  double Egamma_max = getArg( 4 ); // photon energy cut
130  double CKM_A = getArg( 5 );
131  double CKM_lambda = getArg( 6 );
132  double CKM_barrho = getArg( 7 );
133  double CKM_bareta = getArg( 8 );
134 
135  mymaxprob = _calcamp->CalcMaxProb( parnum, photnum, l1num, l2num,
136  _mntffmodel, _wilscoeff, mu, Nf,
137  res_swch, ias, Egamma_max, CKM_A,
138  CKM_lambda, CKM_barrho, CKM_bareta );
139 
140  if ( mymaxprob <= 0.0 ) {
141  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
142  << "The function void Evtbs2llGammaMNT::initProbMax()"
143  << "\n Unexpected value of the probability maximum!"
144  << "\n mymaxprob = " << mymaxprob << std::endl;
145  ::abort();
146  }
147 
148  setProbMax( mymaxprob );
149 }
150 
152 {
153  double mu = getArg( 0 ); // the scale parameter
154  int Nf = (int)getArg( 1 ); // number of "effective" flavors
155  int res_swch = (int)getArg( 2 ); // resonant switching parametr
156  int ias = (int)getArg( 3 ); // switching parametr for \alpha_s(M_Z)
157  double Egamma_max = getArg( 4 ); // photon energy cut
158  double CKM_A = getArg( 5 );
159  double CKM_lambda = getArg( 6 );
160  double CKM_barrho = getArg( 7 );
161  double CKM_bareta = getArg( 8 );
162 
164 
165  // The class "Evtbs2llGammaFFMNT" is the derived class of the
166  // class "Evtbs2llGammaFF" (see the file "Evtbs2llGammaFF.hh")
167  _calcamp->CalcAmp( p, _amp2, _mntffmodel, _wilscoeff, mu, Nf, res_swch, ias,
168  Egamma_max, CKM_A, CKM_lambda, CKM_barrho, CKM_bareta );
169 
170  // EvtGenReport(EVTGEN_NOTICE,"EvtGen") << "\n "
171  // << "\n The function Evtbs2llGammaMNT::decay(...) passed with arguments:"
172  // << "\n mu = " << mu << " Nf =" << Nf
173  // << "\n res_swch = " << res_swch
174  // << "\n ias = " << ias
175  // << "\n Egamma_max =" << Egamma_max
176  // << "\n CKM_A = " << CKM_A
177  // << "\n CKM_lambda = " << CKM_lambda
178  // << "\n CKM_barrho = " << CKM_barrho
179  // << "\n CKM_bareta = " << CKM_bareta
180  // << "\n "
181  // << std::endl;
182 }
void init() override
virtual ~Evtbs2llGammaMNT()
static std::string name(EvtId i)
Definition: EvtPDL.cpp:382
void CalcAmp(EvtParticle *parent, EvtAmp &amp, Evtbs2llGammaFF *formFactors, EvtbTosllWilsCoeffNLO *WilsCoeff, double mu, int Nf, int res_swch, int ias, double Egamma_min, double CKM_A, double CKM_lambda, double CKM_barrho, double CKM_bareta)
Evtbs2llGammaAmp * _calcamp
double getArg(unsigned int j)
static EvtSpinType::spintype getSpinType(EvtId i)
Definition: EvtPDL.cpp:377
Evtbs2llGammaFF * _mntffmodel
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
double CalcMaxProb(EvtId parnum, EvtId photnum, EvtId l1num, EvtId l2num, Evtbs2llGammaFF *formFactors, EvtbTosllWilsCoeffNLO *WilsCoeff, double mu, int Nf, int res_swch, int ias, double Egamma_min, double CKM_A, double CKM_lambda, double CKM_barrho, double CKM_bareta)
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void setProbMax(double prbmx)
std::string getName() override
void decay(EvtParticle *p) override
Definition: EvtId.hh:27
EvtId getParentId() const
Definition: EvtDecayBase.hh:61
void initProbMax() override
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)
EvtbTosllWilsCoeffNLO * _wilscoeff
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
EvtDecayBase * clone() override
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
int getNDaug() const
Definition: EvtDecayBase.hh:65
EvtAmp _amp2
Definition: EvtDecayAmp.hh:73
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67