BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtTensor3C Class Reference

#include <EvtTensor3C.hh>

Public Member Functions

 EvtTensor3C ()
 EvtTensor3C (const EvtTensor3C &t1)
 EvtTensor3C (double d11, double d22, double d33)
virtual ~EvtTensor3C ()
EvtTensor3Coperator= (const EvtTensor3C &t1)
void set (int i, int j, const EvtComplex &c)
const EvtComplexget (int i, int j) const
EvtComplex trace () const
void zero ()
void applyRotateEuler (double phi, double theta, double ksi)
EvtTensor3C operator+= (const EvtTensor3C &t2)
EvtTensor3C operator-= (const EvtTensor3C &t2)
EvtTensor3C operator*= (const double d)
EvtTensor3C operator*= (const EvtComplex &c)
EvtTensor3C conj () const
EvtVector3C cont1 (const EvtVector3C &v) const
EvtVector3C cont2 (const EvtVector3C &v) const
EvtVector3C cont1 (const EvtVector3R &v) const
EvtVector3C cont2 (const EvtVector3R &v) const

Static Public Member Functions

static const EvtTensor3Cid ()

Friends

EvtTensor3C rotateEuler (const EvtTensor3C &v, double phi, double theta, double ksi)
EvtTensor3C operator* (const EvtComplex &c, const EvtTensor3C &t2)
EvtTensor3C operator* (const double d, const EvtTensor3C &t2)
EvtTensor3C operator* (const EvtTensor3C &t2, const EvtComplex &c)
EvtTensor3C operator* (const EvtTensor3C &t2, const double d)
EvtTensor3C operator+ (const EvtTensor3C &t1, const EvtTensor3C &t2)
EvtTensor3C operator- (const EvtTensor3C &t1, const EvtTensor3C &t2)
EvtTensor3C directProd (const EvtVector3C &c1, const EvtVector3C &c2)
EvtTensor3C directProd (const EvtVector3C &c1, const EvtVector3R &c2)
EvtTensor3C directProd (const EvtVector3R &c1, const EvtVector3R &c2)
EvtTensor3C conj (const EvtTensor3C &t2)
EvtTensor3C cont22 (const EvtTensor3C &t1, const EvtTensor3C &t2)
EvtTensor3C cont11 (const EvtTensor3C &t1, const EvtTensor3C &t2)
EvtTensor3C eps (const EvtVector3R &v)
std::ostream & operator<< (std::ostream &c, const EvtTensor3C &v)

Detailed Description

Definition at line 52 of file EvtTensor3C.hh.

Constructor & Destructor Documentation

◆ EvtTensor3C() [1/3]

EvtTensor3C::EvtTensor3C ( )

Definition at line 87 of file EvtTensor3C.cc.

87 {
88
89 int i, j;
90
91 for ( i = 0; i < 3; i++ )
92 {
93 for ( j = 0; j < 3; j++ ) { t[i][j] = EvtComplex( 0.0, 0.0 ); }
94 }
95}

Referenced by conj(), conj, cont11, cont22, directProd, directProd, directProd, eps, EvtTensor3C(), id(), operator*, operator*, operator*, operator*, operator*=(), operator*=(), operator+, operator+=(), operator-, operator-=(), operator<<, operator=(), and rotateEuler.

◆ EvtTensor3C() [2/3]

EvtTensor3C::EvtTensor3C ( const EvtTensor3C & t1)

Definition at line 33 of file EvtTensor3C.cc.

33 {
34
35 int i, j;
36
37 for ( i = 0; i < 3; i++ )
38 {
39 for ( j = 0; j < 3; j++ ) { t[i][j] = t1.t[i][j]; }
40 }
41}

◆ EvtTensor3C() [3/3]

EvtTensor3C::EvtTensor3C ( double d11,
double d22,
double d33 )

Definition at line 43 of file EvtTensor3C.cc.

43 {
44
45 int i, j;
46
47 for ( i = 0; i < 3; i++ )
48 {
49 for ( j = 0; j < 3; j++ ) { t[i][j] = 0.0; }
50 }
51
52 t[0][0] = d11;
53 t[1][1] = d22;
54 t[2][2] = d33;
55}

◆ ~EvtTensor3C()

EvtTensor3C::~EvtTensor3C ( )
virtual

Definition at line 31 of file EvtTensor3C.cc.

31{}

Member Function Documentation

◆ applyRotateEuler()

void EvtTensor3C::applyRotateEuler ( double phi,
double theta,
double ksi )

