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.
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 
24 #include "EvtGenBase/EvtComplex.hh"
25 #include "EvtGenBase/EvtPatches.hh"
26 
27 class EvtSpinDensity;
28 class EvtId;
29 
30 class EvtAmp {
31  public:
32  EvtAmp();
33  EvtAmp( const EvtAmp& amp );
34 
35  void init( EvtId p, int ndaug, EvtId* daug );
36 
37  void setAmp( int* ind, const EvtComplex& amp );
38 
39  const EvtComplex& getAmp( int* ind ) const;
40 
42 
43  EvtSpinDensity contract( int i, const EvtAmp& a );
44  EvtAmp contract( int i, const EvtSpinDensity& rho );
45 
46  //sum over the i:th daugther of a1 and contract with parent of a2
47  EvtAmp contract( int i, const EvtAmp& a1, const EvtAmp& a2 );
48 
51 
52  EvtAmp& operator=( const EvtAmp& amp );
53 
57  void vertex( const EvtComplex& amp );
58 
62  void vertex( int i1, const EvtComplex& amp );
63 
67  void vertex( int i1, int i2, const EvtComplex& amp );
68 
72  void vertex( int i1, int i2, int i3, const EvtComplex& amp );
73 
77  void vertex( int* i1, const EvtComplex& amp );
78 
79  void dump();
80 
81  private:
82  friend class EvtDecayAmp;
83  friend class EvtKstarstargamma;
84 
85  void setNDaug( int n );
86  void setNState( int parent_states, int* daug_states );
87 
88  // the amplitudes
90 
91  // the number of daughters
92  int _ndaug;
93 
94  // the number of states of the parent
95  int _pstates;
96 
97  // number of states of the daughter
98  int dstates[10];
99 
100  // the nontrivial index of the daughter
101  int _dnontrivial[10];
102 
103  // number of nontrivial daugts+parent
105 
106  // compact nstates
107  int _nstate[5];
108 };
109 
110 #endif
EvtSpinDensity getBackwardSpinDensity(EvtSpinDensity *rho_list)
Definition: EvtAmp.cpp:204
EvtAmp()
Definition: EvtAmp.cpp:36
const double a2
int _nontrivial
Definition: EvtAmp.hh:104
const double a1
EvtSpinDensity getSpinDensity()
Definition: EvtAmp.cpp:142
void setNState(int parent_states, int *daug_states)
Definition: EvtAmp.cpp:88
const EvtComplex & getAmp(int *ind) const
Definition: EvtAmp.cpp:129
Definition: EvtId.hh:27
void vertex(const EvtComplex &amp)
Definition: EvtAmp.cpp:454
int _ndaug
Definition: EvtAmp.hh:92
int _dnontrivial[10]
Definition: EvtAmp.hh:101
Definition: EvtAmp.hh:30
int _pstates
Definition: EvtAmp.hh:95
EvtAmp & operator=(const EvtAmp &amp)
Definition: EvtAmp.cpp:490
EvtSpinDensity contract(int i, const EvtAmp &a)
Definition: EvtAmp.cpp:323
void dump()
Definition: EvtAmp.cpp:393
EvtComplex _amp[125]
Definition: EvtAmp.hh:89
EvtSpinDensity getForwardSpinDensity(EvtSpinDensity *rho_list, int k)
Definition: EvtAmp.cpp:230
int dstates[10]
Definition: EvtAmp.hh:98
void setAmp(int *ind, const EvtComplex &amp)
Definition: EvtAmp.cpp:116
void init(EvtId p, int ndaug, EvtId *daug)
Definition: EvtAmp.cpp:68
void setNDaug(int n)
Definition: EvtAmp.cpp:83
int _nstate[5]
Definition: EvtAmp.hh:107