BOSS 8.0.0
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 "EvtComplex.hh"
23#include "EvtPDL.hh"
24#include "EvtPatches.hh"
25#include "EvtReport.hh"
26#include "EvtVector4R.hh"
27#include <iostream>
28#include <math.h>
29#include <stdlib.h>
30
31using std::endl;
32
34
36
37void EvtNeutrinoParticle::init( EvtId part_n, const EvtVector4R& p4 ) {
38
39 _validP4 = true;
40 setp( p4 );
41 setpart_num( part_n );
42
43 double e, px, py, pz;
44 e = p4.get( 0 );
45 px = p4.get( 1 );
46 py = p4.get( 2 );
47 pz = p4.get( 3 );
48
49 if ( EvtPDL::getStdHep( part_n ) == 0 )
50 {
51 report( ERROR, "EvtGen" ) << "Error in EvtNeutrinoParticle::init, part_n="
52 << part_n.getId() << endl;
53 }
54
55 if ( EvtPDL::getStdHep( part_n ) > 0 )
56 {
57
58 double beta, alpha, p2, norm;
59
60 // See Sakurai p. 167-169
61 // and Renton p. 126
62
63 p2 = px * px + py * py + pz * pz;
64
65 beta = acos( pz / sqrt( p2 ) );
66 alpha = atan2( py, px );
67
68 norm = sqrt( 2 * e );
69
70 double cosb, sinb, cosa, sina;
71
72 cosb = cos( 0.5 * beta );
73 sinb = sin( 0.5 * beta );
74
75 cosa = cos( 0.5 * alpha );
76 sina = sin( 0.5 * alpha );
77
78 spinor_parent.set(
79 -norm * sinb * EvtComplex( cosa, -sina ), norm * cosb * EvtComplex( cosa, sina ),
80 norm * sinb * EvtComplex( cosa, -sina ), -norm * cosb * EvtComplex( cosa, sina ) );
81 }
82 else
83 {
84
85 px = -p4.get( 1 );
86 py = -p4.get( 2 );
87 pz = -p4.get( 3 );
88
89 double pn, sqrpn;
90
91 pn = e;
92 sqrpn = sqrt( pn - pz );
93
94 spinor_parent.set( ( 1.0 / sqrpn ) * EvtComplex( px, -py ), EvtComplex( sqrpn, 0.0 ),
95 ( -1.0 / sqrpn ) * EvtComplex( px, -py ), -EvtComplex( sqrpn, 0.0 ) );
96 }
97
99}
100
102
104
105 report( ERROR, "EvtGen" ) << "Tried to get neutrino spinor in restframe";
106 report( ERROR, "EvtGen" ) << "Will terminate execution.";
107
108 ::abort();
109
110 return spinor_rest;
111}
112
114
115 report( ERROR, "EvtGen" ) << "rotateToHelicityBasis not implemented for neutrino.";
116 report( ERROR, "EvtGen" ) << "Will terminate execution.";
117
118 ::abort();
119
120 EvtSpinDensity rho;
121 return rho;
122}
123
125 double gamma ) const {
126
127 report( ERROR, "EvtGen" )
128 << "rotateToHelicityBasis(alpha,beta,gamma) not implemented for neutrino.";
129 report( ERROR, "EvtGen" ) << "Will terminate execution.";
130
131 ::abort();
132
133 EvtSpinDensity rho;
134 return rho;
135}
double p2[4]
double alpha
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:34
@ ERROR
Definition EvtReport.hh:49
Definition EvtId.hh:27
int getId() const
Definition EvtId.hh:40
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:61
void setLifetime()
void setp(double e, double px, double py, double pz)
void setpart_num(EvtId particle_number)
double get(int i) const