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: EvtHighSpinParticle.cc
12 : //
13 : // Description: Class to describe particles with spin>2.
14 : //
15 : // Modification history:
16 : //
17 : // RYD August 8, 2000 Module created
18 : //
19 : //------------------------------------------------------------------------
20 : //
21 : #include "EvtGenBase/EvtPatches.hh"
22 : #include "EvtGenBase/EvtPatches.hh"
23 : #include <iostream>
24 : #include <math.h>
25 : #include <assert.h>
26 : #include "EvtGenBase/EvtHighSpinParticle.hh"
27 : #include "EvtGenBase/EvtVector4R.hh"
28 : #include "EvtGenBase/EvtPDL.hh"
29 : #include "EvtGenBase/EvtSpinDensity.hh"
30 : #include "EvtGenBase/EvtdFunction.hh"
31 :
32 :
33 0 : EvtHighSpinParticle::~EvtHighSpinParticle() {}
34 :
35 :
36 : void EvtHighSpinParticle::init(EvtId id,const EvtVector4R& p4){
37 :
38 0 : _validP4=true;
39 0 : setp(p4);
40 0 : setpart_num(id);
41 :
42 0 : setLifetime();
43 :
44 0 : }
45 :
46 : EvtSpinDensity EvtHighSpinParticle::rotateToHelicityBasis() const{
47 :
48 0 : int n=EvtSpinType::getSpinStates(EvtPDL::getSpinType(getId()));
49 :
50 0 : EvtSpinDensity R;
51 0 : R.setDiag(n);
52 :
53 : return R;
54 :
55 0 : }
56 :
57 :
58 :
59 : EvtSpinDensity EvtHighSpinParticle::rotateToHelicityBasis(double alpha,
60 : double beta,
61 : double gamma) const{
62 :
63 : int i,j;
64 :
65 0 : int n=EvtSpinType::getSpinStates(EvtPDL::getSpinType(getId()));
66 :
67 0 : EvtSpinDensity R;
68 :
69 0 : R.setDim(n);
70 :
71 0 : int J2=EvtSpinType::getSpin2(EvtPDL::getSpinType(getId()));
72 :
73 0 : assert(n==J2+1);
74 :
75 : int *lambda2;
76 :
77 0 : lambda2=new int[J2+1];
78 :
79 0 : for(i=0;i<J2+1;i++){
80 0 : lambda2[i]=J2-i*2;
81 : }
82 :
83 :
84 0 : for(i=0;i<n;i++){
85 0 : for(j=0;j<n;j++){
86 0 : R.set(i,j,EvtdFunction::d(J2,lambda2[j],lambda2[i],beta)*
87 0 : exp(EvtComplex(0.0,0.5*(alpha*lambda2[i]-gamma*lambda2[j]))));
88 : }
89 : }
90 :
91 0 : delete [] lambda2;
92 :
93 : return R;
94 :
95 :
96 0 : }
97 :
98 :
|