00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "EvtGenBase/EvtPatches.hh"
00022 #include <stdlib.h>
00023 #include <math.h>
00024 #include <iostream>
00025 #include <assert.h>
00026 #include "EvtGenBase/EvtdFunction.hh"
00027 #include "EvtGenBase/EvtdFunctionSingle.hh"
00028
00029
00030 double EvtdFunction::d(int j,int m1,int m2, double theta){
00031
00032
00033 int m1p=m1;
00034 int m2p=m2;
00035
00036
00037 int signp=1;
00038
00039 if (abs(m2p)<abs(m1p)) {
00040 int tmp=m1p;
00041 m1p=m2p;
00042 m2p=tmp;
00043 if ((m1p-m2p)%4!=0) signp=-signp;
00044 }
00045
00046
00047 if (m2p<0) {
00048 m1p=-m1p;
00049 m2p=-m2p;
00050 if ((m1p-m2p)%4!=0) signp=-signp;
00051 }
00052
00053
00054 EvtdFunctionSingle df;
00055
00056 df.init(j,m1p,m2p);
00057
00058 double d=df.d(j,m1p,m2p,theta)*signp;
00059
00060 return d;
00061
00062 }
00063
00064
00065