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
EvtPFermi.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
24
25#include <math.h>
26#include <stdlib.h>
27
28//----------------
29// Constructors --
30//----------------
31
32//for DFN model
33EvtPFermi::EvtPFermi( const double& a, const double& mB, const double& mb )
34{
35 m_a = a;
36 m_mb = mb;
37 m_mB = mB;
38}
39
40// for BLNP modell
41EvtPFermi::EvtPFermi( const double& Lambda, const double& b )
42{
43 m_Lambda = Lambda;
44 m_b = b;
45}
46
47//-----------
48// Methods --
49//-----------
50
51double EvtPFermi::getFPFermi( const double& kplus )
52{
53 double FKplus;
54 double x = kplus / ( m_mB - m_mb );
55
56 if ( x >= 1 )
57 return 0;
58 if ( kplus <= -m_mb )
59 return 0;
60
61 FKplus = pow( 1 - x, m_a ) * exp( ( 1 + m_a ) * x );
62
63 return FKplus;
64}
65
66// get value for the leading order exponential SF
67double EvtPFermi::getSFBLNP( const double& what )
68{
69 double SF;
70 double massB = 5.2792;
71
72 if ( what > massB )
73 return 0;
74 if ( what < 0 )
75 return 0;
76
77#if defined( __SUNPRO_CC )
78 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
79 << "The tgamma function is not available on this platform\n";
80 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
81 << "Presumably, you are getting the wrong answer, so I abort..";
82 ::abort();
83#else
84 SF = pow( m_b, m_b ) / ( tgamma( m_b ) * m_Lambda ) *
85 pow( what / m_Lambda, m_b - 1 ) * exp( -m_b * what / m_Lambda );
86#endif
87
88 return SF;
89}
EvtComplex exp(const EvtComplex &c)
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition EvtReport.cpp:32
@ EVTGEN_ERROR
Definition EvtReport.hh:49
double m_a
Definition EvtPFermi.hh:60
double getSFBLNP(const double &what)
Definition EvtPFermi.cpp:67
EvtPFermi(const double &a, const double &mB, const double &mb)
Definition EvtPFermi.cpp:33
double getFPFermi(const double &kplus)
Definition EvtPFermi.cpp:51
double m_b
Definition EvtPFermi.hh:64
double m_mB
Definition EvtPFermi.hh:62
double m_Lambda
Definition EvtPFermi.hh:63
double m_mb
Definition EvtPFermi.hh:61