]>
Commit | Line | Data |
---|---|---|
da0e9ce3 | 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) 2000 Caltech, UCSB | |
10 | // | |
11 | // Module: EvtGen/EvtRaritaSchwing.hh | |
12 | // | |
13 | // Description:Class to handle spin 3/2 | |
14 | // | |
15 | // Modification history: | |
16 | // | |
17 | // RYD April 23, 2000 Module created | |
18 | // | |
19 | //------------------------------------------------------------------------ | |
20 | ||
21 | #ifndef EVTRARITASCHWINGER_HH | |
22 | #define EVTRARITASCHWINGER_HH | |
23 | ||
24 | #include "EvtGenBase/EvtComplex.hh" | |
25 | #include "EvtGenBase/EvtVector4C.hh" | |
26 | #include "EvtGenBase/EvtVector4R.hh" | |
27 | #include "EvtGenBase/EvtDiracSpinor.hh" | |
28 | ||
29 | class EvtRaritaSchwinger ; | |
30 | EvtRaritaSchwinger rotateEuler(const EvtRaritaSchwinger& rs, | |
31 | double alpha,double beta,double gamma); | |
32 | EvtRaritaSchwinger boostTo(const EvtRaritaSchwinger& rs, | |
33 | const EvtVector4R p4); | |
34 | EvtRaritaSchwinger boostTo(const EvtRaritaSchwinger& rs, | |
35 | const EvtVector3R boost); | |
36 | EvtRaritaSchwinger dirProd(EvtVector4R v,EvtDiracSpinor u); | |
37 | EvtRaritaSchwinger dirProd(EvtVector4C v,EvtDiracSpinor u); | |
38 | EvtRaritaSchwinger operator+(const EvtRaritaSchwinger& u1, | |
39 | const EvtRaritaSchwinger& u2); | |
40 | EvtRaritaSchwinger operator-(const EvtRaritaSchwinger& u1, | |
41 | const EvtRaritaSchwinger& u2); | |
42 | EvtComplex operator*(const EvtRaritaSchwinger& u1, | |
43 | const EvtRaritaSchwinger& u2); | |
44 | ||
45 | class EvtRaritaSchwinger{ | |
46 | ||
47 | friend EvtRaritaSchwinger rotateEuler(const EvtRaritaSchwinger& rs, | |
48 | double alpha,double beta,double gamma); | |
49 | friend EvtRaritaSchwinger boostTo(const EvtRaritaSchwinger& rs, | |
50 | const EvtVector4R p4); | |
51 | friend EvtRaritaSchwinger boostTo(const EvtRaritaSchwinger& rs, | |
52 | const EvtVector3R boost); | |
53 | ||
54 | friend EvtRaritaSchwinger dirProd(EvtVector4R v,EvtDiracSpinor u); | |
55 | friend EvtRaritaSchwinger dirProd(EvtVector4C v,EvtDiracSpinor u); | |
56 | ||
57 | friend EvtRaritaSchwinger operator+(const EvtRaritaSchwinger& u1, | |
58 | const EvtRaritaSchwinger& u2); | |
59 | friend EvtRaritaSchwinger operator-(const EvtRaritaSchwinger& u1, | |
60 | const EvtRaritaSchwinger& u2); | |
61 | ||
62 | friend EvtComplex operator*(const EvtRaritaSchwinger& u1, | |
63 | const EvtRaritaSchwinger& u2); | |
64 | ||
65 | public: | |
66 | ||
67 | inline EvtRaritaSchwinger(); | |
68 | virtual ~EvtRaritaSchwinger(); | |
69 | inline EvtRaritaSchwinger(const EvtRaritaSchwinger& rs); | |
70 | inline EvtRaritaSchwinger& operator=(const EvtRaritaSchwinger& rs); | |
71 | ||
72 | void set(int i,int j,const EvtComplex& sp); | |
73 | ||
74 | void applyRotateEuler(double alpha,double beta,double gamma); | |
75 | void applyBoostTo(const EvtVector4R p4); | |
76 | void applyBoostTo(const EvtVector3R boost); | |
77 | ||
78 | EvtRaritaSchwinger& operator+=(const EvtRaritaSchwinger& u2); | |
79 | EvtRaritaSchwinger& operator-=(const EvtRaritaSchwinger& u2); | |
80 | ||
81 | EvtComplex get(int i,int j) const; | |
82 | friend std::ostream& operator<<(std::ostream& s, const EvtRaritaSchwinger& rs); | |
83 | ||
84 | EvtVector4C getVector(int i) const; | |
85 | EvtDiracSpinor getSpinor(int i) const; | |
86 | ||
87 | void setVector(int i,const EvtVector4C& v); | |
88 | void setSpinor(int i,const EvtDiracSpinor& sp); | |
89 | ||
90 | ||
91 | ||
92 | private: | |
93 | ||
94 | //First index in spinor index, second is Lorentz index. | |
95 | EvtComplex _rs[4][4]; | |
96 | ||
97 | }; | |
98 | ||
99 | EvtRaritaSchwinger::EvtRaritaSchwinger(){ | |
100 | ||
101 | int i,j; | |
102 | for(i=0;i<4;i++){ | |
103 | for(j=0;j<4;j++){ | |
104 | _rs[i][j]=0.0; | |
105 | } | |
106 | } | |
107 | ||
108 | } | |
109 | ||
110 | EvtRaritaSchwinger::EvtRaritaSchwinger(const EvtRaritaSchwinger& rs){ | |
111 | ||
112 | int i,j; | |
113 | for(i=0;i<4;i++){ | |
114 | for(j=0;j<4;j++){ | |
115 | _rs[i][j]=rs._rs[i][j]; | |
116 | } | |
117 | } | |
118 | ||
119 | } | |
120 | ||
121 | EvtRaritaSchwinger& EvtRaritaSchwinger::operator=(const EvtRaritaSchwinger& rs){ | |
122 | ||
123 | int i,j; | |
124 | for(i=0;i<4;i++){ | |
125 | for(j=0;j<4;j++){ | |
126 | _rs[i][j]=rs._rs[i][j]; | |
127 | } | |
128 | } | |
129 | ||
130 | return *this; | |
131 | ||
132 | } | |
133 | ||
134 | #endif | |
135 | ||
136 |