BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
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//
22#include <iostream>
23#include <math.h>
24#include <stdlib.h>
28#include "EvtGenBase/EvtPDL.hh"
30
31using std::endl;
32
33
35
37
38 return;
39}
40
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
111
112 return spinor_parent;
113}
114
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
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
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}
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ ERROR
Definition: EvtReport.hh:49
const double alpha
double sin(const BesAngle a)
double cos(const BesAngle a)
void set(const EvtComplex &sp0, const EvtComplex &sp1, const EvtComplex &sp2, const EvtComplex &sp3)
Definition: EvtId.hh:27
int getId() const
Definition: EvtId.hh:41
EvtDiracSpinor spParentNeutrino() const
EvtDiracSpinor spNeutrino() const
void init(EvtId part_n, const EvtVector4R &p4)
EvtSpinDensity rotateToHelicityBasis() const
static int getStdHep(EvtId id)
Definition: EvtPDL.hh:56
void setLifetime()
Definition: EvtParticle.cc:93
void setp(double e, double px, double py, double pz)
Definition: EvtParticle.hh:398
void setpart_num(EvtId particle_number)
Definition: EvtParticle.hh:400
double get(int i) const
Definition: EvtVector4R.hh:179