BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtVectorParticle.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: EvtVectorParticle.cc
12//
13// Description: Class to describe spin 1 particles
14//
15// Modification history:
16//
17// DJL/RYD September 25, 1996 Module created
18//
19//------------------------------------------------------------------------
20//
21#include "EvtGenBase/EvtPatches.hh"
22#include <stdlib.h>
23#include <iostream>
24#include <math.h>
25#include "EvtGenBase/EvtComplex.hh"
26#include "EvtGenBase/EvtVectorParticle.hh"
27#include "EvtGenBase/EvtVector4C.hh"
28#include "EvtGenBase/EvtPDL.hh"
29#include "EvtGenBase/EvtReport.hh"
30
32
33
34void EvtVectorParticle::init(EvtId part_n,double e,double px,double py,double pz){
35
36 _validP4=true;
37 setp(e,px,py,pz);
38 setpart_num(part_n);
39
40 _eps[0].set(0.0,1.0,0.0,0.0);
41 _eps[1].set(0.0,0.0,1.0,0.0);
42 _eps[2].set(0.0,0.0,0.0,1.0);
43
45}
46
47void EvtVectorParticle::init(EvtId part_n,const EvtVector4R& p4){
48
49 _validP4=true;
50 setp(p4);
51 setpart_num(part_n);
52
53 _eps[0].set(0.0,1.0,0.0,0.0);
54 _eps[1].set(0.0,0.0,1.0,0.0);
55 _eps[2].set(0.0,0.0,0.0,1.0);
56
58}
59
60
62
63 static EvtVector4C eplus(0.0,-1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
64 static EvtVector4C ezero(0.0,0.0,0.0,1.0);
65 static EvtVector4C eminus(0.0,1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
66
67 static EvtVector4C eplusC(eplus.conj());
68 static EvtVector4C ezeroC(ezero.conj());
69 static EvtVector4C eminusC(eminus.conj());
70
72 R.SetDim(3);
73
74 for ( int i=0; i<3; i++ ) {
75 R.Set(0,i,(eplusC)*_eps[i]);
76 R.Set(1,i,(ezeroC)*_eps[i]);
77 R.Set(2,i,(eminusC)*_eps[i]);
78 }
79
80 return R;
81
82}
83
84
86 double beta,
87 double gamma) const{
88
89 EvtVector4C eplus(0.0,-1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
90 EvtVector4C ezero(0.0,0.0,0.0,1.0);
91 EvtVector4C eminus(0.0,1.0/sqrt(2.0),EvtComplex(0.0,-1.0/sqrt(2.0)),0.0);
92
93 eplus.applyRotateEuler(alpha,beta,gamma);
94 ezero.applyRotateEuler(alpha,beta,gamma);
95 eminus.applyRotateEuler(alpha,beta,gamma);
96
98 R.SetDim(3);
99
100
101 for ( int i=0; i<3; i++ ) {
102 R.Set(0,i,(eplus.conj())*_eps[i]);
103 R.Set(1,i,(ezero.conj())*_eps[i]);
104 R.Set(2,i,(eminus.conj())*_eps[i]);
105 }
106
107 return R;
108
109}
110
111
const double alpha
void setp(double e, double px, double py, double pz)
void init(EvtId part_n, double e, double px, double py, double pz)
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)
Definition: TUtil.h:27