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
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
22
24 const EvtTwoBodyVertex& vd ) :
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
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 ),
44{
45}
46
48{
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
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}
EvtComplex evaluate(const T &p) const
EvtAmplitude & operator=(const EvtAmplitude &)=default
std::unique_ptr< EvtTwoBodyVertex > m_vb
Definition EvtMassAmp.hh:60
EvtMassAmp(const EvtPropBreitWignerRel &prop, const EvtTwoBodyVertex &vd)
EvtPropBreitWignerRel m_prop
Definition EvtMassAmp.hh:58
bool m_useDeathFactFF
Definition EvtMassAmp.hh:65
bool m_useBirthFactFF
Definition EvtMassAmp.hh:64
EvtTwoBodyVertex m_vd
Definition EvtMassAmp.hh:59
bool m_useBirthFact
Definition EvtMassAmp.hh:62
EvtComplex amplitude(const EvtPoint1D &p) const override
bool m_useDeathFact
Definition EvtMassAmp.hh:63
EvtMassAmp & operator=(const EvtMassAmp &other)
double value() const
Definition EvtPoint1D.hh:35
double p(Index i=AB) const