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.
EvtbsToLLLL.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
43 std::string EvtbsToLLLL::getName()
44 {
45  return "BQTOLLLL";
46 }
47 
48 // The implementation of the clone() method
50 {
51  return new EvtbsToLLLL;
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 // Wolfenstein parameterization for CKM matrix
68 // CKM_A, CKM_lambda, CKM_barrho, CKM_bareta
69 //
71 {
72  // check that there are 8 arguments
73  checkNArg( 8 );
74  // check that there are 4 daughteres
75  checkNDaug( 4 );
76 
77  // We expect that the parent to be a scalar (B-meson)
78  // and the daughters to be l^+, l^-, l^+ and l^-
80 
81  // We expect that the all daughters are the ell+ or ell- == DIRAC
86 
89  _calcamp = new EvtbsToLLLLAmp();
90 }
91 
92 // Set the maximum probability of the decay
94 {
95  double mymaxprob = -10.0; // maximum of the probability
96 
97  // EvtId parnum, l1num, l2num, l3num, l4num;
98 
99  // parnum = getParentId();
100  // l1num = getDaug(0);
101  // l2num = getDaug(1);
102  // l3num = getDaug(2);
103  // l4num = getDaug(3);
104 
105  // EvtSpinType::spintype mesontype=EvtPDL::getSpinType(getDaug(0));
106 
107  // double mu = getArg(0); // the scale parameter
108  // int Nf = (int) getArg(1); // number of "effective" flavors
109  // int res_swch = (int) getArg(2); // resonant switching parametr
110  // int ias = (int) getArg(3); // switching parametr for \alpha_s(M_Z)
111  // double CKM_A = getArg(4);
112  // double CKM_lambda = getArg(5);
113  // double CKM_barrho = getArg(6);
114  // double CKM_bareta = getArg(7);
115 
116  mymaxprob = _calcamp->CalcMaxProb(
117  // parnum, l1num,l2num, l3num,l4num,
118  // _mntffmodel, _wilscoeff,
119  // mu, Nf, res_swch, ias,
120  // CKM_A,CKM_lambda,CKM_barrho,CKM_bareta
121  );
122 
123  if ( mymaxprob <= 0.0 ) {
124  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
125  << "The function void EvtbsToLLLL::initProbMax()"
126  << "\n Unexpected value of the probability maximum!"
127  << "\n mymaxprob = " << mymaxprob << std::endl;
128  ::abort();
129  }
130 
131  setProbMax( mymaxprob );
132 }
133 
135 {
136  double mu = getArg( 0 ); // the scale parameter
137  int Nf = (int)getArg( 1 ); // number of "effective" flavors
138  int res_swch = (int)getArg( 2 ); // resonant switching parametr
139  int ias = (int)getArg( 3 ); // switching parametr for \alpha_s(M_Z)
140  double CKM_A = getArg( 4 );
141  double CKM_lambda = getArg( 5 );
142  double CKM_barrho = getArg( 6 );
143  double CKM_bareta = getArg( 7 );
144 
146 
147  _calcamp->CalcAmp( p, _amp2, _mntffmodel, _wilscoeff, mu, Nf, res_swch, ias,
148  CKM_A, CKM_lambda, CKM_barrho, CKM_bareta );
149 
150  // EvtGenReport(EVTGEN_NOTICE,"EvtGen") << "\n The function EvtbTosllMSExt::decay(...) passed with arguments:"
151  // << "\n mu = " << mu << " Nf =" << Nf
152  // << " res_swch = " << res_swch
153  // << " ias = " << ias
154  // << " CKM_A = " << CKM_A
155  // << " CKM_lambda = " << CKM_lambda
156  // << " CKM_barrho = " << CKM_barrho
157  // << " CKM_bareta = " << CKM_bareta
158  // << " ReA7 = " << ReA7
159  // << " ImA7 = " << ImA7
160  // << " ReA10 = " << ReA10
161  // << " ImA10 = " << ImA10 << std::endl;
162 }
EvtDecayBase * clone() override
Definition: EvtbsToLLLL.cpp:49
double getArg(unsigned int j)
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void setProbMax(double prbmx)
void decay(EvtParticle *p) override
double initializePhaseSpace(unsigned int numdaughter, EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
Evtbs2llGammaFF * _mntffmodel
Definition: EvtbsToLLLL.hh:44
void init() override
Definition: EvtbsToLLLL.cpp:70
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)
virtual ~EvtbsToLLLL()
Definition: EvtbsToLLLL.cpp:35
int getNDaug() const
Definition: EvtDecayBase.hh:65
void initProbMax() override
Definition: EvtbsToLLLL.cpp:93
std::string getName() override
Definition: EvtbsToLLLL.cpp:43
EvtAmp _amp2
Definition: EvtDecayAmp.hh:73
void CalcAmp(EvtParticle *parent, EvtAmp &amp, Evtbs2llGammaFF *formFactors, EvtbTosllWilsCoeffNLO *WilsCoeff, double mu, int Nf, int res_swch, int ias, double CKM_A, double CKM_lambda, double CKM_barrho, double CKM_bareta)
EvtbsToLLLLAmp * _calcamp
Definition: EvtbsToLLLL.hh:45
EvtbTosllWilsCoeffNLO * _wilscoeff
Definition: EvtbsToLLLL.hh:46