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
src
EvtGenBase
EvtMassAmp.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 "
EvtGenBase/EvtMassAmp.hh
"
22
23
EvtMassAmp::EvtMassAmp
(
const
EvtPropBreitWignerRel
& prop,
24
const
EvtTwoBodyVertex
& vd ) :
25
EvtAmplitude
<
EvtPoint1D
>(),
26
m_prop
( prop ),
27
m_vd
( vd ),
28
m_useBirthFact
( false ),
29
m_useDeathFact
( false ),
30
m_useBirthFactFF
( false ),
31
m_useDeathFactFF
( false )
32
{
33
}
34
35
EvtMassAmp::EvtMassAmp
(
const
EvtMassAmp
& other ) :
36
EvtAmplitude
<
EvtPoint1D
>( other ),
37
m_prop
( other.
m_prop
),
38
m_vd
( other.
m_vd
),
39
m_vb
( other.
m_vb
? new
EvtTwoBodyVertex
( *other.
m_vb
) : nullptr ),
40
m_useBirthFact
( other.
m_useBirthFact
),
41
m_useDeathFact
( other.
m_useDeathFact
),
42
m_useBirthFactFF
( other.
m_useBirthFactFF
),
43
m_useDeathFactFF
( other.
m_useDeathFactFF
)
44
{
45
}
46
47
EvtMassAmp
&
EvtMassAmp::operator=
(
const
EvtMassAmp
& other )
48
{
49
EvtAmplitude<EvtPoint1D>::operator=
( other );
50
m_prop
= other.m_prop;
51
m_vd
= other.m_vd;
52
m_vb
.reset( other.m_vb ?
new
EvtTwoBodyVertex
( *other.m_vb ) :
nullptr
);
53
m_useBirthFact
= other.m_useBirthFact;
54
m_useDeathFact
= other.m_useDeathFact;
55
m_useBirthFactFF
= other.m_useBirthFactFF;
56
m_useDeathFactFF
= other.m_useDeathFactFF;
57
return
*
this
;
58
}
59
60
EvtComplex
EvtMassAmp::amplitude
(
const
EvtPoint1D
& p )
const
61
{
62
// Modified vertex
63
64
double
m = p.
value
();
65
// keep things from crashing..
66
67
if
( m < (
m_vd
.mA() +
m_vd
.mB() ) )
68
return
EvtComplex
( 0., 0. );
69
70
EvtTwoBodyKine
vd(
m_vd
.mA(),
m_vd
.mB(), m );
71
72
// Compute mass-dependent width for relativistic propagator
73
74
EvtPropBreitWignerRel
bw(
m_prop
.m0(),
m_prop
.g0() *
m_vd
.widthFactor( vd ) );
75
EvtComplex
amp = bw.
evaluate
( m );
76
77
// Birth vertex factors
78
79
if
(
m_useBirthFact
) {
80
assert(
m_vb
);
81
if
( ( m +
m_vb
->mB() ) <
m_vb
->mAB() ) {
82
EvtTwoBodyKine
vb( m,
m_vb
->mB(),
m_vb
->mAB() );
83
amp *=
m_vb
->phaseSpaceFactor( vb,
EvtTwoBodyKine::AB
);
84
amp *= sqrt( ( vb.
p
() /
m_vb
->pD() ) );
85
86
if
(
m_useBirthFactFF
) {
87
assert(
m_vb
);
88
amp *=
m_vb
->formFactor( vb );
89
}
90
}
else
{
91
if
(
m_vb
->L() != 0 )
92
amp = 0.;
93
}
94
}
95
96
// Decay vertex factors
97
98
if
(
m_useDeathFact
) {
99
amp *=
m_vd
.phaseSpaceFactor( vd,
EvtTwoBodyKine::AB
);
100
amp *= sqrt( ( vd.
p
() /
m_vd
.pD() ) );
101
}
102
if
(
m_useDeathFactFF
)
103
amp *=
m_vd
.formFactor( vd );
104
105
return
amp;
106
}
EvtMassAmp.hh
EvtAmplitude::evaluate
EvtComplex evaluate(const T &p) const
Definition
EvtAmplitude.hh:40
EvtAmplitude< EvtPoint1D >::EvtAmplitude
EvtAmplitude()=default
EvtAmplitude::operator=
EvtAmplitude & operator=(const EvtAmplitude &)=default
EvtComplex
Definition
EvtComplex.hh:29
EvtMassAmp::m_vb
std::unique_ptr< EvtTwoBodyVertex > m_vb
Definition
EvtMassAmp.hh:60
EvtMassAmp::EvtMassAmp
EvtMassAmp(const EvtPropBreitWignerRel &prop, const EvtTwoBodyVertex &vd)
Definition
EvtMassAmp.cpp:23
EvtMassAmp::m_prop
EvtPropBreitWignerRel m_prop
Definition
EvtMassAmp.hh:58
EvtMassAmp::m_useDeathFactFF
bool m_useDeathFactFF
Definition
EvtMassAmp.hh:65
EvtMassAmp::m_useBirthFactFF
bool m_useBirthFactFF
Definition
EvtMassAmp.hh:64
EvtMassAmp::m_vd
EvtTwoBodyVertex m_vd
Definition
EvtMassAmp.hh:59
EvtMassAmp::m_useBirthFact
bool m_useBirthFact
Definition
EvtMassAmp.hh:62
EvtMassAmp::amplitude
EvtComplex amplitude(const EvtPoint1D &p) const override
Definition
EvtMassAmp.cpp:60
EvtMassAmp::m_useDeathFact
bool m_useDeathFact
Definition
EvtMassAmp.hh:63
EvtMassAmp::operator=
EvtMassAmp & operator=(const EvtMassAmp &other)
Definition
EvtMassAmp.cpp:47
EvtPoint1D
Definition
EvtPoint1D.hh:27
EvtPoint1D::value
double value() const
Definition
EvtPoint1D.hh:35
EvtPropBreitWignerRel
Definition
EvtPropBreitWignerRel.hh:29
EvtTwoBodyKine
Definition
EvtTwoBodyKine.hh:28
EvtTwoBodyKine::AB
@ AB
Definition
EvtTwoBodyKine.hh:34
EvtTwoBodyKine::p
double p(Index i=AB) const
Definition
EvtTwoBodyKine.cpp:57
EvtTwoBodyVertex
Definition
EvtTwoBodyVertex.hh:32
Generated by
1.16.1