BOSS 7.0.1
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 53 of file EvtTensor3C.hh.

Constructor & Destructor Documentation

◆ EvtTensor3C() [1/3]

EvtTensor3C::EvtTensor3C ( )

Definition at line 98 of file EvtTensor3C.cc.

98 {
99
100 int i,j;
101
102 for(i=0;i<3;i++){
103 for(j=0;j<3;j++){
104 t[i][j]=EvtComplex(0.0,0.0);
105 }
106 }
107
108}

◆ EvtTensor3C() [2/3]

EvtTensor3C::EvtTensor3C ( const EvtTensor3C t1)

Definition at line 35 of file EvtTensor3C.cc.

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

◆ EvtTensor3C() [3/3]

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

Definition at line 46 of file EvtTensor3C.cc.

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

◆ ~EvtTensor3C()

EvtTensor3C::~EvtTensor3C ( )
virtual

Definition at line 32 of file EvtTensor3C.cc.

32{}

Member Function Documentation

◆ applyRotateEuler()

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

Definition at line 358 of file EvtTensor3C.cc.

358 {
359
360 EvtComplex temp[3][3];
361 double sp,st,sk,cp,ct,ck;
362 double r[3][3];
363 int i,j,k;
364
365 sp=sin(phi);
366 st=sin(theta);
367 sk=sin(ksi);
368 cp=cos(phi);
369 ct=cos(theta);
370 ck=cos(ksi);
371
372 r[0][0]=ck*ct*cp-sk*sp;
373 r[0][1]=ck*ct*sp+sk*cp;
374 r[0][2]=-ck*st;
375
376 r[1][0]=-sk*ct*cp-ck*sp;
377 r[1][1]=-sk*ct*sp+ck*cp;
378 r[1][2]=sk*st;
379
380 r[2][0]=st*cp;
381 r[2][1]=st*sp;
382 r[2][2]=ct;
383
384 for(i=0;i<3;i++){
385 for(j=0;j<3;j++){
386 temp[i][j]=0.0;
387 for(k=0;k<3;k++){
388 temp[i][j]+=r[i][k]*t[k][j];
389 }
390 }
391 }
392
393 for(i=0;i<3;i++){
394 for(j=0;j<3;j++){
395 t[i][j]=0.0;
396 for(k=0;k<3;k++){
397 t[i][j]+=r[i][k]*temp[j][k];
398 }
399 }
400 }
401
402
403}
double sin(const BesAngle a)
double cos(const BesAngle a)

◆ conj()

EvtTensor3C EvtTensor3C::conj ( ) const

Definition at line 75 of file EvtTensor3C.cc.

75 {
76 EvtTensor3C temp;
77
78 int i,j;
79
80 for(i=0;i<3;i++) {
81 for(j=0;j<3;j++) {
82 temp.set(j,i,::conj(t[i][j]));
83 }
84 }
85 return temp;
86}
friend EvtTensor3C conj(const EvtTensor3C &t2)
Definition: EvtTensor3C.cc:204
void set(int i, int j, const EvtComplex &c)
Definition: EvtTensor3C.hh:131

◆ cont1() [1/2]

EvtVector3C EvtTensor3C::cont1 ( const EvtVector3C v) const

Definition at line 254 of file EvtTensor3C.cc.

254 {
255 EvtVector3C temp;
256
257 int i;
258
259 for(i=0;i<3;i++){
260 temp.set(i,t[0][i]*v.get(0)+t[1][i]*v.get(1)
261 +t[2][i]*v.get(2));
262 }
263
264 return temp;
265}
**********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 &)
Definition: EvtVector3C.hh:76

◆ cont1() [2/2]

EvtVector3C EvtTensor3C::cont1 ( const EvtVector3R v) const

Definition at line 280 of file EvtTensor3C.cc.

280 {
281 EvtVector3C temp;
282
283 int i;
284
285 for(i=0;i<3;i++){
286 temp.set(i,t[0][i]*v.get(0)+t[1][i]*v.get(1)
287 +t[2][i]*v.get(2));
288 }
289
290 return temp;
291}