Definition at line 312 of file EvtTensor3C.cc.

312 {
313
314 EvtComplex temp[3][3];
315 double sp, st, sk, cp, ct, ck;
316 double r[3][3];
317 int i, j, k;
318
319 sp = sin( phi );
320 st = sin( theta );
321 sk = sin( ksi );
322 cp = cos( phi );
323 ct = cos( theta );
324 ck = cos( ksi );
325
326 r[0][0] = ck * ct * cp - sk * sp;
327 r[0][1] = ck * ct * sp + sk * cp;
328 r[0][2] = -ck * st;
329
330 r[1][0] = -sk * ct * cp - ck * sp;
331 r[1][1] = -sk * ct * sp + ck * cp;
332 r[1][2] = sk * st;
333
334 r[2][0] = st * cp;
335 r[2][1] = st * sp;
336 r[2][2] = ct;
337
338 for ( i = 0; i < 3; i++ )
339 {
340 for ( j = 0; j < 3; j++ )
341 {
342 temp[i][j] = 0.0;
343 for ( k = 0; k < 3; k++ ) { temp[i][j] += r[i][k] * t[k][j]; }
344 }
345 }
346
347 for ( i = 0; i < 3; i++ )
348 {
349 for ( j = 0; j < 3; j++ )
350 {
351 t[i][j] = 0.0;
352 for ( k = 0; k < 3; k++ ) { t[i][j] += r[i][k] * temp[j][k]; }
353 }
354 }
355}

Referenced by rotateEuler.

◆ conj()

EvtTensor3C EvtTensor3C::conj ( ) const

Definition at line 67 of file EvtTensor3C.cc.

67 {
68 EvtTensor3C temp;
69
70 int i, j;
71
72 for ( i = 0; i < 3; i++ )
73 {
74 for ( j = 0; j < 3; j++ ) { temp.set( j, i, ::conj( t[i][j] ) ); }
75 }
76 return temp;
77}
void set(int i, int j, const EvtComplex &c)
EvtTensor3C conj() const

◆ cont1() [1/2]

EvtVector3C EvtTensor3C::cont1 ( const EvtVector3C & v) const

Definition at line 225 of file EvtTensor3C.cc.

225 {
226 EvtVector3C temp;
227
228 int i;
229
230 for ( i = 0; i < 3; i++ )
231 { temp.set( i, t[0][i] * v.get( 0 ) + t[1][i] * v.get( 1 ) + t[2][i] * v.get( 2 ) ); }
232
233 return temp;
234}
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
void set(const int, const EvtComplex &)

◆ cont1() [2/2]

EvtVector3C EvtTensor3C::cont1 ( const EvtVector3R & v) const

Definition at line 247 of file EvtTensor3C.cc.

247 {
248 EvtVector3C temp;
249
250 int i;
251
252 for ( i = 0; i < 3; i++ )
253 { temp.set( i, t[0][i] * v.get( 0 ) + t[1][i] * v.get( 1 ) + t[2][i] * v.get( 2 ) ); }
254
255 return temp;
256}

◆ cont2() [1/2]

EvtVector3C EvtTensor3C::cont2 ( const EvtVector3C & v) const

Definition at line 236 of file EvtTensor3C.cc.

236 {
237 EvtVector3C temp;
238
239 int i;
240
241 for ( i = 0; i < 3; i++ )
242 { temp.set( i, t[i][0] * v.get( 0 ) + t[i][1] * v.get( 1 ) + t[i][2] * v.get( 2 ) ); }
243
244 return temp;
245}

◆ cont2() [2/2]

EvtVector3C EvtTensor3C::cont2 ( const EvtVector3R & v) const

Definition at line 258 of file EvtTensor3C.cc.

258 {
259 EvtVector3C temp;
260
261 int i;
262
263 for ( i = 0; i < 3; i++ )
264 { temp.set( i, t[i][0] * v.get( 0 ) + t[i][1] * v.get( 1 ) + t[i][2] * v.get( 2 ) ); }
265
266 return temp;
267}

◆ get()

const EvtComplex & EvtTensor3C::get ( int i,
int j ) const
inline

Definition at line 126 of file EvtTensor3C.hh.

126{ return t[i][j]; }

Referenced by conj, cont11, and cont22.

◆ id()

const EvtTensor3C & EvtTensor3C::id ( )
static

Definition at line 289 of file EvtTensor3C.cc.

289 {
290
291 static EvtTensor3C identity( 1.0, 1.0, 1.0 );
292
293 return identity;
294}

Referenced by EvtSVVHelAmp::SVVHel().

◆ operator*=() [1/2]

EvtTensor3C EvtTensor3C::operator*= ( const double d)

Definition at line 130 of file EvtTensor3C.cc.

130 {
131
132 int i, j;
133
134 for ( i = 0; i < 3; i++ )
135 {
136 for ( j = 0; j < 3; j++ ) { t[i][j] *= EvtComplex( c ); }
137 }
138 return *this;
139}

◆ operator*=() [2/2]

EvtTensor3C EvtTensor3C::operator*= ( const EvtComplex & c)

Definition at line 119 of file EvtTensor3C.cc.

119 {
120
121 int i, j;
122
123 for ( i = 0; i < 3; i++ )
124 {
125 for ( j = 0; j < 3; j++ ) { t[i][j] *= c; }
126 }
127 return *this;
128}

◆ operator+=()

EvtTensor3C EvtTensor3C::operator+= ( const EvtTensor3C & t2)

Definition at line 97 of file EvtTensor3C.cc.

97 {
98
99 int i, j;
100
101 for ( i = 0; i < 3; i++ )
102 {
103 for ( j = 0; j < 3; j++ ) { t[i][j] += t2.t[i][j]; }
104 }
105 return *this;
106}

◆ operator-=()

EvtTensor3C EvtTensor3C::operator-= ( const EvtTensor3C & t2)

Definition at line 108 of file EvtTensor3C.cc.

108 {
109
110 int i, j;
111
112 for ( i = 0; i < 3; i++ )
113 {
114 for ( j = 0; j < 3; j++ ) { t[i][j] -= t2.t[i][j]; }
115 }
116 return *this;
117}

◆ operator=()

EvtTensor3C & EvtTensor3C::operator= ( const EvtTensor3C & t1)

Definition at line 57 of file EvtTensor3C.cc.

57 {
58 int i, j;
59
60 for ( i = 0; i < 3; i++ )
61 {
62 for ( j = 0; j < 3; j++ ) { t[i][j] = t1.t[i][j]; }
63 }
64 return *this;
65}

◆ set()

void EvtTensor3C::set ( int i,
int j,
const EvtComplex & c )
inline

◆ trace()

EvtComplex EvtTensor3C::trace ( ) const
inline

Definition at line 128 of file EvtTensor3C.hh.

128{ return t[0][0] + t[1][1] + t[2][2]; }

◆ zero()

void EvtTensor3C::zero ( )

Definition at line 79 of file EvtTensor3C.cc.

79 {
80 int i, j;
81 for ( i = 0; i < 3; i++ )
82 {
83 for ( j = 0; j < 3; j++ ) { t[i][j] = EvtComplex( 0.0, 0.0 ); }
84 }
85}

◆ conj

EvtTensor3C conj ( const EvtTensor3C & t2)
friend

Definition at line 174 of file EvtTensor3C.cc.

174 {
175 EvtTensor3C temp;
176
177 int i, j;
178
179 for ( i = 0; i < 3; i++ )
180 {
181 for ( j = 0; j < 3; j++ ) { temp.set( i, j, ::conj( ( t2.get( i, j ) ) ) ); }
182 }
183
184 return temp;
185}
const EvtComplex & get(int i, int j) const

Referenced by conj.

◆ cont11

EvtTensor3C cont11 ( const EvtTensor3C & t1,
const EvtTensor3C & t2 )
friend

Definition at line 206 of file EvtTensor3C.cc.

206 {
207 EvtTensor3C temp;
208
209 int i, j;
210 EvtComplex c;
211
212 for ( i = 0; i < 3; i++ )
213 {
214 for ( j = 0; j < 3; j++ )
215 {
216 c = t1.get( 0, i ) * t2.get( 0, j ) + t1.get( 1, i ) * t2.get( 1, j ) +
217 t1.get( 2, i ) * t2.get( 2, j );
218 temp.set( i, j, c );
219 }
220 }
221
222 return temp;
223}

◆ cont22

EvtTensor3C cont22 ( const EvtTensor3C & t1,
const EvtTensor3C & t2 )
friend

Definition at line 187 of file EvtTensor3C.cc.

187 {
188 EvtTensor3C temp;
189
190 int i, j;
191 EvtComplex c;
192
193 for ( i = 0; i < 3; i++ )
194 {
195 for ( j = 0; j < 3; j++ )
196 {
197 c = t1.get( i, 0 ) * t2.get( j, 0 ) + t1.get( i, 1 ) * t2.get( j, 1 ) +
198 t1.get( i, 2 ) * t2.get( j, 2 );
199 temp.set( i, j, c );
200 }
201 }
202
203 return temp;
204}

