EvtGen
2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Toggle main menu visibility
Loading...
Searching...
No Matches
EvtGenBase
EvtTensor3C.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 EVTTENSOR3C_HH
22
#define EVTTENSOR3C_HH
23
24
#include "
EvtGenBase/EvtComplex.hh
"
25
26
#include <iostream>
27
28
class
EvtVector3C
;
29
class
EvtVector3R
;
30
31
class
EvtTensor3C
;
32
33
namespace
EvtGenFunctions
{
34
EvtTensor3C
eps
(
const
EvtVector3R& v );
35
EvtTensor3C
rotateEuler
(
const
EvtTensor3C& v,
double
phi,
double
theta,
36
double
ksi );
37
EvtTensor3C
directProd
(
const
EvtVector3C& c1,
const
EvtVector3C& c2 );
38
EvtTensor3C
directProd
(
const
EvtVector3C& c1,
const
EvtVector3R& c2 );
39
EvtTensor3C
directProd
(
const
EvtVector3R& c1,
const
EvtVector3R& c2 );
40
}
// namespace EvtGenFunctions
41
42
class
EvtTensor3C
final {
43
friend
EvtTensor3C
operator*
(
const
EvtComplex
& c,
const
EvtTensor3C
& t2 );
44
friend
EvtTensor3C
operator*
(
const
double
d,
const
EvtTensor3C
& t2 );
45
friend
EvtTensor3C
operator*
(
const
EvtTensor3C
& t2,
const
EvtComplex
& c );
46
friend
EvtTensor3C
operator*
(
const
EvtTensor3C
& t2,
const
double
d );
47
friend
EvtTensor3C
operator+
(
const
EvtTensor3C
& t1,
const
EvtTensor3C
& t2 );
48
friend
EvtTensor3C
operator-
(
const
EvtTensor3C
& t1,
const
EvtTensor3C
& t2 );
49
friend
EvtTensor3C
EvtGenFunctions::directProd
(
const
EvtVector3C
& c1,
50
const
EvtVector3C
& c2 );
51
friend
EvtTensor3C
EvtGenFunctions::directProd
(
const
EvtVector3C
& c1,
52
const
EvtVector3R
& c2 );
53
friend
EvtTensor3C
EvtGenFunctions::directProd
(
const
EvtVector3R
& c1,
54
const
EvtVector3R
& c2 );
55
friend
EvtTensor3C
conj
(
const
EvtTensor3C
& t2 );
56
//Contract the second index of two tensors result(i,j) = t1(i,k)t2(j,k)
57
friend
EvtTensor3C
cont22
(
const
EvtTensor3C
& t1,
const
EvtTensor3C
& t2 );
58
//Contract the first index of two tensors result(i,j) = t1(k,i)t2(k,j)
59
friend
EvtTensor3C
cont11
(
const
EvtTensor3C
& t1,
const
EvtTensor3C
& t2 );
60
//Contract the last index of eps_{ijk} with w
61
friend
EvtTensor3C
EvtGenFunctions::eps
(
const
EvtVector3R
& v );
62
friend
std::ostream&
operator<<
( std::ostream& c,
const
EvtTensor3C
& v );
63
64
public
:
65
EvtTensor3C
();
66
EvtTensor3C
(
const
EvtTensor3C
& t1 );
67
EvtTensor3C
(
double
d11,
double
d22,
double
d33 );
68
EvtTensor3C
&
operator=
(
const
EvtTensor3C
& t1 );
69
inline
void
set
(
int
i,
int
j,
const
EvtComplex
& c );
70
inline
const
EvtComplex
&
get
(
int
i,
int
j )
const
;
71
inline
EvtComplex
trace
()
const
;
72
static
const
EvtTensor3C
&
id
();
73
void
zero
();
74
void
applyRotateEuler
(
double
phi,
double
theta,
double
ksi );
75
76
EvtTensor3C
operator+=
(
const
EvtTensor3C
& t2 );
77
EvtTensor3C
operator-=
(
const
EvtTensor3C
& t2 );
78
EvtTensor3C
operator*=
(
const
double
d );
79
EvtTensor3C
operator*=
(
const
EvtComplex
& c );
80
EvtTensor3C
conj
()
const
;
81
EvtVector3C
cont1
(
const
EvtVector3C
& v )
const
;
82
EvtVector3C
cont2
(
const
EvtVector3C
& v )
const
;
83
EvtVector3C
cont1
(
const
EvtVector3R
& v )
const
;
84
EvtVector3C
cont2
(
const
EvtVector3R
& v )
const
;
85
86
private
:
87
EvtComplex
m_t
[3][3];
88
};
89
90
inline
EvtTensor3C
operator*
(
const
EvtComplex
& c,
const
EvtTensor3C
& t2 )
91
{
92
return
EvtTensor3C
( t2 ) *= c;
93
}
94
95
inline
EvtTensor3C
operator*
(
const
double
d,
const
EvtTensor3C
& t2 )
96
{
97
return
EvtTensor3C
( t2 ) *= d;
98
}
99
100
inline
EvtTensor3C
operator*
(
const
EvtTensor3C
& t2,
const
EvtComplex
& c )
101
{
102
return
EvtTensor3C
( t2 ) *= c;
103
}
104
105
inline
EvtTensor3C
operator*
(
const
EvtTensor3C
& t2,
const
double
d )
106
{
107
return
EvtTensor3C
( t2 ) *= d;
108
}
109
110
inline
EvtTensor3C
operator+
(
const
EvtTensor3C
& t1,
const
EvtTensor3C
& t2 )
111
{
112
return
EvtTensor3C
( t1 ) += t2;
113
}
114
115
inline
EvtTensor3C
operator-
(
const
EvtTensor3C
& t1,
const
EvtTensor3C
& t2 )
116
{
117
return
EvtTensor3C
( t1 ) -= t2;
118
}
119
120
inline
void
EvtTensor3C::set
(
int
i,
int
j,
const
EvtComplex
& c )
121
{
122
m_t
[i][j] = c;
123
}
124
125
inline
const
EvtComplex
&
EvtTensor3C::get
(
int
i,
int
j )
const
126
{
127
return
m_t
[i][j];
128
}
129
130
inline
EvtComplex
EvtTensor3C::trace
()
const
131
{
132
return
m_t
[0][0] +
m_t
[1][1] +
m_t
[2][2];
133
}
134
135
#endif
EvtComplex.hh
operator*
EvtTensor3C operator*(const EvtComplex &c, const EvtTensor3C &t2)
Definition
EvtTensor3C.hh:90
operator-
EvtTensor3C operator-(const EvtTensor3C &t1, const EvtTensor3C &t2)
Definition
EvtTensor3C.hh:115
operator+
EvtTensor3C operator+(const EvtTensor3C &t1, const EvtTensor3C &t2)
Definition
EvtTensor3C.hh:110
EvtComplex
Definition
EvtComplex.hh:29
EvtTensor3C
Definition
EvtTensor3C.hh:42
EvtTensor3C::get
const EvtComplex & get(int i, int j) const
Definition
EvtTensor3C.hh:125
EvtTensor3C::zero
void zero()
Definition
EvtTensor3C.cpp:84
EvtTensor3C::cont1
EvtVector3C cont1(const EvtVector3C &v) const
Definition
EvtTensor3C.cpp:246
EvtTensor3C::set
void set(int i, int j, const EvtComplex &c)
Definition
EvtTensor3C.hh:120
EvtTensor3C::m_t
EvtComplex m_t[3][3]
Definition
EvtTensor3C.hh:87
EvtTensor3C::operator<<
friend std::ostream & operator<<(std::ostream &c, const EvtTensor3C &v)
EvtTensor3C::EvtTensor3C
EvtTensor3C()
Definition
EvtTensor3C.cpp:94
EvtTensor3C::applyRotateEuler
void applyRotateEuler(double phi, double theta, double ksi)
Definition
EvtTensor3C.cpp:350
EvtTensor3C::cont22
friend EvtTensor3C cont22(const EvtTensor3C &t1, const EvtTensor3C &t2)
Definition
EvtTensor3C.cpp:210
EvtTensor3C::operator*
friend EvtTensor3C operator*(const EvtComplex &c, const EvtTensor3C &t2)
Definition
EvtTensor3C.hh:90
EvtTensor3C::cont2
EvtVector3C cont2(const EvtVector3C &v) const
Definition
EvtTensor3C.cpp:260
EvtTensor3C::operator-=
EvtTensor3C operator-=(const EvtTensor3C &t2)
Definition
EvtTensor3C.cpp:117
EvtTensor3C::operator-
friend EvtTensor3C operator-(const EvtTensor3C &t1, const EvtTensor3C &t2)
Definition
EvtTensor3C.hh:115
EvtTensor3C::operator+
friend EvtTensor3C operator+(const EvtTensor3C &t1, const EvtTensor3C &t2)
Definition
EvtTensor3C.hh:110
EvtTensor3C::id
static const EvtTensor3C & id()
Definition
EvtTensor3C.cpp:322
EvtTensor3C::conj
EvtTensor3C conj() const
Definition
EvtTensor3C.cpp:70
EvtTensor3C::operator=
EvtTensor3C & operator=(const EvtTensor3C &t1)
Definition
EvtTensor3C.cpp:58
EvtTensor3C::trace
EvtComplex trace() const
Definition
EvtTensor3C.hh:130
EvtTensor3C::operator*=
EvtTensor3C operator*=(const double d)
Definition
EvtTensor3C.cpp:141
EvtTensor3C::operator+=
EvtTensor3C operator+=(const EvtTensor3C &t2)
Definition
EvtTensor3C.cpp:105
EvtTensor3C::cont11
friend EvtTensor3C cont11(const EvtTensor3C &t1, const EvtTensor3C &t2)
Definition
EvtTensor3C.cpp:228
EvtVector3C
Definition
EvtVector3C.hh:29
EvtVector3R
Definition
EvtVector3R.hh:26
EvtGenFunctions
Definition
EvtGammaMatrix.hh:31
EvtGenFunctions::rotateEuler
EvtTensor3C rotateEuler(const EvtTensor3C &v, double phi, double theta, double ksi)
Definition
EvtTensor3C.cpp:342
EvtGenFunctions::eps
EvtTensor3C eps(const EvtVector3R &v)
Definition
EvtTensor3C.cpp:302
EvtGenFunctions::directProd
EvtTensor3C directProd(const EvtVector3C &c1, const EvtVector3C &c2)
Definition
EvtTensor3C.cpp:153
Generated by
1.17.0