◆ cont2() [1/2]

EvtVector3C EvtTensor3C::cont2 ( const EvtVector3C v) const

Definition at line 267 of file EvtTensor3C.cc.

267 {
268 EvtVector3C temp;
269
270 int i;
271
272 for(i=0;i<3;i++){
273 temp.set(i,t[i][0]*v.get(0)+t[i][1]*v.get(1)
274 +t[i][2]*v.get(2));
275 }
276
277 return temp;
278}

◆ cont2() [2/2]

EvtVector3C EvtTensor3C::cont2 ( const EvtVector3R v) const

Definition at line 293 of file EvtTensor3C.cc.

293 {
294 EvtVector3C temp;
295
296 int i;
297
298 for(i=0;i<3;i++){
299 temp.set(i,t[i][0]*v.get(0)+t[i][1]*v.get(1)
300 +t[i][2]*v.get(2));
301 }
302
303 return temp;
304}

◆ get()

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

Definition at line 135 of file EvtTensor3C.hh.

135 {
136 return t[i][j];
137}

◆ id()

const EvtTensor3C & EvtTensor3C::id ( )
static

Definition at line 330 of file EvtTensor3C.cc.

330 {
331
332 static EvtTensor3C identity(1.0,1.0,1.0);
333
334 return identity;
335
336}

Referenced by EvtSVVHelAmp::SVVHel().

◆ operator*=() [1/2]

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

Definition at line 150 of file EvtTensor3C.cc.

150 {
151
152 int i,j;
153
154 for (i=0;i<3;i++) {
155 for (j=0;j<3;j++) {
156 t[i][j]*=EvtComplex(c);
157 }
158 }
159 return *this;
160}

◆ operator*=() [2/2]

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

Definition at line 137 of file EvtTensor3C.cc.

137 {
138
139 int i,j;
140
141 for (i=0;i<3;i++) {
142 for (j=0;j<3;j++) {
143 t[i][j]*=c;
144 }
145 }
146 return *this;
147}

◆ operator+=()

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

Definition at line 110 of file EvtTensor3C.cc.

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

◆ operator-=()

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

Definition at line 123 of file EvtTensor3C.cc.

123 {
124
125 int i,j;
126
127 for (i=0;i<3;i++) {
128 for (j=0;j<3;j++) {
129 t[i][j]-=t2.t[i][j];
130 }
131 }
132 return *this;
133}

◆ operator=()

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

Definition at line 64 of file EvtTensor3C.cc.

64 {
65 int i,j;
66
67 for(i=0;i<3;i++) {
68 for(j=0;j<3;j++) {
69 t[i][j] = t1.t[i][j];
70 }
71 }
72 return *this;
73}

◆ set()

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

Definition at line 131 of file EvtTensor3C.hh.

131 {
132 t[i][j]=c;
133}

Referenced by Evt3Rank3C::cont1(), Evt3Rank3C::cont2(), Evt3Rank3C::cont3(), and eps().

◆ trace()

EvtComplex EvtTensor3C::trace ( ) const
inline

Definition at line 139 of file EvtTensor3C.hh.

139 {
140 return t[0][0]+t[1][1]+t[2][2];
141}

◆ zero()

void EvtTensor3C::zero ( )

Definition at line 88 of file EvtTensor3C.cc.

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

Friends And Related Function Documentation

◆ conj

EvtTensor3C conj ( const EvtTensor3C t2)
friend

Definition at line 204 of file EvtTensor3C.cc.

204 {
205 EvtTensor3C temp;
206
207 int i,j;
208
209 for(i=0;i<3;i++){
210 for(j=0;j<3;j++){
211 temp.set(i,j,::conj((t2.get(i,j))));
212 }
213 }
214
215 return temp;
216}
const EvtComplex & get(int i, int j) const
Definition: EvtTensor3C.hh:135

Referenced by eps().

◆ cont11

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

Definition at line 236 of file EvtTensor3C.cc.

236 {
237 EvtTensor3C temp;
238
239 int i,j;
240 EvtComplex c;
241
242 for(i=0;i<3;i++){
243 for(j=0;j<3;j++){
244 c=t1.get(0,i)*t2.get(0,j)+t1.get(1,i)*t2.get(1,j)
245 +t1.get(2,i)*t2.get(2,j);
246 temp.set(i,j,c);
247 }
248 }
249
250 return temp;
251}

◆ cont22

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

Definition at line 219 of file EvtTensor3C.cc.

219 {
220 EvtTensor3C temp;
221
222 int i,j;
223 EvtComplex c;
224
225 for(i=0;i<3;i++){
226 for(j=0;j<3;j++){
227 c=t1.get(i,0)*t2.get(j,0)+t1.get(i,1)*t2.get(j,1)
228 +t1.get(i,2)*t2.get(j,2);
229 temp.set(i,j,c);
230 }
231 }
232
233 return temp;
234}

◆ directProd [1/3]

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

Definition at line 165 of file EvtTensor3C.cc.

165 {
166 EvtTensor3C temp;
167 int i,j;
168
169 for (i=0;i<3;i++) {
170 for (j=0;j<3;j++) {
171 temp.set(i,j,c1.get(i)*c2.get(j));
172 }
173 }
174 return temp;
175}
const EvtComplex & get(int) const
Definition: EvtVector3C.hh:94

◆ directProd [2/3]

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

Definition at line 178 of file EvtTensor3C.cc.

178 {
179 EvtTensor3C temp;
180 int i,j;
181
182 for (i=0;i<3;i++) {
183 for (j=0;j<3;j++) {
184 temp.set(i,j,c1.get(i)*c2.get(j));
185 }
186 }
187 return temp;
188}
double get(int i) const
Definition: EvtVector3R.hh:126

◆ directProd [3/3]

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

Definition at line 191 of file EvtTensor3C.cc.

191 {
192 EvtTensor3C temp;
193 int i,j;
194
195 for (i=0;i<3;i++) {
196 for (j=0;j<3;j++) {
197 temp.t[i][j]=EvtComplex(c1.get(i)*c2.get(j),0.0);
198 }
199 }
200 return temp;
201}

◆ eps

EvtTensor3C eps ( const EvtVector3R v)
friend

Definition at line 307 of file EvtTensor3C.cc.

307 {
308
309 EvtTensor3C temp;
310
311 temp.t[0][0]=0.0;
312 temp.t[1][1]=0.0;
313 temp.t[2][2]=0.0;
314
315 temp.t[0][1]=v.get(2);
316 temp.t[0][2]=-v.get(1);
317
318 temp.t[1][0]=-v.get(2);
319 temp.t[1][2]=v.get(0);
320
321 temp.t[2][0]=v.get(1);
322 temp.t[2][1]=-v.get(0);
323
324 return temp;
325
326}

◆ operator* [1/4]

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

Definition at line 111 of file EvtTensor3C.hh.

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

◆ operator* [2/4]

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

Definition at line 107 of file EvtTensor3C.hh.

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

◆ operator* [3/4]

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

Definition at line 119 of file EvtTensor3C.hh.

119 {
120 return EvtTensor3C(t2)*=d;
121}

◆ operator* [4/4]

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

Definition at line 115 of file EvtTensor3C.hh.

115 {
116 return EvtTensor3C(t2)*=c;
117}

◆ operator+

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

Definition at line 123 of file EvtTensor3C.hh.

123 {
124 return EvtTensor3C(t1)+=t2;
125}

◆ operator-

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

Definition at line 127 of file EvtTensor3C.hh.

127 {
128 return EvtTensor3C(t1)-=t2;
129}

◆ 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 348 of file EvtTensor3C.cc.

349 {
350
351 EvtTensor3C tmp(v);
352 tmp.applyRotateEuler(alpha,beta,gamma);
353 return tmp;
354
355}
const double alpha

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