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
EvtAmp.hh
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#ifndef EVTAMP_HH
22#define EVTAMP_HH
23
25
26class EvtSpinDensity;
27class EvtId;
28
29class EvtAmp {
30 public:
31 EvtAmp();
32 EvtAmp( const EvtAmp& amp );
33
34 void init( EvtId p, int ndaug, const EvtId* daug );
35
36 void setAmp( int* ind, const EvtComplex& amp );
37
38 const EvtComplex& getAmp( int* ind ) const;
39
41
42 EvtSpinDensity contract( int i, const EvtAmp& a ) const;
43 EvtAmp contract( int i, const EvtSpinDensity& rho ) const;
44
45 //sum over the i:th daugther of a1 and contract with parent of a2
46 EvtAmp contract( int i, const EvtAmp& a1, const EvtAmp& a2 ) const;
47
48 EvtSpinDensity getForwardSpinDensity( EvtSpinDensity* rho_list, int k ) const;
50
51 EvtAmp& operator=( const EvtAmp& amp );
52
56 void vertex( const EvtComplex& amp );
57
61 void vertex( int i1, const EvtComplex& amp );
62
66 void vertex( int i1, int i2, const EvtComplex& amp );
67
71 void vertex( int i1, int i2, int i3, const EvtComplex& amp );
72
76 void vertex( int* i1, const EvtComplex& amp );
77
78 void dump() const;
79
80 private:
81 friend class EvtDecayAmp;
82
83 void setNDaug( int n );
84 void setNState( int parent_states, int* daug_states );
85
86 // the amplitudes
88
89 // the number of daughters
91
92 // the number of states of the parent
94
95 // number of states of the daughter
96 int m_dstates[10];
97
98 // the nontrivial index of the daughter
100
101 // number of nontrivial daugts+parent
103
104 // compact nstates
105 int m_nstate[5];
106};
107
108#endif
const double a2
const double a1
void setNDaug(int n)
Definition EvtAmp.cpp:82
const EvtComplex & getAmp(int *ind) const
Definition EvtAmp.cpp:128
void setAmp(int *ind, const EvtComplex &amp)
Definition EvtAmp.cpp:115
void vertex(const EvtComplex &amp)
Definition EvtAmp.cpp:453
int m_pstates
Definition EvtAmp.hh:93
EvtSpinDensity contract(int i, const EvtAmp &a) const
Definition EvtAmp.cpp:322
friend class EvtDecayAmp
Definition EvtAmp.hh:81
int m_dstates[10]
Definition EvtAmp.hh:96
EvtAmp()
Definition EvtAmp.cpp:35
void dump() const
Definition EvtAmp.cpp:392
EvtSpinDensity getBackwardSpinDensity(EvtSpinDensity *rho_list) const
Definition EvtAmp.cpp:203
int m_dnontrivial[10]
Definition EvtAmp.hh:99
int m_nstate[5]
Definition EvtAmp.hh:105
EvtComplex m_amp[125]
Definition EvtAmp.hh:87
int m_nontrivial
Definition EvtAmp.hh:102
EvtSpinDensity getSpinDensity() const
Definition EvtAmp.cpp:141
EvtSpinDensity getForwardSpinDensity(EvtSpinDensity *rho_list, int k) const
Definition EvtAmp.cpp:229
EvtAmp & operator=(const EvtAmp &amp)
Definition EvtAmp.cpp:489
void setNState(int parent_states, int *daug_states)
Definition EvtAmp.cpp:87
void init(EvtId p, int ndaug, const EvtId *daug)
Definition EvtAmp.cpp:67
int m_ndaug
Definition EvtAmp.hh:90
Definition EvtId.hh:27