EvtGen 2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Loading...
Searching...
No Matches
EvtBCLFF.cpp
Go to the documentation of this file.
1
2/***********************************************************************
3* Copyright 1998-2021 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/EvtId.hh"
24#include "EvtGenBase/EvtPDL.hh"
26
27#include <cmath>
28#include <cstdlib>
29#include <string>
30
31EvtBCLFF::EvtBCLFF( int numarg, double* arglist ) :
33{
34 if ( numarg > 19 ) {
35 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
36 << "Too large number of coefficients!\n";
37 ::abort();
38 }
39 for ( int i = 0; i < m_numBCLFFCoefficients; ++i ) {
40 m_BCLFFCoefficients[i] = arglist[i];
41 }
42}
43
44void EvtBCLFF::getscalarff( EvtId parent, EvtId daughter, double t, double,
45 double* fpf, double* f0f )
46{
47 if ( m_numBCLFFCoefficients != 8 ) {
48 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
49 << "Wrong number of arguments for EvtBCLFF::getscalarff!\n";
50 ::abort();
51 }
52
53 const auto mB = EvtPDL::getMeanMass( parent );
54 const auto mM = EvtPDL::getMeanMass( daughter );
55
56 const auto tplus = ( mB + mM ) * ( mB + mM );
57 const auto tzero = ( mB + mM ) * ( std::sqrt( mB ) - std::sqrt( mM ) ) *
58 ( std::sqrt( mB ) - std::sqrt( mM ) );
59
60 const auto mR2 = m_resonance1Minus * m_resonance1Minus;
61 const auto pole = 1.0 / ( 1.0 - t / mR2 );
62
63 const std::array<double, 4> bplus{ m_BCLFFCoefficients[0],
67 const std::array<double, 4> bzero{ m_BCLFFCoefficients[4],
71
72 const auto N_fpf = bplus.size();
73 const auto N_f0f = bzero.size();
74
75 auto z = [tplus, tzero]( decltype( t ) q2 ) {
76 const auto term1 = std::sqrt( tplus - q2 );
77 const auto term2 = std::sqrt( tplus - tzero );
78 return ( term1 - term2 ) / ( term1 + term2 );
79 };
80
81 double sum_fpf = 0;
82 for ( unsigned int n = 0; n < N_fpf; ++n ) {
83 sum_fpf += bplus[n] * ( std::pow( z( t ), n ) -
84 std::pow( -1, n - N_fpf ) * n / N_fpf *
85 std::pow( z( t ), N_fpf ) );
86 }
87 *fpf = pole * sum_fpf;
88
89 double sum_f0f = 0;
90 for ( unsigned int n = 0; n < N_f0f; ++n ) {
91 sum_f0f += bzero[n] * std::pow( z( t ), n );
92 }
93 *f0f = sum_f0f;
94}
95
96void EvtBCLFF::getvectorff( EvtId parent, EvtId daughter, double t, double,
97 double* a1f, double* a2f, double* vf, double* a0f )
98{
99 if ( m_numBCLFFCoefficients != 11 ) {
100 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
101 << "Wrong number of arguments for EvtBCLFF::getvectorff!\n";
102 ::abort();
103 }
104
105 const auto mB = EvtPDL::getMeanMass( parent );
106 const auto mB2 = mB * mB;
107 const auto mM = EvtPDL::getMeanMass( daughter );
108 const auto mM2 = mM * mM;
109
110 const auto tplus = ( mB + mM ) * ( mB + mM );
111 const auto tminus = ( mB - mM ) * ( mB - mM );
112 const auto tzero = tplus * ( 1.0 - std::sqrt( 1.0 - tminus / tplus ) );
113
114 const auto mR2A0 = m_resonance0Minus * m_resonance0Minus;
115 const auto mR2A1 = m_resonance1Plus * m_resonance1Plus;
116 const auto mR2A12 = m_resonance1Plus * m_resonance1Plus;
117 const auto mR2V = m_resonance1Minus * m_resonance1Minus;
118
119 const auto poleA0 = 1.0 / ( 1.0 - t / mR2A0 );
120 const auto poleA1 = 1.0 / ( 1.0 - t / mR2A1 );
121 const auto poleA12 = 1.0 / ( 1.0 - t / mR2A12 );
122 const auto poleV = 1.0 / ( 1.0 - t / mR2V );
123
124 const std::array<double, 3> A0{
125 8 * mB * mM / ( mB2 - mM2 ) * m_BCLFFCoefficients[5],
127 const std::array<double, 3> A1{ m_BCLFFCoefficients[2],
130 const std::array<double, 3> A12{ m_BCLFFCoefficients[5],
133 const std::array<double, 3> V{ m_BCLFFCoefficients[8], m_BCLFFCoefficients[9],
135
136 auto z = [tplus, tzero]( decltype( t ) q2 ) {
137 const auto term1 = std::sqrt( tplus - q2 );
138 const auto term2 = std::sqrt( tplus - tzero );
139 return ( term1 - term2 ) / ( term1 + term2 );
140 };
141
142 auto sum = [&z]( decltype( t ) q2, std::array<double, 3> par ) {
143 double tot = 0.0;
144 for ( unsigned int n = 0; n < par.size(); ++n ) {
145 tot += par[n] * std::pow( z( q2 ) - z( 0.0 ), n );
146 }
147 return tot;
148 };
149
150 auto kaellen = [mB, mM]( decltype( t ) q2 ) {
151 return ( ( mB + mM ) * ( mB + mM ) - q2 ) *
152 ( ( mB - mM ) * ( mB - mM ) - q2 );
153 };
154
155 const auto ffA0 = poleA0 * sum( t, A0 );
156 const auto ffA1 = poleA1 * sum( t, A1 );
157 const auto ffA12 = poleA12 * sum( t, A12 );
158 const auto ffV = poleV * sum( t, V );
159
160 const auto ffA2 = ( ( mB + mM ) * ( mB + mM ) * ( mB2 - mM2 - t ) * ffA1 -
161 ( 16 * mB * mM2 * ( mB + mM ) ) * ffA12 ) /
162 kaellen( t );
163
164 *a0f = ffA0;
165 *a1f = ffA1;
166 *a2f = ffA2;
167 *vf = ffV;
168}
169
170void EvtBCLFF::gettensorff( EvtId, EvtId, double, double, double*, double*,
171 double*, double* )
172{
173 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
174 << "Not implemented :gettensorff in EvtBCLFF.\n";
175 ::abort();
176}
177
178void EvtBCLFF::getbaryonff( EvtId, EvtId, double, double, double*, double*,
179 double*, double* )
180{
181 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
182 << "Not implemented :getbaryonff in EvtBCLFF.\n";
183 ::abort();
184}
185
186void EvtBCLFF::getdiracff( EvtId, EvtId, double, double, double*, double*,
187 double*, double*, double*, double* )
188{
189 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
190 << "Not implemented :getdiracff in EvtBCLFF.\n";
191 ::abort();
192}
193
194void EvtBCLFF::getraritaff( EvtId, EvtId, double, double, double*, double*,
195 double*, double*, double*, double*, double*, double* )
196{
197 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
198 << "Not implemented :getraritaff in EvtBCLFF.\n";
199 ::abort();
200}
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition EvtReport.cpp:32
@ EVTGEN_ERROR
Definition EvtReport.hh:49
void getbaryonff(EvtId, EvtId, double, double, double *, double *, double *, double *) override
Not Implemented.
Definition EvtBCLFF.cpp:178
std::array< double, 19 > m_BCLFFCoefficients
Parameters passed to the model; BCL expansion coefficients.
Definition EvtBCLFF.hh:92
int m_numBCLFFCoefficients
Total number of parameters passed to the model.
Definition EvtBCLFF.hh:90
void getdiracff(EvtId, EvtId, double, double, double *, double *, double *, double *, double *, double *) override
Not Implemented.
Definition EvtBCLFF.cpp:186
void getvectorff(EvtId parent, EvtId daughter, double t, double, double *a1f, double *a2f, double *vf, double *a0f) override
Definition EvtBCLFF.cpp:96
static constexpr double m_resonance1Minus
Mass of the 1- resonance for the parametrization of the vector FF.
Definition EvtBCLFF.hh:97
EvtBCLFF(int numarg, double *arglist)
Definition EvtBCLFF.cpp:31
void getscalarff(EvtId parent, EvtId daughter, double t, double, double *fpf, double *f0f) override
Definition EvtBCLFF.cpp:44
static constexpr double m_resonance0Minus
Mass of the 0- resonance for the parametrization of the vector FF.
Definition EvtBCLFF.hh:95
void gettensorff(EvtId parent, EvtId daughter, double t, double, double *hf, double *kf, double *bp, double *bm) override
Not Implemented.
Definition EvtBCLFF.cpp:170
void getraritaff(EvtId, EvtId, double, double, double *, double *, double *, double *, double *, double *, double *, double *) override
Not Implemented.
Definition EvtBCLFF.cpp:194
static constexpr double m_resonance1Plus
Mass of the 1+ resonance for the parametrization of the vector FF.
Definition EvtBCLFF.hh:99
Definition EvtId.hh:27
static double getMeanMass(EvtId i)
Definition EvtPDL.cpp:306