BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtRaritaSchwinger.cc
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) 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#include "EvtPatches.hh"
21
22#include "EvtRaritaSchwinger.hh"
23using std::endl;
24using std::ostream;
25
27
29 double gamma ) {
30
31 EvtRaritaSchwinger tmp( rs );
32 tmp.applyRotateEuler( alpha, beta, gamma );
33 return tmp;
34}
35
37
38 EvtRaritaSchwinger tmp( rs );
39 tmp.applyBoostTo( p4 );
40 return tmp;
41}
42
45 EvtRaritaSchwinger tmp( rs );
46 tmp.applyBoostTo( boost );
47 return tmp;
48}
50void EvtRaritaSchwinger::set( int i, int j, const EvtComplex& sp ) { _rs[i][j] = sp; }
51
52EvtComplex EvtRaritaSchwinger::get( int i, int j ) const { return _rs[i][j]; }
53
54void EvtRaritaSchwinger::applyRotateEuler( double alpha, double beta, double gamma ) {
55
56 // inefficient but simple to code...
58 EvtVector4C v1 = getVector( 1 );
59 EvtVector4C v2 = getVector( 2 );
60 EvtVector4C v3 = getVector( 3 );
61 v0.applyRotateEuler( alpha, beta, gamma );
62 v1.applyRotateEuler( alpha, beta, gamma );
63 v2.applyRotateEuler( alpha, beta, gamma );
64 v3.applyRotateEuler( alpha, beta, gamma );
65 setVector( 0, v0 );
66 setVector( 1, v1 );
67 setVector( 2, v2 );
68 setVector( 3, v3 );
69 EvtDiracSpinor sp0 = getSpinor( 0 );
70 EvtDiracSpinor sp1 = getSpinor( 1 );
71 EvtDiracSpinor sp2 = getSpinor( 2 );
72 EvtDiracSpinor sp3 = getSpinor( 3 );
73 sp0.applyRotateEuler( alpha, beta, gamma );
74 sp1.applyRotateEuler( alpha, beta, gamma );
75 sp2.applyRotateEuler( alpha, beta, gamma );
76 sp3.applyRotateEuler( alpha, beta, gamma );
77 setSpinor( 0, sp0 );
78 setSpinor( 1, sp1 );
79 setSpinor( 2, sp2 );
80 setSpinor( 3, sp3 );
81}
82
84
85 double e = p4.get( 0 );
86
87 EvtVector3R boost( p4.get( 1 ) / e, p4.get( 2 ) / e, p4.get( 3 ) / e );
88
89 applyBoostTo( boost );
90
91 return;
92}
93
95
96 // inefficient but simple to code...
97 EvtVector4C v0 = getVector( 0 );
98 EvtVector4C v1 = getVector( 1 );
99 EvtVector4C v2 = getVector( 2 );
100 EvtVector4C v3 = getVector( 3 );
101 v0.applyBoostTo( boost );
102 v1.applyBoostTo( boost );
103 v2.applyBoostTo( boost );
104 v3.applyBoostTo( boost );
105 setVector( 0, v0 );
106 setVector( 1, v1 );
107 setVector( 2, v2 );
108 setVector( 3, v3 );
109 EvtDiracSpinor sp0 = getSpinor( 0 );
110 EvtDiracSpinor sp1 = getSpinor( 1 );
111 EvtDiracSpinor sp2 = getSpinor( 2 );
112 EvtDiracSpinor sp3 = getSpinor( 3 );
113 sp0.applyBoostTo( boost );
114 sp1.applyBoostTo( boost );
115 sp2.applyBoostTo( boost );
116 sp3.applyBoostTo( boost );
117 setSpinor( 0, sp0 );
118 setSpinor( 1, sp1 );
119 setSpinor( 2, sp2 );
120 setSpinor( 3, sp3 );
121}
122
123ostream& operator<<( ostream& s, const EvtRaritaSchwinger& rs ) {
124
125 int i, j;
126 s << endl;
127 for ( i = 0; i < 4; i++ )
128 {
129 for ( j = 0; j < 4; j++ ) { s << rs._rs[i][j]; }
130 s << endl;
131 }
132 return s;
133}
134
136
137 EvtVector4C tmp( _rs[i][0], _rs[i][1], _rs[i][2], _rs[i][3] );
138 return tmp;
139}
140
142
143 EvtDiracSpinor tmp;
144 tmp.set( _rs[0][i], _rs[1][i], _rs[2][i], _rs[3][i] );
145 return tmp;
146}
147
149
150 _rs[i][0] = v.get( 0 );
151 _rs[i][1] = v.get( 1 );
152 _rs[i][2] = v.get( 2 );
153 _rs[i][3] = v.get( 3 );
154}
155
157
158 _rs[0][i] = sp.get_spinor( 0 );
159 _rs[1][i] = sp.get_spinor( 1 );
160 _rs[2][i] = sp.get_spinor( 2 );
161 _rs[3][i] = sp.get_spinor( 3 );
162}
163
165
166 int i, j;
167
169
170 for ( i = 0; i < 4; i++ )
171 {
172 for ( j = 0; j < 4; j++ ) { tmp._rs[i][j] = u.get_spinor( i ) * v.get( j ); }
173 }
174
175 return tmp;
176}
177
179
180 int i, j;
181
183
184 for ( i = 0; i < 4; i++ )
185 {
186 for ( j = 0; j < 4; j++ ) { tmp._rs[i][j] = u.get_spinor( i ) * v.get( j ); }
187 }
188
189 return tmp;
190}
191
193
194 int i, j;
195 EvtComplex tmp = 0.0;
196
197 for ( i = 0; i < 4; i++ )
198 {
199 for ( j = 0; j < 4; j++ ) { tmp += conj( u1._rs[i][j] ) * u2._rs[i][j]; }
200 }
201
202 return tmp;
203}
204
206
207 int i, j;
208
209 for ( i = 0; i < 4; i++ )
210 {
211 for ( j = 0; j < 4; j++ ) { _rs[i][j] += u2._rs[i][j]; }
212 }
213
214 return *this;
215}
216
218
219 return EvtRaritaSchwinger( u1 ) += u2;
220}
221
223
224 int i, j;
225
226 for ( i = 0; i < 4; i++ )
227 {
228 for ( j = 0; j < 4; j++ ) { _rs[i][j] += u2._rs[i][j]; }
229 }
230
231 return *this;
232}
233
235
236 return EvtRaritaSchwinger( u1 ) -= u2;
237}
Evt3Rank3C conj(const Evt3Rank3C &t2)
double alpha
EvtRaritaSchwinger operator+(const EvtRaritaSchwinger &u1, const EvtRaritaSchwinger &u2)
EvtRaritaSchwinger boostTo(const EvtRaritaSchwinger &rs, const EvtVector4R p4)
EvtRaritaSchwinger rotateEuler(const EvtRaritaSchwinger &rs, double alpha, double beta, double gamma)
EvtRaritaSchwinger operator-(const EvtRaritaSchwinger &u1, const EvtRaritaSchwinger &u2)
EvtComplex operator*(const EvtRaritaSchwinger &u1, const EvtRaritaSchwinger &u2)
ostream & operator<<(ostream &s, const EvtRaritaSchwinger &rs)
EvtRaritaSchwinger dirProd(EvtVector4R v, EvtDiracSpinor u)
XmlRpcServer s
**********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
const EvtComplex & get_spinor(int i) const
void set(const EvtComplex &sp0, const EvtComplex &sp1, const EvtComplex &sp2, const EvtComplex &sp3)
void applyRotateEuler(double alpha, double beta, double gamma)
void applyBoostTo(const EvtVector4R &p4)
EvtDiracSpinor getSpinor(int i) const
void applyRotateEuler(double alpha, double beta, double gamma)
void setSpinor(int i, const EvtDiracSpinor &sp)
void set(int i, int j, const EvtComplex &sp)
EvtComplex get(int i, int j) const
EvtRaritaSchwinger & operator+=(const EvtRaritaSchwinger &u2)
EvtRaritaSchwinger & operator-=(const EvtRaritaSchwinger &u2)
void setVector(int i, const EvtVector4C &v)
void applyBoostTo(const EvtVector4R p4)
EvtVector4C getVector(int i) const
void applyRotateEuler(double alpha, double beta, double gamma)
void applyBoostTo(const EvtVector4R &p4)
double get(int i) const