BOSS
7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtNeutrinoParticle.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) 1998 Caltech, UCSB
10
//
11
// Module: EvtNeutrinoParticle.cc
12
//
13
// Description: Class to describe neutrinos
14
//
15
// Modification history:
16
//
17
// DJL/RYD September 25, 1996 Module created
18
//
19
//------------------------------------------------------------------------
20
//
21
#include "EvtGenBase/EvtPatches.hh"
22
#include <iostream>
23
#include <math.h>
24
#include <stdlib.h>
25
#include "EvtGenBase/EvtComplex.hh"
26
#include "EvtGenBase/EvtNeutrinoParticle.hh"
27
#include "EvtGenBase/EvtVector4R.hh"
28
#include "EvtGenBase/EvtPDL.hh"
29
#include "EvtGenBase/EvtReport.hh"
30
31
using
std::endl;
32
33
34
EvtNeutrinoParticle::~EvtNeutrinoParticle
(){}
35
36
EvtNeutrinoParticle::EvtNeutrinoParticle
(){
37
38
return
;
39
}
40
41
void
EvtNeutrinoParticle::init
(
EvtId
part_n,
const
EvtVector4R
& p4){
42
43
_validP4
=
true
;
44
setp
(p4);
45
setpart_num
(part_n);
46
47
double
e,px,py,pz;
48
e=p4.
get
(0);
49
px=p4.
get
(1);
50
py=p4.
get
(2);
51
pz=p4.
get
(3);
52
53
if
(
EvtPDL::getStdHep
(part_n)==0){
54
report
(
ERROR
,
"EvtGen"
) <<
"Error in EvtNeutrinoParticle::init, part_n="
55
<< part_n.
getId
()<<endl;
56
}
57
58
if
(
EvtPDL::getStdHep
(part_n)>0){
59
60
double
beta,
alpha
,p2,norm;
61
62
// See Sakurai p. 167-169
63
// and Renton p. 126
64
65
p2=px*px+py*py+pz*pz;
66
67
beta=acos(pz/sqrt(p2));
68
alpha
=atan2(py,px);
69
70
norm=sqrt(2*e);
71
72
double
cosb,sinb,cosa,sina;
73
74
cosb=
cos
(0.5*beta);
75
sinb=
sin
(0.5*beta);
76
77
cosa=
cos
(0.5*
alpha
);
78
sina=
sin
(0.5*
alpha
);
79
80
spinor_parent.
set
(-norm*sinb*
EvtComplex
(cosa,-sina),
81
norm*cosb*
EvtComplex
(cosa,sina),
82
norm*sinb*
EvtComplex
(cosa,-sina),
83
-norm*cosb*
EvtComplex
(cosa,sina));
84
85
}
86
else
{
87
88
px=-p4.
get
(1);
89
py=-p4.
get
(2);
90
pz=-p4.
get
(3);
91
92
double
pn,sqrpn;
93
94
pn=e;
95
sqrpn=sqrt(pn-pz);
96
97
spinor_parent.
set
((1.0/sqrpn)*
EvtComplex
(px,-py),
98
EvtComplex
(sqrpn,0.0),
99
(-1.0/sqrpn)*
EvtComplex
(px,-py),
100
-
EvtComplex
(sqrpn,0.0));
101
102
103
}
104
105
setLifetime
();
106
107
}
108
109
110
EvtDiracSpinor
EvtNeutrinoParticle::spParentNeutrino
()
const
{
111
112
return
spinor_parent;
113
}
114
115
EvtDiracSpinor
EvtNeutrinoParticle::spNeutrino
()
const
{
116
117
report
(
ERROR
,
"EvtGen"
) <<
"Tried to get neutrino spinor in restframe"
;
118
report
(
ERROR
,
"EvtGen"
) <<
"Will terminate execution."
;
119
120
::abort();
121
122
return
spinor_rest;
123
}
124
125
126
EvtSpinDensity
EvtNeutrinoParticle::rotateToHelicityBasis
()
const
{
127
128
report
(
ERROR
,
"EvtGen"
) <<
"rotateToHelicityBasis not implemented for neutrino."
;
129
report
(
ERROR
,
"EvtGen"
) <<
"Will terminate execution."
;
130
131
::abort();
132
133
EvtSpinDensity
rho;
134
return
rho;
135
136
}
137
138
EvtSpinDensity
EvtNeutrinoParticle::rotateToHelicityBasis
(
double
alpha
,
139
double
beta,
140
double
gamma)
const
{
141
142
report
(
ERROR
,
"EvtGen"
) <<
"rotateToHelicityBasis(alpha,beta,gamma) not implemented for neutrino."
;
143
report
(
ERROR
,
"EvtGen"
) <<
"Will terminate execution."
;
144
145
::abort();
146
147
EvtSpinDensity
rho;
148
return
rho;
149
150
151
}
sin
double sin(const BesAngle a)
Definition:
BesAngle.h:210
cos
double cos(const BesAngle a)
Definition:
BesAngle.h:213
alpha
const double alpha
Definition:
FastVertexFit.cxx:4
report
ostream & report(Severity severity, const char *facility)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtReport.cc:36
ERROR
@ ERROR
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtReport.hh:49
EvtComplex
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtComplex.hh:28
EvtDiracSpinor
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtDiracSpinor.hh:52
EvtDiracSpinor::set
void set(const EvtComplex &sp0, const EvtComplex &sp1, const EvtComplex &sp2, const EvtComplex &sp3)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtDiracSpinor.cc:40
EvtId
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtId.hh:27
EvtId::getId
int getId() const
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtId.hh:41
EvtNeutrinoParticle::spParentNeutrino
EvtDiracSpinor spParentNeutrino() const
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtNeutrinoParticle.cc:110
EvtNeutrinoParticle::spNeutrino
EvtDiracSpinor spNeutrino() const
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtNeutrinoParticle.cc:115
EvtNeutrinoParticle::init
void init(EvtId part_n, const EvtVector4R &p4)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtNeutrinoParticle.cc:41
EvtNeutrinoParticle::EvtNeutrinoParticle
EvtNeutrinoParticle()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtNeutrinoParticle.cc:36
EvtNeutrinoParticle::rotateToHelicityBasis
EvtSpinDensity rotateToHelicityBasis() const
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtNeutrinoParticle.cc:126
EvtNeutrinoParticle::~EvtNeutrinoParticle
virtual ~EvtNeutrinoParticle()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtNeutrinoParticle.cc:34
EvtPDL::getStdHep
static int getStdHep(EvtId id)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtPDL.hh:56
EvtParticle::_validP4
bool _validP4
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParticle.hh:407
EvtParticle::setLifetime
void setLifetime()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParticle.cc:93
EvtParticle::setp
void setp(double e, double px, double py, double pz)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParticle.hh:398
EvtParticle::setpart_num
void setpart_num(EvtId particle_number)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParticle.hh:400
EvtSpinDensity
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtSpinDensity.hh:27
EvtVector4R
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtVector4R.hh:29
EvtVector4R::get
double get(int i) const
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtVector4R.hh:179
source
Generator
BesEvtGen
bak-BesEvtGen-00-04-08
src
EvtGen
EvtGenBase
EvtNeutrinoParticle.cc
Generated by
1.9.6