Line data Source code
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 : using std::endl;
31 :
32 :
33 0 : EvtNeutrinoParticle::~EvtNeutrinoParticle(){}
34 :
35 0 : EvtNeutrinoParticle::EvtNeutrinoParticle(){
36 :
37 0 : return;
38 0 : }
39 :
40 : void EvtNeutrinoParticle::init(EvtId part_n,const EvtVector4R& p4){
41 :
42 0 : _validP4=true;
43 0 : setp(p4);
44 0 : setpart_num(part_n);
45 :
46 : double e,px,py,pz;
47 0 : e=p4.get(0);
48 0 : px=p4.get(1);
49 0 : py=p4.get(2);
50 0 : pz=p4.get(3);
51 :
52 0 : if (EvtPDL::getStdHep(part_n)==0){
53 0 : report(Severity::Error,"EvtGen") << "Error in EvtNeutrinoParticle::init, part_n="
54 0 : << part_n.getId()<<endl;
55 0 : }
56 :
57 0 : if (EvtPDL::getStdHep(part_n)>0){
58 :
59 : double beta,alpha,p2,norm;
60 :
61 : // See Sakurai p. 167-169
62 : // and Renton p. 126
63 :
64 0 : p2=px*px+py*py+pz*pz;
65 :
66 0 : beta=acos(pz/sqrt(p2));
67 0 : alpha=atan2(py,px);
68 :
69 0 : norm=sqrt(2*e);
70 :
71 : double cosb,sinb,cosa,sina;
72 :
73 0 : cosb=cos(0.5*beta);
74 0 : sinb=sin(0.5*beta);
75 :
76 0 : cosa=cos(0.5*alpha);
77 0 : sina=sin(0.5*alpha);
78 :
79 0 : spinor_parent.set(-norm*sinb*EvtComplex(cosa,-sina),
80 0 : norm*cosb*EvtComplex(cosa,sina),
81 0 : norm*sinb*EvtComplex(cosa,-sina),
82 0 : -norm*cosb*EvtComplex(cosa,sina));
83 :
84 0 : }
85 : else{
86 :
87 0 : px=-p4.get(1);
88 0 : py=-p4.get(2);
89 0 : pz=-p4.get(3);
90 :
91 : double pn,sqrpn;
92 :
93 : pn=e;
94 0 : sqrpn=sqrt(pn-pz);
95 :
96 0 : spinor_parent.set((1.0/sqrpn)*EvtComplex(px,-py),
97 0 : EvtComplex(sqrpn,0.0),
98 0 : (-1.0/sqrpn)*EvtComplex(px,-py),
99 0 : -EvtComplex(sqrpn,0.0));
100 :
101 :
102 : }
103 :
104 0 : setLifetime();
105 :
106 0 : }
107 :
108 :
109 : EvtDiracSpinor EvtNeutrinoParticle::spParentNeutrino() const {
110 :
111 0 : return spinor_parent;
112 : }
113 :
114 : EvtDiracSpinor EvtNeutrinoParticle::spNeutrino() const {
115 :
116 0 : report(Severity::Error,"EvtGen") << "Tried to get neutrino spinor in restframe";
117 0 : report(Severity::Error,"EvtGen") << "Will terminate execution.";
118 :
119 0 : ::abort();
120 :
121 : return spinor_rest;
122 : }
123 :
124 :
125 : EvtSpinDensity EvtNeutrinoParticle::rotateToHelicityBasis() const{
126 :
127 0 : report(Severity::Error,"EvtGen") << "rotateToHelicityBasis not implemented for neutrino.";
128 0 : report(Severity::Error,"EvtGen") << "Will terminate execution.";
129 :
130 0 : ::abort();
131 :
132 : EvtSpinDensity rho;
133 : return rho;
134 :
135 : }
136 :
137 : EvtSpinDensity EvtNeutrinoParticle::rotateToHelicityBasis(double,
138 : double,
139 : double) const{
140 :
141 0 : report(Severity::Error,"EvtGen") << "rotateToHelicityBasis(alpha,beta,gama) not implemented for neutrino.";
142 0 : report(Severity::Error,"EvtGen") << "Will terminate execution.";
143 :
144 0 : ::abort();
145 :
146 : EvtSpinDensity R;
147 : R.setDiag(1);
148 :
149 : return R;
150 :
151 : }
152 :
153 :
154 :
|