evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
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 #include "EvtGenBase/EvtPatches.hh"
24 
26  const EvtTwoBodyVertex& vd ) :
28  _prop( prop ),
29  _vd( vd ),
30  _useBirthFact( false ),
31  _useDeathFact( false ),
32  _useBirthFactFF( false ),
33  _useDeathFactFF( false )
34 {
35 }
36 
39  _prop( other._prop ),
40  _vd( other._vd ),
41  _vb( other._vb ? new EvtTwoBodyVertex( *other._vb ) : nullptr ),
42  _useBirthFact( other._useBirthFact ),
43  _useDeathFact( other._useDeathFact ),
44  _useBirthFactFF( other._useBirthFactFF ),
45  _useDeathFactFF( other._useDeathFactFF )
46 {
47 }
48 
50 {
52  _prop = other._prop;
53  _vd = other._vd;
54  _vb.reset( other._vb ? new EvtTwoBodyVertex( *other._vb ) : nullptr );
55  _useBirthFact = other._useBirthFact;
56  _useDeathFact = other._useDeathFact;
57  _useBirthFactFF = other._useBirthFactFF;
58  _useDeathFactFF = other._useDeathFactFF;
59  return *this;
60 }
61 
63 {
64  // Modified vertex
65 
66  double m = p.value();
67  // keep things from crashing..
68 
69  if ( m < ( _vd.mA() + _vd.mB() ) )
70  return EvtComplex( 0., 0. );
71 
72  EvtTwoBodyKine vd( _vd.mA(), _vd.mB(), m );
73 
74  // Compute mass-dependent width for relativistic propagator
75 
77  EvtComplex amp = bw.evaluate( m );
78 
79  // Birth vertex factors
80 
81  if ( _useBirthFact ) {
82  assert( _vb );
83  if ( ( m + _vb->mB() ) < _vb->mAB() ) {
84  EvtTwoBodyKine vb( m, _vb->mB(), _vb->mAB() );
85  amp *= _vb->phaseSpaceFactor( vb, EvtTwoBodyKine::AB );
86  amp *= sqrt( ( vb.p() / _vb->pD() ) );
87 
88  if ( _useBirthFactFF ) {
89  assert( _vb );
90  amp *= _vb->formFactor( vb );
91  }
92  } else {
93  if ( _vb->L() != 0 )
94  amp = 0.;
95  }
96  }
97 
98  // Decay vertex factors
99 
100  if ( _useDeathFact ) {
102  amp *= sqrt( ( vd.p() / _vd.pD() ) );
103  }
104  if ( _useDeathFactFF )
105  amp *= _vd.formFactor( vd );
106 
107  return amp;
108 }
EvtComplex amplitude(const EvtPoint1D &p) const override
Definition: EvtMassAmp.cpp:62
double value() const
Definition: EvtPoint1D.hh:35
double pD() const
std::unique_ptr< EvtTwoBodyVertex > _vb
Definition: EvtMassAmp.hh:59
bool _useDeathFactFF
Definition: EvtMassAmp.hh:64
double formFactor(EvtTwoBodyKine x) const
double widthFactor(EvtTwoBodyKine x) const
EvtPropBreitWignerRel _prop
Definition: EvtMassAmp.hh:57
EvtMassAmp & operator=(const EvtMassAmp &other)
Definition: EvtMassAmp.cpp:49
double mA() const
bool _useBirthFact
Definition: EvtMassAmp.hh:61
double g0() const
bool _useDeathFact
Definition: EvtMassAmp.hh:62
double mB() const
EvtTwoBodyVertex _vd
Definition: EvtMassAmp.hh:58
EvtAmplitude & operator=(const EvtAmplitude &)=default
double m0() const
bool _useBirthFactFF
Definition: EvtMassAmp.hh:63
Index other(Index i, Index j)
Definition: EvtCyclic3.cpp:156
EvtMassAmp(const EvtPropBreitWignerRel &prop, const EvtTwoBodyVertex &vd)
Definition: EvtMassAmp.cpp:25
double phaseSpaceFactor(EvtTwoBodyKine x, EvtTwoBodyKine::Index) const