EvtGen
2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Toggle main menu visibility
Loading...
Searching...
No Matches
src
EvtGenBase
EvtNeutrinoParticle.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
21
#include "
EvtGenBase/EvtNeutrinoParticle.hh
"
22
23
#include "
EvtGenBase/EvtComplex.hh
"
24
#include "
EvtGenBase/EvtPDL.hh
"
25
#include "
EvtGenBase/EvtReport.hh
"
26
#include "
EvtGenBase/EvtVector4R.hh
"
27
28
#include <iostream>
29
#include <math.h>
30
#include <stdlib.h>
31
using
std::endl;
32
33
void
EvtNeutrinoParticle::init
(
EvtId
part_n,
const
EvtVector4R
& p4 )
34
{
35
m_validP4
=
true
;
36
setp
( p4 );
37
setpart_num
( part_n );
38
39
double
e, px, py, pz;
40
e = p4.
get
( 0 );
41
px = p4.
get
( 1 );
42
py = p4.
get
( 2 );
43
pz = p4.
get
( 3 );
44
45
if
(
EvtPDL::getStdHep
( part_n ) == 0 ) {
46
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
47
<<
"Error in EvtNeutrinoParticle::init, part_n="
<< part_n.
getId
()
48
<< endl;
49
}
50
51
if
(
EvtPDL::getStdHep
( part_n ) > 0 ) {
52
double
beta, alpha, p2, norm;
53
54
// See Sakurai p. 167-169
55
// and Renton p. 126
56
57
p2 = px * px + py * py + pz * pz;
58
59
beta = acos( pz / sqrt( p2 ) );
60
alpha = atan2( py, px );
61
62
norm = sqrt( 2 * e );
63
64
double
cosb, sinb, cosa, sina;
65
66
cosb = cos( 0.5 * beta );
67
sinb = sin( 0.5 * beta );
68
69
cosa = cos( 0.5 * alpha );
70
sina = sin( 0.5 * alpha );
71
72
m_spinor_parent
.set( -norm * sinb *
EvtComplex
( cosa, -sina ),
73
norm * cosb *
EvtComplex
( cosa, sina ),
74
norm * sinb *
EvtComplex
( cosa, -sina ),
75
-norm * cosb *
EvtComplex
( cosa, sina ) );
76
77
}
else
{
78
px = -p4.
get
( 1 );
79
py = -p4.
get
( 2 );
80
pz = -p4.
get
( 3 );
81
82
double
pn, sqrpn;
83
84
pn = e;
85
sqrpn = sqrt( pn - pz );
86
87
m_spinor_parent
.set( ( 1.0 / sqrpn ) *
EvtComplex
( px, -py ),
88
EvtComplex
( sqrpn, 0.0 ),
89
( -1.0 / sqrpn ) *
EvtComplex
( px, -py ),
90
-
EvtComplex
( sqrpn, 0.0 ) );
91
}
92
93
setLifetime
();
94
}
95
96
EvtDiracSpinor
EvtNeutrinoParticle::spParentNeutrino
()
const
97
{
98
return
m_spinor_parent
;
99
}
100
101
EvtDiracSpinor
EvtNeutrinoParticle::spNeutrino
()
const
102
{
103
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
104
<<
"Tried to get neutrino spinor in restframe"
;
105
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
) <<
"Will terminate execution."
;
106
107
::abort();
108
109
return
m_spinor_rest
;
110
}
111
112
EvtSpinDensity
EvtNeutrinoParticle::rotateToHelicityBasis
()
const
113
{
114
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
115
<<
"rotateToHelicityBasis not implemented for neutrino."
;
116
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
) <<
"Will terminate execution."
;
117
118
::abort();
119
120
EvtSpinDensity
rho;
121
return
rho;
122
}
123
124
EvtSpinDensity
EvtNeutrinoParticle::rotateToHelicityBasis
(
double
,
double
,
125
double
)
const
126
{
127
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
128
<<
"rotateToHelicityBasis(alpha,beta,gama) not implemented for neutrino."
;
129
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
) <<
"Will terminate execution."
;
130
131
::abort();
132
133
EvtSpinDensity
R;
134
R.
setDiag
( 1 );
135
136
return
R;
137
}
EvtComplex.hh
EvtNeutrinoParticle.hh
EvtPDL.hh
EvtReport.hh
EvtGenReport
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition
EvtReport.cpp:32
EVTGEN_ERROR
@ EVTGEN_ERROR
Definition
EvtReport.hh:49
EvtVector4R.hh
EvtComplex
Definition
EvtComplex.hh:29
EvtDiracSpinor
Definition
EvtDiracSpinor.hh:32
EvtId
Definition
EvtId.hh:27
EvtId::getId
int getId() const
Definition
EvtId.hh:41
EvtNeutrinoParticle::spNeutrino
EvtDiracSpinor spNeutrino() const override
Definition
EvtNeutrinoParticle.cpp:101
EvtNeutrinoParticle::m_spinor_rest
EvtDiracSpinor m_spinor_rest
Definition
EvtNeutrinoParticle.hh:40
EvtNeutrinoParticle::spParentNeutrino
EvtDiracSpinor spParentNeutrino() const override
Definition
EvtNeutrinoParticle.cpp:96
EvtNeutrinoParticle::m_spinor_parent
EvtDiracSpinor m_spinor_parent
Definition
EvtNeutrinoParticle.hh:41
EvtNeutrinoParticle::rotateToHelicityBasis
EvtSpinDensity rotateToHelicityBasis() const override
Definition
EvtNeutrinoParticle.cpp:112
EvtNeutrinoParticle::init
void init(EvtId part_n, const EvtVector4R &p4) override
Definition
EvtNeutrinoParticle.cpp:33
EvtPDL::getStdHep
static int getStdHep(EvtId id)
Definition
EvtPDL.cpp:356
EvtParticle::setLifetime
void setLifetime()
Definition
EvtParticle.cpp:100
EvtParticle::m_validP4
bool m_validP4
Definition
EvtParticle.hh:460
EvtParticle::setp
void setp(double e, double px, double py, double pz)
Definition
EvtParticle.hh:442
EvtParticle::setpart_num
void setpart_num(EvtId particle_number)
Definition
EvtParticle.hh:454
EvtSpinDensity
Definition
EvtSpinDensity.hh:28
EvtSpinDensity::setDiag
void setDiag(int n)
Definition
EvtSpinDensity.cpp:118
EvtVector4R
Definition
EvtVector4R.hh:29
EvtVector4R::get
double get(int i) const
Definition
EvtVector4R.hh:163
Generated by
1.17.0