BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Evt3Rank3C.hh
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of the EvtGen package developed jointly
5// for the BaBar and CLEO collaborations. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/COPYRIGHT
9// Copyright (C) 1998 Caltech, UCSB
10//
11// Module: EvtGen/Evt3Rank3C.hh
12//
13// Description:Class to handle complex 3rd rank tensors
14//
15// Modification history:
16//
17// RYD September 14, 1997 Module created
18//
19//------------------------------------------------------------------------
20
21#ifndef EVT3RANK3C_HH
22#define EVT3RANK3C_HH
23
24#include "EvtComplex.hh"
25#include <iostream>
26// #include "EvtTensor3C.hh"
27// #include "EvtVector3C.hh"
28// #include "EvtVector3R.hh"
29
30class EvtTensor3C;
31class EvtVector3C;
32class EvtVector3R;
33
34class Evt3Rank3C;
35inline Evt3Rank3C operator*( const EvtComplex& c, const Evt3Rank3C& t2 );
36inline Evt3Rank3C operator*( const double d, const Evt3Rank3C& t2 );
37inline Evt3Rank3C operator*( const Evt3Rank3C& t2, const EvtComplex& c );
38inline Evt3Rank3C operator*( const Evt3Rank3C& t2, const double d );
39inline Evt3Rank3C operator+( const Evt3Rank3C& t1, const Evt3Rank3C& t2 );
40inline Evt3Rank3C operator-( const Evt3Rank3C& t1, const Evt3Rank3C& t2 );
41Evt3Rank3C directProd( const EvtVector3C& c1, const EvtVector3C& c2, const EvtVector3C& c3 );
42Evt3Rank3C conj( const Evt3Rank3C& t2 );
43
44//=================
46
47 friend Evt3Rank3C operator*( const EvtComplex& c, const Evt3Rank3C& t2 );
48 friend Evt3Rank3C operator*( const double d, const Evt3Rank3C& t2 );
49 friend Evt3Rank3C operator*( const Evt3Rank3C& t2, const EvtComplex& c );
50 friend Evt3Rank3C operator*( const Evt3Rank3C& t2, const double d );
51 friend Evt3Rank3C operator+( const Evt3Rank3C& t1, const Evt3Rank3C& t2 );
52 friend Evt3Rank3C operator-( const Evt3Rank3C& t1, const Evt3Rank3C& t2 );
53 friend Evt3Rank3C directProd( const EvtVector3C& c1, const EvtVector3C& c2,
54 const EvtVector3C& c3 );
55 friend Evt3Rank3C conj( const Evt3Rank3C& t2 );
56
57public:
58 Evt3Rank3C();
59 Evt3Rank3C( const Evt3Rank3C& t1 );
60 virtual ~Evt3Rank3C();
61 Evt3Rank3C& operator=( const Evt3Rank3C& t1 );
62 inline void set( int i, int j, int k, const EvtComplex& c );
63 inline const EvtComplex& get( int i, int j, int k ) const;
64 void zero();
65
66 void dump() const;
67 Evt3Rank3C& operator+=( const Evt3Rank3C& t2 );
68 Evt3Rank3C& operator-=( const Evt3Rank3C& t2 );
69 Evt3Rank3C& operator*=( const double d );
70 Evt3Rank3C& operator*=( const EvtComplex& c );
71 Evt3Rank3C conj() const;
72 EvtTensor3C cont1( const EvtVector3C& v ) const;
73 EvtTensor3C cont2( const EvtVector3C& v ) const;
74 EvtTensor3C cont3( const EvtVector3C& v ) const;
75 EvtTensor3C cont1( const EvtVector3R& v ) const;
76 EvtTensor3C cont2( const EvtVector3R& v ) const;
77 EvtTensor3C cont3( const EvtVector3R& v ) const;
78
79private:
80 EvtComplex t[3][3][3];
81};
82
83inline Evt3Rank3C operator*( const EvtComplex& c, const Evt3Rank3C& t2 ) {
84 return Evt3Rank3C( t2 ) *= c;
85}
86
87inline Evt3Rank3C operator*( const double d, const Evt3Rank3C& t2 ) {
88 return Evt3Rank3C( t2 ) *= d;
89}
90
91inline Evt3Rank3C operator*( const Evt3Rank3C& t2, const EvtComplex& c ) {
92 return Evt3Rank3C( t2 ) *= c;
93}
94
95inline Evt3Rank3C operator*( const Evt3Rank3C& t2, const double d ) {
96 return Evt3Rank3C( t2 ) *= d;
97}
98
99inline Evt3Rank3C operator+( const Evt3Rank3C& t1, const Evt3Rank3C& t2 ) {
100 return Evt3Rank3C( t1 ) += t2;
101}
102
103inline Evt3Rank3C operator-( const Evt3Rank3C& t1, const Evt3Rank3C& t2 ) {
104 return Evt3Rank3C( t1 ) -= t2;
105}
106
107inline void Evt3Rank3C::set( int i, int j, int k, const EvtComplex& c ) { t[i][j][k] = c; }
108
109inline const EvtComplex& Evt3Rank3C::get( int i, int j, int k ) const { return t[i][j][k]; }
110
111#endif
Evt3Rank3C operator-(const Evt3Rank3C &t1, const Evt3Rank3C &t2)
Evt3Rank3C conj(const Evt3Rank3C &t2)
Evt3Rank3C operator+(const Evt3Rank3C &t1, const Evt3Rank3C &t2)
Definition Evt3Rank3C.hh:99
Evt3Rank3C directProd(const EvtVector3C &c1, const EvtVector3C &c2, const EvtVector3C &c3)
Evt3Rank3C operator*(const EvtComplex &c, const Evt3Rank3C &t2)
Definition Evt3Rank3C.hh:83
**********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
Evt3Rank3C & operator-=(const Evt3Rank3C &t2)
void zero()
Definition Evt3Rank3C.cc:73
Evt3Rank3C & operator*=(const double d)
virtual ~Evt3Rank3C()
Definition Evt3Rank3C.cc:43
EvtTensor3C cont1(const EvtVector3C &v) const
friend Evt3Rank3C operator-(const Evt3Rank3C &t1, const Evt3Rank3C &t2)
const EvtComplex & get(int i, int j, int k) const
Evt3Rank3C & operator=(const Evt3Rank3C &t1)
Definition Evt3Rank3C.cc:45
Evt3Rank3C & operator+=(const Evt3Rank3C &t2)
void dump() const
Definition Evt3Rank3C.cc:97
friend Evt3Rank3C operator+(const Evt3Rank3C &t1, const Evt3Rank3C &t2)
Definition Evt3Rank3C.hh:99
friend Evt3Rank3C directProd(const EvtVector3C &c1, const EvtVector3C &c2, const EvtVector3C &c3)
EvtTensor3C cont2(const EvtVector3C &v) const
void set(int i, int j, int k, const EvtComplex &c)
friend Evt3Rank3C operator*(const EvtComplex &c, const Evt3Rank3C &t2)
Definition Evt3Rank3C.hh:83
EvtTensor3C cont3(const EvtVector3C &v) const
Evt3Rank3C conj() const
Definition Evt3Rank3C.cc:58