◆ directProd [1/3]

EvtTensor3C directProd ( const EvtVector3C & c1,
const EvtVector3C & c2 )
friend

Definition at line 141 of file EvtTensor3C.cc.

141 {
142 EvtTensor3C temp;
143 int i, j;
144
145 for ( i = 0; i < 3; i++ )
146 {
147 for ( j = 0; j < 3; j++ ) { temp.set( i, j, c1.get( i ) * c2.get( j ) ); }
148 }
149 return temp;
150}
const EvtComplex & get(int) const

◆ directProd [2/3]

EvtTensor3C directProd ( const EvtVector3C & c1,
const EvtVector3R & c2 )
friend

Definition at line 152 of file EvtTensor3C.cc.

152 {
153 EvtTensor3C temp;
154 int i, j;
155
156 for ( i = 0; i < 3; i++ )
157 {
158 for ( j = 0; j < 3; j++ ) { temp.set( i, j, c1.get( i ) * c2.get( j ) ); }
159 }
160 return temp;
161}
double get(int i) const

◆ directProd [3/3]

EvtTensor3C directProd ( const EvtVector3R & c1,
const EvtVector3R & c2 )
friend

Definition at line 163 of file EvtTensor3C.cc.

163 {
164 EvtTensor3C temp;
165 int i, j;
166
167 for ( i = 0; i < 3; i++ )
168 {
169 for ( j = 0; j < 3; j++ ) { temp.t[i][j] = EvtComplex( c1.get( i ) * c2.get( j ), 0.0 ); }
170 }
171 return temp;
172}

◆ eps

EvtTensor3C eps ( const EvtVector3R & v)
friend

Definition at line 269 of file EvtTensor3C.cc.

269 {
270
271 EvtTensor3C temp;
272
273 temp.t[0][0] = 0.0;
274 temp.t[1][1] = 0.0;
275 temp.t[2][2] = 0.0;
276
277 temp.t[0][1] = v.get( 2 );
278 temp.t[0][2] = -v.get( 1 );
279
280 temp.t[1][0] = -v.get( 2 );
281 temp.t[1][2] = v.get( 0 );
282
283 temp.t[2][0] = v.get( 1 );
284 temp.t[2][1] = -v.get( 0 );
285
286 return temp;
287}

◆ operator* [1/4]

EvtTensor3C operator* ( const double d,
const EvtTensor3C & t2 )
friend

Definition at line 104 of file EvtTensor3C.hh.

104 {
105 return EvtTensor3C( t2 ) *= d;
106}

◆ operator* [2/4]

EvtTensor3C operator* ( const EvtComplex & c,
const EvtTensor3C & t2 )
friend

Definition at line 100 of file EvtTensor3C.hh.

100 {
101 return EvtTensor3C( t2 ) *= c;
102}

◆ operator* [3/4]

EvtTensor3C operator* ( const EvtTensor3C & t2,
const double d )
friend

Definition at line 112 of file EvtTensor3C.hh.

112 {
113 return EvtTensor3C( t2 ) *= d;
114}

◆ operator* [4/4]

EvtTensor3C operator* ( const EvtTensor3C & t2,
const EvtComplex & c )
friend

Definition at line 108 of file EvtTensor3C.hh.

108 {
109 return EvtTensor3C( t2 ) *= c;
110}

◆ operator+

EvtTensor3C operator+ ( const EvtTensor3C & t1,
const EvtTensor3C & t2 )
friend

Definition at line 116 of file EvtTensor3C.hh.

116 {
117 return EvtTensor3C( t1 ) += t2;
118}

◆ operator-

EvtTensor3C operator- ( const EvtTensor3C & t1,
const EvtTensor3C & t2 )
friend

Definition at line 120 of file EvtTensor3C.hh.

120 {
121 return EvtTensor3C( t1 ) -= t2;
122}

◆ operator<<

std::ostream & operator<< ( std::ostream & c,
const EvtTensor3C & v )
friend

◆ rotateEuler

EvtTensor3C rotateEuler ( const EvtTensor3C & v,
double phi,
double theta,
double ksi )
friend

Definition at line 305 of file EvtTensor3C.cc.

305 {
306
307 EvtTensor3C tmp( v );
308 tmp.applyRotateEuler( alpha, beta, gamma );
309 return tmp;
310}
double alpha

The documentation for this class was generated from the following files: