EvtGen 2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Loading...
Searching...
No Matches
EvtRaritaSchwingerParticle.cpp
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
22
25#include "EvtGenBase/EvtPDL.hh"
28
29#include <iostream>
30#include <math.h>
31#include <stdlib.h>
32using std::endl;
33
35{
36 m_validP4 = true;
37 setp( p4 );
38 setpart_num( id );
39
40 if ( EvtPDL::getStdHep( id ) == 0 ) {
41 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
42 << "Error in EvtRaritaSchwingerParticle::init, part_n=" << id.getId()
43 << endl;
44 ::abort();
45 }
46
47 double sqmt2 = sqrt( 2.0 * ( this->getP4().mass() ) );
48
49 EvtDiracSpinor spplus;
50 EvtDiracSpinor spminus;
51
52 if ( EvtPDL::getStdHep( getId() ) > 0 ) {
53 spplus.set( sqmt2, 0.0, 0.0, 0.0 );
54 spminus.set( 0.0, sqmt2, 0.0, 0.0 );
55 } else {
56 spplus.set( 0.0, 0.0, sqmt2, 0.0 );
57 spminus.set( 0.0, 0.0, 0.0, sqmt2 );
58 }
59
60 static const EvtVector4C eplus( 0.0, -1.0 / sqrt( 2.0 ),
61 EvtComplex( 0.0, -1.0 / sqrt( 2.0 ) ), 0.0 );
62 static const EvtVector4C ezero( 0.0, 0.0, 0.0, 1.0 );
63 static const EvtVector4C eminus( 0.0, 1.0 / sqrt( 2.0 ),
64 EvtComplex( 0.0, -1.0 / sqrt( 2.0 ) ), 0.0 );
65
66 m_spinorRest[0] = dirProd( eplus, spplus );
67 m_spinorRest[1] = dirProd( sqrt( 2.0 / 3.0 ) * ezero, spplus ) +
68 dirProd( sqrt( 1.0 / 3.0 ) * eplus, spminus );
69 m_spinorRest[2] = dirProd( sqrt( 2.0 / 3.0 ) * ezero, spminus ) +
70 dirProd( sqrt( 1.0 / 3.0 ) * eminus, spplus );
71 m_spinorRest[3] = dirProd( eminus, spminus );
72
73 m_spinor[0] = boostTo( m_spinorRest[0], p4 );
74 m_spinor[1] = boostTo( m_spinorRest[1], p4 );
75 m_spinor[2] = boostTo( m_spinorRest[2], p4 );
76 m_spinor[3] = boostTo( m_spinorRest[3], p4 );
77
79}
80
82 EvtId id, const EvtVector4R& p4, const EvtRaritaSchwinger& prod1,
83 const EvtRaritaSchwinger& prod2, const EvtRaritaSchwinger& prod3,
84 const EvtRaritaSchwinger& prod4, const EvtRaritaSchwinger& rest1,
85 const EvtRaritaSchwinger& rest2, const EvtRaritaSchwinger& rest3,
86 const EvtRaritaSchwinger& rest4 )
87{
88 m_validP4 = true;
89 setp( p4 );
90 setpart_num( id );
91
92 if ( EvtPDL::getStdHep( id ) == 0 ) {
93 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
94 << "Error in EvtRaritaSchwingerParticle::init, part_n=" << id.getId()
95 << std::endl;
96 ::abort();
97 }
98 m_spinorRest[0] = rest1;
99 m_spinorRest[1] = rest2;
100 m_spinorRest[2] = rest3;
101 m_spinorRest[3] = rest4;
102
103 m_spinor[0] = prod1;
104 m_spinor[1] = prod2;
105 m_spinor[2] = prod3;
106 m_spinor[3] = prod4;
107
108 setLifetime();
109}
110
115
120
122{
123 double sqmt2 = sqrt( 2.0 * ( this->getP4().mass() ) );
124
125 EvtDiracSpinor spplus;
126 EvtDiracSpinor spminus;
127
128 if ( EvtPDL::getStdHep( getId() ) > 0 ) {
129 spplus.set( 1.0, 0.0, 0.0, 0.0 );
130 spminus.set( 0.0, 1.0, 0.0, 0.0 );
131 } else {
132 spplus.set( 0.0, 0.0, 1.0, 0.0 );
133 spminus.set( 0.0, 0.0, 0.0, 1.0 );
134 }
135
136 EvtVector4C eplus( 0.0, -1.0 / sqrt( 2.0 ),
137 EvtComplex( 0.0, -1.0 / sqrt( 2.0 ) ), 0.0 );
138 EvtVector4C ezero( 0.0, 0.0, 0.0, 1.0 );
139 EvtVector4C eminus( 0.0, 1.0 / sqrt( 2.0 ),
140 EvtComplex( 0.0, -1.0 / sqrt( 2.0 ) ), 0.0 );
141
142 EvtRaritaSchwinger sppp = dirProd( eplus, spplus );
143 EvtRaritaSchwinger spp = dirProd( sqrt( 2.0 / 3.0 ) * ezero, spplus ) +
144 dirProd( sqrt( 1.0 / 3.0 ) * eplus, spminus );
145 EvtRaritaSchwinger spm = dirProd( sqrt( 2.0 / 3.0 ) * ezero, spminus ) +
146 dirProd( sqrt( 1.0 / 3.0 ) * eminus, spplus );
147 EvtRaritaSchwinger spmm = dirProd( eminus, spminus );
148
150 R.setDim( 4 );
151
152 for ( int i = 0; i < 4; i++ ) {
153 R.set( 0, i, ( sppp * m_spinorRest[i] ) / sqmt2 );
154 R.set( 1, i, ( spp * m_spinorRest[i] ) / sqmt2 );
155 R.set( 2, i, ( spm * m_spinorRest[i] ) / sqmt2 );
156 R.set( 3, i, ( spmm * m_spinorRest[i] ) / sqmt2 );
157 }
158
159 return R;
160}
161
163 double alpha, double beta, double gamma ) const
164{
165 EvtDiracSpinor spplus;
166 EvtDiracSpinor spminus;
167
168 if ( EvtPDL::getStdHep( getId() ) > 0 ) {
169 spplus.set( 1.0, 0.0, 0.0, 0.0 );
170 spminus.set( 0.0, 1.0, 0.0, 0.0 );
171 } else {
172 spplus.set( 0.0, 0.0, 1.0, 0.0 );
173 spminus.set( 0.0, 0.0, 0.0, 1.0 );
174 }
175
176 EvtVector4C eplus( 0.0, -1.0 / sqrt( 2.0 ),
177 EvtComplex( 0.0, -1.0 / sqrt( 2.0 ) ), 0.0 );
178 EvtVector4C ezero( 0.0, 0.0, 0.0, 1.0 );
179 EvtVector4C eminus( 0.0, 1.0 / sqrt( 2.0 ),
180 EvtComplex( 0.0, -1.0 / sqrt( 2.0 ) ), 0.0 );
181
182 EvtRaritaSchwinger sppp = dirProd( eplus, spplus );
183 EvtRaritaSchwinger spp = dirProd( sqrt( 2.0 / 3.0 ) * ezero, spplus ) +
184 dirProd( sqrt( 1.0 / 3.0 ) * eplus, spminus );
185 EvtRaritaSchwinger spm = dirProd( sqrt( 2.0 / 3.0 ) * ezero, spminus ) +
186 dirProd( sqrt( 1.0 / 3.0 ) * eminus, spplus );
187 EvtRaritaSchwinger spmm = dirProd( eminus, spminus );
188
189 sppp.applyRotateEuler( alpha, beta, gamma );
190 spp.applyRotateEuler( alpha, beta, gamma );
191 spm.applyRotateEuler( alpha, beta, gamma );
192 spmm.applyRotateEuler( alpha, beta, gamma );
193
195 R.setDim( 4 );
196
197 double sqmt2 = sqrt( 2.0 * ( this->getP4().mass() ) );
198
199 for ( int i = 0; i < 4; i++ ) {
200 R.set( 0, i, ( sppp * m_spinorRest[i] ) / sqmt2 );
201 R.set( 1, i, ( spp * m_spinorRest[i] ) / sqmt2 );
202 R.set( 2, i, ( spm * m_spinorRest[i] ) / sqmt2 );
203 R.set( 3, i, ( spmm * m_spinorRest[i] ) / sqmt2 );
204 }
205
206 return R;
207}
EvtRaritaSchwinger boostTo(const EvtRaritaSchwinger &rs, const EvtVector4R p4)
EvtRaritaSchwinger dirProd(EvtVector4R v, EvtDiracSpinor u)
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition EvtReport.cpp:32
@ EVTGEN_ERROR
Definition EvtReport.hh:49
void set(const EvtComplex &sp0, const EvtComplex &sp1, const EvtComplex &sp2, const EvtComplex &sp3)
Definition EvtId.hh:27
static int getStdHep(EvtId id)
Definition EvtPDL.cpp:356
EvtId getId() const
void setLifetime()
const EvtVector4R & getP4() const
void setp(double e, double px, double py, double pz)
double mass() const
void setpart_num(EvtId particle_number)
EvtRaritaSchwinger spRS(int) const override
EvtRaritaSchwinger spRSParent(int) const override
EvtSpinDensity rotateToHelicityBasis() const override
void init(EvtId id, const EvtVector4R &p4) override
void applyRotateEuler(double alpha, double beta, double gamma)
void setDim(int n)
void set(int i, int j, const EvtComplex &rhoij)