CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtdFunctionSingle Class Reference

#include <EvtdFunctionSingle.hh>

Public Member Functions

 EvtdFunctionSingle ()
 
 ~EvtdFunctionSingle ()
 
void init (int j, int m1, int m2)
 
double d (int j, int m1, int m2, double theta)
 

Detailed Description

Definition at line 24 of file EvtdFunctionSingle.hh.

Constructor & Destructor Documentation

◆ EvtdFunctionSingle()

EvtdFunctionSingle::EvtdFunctionSingle ( )

Definition at line 29 of file EvtdFunctionSingle.cc.

29 {
30 _j=0;
31 _m1=0;
32 _m2=0;
33 _coef=0;
34 _kmin=0;
35 _kmax=0;
36}

◆ ~EvtdFunctionSingle()

EvtdFunctionSingle::~EvtdFunctionSingle ( )

Definition at line 39 of file EvtdFunctionSingle.cc.

39 {
40 if (_coef!=0) delete [] _coef;
41}

Member Function Documentation

◆ d()

double EvtdFunctionSingle::d ( int j,
int m1,
int m2,
double theta )

Definition at line 81 of file EvtdFunctionSingle.cc.

81 {
82
83 //report(INFO,"EvtGen") << "j,m1,m2:"<<j<<","<<m1<<","<<m2<<" theta:"<<theta<<endl;
84
85 assert(j==_j);
86 assert(m1==_m1);
87 assert(m2==_m2);
88
89 double c2=cos(0.5*theta);
90 double s2=sin(0.5*theta);
91
92 double d=0.0;
93
94 int k;
95 for(k=_kmin;k<=_kmax;k+=2){
96 d+=_coef[(k-_kmin)/2]*pow(c2,(2*_j-2*k+m2-m1)/2)*pow(s2,(2*k-m2+m1)/2);
97 }
98
99 return d;
100
101}
double sin(const BesAngle a)
Definition BesAngle.h:210
double cos(const BesAngle a)
Definition BesAngle.h:213
double d(int j, int m1, int m2, double theta)

Referenced by EvtdFunction::d(), and d().

◆ init()

void EvtdFunctionSingle::init ( int j,
int m1,
int m2 )

Definition at line 44 of file EvtdFunctionSingle.cc.

44 {
45
46 assert(abs(m2)>=abs(m1));
47 assert(m2>=0);
48
49 _j=j;
50 _m1=m1;
51 _m2=m2;
52
53 _kmin=_m2-_m1;
54 _kmax=_j-_m1;
55
56 assert(_kmin<=_kmax);
57
58 _coef=new double[(_kmax-_kmin)/2+1];
59
60 int k;
61
62 for(k=_kmin;k<=_kmax;k+=2){
63 int sign=1;
64 if ((k-_m2+_m1)%4!=0) sign=-sign;
65 //fkw change to satisfy KCC
66 double fkwTmp = fact((_j+_m2)/2)*fact((_j-_m2)/2)
67 *fact((_j+_m1)/2)*fact((_j-_m1)/2);
68 _coef[(k-_kmin)/2]=sign*sqrt(fkwTmp)/
69 (fact((_j+_m2-k)/2)*fact(k/2)*fact((_j-_m1-k)/2)*fact((k-_m2+_m1)/2));
70
71 //fkw _coef[(k-_kmin)/2]=sign*sqrt(fact((_j+_m2)/2)*fact((_j-_m2)/2)*
72 //fkw fact((_j+_m1)/2)*fact((_j-_m1)/2))/
73 //fkw (fact((_j+_m2-k)/2)*fact(k/2)*fact((_j-_m1-k)/2)*fact((k-_m2+_m1)/2));
74
75 //report(INFO,"EvtGen") << "k, coef:"<<k/2<<" "<<_coef[(k-_kmin)/2]<<endl;
76 }
77
78}
double abs(const EvtComplex &c)

Referenced by EvtdFunction::d().


The documentation for this class was generated from the following files: