evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
EvtRaritaSchwinger.hh
Go to the documentation of this file.
1 
2 /***********************************************************************
3 * Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4 * *
5 * This file is part of EvtGen. *
6 * *
7 * EvtGen is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * EvtGen is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU General Public License *
18 * along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19 ***********************************************************************/
20 
21 #ifndef EVTRARITASCHWINGER_HH
22 #define EVTRARITASCHWINGER_HH
23 
24 #include "EvtGenBase/EvtComplex.hh"
28 
29 class EvtRaritaSchwinger;
30 EvtRaritaSchwinger rotateEuler( const EvtRaritaSchwinger& rs, double alpha,
31  double beta, double gamma );
34  const EvtVector3R boost );
38  const EvtRaritaSchwinger& u2 );
40  const EvtRaritaSchwinger& u2 );
42 
43 class EvtRaritaSchwinger final {
45  double alpha, double beta,
46  double gamma );
48  const EvtVector4R p4 );
50  const EvtVector3R boost );
51 
54 
56  const EvtRaritaSchwinger& u2 );
58  const EvtRaritaSchwinger& u2 );
59 
60  friend EvtComplex operator*( const EvtRaritaSchwinger& u1,
61  const EvtRaritaSchwinger& u2 );
62 
63  public:
64  inline EvtRaritaSchwinger();
65  inline EvtRaritaSchwinger( const EvtRaritaSchwinger& rs );
66  inline EvtRaritaSchwinger& operator=( const EvtRaritaSchwinger& rs );
67 
68  void set( int i, int j, const EvtComplex& sp );
69 
70  void applyRotateEuler( double alpha, double beta, double gamma );
71  void applyBoostTo( const EvtVector4R p4 );
72  void applyBoostTo( const EvtVector3R boost );
73 
76 
77  EvtComplex get( int i, int j ) const;
78  friend std::ostream& operator<<( std::ostream& s,
79  const EvtRaritaSchwinger& rs );
80 
81  EvtVector4C getVector( int i ) const;
82  EvtDiracSpinor getSpinor( int i ) const;
83 
84  void setVector( int i, const EvtVector4C& v );
85  void setSpinor( int i, const EvtDiracSpinor& sp );
86 
87  private:
88  //First index in spinor index, second is Lorentz index.
89  EvtComplex _rs[4][4];
90 };
91 
93 {
94  int i, j;
95  for ( i = 0; i < 4; i++ ) {
96  for ( j = 0; j < 4; j++ ) {
97  _rs[i][j] = 0.0;
98  }
99  }
100 }
101 
103 {
104  int i, j;
105  for ( i = 0; i < 4; i++ ) {
106  for ( j = 0; j < 4; j++ ) {
107  _rs[i][j] = rs._rs[i][j];
108  }
109  }
110 }
111 
113 {
114  int i, j;
115  for ( i = 0; i < 4; i++ ) {
116  for ( j = 0; j < 4; j++ ) {
117  _rs[i][j] = rs._rs[i][j];
118  }
119  }
120 
121  return *this;
122 }
123 
124 #endif
friend EvtRaritaSchwinger operator-(const EvtRaritaSchwinger &u1, const EvtRaritaSchwinger &u2)
EvtComplex _rs[4][4]
void set(int i, int j, const EvtComplex &sp)
EvtRaritaSchwinger operator+(const EvtRaritaSchwinger &u1, const EvtRaritaSchwinger &u2)
void applyRotateEuler(double alpha, double beta, double gamma)
EvtRaritaSchwinger operator-(const EvtRaritaSchwinger &u1, const EvtRaritaSchwinger &u2)
friend EvtRaritaSchwinger dirProd(EvtVector4R v, EvtDiracSpinor u)
void setSpinor(int i, const EvtDiracSpinor &sp)
EvtComplex operator *(const EvtRaritaSchwinger &u1, const EvtRaritaSchwinger &u2)
friend std::ostream & operator<<(std::ostream &s, const EvtRaritaSchwinger &rs)
EvtComplex get(int i, int j) const
EvtRaritaSchwinger boostTo(const EvtRaritaSchwinger &rs, const EvtVector4R p4)
EvtRaritaSchwinger rotateEuler(const EvtRaritaSchwinger &rs, double alpha, double beta, double gamma)
void setVector(int i, const EvtVector4C &v)
EvtRaritaSchwinger & operator-=(const EvtRaritaSchwinger &u2)
EvtRaritaSchwinger & operator+=(const EvtRaritaSchwinger &u2)
friend EvtRaritaSchwinger rotateEuler(const EvtRaritaSchwinger &rs, double alpha, double beta, double gamma)
EvtRaritaSchwinger & operator=(const EvtRaritaSchwinger &rs)
friend EvtRaritaSchwinger operator+(const EvtRaritaSchwinger &u1, const EvtRaritaSchwinger &u2)
EvtVector4C getVector(int i) const
EvtDiracSpinor getSpinor(int i) const
EvtRaritaSchwinger dirProd(EvtVector4R v, EvtDiracSpinor u)
void applyBoostTo(const EvtVector4R p4)
friend EvtRaritaSchwinger boostTo(const EvtRaritaSchwinger &rs, const EvtVector4R p4)
friend EvtComplex operator *(const EvtRaritaSchwinger &u1, const EvtRaritaSchwinger &u2)