EvtGen
2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Toggle main menu visibility
Loading...
Searching...
No Matches
src
EvtGenModels
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
21
#include "
EvtGenModels/EvtPFermi.hh
"
22
23
#include "
EvtGenBase/EvtReport.hh
"
24
25
#include <math.h>
26
#include <stdlib.h>
27
28
//----------------
29
// Constructors --
30
//----------------
31
32
//for DFN model
33
EvtPFermi::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
41
EvtPFermi::EvtPFermi
(
const
double
& Lambda,
const
double
& b )
42
{
43
m_Lambda
= Lambda;
44
m_b
= b;
45
}
46
47
//-----------
48
// Methods --
49
//-----------
50
51
double
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
67
double
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
}
exp
EvtComplex exp(const EvtComplex &c)
Definition
EvtComplex.hh:242
EvtPFermi.hh
EvtReport.hh
EvtGenReport
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition
EvtReport.cpp:32
EVTGEN_ERROR
@ EVTGEN_ERROR
Definition
EvtReport.hh:49
EvtPFermi::m_a
double m_a
Definition
EvtPFermi.hh:60
EvtPFermi::getSFBLNP
double getSFBLNP(const double &what)
Definition
EvtPFermi.cpp:67
EvtPFermi::EvtPFermi
EvtPFermi(const double &a, const double &mB, const double &mb)
Definition
EvtPFermi.cpp:33
EvtPFermi::getFPFermi
double getFPFermi(const double &kplus)
Definition
EvtPFermi.cpp:51
EvtPFermi::m_b
double m_b
Definition
EvtPFermi.hh:64
EvtPFermi::m_mB
double m_mB
Definition
EvtPFermi.hh:62
EvtPFermi::m_Lambda
double m_Lambda
Definition
EvtPFermi.hh:63
EvtPFermi::m_mb
double m_mb
Definition
EvtPFermi.hh:61
Generated by
1.17.0