]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TEvtGen/EvtGenBase/EvtRaritaSchwinger.hh
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenBase / EvtRaritaSchwinger.hh
CommitLineData
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
29class EvtRaritaSchwinger ;
30EvtRaritaSchwinger rotateEuler(const EvtRaritaSchwinger& rs,
31 double alpha,double beta,double gamma);
32EvtRaritaSchwinger boostTo(const EvtRaritaSchwinger& rs,
33 const EvtVector4R p4);
34EvtRaritaSchwinger boostTo(const EvtRaritaSchwinger& rs,
35 const EvtVector3R boost);
36EvtRaritaSchwinger dirProd(EvtVector4R v,EvtDiracSpinor u);
37EvtRaritaSchwinger dirProd(EvtVector4C v,EvtDiracSpinor u);
38EvtRaritaSchwinger operator+(const EvtRaritaSchwinger& u1,
39 const EvtRaritaSchwinger& u2);
40EvtRaritaSchwinger operator-(const EvtRaritaSchwinger& u1,
41 const EvtRaritaSchwinger& u2);
42EvtComplex operator*(const EvtRaritaSchwinger& u1,
43 const EvtRaritaSchwinger& u2);
44
45class 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
65public:
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
92private:
93
94 //First index in spinor index, second is Lorentz index.
95 EvtComplex _rs[4][4];
96
97};
98
99EvtRaritaSchwinger::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
110EvtRaritaSchwinger::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
121EvtRaritaSchwinger& 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