BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
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 "EvtVectorParticle.hh"
22#include "EvtComplex.hh"
23#include "EvtPDL.hh"
24#include "EvtPatches.hh"
25#include "EvtReport.hh"
26#include "EvtVector4C.hh"
27#include <iostream>
28#include <math.h>
29#include <stdlib.h>
30
32
33void EvtVectorParticle::init( EvtId part_n, double e, double px, double py, double pz ) {
34
35 _validP4 = true;
36 setp( e, px, py, pz );
37 setpart_num( part_n );
38
39 _eps[0].set( 0.0, 1.0, 0.0, 0.0 );
40 _eps[1].set( 0.0, 0.0, 1.0, 0.0 );
41 _eps[2].set( 0.0, 0.0, 0.0, 1.0 );
42
44}
45
46void EvtVectorParticle::init( EvtId part_n, const EvtVector4R& p4 ) {
47
48 _validP4 = true;
49 setp( p4 );
50 setpart_num( part_n );
51
52 _eps[0].set( 0.0, 1.0, 0.0, 0.0 );
53 _eps[1].set( 0.0, 0.0, 1.0, 0.0 );
54 _eps[2].set( 0.0, 0.0, 0.0, 1.0 );
55
57}
58
60
61 static EvtVector4C eplus( 0.0, -1.0 / sqrt( 2.0 ), EvtComplex( 0.0, -1.0 / sqrt( 2.0 ) ),
62 0.0 );
63 static EvtVector4C ezero( 0.0, 0.0, 0.0, 1.0 );
64 static EvtVector4C eminus( 0.0, 1.0 / sqrt( 2.0 ), EvtComplex( 0.0, -1.0 / sqrt( 2.0 ) ),
65 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 {
76 R.Set( 0, i, (eplusC)*_eps[i] );
77 R.Set( 1, i, (ezeroC)*_eps[i] );
78 R.Set( 2, i, (eminusC)*_eps[i] );
79 }
80
81 return R;
82}
83
85 double gamma ) const {
86
87 EvtVector4C eplus( 0.0, -1.0 / sqrt( 2.0 ), EvtComplex( 0.0, -1.0 / sqrt( 2.0 ) ), 0.0 );
88 EvtVector4C ezero( 0.0, 0.0, 0.0, 1.0 );
89 EvtVector4C eminus( 0.0, 1.0 / sqrt( 2.0 ), EvtComplex( 0.0, -1.0 / sqrt( 2.0 ) ), 0.0 );
90
91 eplus.applyRotateEuler( alpha, beta, gamma );
92 ezero.applyRotateEuler( alpha, beta, gamma );
93 eminus.applyRotateEuler( alpha, beta, gamma );
94
96 R.SetDim( 3 );
97
98 for ( int i = 0; i < 3; i++ )
99 {
100 R.Set( 0, i, ( eplus.conj() ) * _eps[i] );
101 R.Set( 1, i, ( ezero.conj() ) * _eps[i] );
102 R.Set( 2, i, ( eminus.conj() ) * _eps[i] );
103 }
104
105 return R;
106}
double alpha
Definition EvtId.hh:27
void setLifetime()
void setp(double e, double px, double py, double pz)
void setpart_num(EvtId particle_number)
void applyRotateEuler(double alpha, double beta, double gamma)
EvtVector4C conj() const
EvtSpinDensity rotateToHelicityBasis() const
void init(EvtId part_n, double e, double px, double py, double pz)